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

# Orkestra SDK Overview

Welcome to the Orkestra Python SDK. Build multi-agent workflows, chain logic with handlers, get structured outputs with Pydantic, and deploy workflows as API endpoints.

## Installation

```bash theme={null}
pip install orkestra-sdk  # or use poetry
```

## Create a client and an agent

```python theme={null}
from orkestra import Orkestra, LLMProvider

client = Orkestra()
agent = client.Agent(
  name="Summarizer",
  description="Summarizes text",
  model_provider="openai",
  model_name="gpt-3.5-turbo",
  api_secret="YOUR_OPENAI_API_KEY",
)
print(agent.generate("Summarize Orkestra in one sentence."))
```

## Build a workflow

```python theme={null}
researcher = client.Agent(
  name="Researcher",
  description="Gathers facts",
  model_provider="openai",
  model_name="gpt-4-turbo",
  api_secret="YOUR_OPENAI_API_KEY",
)

summarizer = client.Agent(
  name="Summarizer",
  description="Summarizes findings",
  model_provider="openai",
  model_name="gpt-3.5-turbo",
  api_secret="YOUR_OPENAI_API_KEY",
)

wf = client.Workflow().add(researcher).add(summarizer)
print(wf.run("Explain Retrieval-Augmented Generation in simple terms"))
```

## Deploy as an API (FastAPI + Swagger)

```python theme={null}
from orkestra import OrkestraServer
server = OrkestraServer(client)
server.add_workflow(
  endpoint_name="summarize",
  workflow=wf,
  summary="Summarize topic",
  description="Researches a topic then summarizes the findings.",
)
server.run()  # Visit /docs or /redoc
```

Continue with: [Agents](./agent), [Workflows](./workflow), [Structured outputs](./structured-outputs), [Conditional workflows](./conditional-workflows), and [Server](./server).
