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

# Framework examples

> Complete, tested agents built with CrewAI, MCP, Open WebUI, Upsonic, LangGraph, LangChain, the OpenAI Agents SDK, Agno, Pydantic AI, LlamaIndex, Google ADK, the Vercel AI SDK and Mastra.

AgentOS runs agents written with any framework. Each page in this section is a complete bundle — `agentos.yaml`, `Dockerfile` and code — that you can zip and deploy as it is. Every one was built and checked with the [conformance kit](https://docs.upsonic.ai/agentos/build/conformance.md) against the versions named on its page.

## Bringing an existing agent

Your agent's code stays as it is. Three changes connect it to AgentOS:

**1. Serve the contract**

Wrap the agent's entry point in a handler that answers `POST /invoke` and `GET /health`. With the [SDKs](https://docs.upsonic.ai/agentos/build/sdks.md) this is a few lines: a function per capability, passed to `serve`.

**2. Send model calls to the gateway**

Point the framework's OpenAI-compatible client at `inv.llm.base_url` with the run token header (`inv.llm.headers`), and use the model names from `config.models` in `agentos.yaml`. Usage, cost, guardrails and model changes then work without touching your code again. See [Calling models](https://docs.upsonic.ai/agentos/build/models.md).

**3. Declare what it needs**

List its capabilities with input and output schemas, its secrets, and the hosts it calls (`network.allow`) in [agentos.yaml](https://docs.upsonic.ai/agentos/build/agentos-yaml.md). Then zip and [deploy](https://docs.upsonic.ai/agentos/platform/deploying.md).

When the framework can pause for a person, the run is held and the decision arrives in the Review queue. The pages show how each framework's pause becomes an AgentOS [approval](https://docs.upsonic.ai/agentos/build/human-approvals.md).

## Examples

| Framework | Language | Model through the gateway | Asks a person with |
| - | - | - | - |
| [CrewAI](https://docs.upsonic.ai/agentos/frameworks/crewai.md) | Python | `LLM(provider="openai", base_url=…, default_headers=…)` | a Flow step and `inv.ask` (a Crew can't pause) |
| [MCP](https://docs.upsonic.ai/agentos/frameworks/mcp.md) | Python | `inv.llm` tool loop over the MCP servers' tools | `inv.ask` before a risky tool call |
| [Open WebUI](https://docs.upsonic.ai/agentos/frameworks/open-webui.md) | Python | the agent runs on AgentOS; Open WebUI calls it through a Pipe | the Review queue (the chat shows the run is waiting) |
| [Upsonic](https://docs.upsonic.ai/agentos/frameworks/upsonic.md) | Python | `OpenAIChatModel` with an `OpenAIProvider` on the gateway | an external-execution tool, continued with `continue_run_async` |
| [LangGraph](https://docs.upsonic.ai/agentos/frameworks/langgraph.md) | Python | `ChatOpenAI` on the gateway | `interrupt()`, through the LangGraph adapter |
| [LangChain](https://docs.upsonic.ai/agentos/frameworks/langchain.md) | Python | `ChatOpenAI` on the gateway | `interrupt()` in a `create_agent` tool, through the LangGraph adapter |
| [OpenAI Agents SDK](https://docs.upsonic.ai/agentos/frameworks/openai-agents.md) | Python | the adapter's model helper (chat completions) | `needs_approval=True`, through the adapter |
| [Agno](https://docs.upsonic.ai/agentos/frameworks/agno.md) | Python | the adapter's model helper | `requires_confirmation=True`, through the adapter |
| [Pydantic AI](https://docs.upsonic.ai/agentos/frameworks/pydantic-ai.md) | Python | `OpenAIChatModel` with an `OpenAIProvider` on the gateway | `requires_approval=True`, continued with deferred tool results |
| [LlamaIndex](https://docs.upsonic.ai/agentos/frameworks/llamaindex.md) | Python | `OpenAILike` on the gateway | `ctx.wait_for_event` in a `FunctionAgent` tool |
| [Google ADK](https://docs.upsonic.ai/agentos/frameworks/google-adk.md) | Python | `LiteLlm` on the gateway | `inv.ask` before money moves |
| [Vercel AI SDK](https://docs.upsonic.ai/agentos/frameworks/vercel-ai-sdk.md) | TypeScript | `agentosModel(inv)` | tool approval, through the adapter |
| [Mastra](https://docs.upsonic.ai/agentos/frameworks/mastra.md) | TypeScript | a Mastra `Agent` with `agentosModel(inv)` | a workflow step's `suspend()`, through the adapter |
| [OpenAI Agents SDK (JS)](https://docs.upsonic.ai/agentos/frameworks/openai-agents-js.md) | TypeScript | an `OpenAI` client on the gateway (chat completions) | `needsApproval`, mapped to `inv.ask` |

> [!TIP]
>
> Keep code that runs before an ask idempotent: on the resume, the handler runs again from the top. Key side effects by `run_id` and a step name. See [Human approvals](https://docs.upsonic.ai/agentos/build/human-approvals.md).

## Framework not listed?

Anything that can serve HTTP and call an OpenAI-compatible endpoint works, in any language. Follow the [agent contract](https://docs.upsonic.ai/agentos/build/agent-contract.md) directly, or use the [SDKs](https://docs.upsonic.ai/agentos/build/sdks.md) and their [framework adapters](https://docs.upsonic.ai/agentos/build/frameworks.md), then check it with the [conformance kit](https://docs.upsonic.ai/agentos/build/conformance.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.