# How to use Agno with Subconscious

> To use Agno with Subconscious, give your `Agent` an `OpenAILike` model with `id="subconscious/glm-5.3-marathon"`, `base_url="https://api.subconscious.dev/v1"` and your Subconscious API key. Agno sends every model call to the OpenAI-compatible Subconscious API.

Canonical page: https://www.subconscious.dev/agents/frameworks/agno
Category: [Frameworks](https://www.subconscious.dev/agents/frameworks)
Last verified: 2026-09-30
Agno: https://docs.agno.com
Source: https://github.com/agno-agi/agno

## Before you start

- Python 3.10+
- A Subconscious account and API key

## Set up Agno

### 1. Install Agno

Install the framework and its OpenAI-compatible client.

```bash
pip install -U agno openai
```

### 2. Create a Subconscious API key

Sign in at https://platform.subconscious.dev, create an API key, and export it so the tool can read it.

```bash
export SUBCONSCIOUS_API_KEY="your_key"
```

### 3. Point it at Subconscious

Use OpenAILike rather than OpenAIChat: OpenAIChat sends system prompts with the OpenAI-only developer role.

```python
import os
from agno.agent import Agent
from agno.models.openai.like import OpenAILike

agent = Agent(
    model=OpenAILike(
        id="subconscious/glm-5.3-marathon",
        api_key=os.environ["SUBCONSCIOUS_API_KEY"],
        base_url="https://api.subconscious.dev/v1",
    ),
    instructions="You are a concise assistant.",
)

agent.print_response("Share a 2 sentence horror story.")
```

### 4. Run it

Run the script.

```bash
python agent.py
```

## Connection details

- OpenAI-compatible base URL: https://api.subconscious.dev/v1
- Anthropic-compatible base URL: https://api.subconscious.dev
- API key: From subc login or the Subconscious dashboard
- Model: subconscious/glm-5.3-marathon
- Multimodal, high-throughput model: subconscious/deepseek-v4.1-flash-marathon

Full API reference: https://docs.subconscious.dev

## Frequently asked questions

### Which Subconscious model should I use with Agno?

Start with subconscious/glm-5.3-marathon, an open frontier coding model built for long agent runs. subconscious/deepseek-v4.1-flash-marathon is a cheaper, high-throughput alternative that also takes image input. Use the full model ID, including the subconscious/ prefix.

### Is Agno on Subconscious OpenAI- or Anthropic-compatible?

This guide connects Agno through the OpenAI-compatible Subconscious API. Subconscious serves both formats: OpenAI Chat Completions at https://api.subconscious.dev/v1 and Anthropic Messages at https://api.subconscious.dev.

### How is Agno usage on Subconscious billed?

Per token by default, with no commitment. Heavy users can switch to a monthly token plan: a fixed price for a large daily token allowance shared across your team.
