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

# Agent Framework

> Run desktop chat turns through CrewAI, AutoGen, LangGraph and other adapters

Pick which framework runs a chat turn — PraisonAI is built in, and installing `praisonai-frameworks` adds CrewAI, AutoGen, LangGraph, Agno, Google ADK, OpenAI Agents SDK and Pydantic AI.

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonaiagents import Agent

agent = Agent(
    name="Assistant",
    instructions="You are a helpful assistant.",
)
# The desktop app is a thin shell around this agent. Selecting a non-default
# framework in Settings routes the same turn through that framework instead.
agent.start("Summarize this file")
```

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
graph LR
    Turn[💬 Chat turn] --> Selector{🎚️ Framework<br/>selector}
    Selector --> PA[🤖 PraisonAI]
    Selector --> CW[🤖 CrewAI]
    Selector --> AG[🤖 AutoGen]
    Selector --> LG[🤖 LangGraph]
    Selector --> More[🤖 …]
    PA --> Reply[📩 Reply]
    CW --> Reply
    AG --> Reply
    LG --> Reply
    More --> Reply

    classDef turn fill:#6366F1,stroke:#7C90A0,color:#fff
    classDef sel fill:#189AB4,stroke:#7C90A0,color:#fff
    classDef adapter fill:#F59E0B,stroke:#7C90A0,color:#fff
    classDef out fill:#10B981,stroke:#7C90A0,color:#fff

    class Turn turn
    class Selector sel
    class PA,CW,AG,LG,More adapter
    class Reply out
```

The default `framework = "praisonai"` runs the built-in agent. Any other name routes the turn through that framework's adapter, discovered by the `praisonai-frameworks` extras package.

## Quick Start

**1. Keep the default**

Do nothing. `framework` defaults to `"praisonai"`, so every turn runs the built-in agent with no extra install.

**2. Install the extras**

Add the framework you want as an extra of `praisonai-frameworks`:

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
pip install "praisonai-frameworks[crewai]"
```

The other extras are `autogen`, `langgraph`, `agno`, `google-adk`, `openai-agents`, and `pydantic-ai`.

**3. Set the setting**

Open **Settings → Models → Agent framework**, type the framework name (for example `crewai`), and restart the app. The field is marked **Requires restart**, so the engine picks it up on the next launch.

***

## How It Works

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
graph LR
    Cfg[⚙️ framework setting] --> Gen[🧬 AgentsGenerator]
    Gen --> YAML[📄 one-agent YAML]
    YAML --> Adapter[🤖 Framework adapter]
    Adapter --> Whole[📩 Whole reply]

    classDef cfg fill:#6366F1,stroke:#7C90A0,color:#fff
    classDef mid fill:#189AB4,stroke:#7C90A0,color:#fff
    classDef doc fill:#F59E0B,stroke:#7C90A0,color:#fff
    classDef out fill:#10B981,stroke:#7C90A0,color:#fff

    class Cfg cfg
    class Gen,YAML mid
    class Adapter doc
    class Whole out
```

A non-default framework routes through `praisonai.agents_generator.AgentsGenerator` with a generated one-agent YAML — the chat turn is expressed as a single agent, single task config. Because that path returns the finished result rather than a token stream, **streaming is not available for these frameworks**: the reply arrives whole. The exact contract lives in `run_with_framework` and `_framework_yaml` in the engine's `server.py`.

***

## Availability & Install Hints

`GET /frameworks` reports this same list at runtime — `available` names what this install can run, and `hints` gives the install command for the rest.

| Framework | Install hint |
| - | - |
| `praisonai` | *(built in — always available)* |
| `crewai` | `pip install "praisonai-frameworks[crewai]"` |
| `autogen` | `pip install "praisonai-frameworks[autogen]"` |
| `langgraph` | `pip install "praisonai-frameworks[langgraph]"` |
| `agno` | `pip install "praisonai-frameworks[agno]"` |
| `google-adk` | `pip install "praisonai-frameworks[google-adk]"` |
| `openai-agents` | `pip install "praisonai-frameworks[openai-agents]"` |
| `pydantic-ai` | `pip install "praisonai-frameworks[pydantic-ai]"` |

***

## Refusal Behaviour

> [!WARNING]
>
> A framework that is not installed is **refused with its install command**, not silently swapped for the built-in. Selecting `crewai` without the extra installed makes the turn raise a `RuntimeError` whose message names `praisonai-frameworks` and how to obtain it — the setting never quietly falls back to `praisonai`. A silent fallback is what makes a setting look effective while changing nothing, so the engine refuses instead.

***

## Best Practices

> [accordion] Install one framework at a time
>
> The extras are heavy — each pulls its own dependency tree. Install only the framework you intend to use rather than every extra at once.

> [accordion] Restart after changing the framework
>
> The `framework` field is `requiresRestart: true`. Relaunch the app after changing it so the engine loads the selected adapter.

> [accordion] Streaming behaviour changes for non-default frameworks
>
> The reply arrives whole for any framework other than `praisonai`. The streaming toggle has no effect on those turns — expect the answer to appear at once rather than token by token.

***

## Related

> [card] [Settings Reference](https://praison.ai/docs/features/desktop/settings.md)
>
> The `framework` row and every other Models field

> [card] [PraisonAI Agents](https://praison.ai/docs/framework/praisonaiagents.md)
>
> What the built-in framework does

> [card] [CrewAI](https://praison.ai/docs/framework/crewai.md)
>
> Role-based multi-agent crews

> [card] [LangGraph](https://praison.ai/docs/framework/langgraph.md)
>
> Graph-structured agent workflows


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