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.
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
pip install orkestra-sdk # or use poetry
Create a client and an agent
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
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)
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, Workflows, Structured outputs, Conditional workflows, and Server.