Skip to main content

OSymandias

Multi-agent runtime for Python developers. One command to start everything.

PyPI Python License Status

Full documentation → GitHub


What is this?

OSymandias is a Python library and CLI that turns your project into a full multi-agent runtime.

pip install osymandias
osy init
osy serve

PostgreSQL, Redis, RabbitMQ, Qdrant — managed internally via Docker. Dashboard at localhost:47759. Four Celery workers ready.


Quick start

Prerequisites: Python 3.11+, Docker

pip install osymandias

# Generate OSY.compose.yml + OSY.nginx.conf + .env + sample osy_tools.py
osy init

# Start everything
osy serve

Open http://localhost:47759 — dashboard. API directly at http://localhost:47760/api/v1.

osy stop    # pause containers, keep data
osy down    # remove containers, keep volumes
osy delete  # remove containers + volumes (asks for confirmation)
osy logs <job-id> -f  # live-stream events

Built-in tool functions (@osy.tool)

from osymandias import osy

@osy.tool
def fetch_competitor_data(company: str, metrics: list[str]) -> dict:
    """Fetch competitor metrics from internal database."""
    return {"company": company, "data": [...]}

Schema inferred from type hints. osy serve scans all .py files automatically — no YAML, no config files.


External agents (@osy.agent)

Register any Python callable — LangChain chain, CrewAI crew, LlamaIndex query engine, or plain Python — as an OSymandias agent:

from osymandias import osy, OsyContext

@osy.agent("ResearchAgent", framework="langchain",
           description="Searches and summarises web content")
def research_agent(task: str, ctx: OsyContext) -> dict:
    chain = build_langchain_chain()
    ctx.emit_event("TASK_PROGRESS", {"step": "running chain"})
    return {"summary": chain.invoke(task)}

Works with any framework: LangChain, CrewAI, LlamaIndex, Smolagents, OpenAI Agents SDK, plain Python.


OsyContext

Every @osy.agent function optionally receives an OsyContext as its ctx parameter:

@osy.agent("OrchestratorAgent")
def orchestrate(task: str, ctx: OsyContext) -> dict:

    # shared memory — any agent in the same job can read/write
    ctx.write_memory("plan", {"step": 1, "goal": task})

    # live events — streamed to the dashboard
    ctx.emit_event("TASK_PROGRESS", {"pct": 50})

    # sub-tasks — spawn child tasks and wait for results
    task_ids = ctx.spawn_tasks([
        {"title": "Research", "agent_type": "ResearchAgent", "description": task},
        {"title": "Analyse",  "agent_type": "AnalystAgent",  "description": task},
    ])
    return {"merged": ctx.wait_for_tasks(task_ids)}
Method Description
ctx.write_memory(key, value) Write to shared job memory
ctx.read_memory(key) Read from shared job memory
ctx.emit_event(type, payload) Stream event to dashboard live feed
ctx.spawn_tasks(list) Spawn sub-tasks in parallel
ctx.wait_for_tasks(ids) Block until all sub-tasks complete

Supported LLM providers

OpenAI · Anthropic · DeepSeek · Groq · Gemini · Ollama (local)

Switch models per-agent from the dashboard — no restart required.


How it works

Job        →  A user-submitted goal
  └── Task ×N  →  Subtask assigned to a specific agent type
        └── AgentInstance  →  A running agent loop (LLM + tools + memory)
              ├── ToolCall  →  web_search / @osy.tool / webhook / ...
              └── Sub-task  →  ctx.spawn_tasks([...]) → child Task ×N

Jobs are decomposed by a built-in PlannerAgent that sees all registered agents and routes tasks optimally. Tasks execute in parallel across specialized agents.


Full documentation → GitHub


Built with FastAPI · Celery · PostgreSQL · Redis · RabbitMQ · Qdrant · LiteLLM · Next.js

Release files for osymandias 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for osymandias 1.1.1
File Size Uploaded
osymandias-1.1.1.tar.gz 889.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for osymandias 1.1.1
File Interpreter ABI Platform
osymandias-1.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 1.9 MB

Release files / osymandias-1.1.1.tar.gz

Download URL osymandias-1.1.1.tar.gz
Size 889.9 kB
Tags Source
SHA-256 checksum
How to use checksums
f7d87f046c979ad59831852696d6675319101a9aed62e8b88ad6cfdacd71bc19
BLAKE2b-256 checksum
How to use checksums
6c07f8a67e554ca99365a9aef62167b7191340e6c2ee4be90cfab6c414a0038f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / osymandias-1.1.1-py3-none-any.whl

Download URL osymandias-1.1.1-py3-none-any.whl
Size 1.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
98f32c39ea45fc186ba570fbb95fe7b494d1b84f9066f30e03c864d5482c7ffe
BLAKE2b-256 checksum
How to use checksums
6563fa2704cb4b74e0aaaff3a90d849e97718c54fff05da1fc1f04f63620c5c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release history Release notifications | RSS feed

This release

1.1.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page