> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xpander.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Frameworks

> Pick a framework and see what xpander wires up for you

Xpander supplies your agent's identity (instructions, tools, knowledge bases, memory, deployment target) and routes tasks to your handler.

The **framework** you choose is the library that runs the LLM loop in your process: the thing with an `Agent` class, a tool-calling interface, and an `arun()` method. xpander does not replace your framework. It plugs into it.

Selection lives in `xpander_config.json`, written by `xpander agent new`. The SDK reads `framework` from that file and wires up accordingly:

```json xpander_config.json theme={"dark"}
{
  "agent_id": "agt_01H...",
  "organization_id": "org_01H...",
  "api_key": "xpd_...",
  "framework": "agno"  // or: "open-ai-agents", "langchain", "strands-agents"
}
```

Right now, the SDK supports 4 frameworks:

<Columns cols={4}>
  <Tile href="/developers/frameworks/agno" title="Agno">
    <img src="https://mintcdn.com/xpanderai-099931d1/OGlJJ1lp1VY3af7I/images/guide/agno.png?fit=max&auto=format&n=OGlJJ1lp1VY3af7I&q=85&s=777935927ddc204caf7fad77433f5aaf" alt="Agno" width="75" data-path="images/guide/agno.png" />
  </Tile>

  <Tile href="/developers/frameworks/openai-agents" title="OpenAI Agents SDK">
    <img src="https://mintcdn.com/xpanderai-099931d1/spAT5oJqrBo38E7K/images/openai.png?fit=max&auto=format&n=spAT5oJqrBo38E7K&q=85&s=1d8abf07e6ed1ba394ff961b8328692c" alt="OpenAI Agents SDK" width="75" data-path="images/openai.png" />
  </Tile>

  <Tile href="/developers/frameworks/langchain" title="LangChain">
    <img src="https://mintcdn.com/xpanderai-099931d1/spAT5oJqrBo38E7K/images/guide/lang.png?fit=max&auto=format&n=spAT5oJqrBo38E7K&q=85&s=4bbf12ff55ea347ffe1ea566872c4e63" alt="LangChain + LangGraph" width="640" height="640" data-path="images/guide/lang.png" />
  </Tile>

  <Tile href="/developers/frameworks/aws-strands" title="AWS Strands">
    <img src="https://mintcdn.com/xpanderai-099931d1/spAT5oJqrBo38E7K/images/guide/strands.svg?fit=max&auto=format&n=spAT5oJqrBo38E7K&q=85&s=a0e7e76a85a6a47094eaa46c1e5edfd0" alt="AWS Strands" width="55" data-path="images/guide/strands.svg" />
  </Tile>
</Columns>

## Comparison

| Capability                                        | Agno                    | OpenAI Agents SDK                              | LangChain                                 | AWS Strands                               |
| ------------------------------------------------- | ----------------------- | ---------------------------------------------- | ----------------------------------------- | ----------------------------------------- |
| Pre-built connectors (2,000+)                     | Auto-included           | `agent.openai_agents_sdk_tools`                | `agent.tools.functions`                   | `agent.strands_tools`                     |
| Custom `@register_tool` functions                 | Auto-included           | Auto-included                                  | Auto-included                             | Auto-included                             |
| Instructions (role, goal, general)                | Auto-attached           | `agent.instructions.full`                      | `agent.instructions.full`                 | `agent.instructions.full`                 |
| Model + provider credentials                      | Auto-attached           | `agent.model_name` (you build the client)      | `agent.model_name` (you build the client) | `agent.model_name` (you build the client) |
| Knowledge-base retriever                          | Auto-attached           | Manual via `agent.knowledge_bases_retriever()` | Manual                                    | Manual                                    |
| Session storage (Postgres)                        | Auto-wired              | Manual                                         | Manual                                    | Manual                                    |
| User and agent memory                             | Auto-wired              | Manual                                         | Manual                                    | Manual                                    |
| Context optimization (toon encoding, compaction)  | Auto-wired              | Not available                                  | Not available                             | Not available                             |
| Guardrails (PII, prompt injection, moderation)    | Auto-wired              | Manual                                         | Manual                                    | Manual                                    |
| Multi-agent teams                                 | Auto-wired (`AgnoTeam`) | Manual                                         | Manual                                    | Manual                                    |
| Session helpers (`agent.get_user_sessions`, etc.) | Yes                     | Raises `NotImplementedError`                   | Raises `NotImplementedError`              | Raises `NotImplementedError`              |

A few takeaways worth calling out:

* **Agno is the only path with automatic wiring.** `Backend.aget_args()` dispatches on `agent.framework`. On the other three, you load the agent through `Agents().aget(...)` and read fields off it yourself.
* **Pre-built connectors and custom `@register_tool` functions reach every framework.** What changes is the property name you read them from: `agent.tools.functions` for LangChain, `agent.openai_agents_sdk_tools` for the OpenAI Agents SDK, `agent.strands_tools` for AWS Strands.
* **Memory, knowledge retrieval, and guardrails are Agno-only auto-wired.** On other frameworks, xpander gives you the data (`agent.knowledge_bases_retriever()`, session metadata, the agent's memory config) but your code is responsible for plugging it into the framework.
* **Agno-exclusive features**: context optimization (toon encoding, runtime compaction), `AgnoTeam`-based multi-agent coordination, and the session helpers (`agent.get_user_sessions`, `agent.get_session`, `agent.delete_session`, which raise `NotImplementedError` outside Agno).

See the framework's dedicated page for the full guide.

## How to choose

Default to Agno unless you have a reason not to. Pick a non-Agno framework when:

* **Existing investment.** Your team already builds on it and switching cost is real. Example: a LangGraph workflow that's been in production for six months.
* **Framework-specific feature.** You need something Agno doesn't have. Example: LangGraph's stateful multi-step workflows, the OpenAI Agents SDK's `Runner` ergonomics, Strands' AWS-native primitives.
* **Embedded in an existing app.** You're adding xpander tools to a service that already runs one of these frameworks. Example: a FastAPI worker that already imports `agents.Runner`.

You're not locked in. The agent's identity lives in xpander's control plane, so you can swap frameworks later by editing `framework` in `xpander_config.json` and rewriting your handler.

## Next steps

<CardGroup cols={2}>
  <Card title="Agno" icon="cube" href="/developers/frameworks/agno">
    The recommended path. What `Backend.aget_args()` actually wires up.
  </Card>

  <Card title="OpenAI Agents SDK" icon="o" href="/developers/frameworks/openai-agents">
    Manual wiring with `agent.openai_agents_sdk_tools`.
  </Card>

  <Card title="LangChain + LangGraph" icon="link" href="/developers/frameworks/langchain">
    Manual wiring with `agent.tools.functions` and `create_react_agent`.
  </Card>

  <Card title="AWS Strands" icon="aws" href="/developers/frameworks/aws-strands">
    Manual wiring with `agent.strands_tools` on AWS-native orchestration.
  </Card>

  <Card title="Core Concepts" icon="lightbulb" href="/developers/core-concepts">
    The SDK class names mapped onto agents, tasks, threads, tools, and memory.
  </Card>

  <Card title="Quickstart" icon="rocket" href="/developers/quickstart">
    10-minute scaffold-to-deploy walkthrough on the default Agno path.
  </Card>
</CardGroup>
