Skip to main content

project logo

Fastest way to build and deploy long-running AI agents—with durability, observability, and security.

Docs | Examples

Features

Feature Description Docs
🚀 MCP & tool security The only full FastAPI compatible MCP Server with decorator API Link
🦾 Agent-to-agent Multi-agent communication Link
📊 Observability Agent tracing and monitoring Link
💾 Durable runs Persist, resume, and fork agent runs Durable runs docs
🔍 Tool Search API Reduced tool context bloat Link

🚅 Quick Start

Installation

The recommended method of installing agentor is with pip from PyPI.

pip install agentor

This installs the v0.1.0 line, built on Agentor's own agent engine — durable, forkable runs included.

Tools with heavy or vendor-specific dependencies ship as extras, so the base install stays small:

pip install "agentor[google]"   # GmailTool, CalendarTool
pip install "agentor[all]"      # every optional tool

Available extras: google, exa, git, github, slack, postgres, scrapegraph, all.

More ways...

You can also install the latest bleeding edge version (could be unstable) of agentor, should you feel motivated enough, as follows:

pip install git+https://github.com/celestoai/agentor@main

Build and Serve an Agent

Build an Agent, connect external tools or MCP Server and serve as an API in just a few lines of code:

from agentor.tools import GetWeatherTool
from agentor import Agentor

agent = Agentor(
    name="Weather Agent",
    model="gpt-5-mini",  # Use any LLM provider - gemini/gemini-2.5-pro or anthropic/claude-3.5
    tools=[GetWeatherTool()]
)
result = agent.run("What is the weather in London?")  # Run the Agent
print(result)

# Serve Agent with a single line of code
agent.serve()

Any OpenAI-compatible provider

Point base_url at any provider that speaks OpenAI's /chat/completions — OpenRouter, Groq, Together, Fireworks, DeepSeek, vLLM, Ollama, or Anthropic's and Gemini's compatible endpoints — with no extra dependency:

agent = Agentor(
    name="Assistant",
    model="openrouter/auto",
    base_url="https://openrouter.ai/api/v1",
    api_key=os.environ["OPENROUTER_API_KEY"],
)

Run the following command to query the Agent server:

curl -X 'POST' \
  'http://localhost:8000/chat' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "input": "What is the weather in London?"
}'

agent.serve() gives you an ordinary ASGI app, so host it wherever you already run Python services.

Durable Runs

Give the agent a store and every run becomes an append-only event log that survives process death. Resume an interrupted run, or fork any persisted run — even a completed one — into a new, independent run that keeps the full trace, the model's reasoning included when the provider returns it:

from agentor import Agentor
from agentor.engine.store import FileStore

agent = Agentor(name="Assistant", model="gpt-5-mini", store=FileStore("runs"))

result = agent.run("Draft a launch plan")   # persisted under result.run_id
# Interrupted mid-run? agent.resume(result.run_id) picks up where it left off.

fork = agent.fork(result.run_id, "Make it punchier")  # fork.run_id is a new run; parent untouched

fork and resume have async twins, afork and aresume.

Tracing

Tracing is off unless you ask for it. A trace carries prompts, tool arguments, tool results, and the model's reasoning when a provider returns it — so nothing leaves your process by default.

Turn it on for an agent:

agent = Agentor(name="Assistant", enable_tracing=True)   # needs CELESTO_API_KEY

Or decide per run:

agent.run("public question")
agent.run("contains customer data", tracing=False)  # this run sends nothing
agent.run("debug this", tracing=True)               # trace just this one

tracing= is accepted by run, arun, chat and stream_chat. View traces at celesto.ai/observe.

Agent Skills

Skills are folders of instructions, scripts, and resources that Claude loads dynamically to improve performance on specialized tasks.

Agent Skills help agents pull just the right context from simple Markdown files. The agent first sees only a skill’s name and short description. When the task matches, it loads the rest of SKILL.md, follows the steps, and can call a shell environment to run the commands the skill points to.

  • Starts light: discover skills by name/description only
  • Loads on demand: pull full instructions from SKILL.md when relevant
  • Executes safely: run skill-driven commands in an isolated shell

Skill layout example:

example-skill/
├── SKILL.md        # required instructions + metadata
├── scripts/        # optional helpers the agent can call
├── assets/         # optional templates/resources
└── references/     # optional docs or checklists

Using a skill to create a GIF:

from agentor.tools import ShellTool
from agentor import Agentor

agent = Agentor(
    name="Assistant",
    model="gemini/gemini-3-flash-preview",
    instructions="Your job is to create GIFs. Lean on the shell tool and any available skills.",
    skills=[".skills/slack-gif-creator"],
    tools=[ShellTool()],
)

async for chunk in await agent.chat("produce a cat gif", stream=True):
    print(chunk)

Create an Agent from Markdown

Bootstrap an Agent directly from a markdown file with metadata for name, tools, model, and temperature:

---
name: WeatherBot
tools: [get_weather]
model: gpt-4o-mini
temperature: 0.3
---
You are a concise weather assistant.

Load it with:

from agentor import Agentor

agent = Agentor.from_md("agent.md")
result = agent.run("Weather in Paris?")

Build a custom MCP Server with LiteMCP

Agentor enables you to build a custom MCP Server using LiteMCP. You can run it inside a FastAPI application or as a standalone MCP server.

from agentor.mcp import LiteMCP, get_token

mcp = LiteMCP(name="my-server", version="1.0.0")

@mcp.tool(description="Get weather for a given location")
def get_weather(location: str) -> str:

    # *********** Control authentication ***********
    token = get_token()
    if token != "SOME_SECRET":
        return "Not authorized"

    return f"Weather in {location}: Sunny, 72°F"

mcp.serve()

LiteMCP vs FastMCP

Key Difference: LiteMCP is a native ASGI app that integrates directly with FastAPI using standard patterns. FastMCP requires mounting as a sub-application, diverging from standard FastAPI primitives.

Feature LiteMCP FastMCP
Integration Native ASGI Requires mounting
FastAPI Patterns ✅ Standard ⚠️ Diverges
Built-in CORS ✅ ❌
Custom Methods ✅ Full ⚠️ Limited
With Existing Backend ✅ Easy ⚠️ Complex

📖 Learn more

Agent-to-Agent (A2A) Protocol

The A2A Protocol defines standard specifications for agent communication and message formatting, enabling seamless interoperability between different AI agents.

Key Features:

  • Standard Communication: JSON-RPC based messaging with support for both streaming and non-streaming responses
  • Agent Discovery: Automatic agent card generation at /.well-known/agent-card.json describing agent capabilities, skills, and endpoints
  • Rich Interactions: Built-in support for tasks, status updates, and artifact sharing between agents

Agentor makes it easy to serve any agent as an A2A protocol.

from agentor import Agentor

agent = Agentor(
    name="Weather Agent",
    model="gpt-5-mini",
    tools=["get_weather"],
)

# Serve agent with A2A protocol enabled automatically
agent.serve(port=8000)
# Agent card available at: http://localhost:8000/.well-known/agent-card.json

Any agent served with agent.serve() automatically becomes A2A-compatible with standardized endpoints for message sending, streaming, and task management.

📖 Learn more

🤝 Contributing

We'd love your help making Agentor even better! Please read our Contributing Guidelines and Code of Conduct.

📄 License

Apache 2.0 License - see LICENSE for details.


Built with 🧡 in London by Celesto AI

Release files for agentor 0.1.0

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

Source distribution (sdist)

Source distribution for agentor 0.1.0
File Size Uploaded
agentor-0.1.0.tar.gz 139.1 kB Details

Built distribution (wheel)

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

Total release size: 226.9 kB

Release files / agentor-0.1.0.tar.gz

Download URL agentor-0.1.0.tar.gz
Size 139.1 kB
Tags Source
SHA-256 checksum
How to use checksums
1c3a05d640978326688ec2072c829f6201ce3d4cbfac23713f5f707b126d8383
BLAKE2b-256 checksum
How to use checksums
753049f27174df78d1a8897a7fdf2e72efc6ce1ed38f9a720f695b77e59a6a24
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 25, 2026.

Transparency log

Release files / agentor-0.1.0-py3-none-any.whl

Download URL agentor-0.1.0-py3-none-any.whl
Size 87.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7bcc683f46cbd0d2fecb1372ee755936f51767e95eeb17cc6689b5520999b5ab
BLAKE2b-256 checksum
How to use checksums
9bcbbaec690fd13428e2499956d54ff103ab41791d00abd533c3d9e62bcc2974
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 25, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

0.0.23

2 release files

0.0.22

2 release files

0.0.20

2 release files

0.0.18

2 release files

0.0.17

2 release files

0.0.16

2 release files

0.0.15

2 release files

0.0.14

2 release files

0.0.13

2 release files

0.0.12

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

0.0.0

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