Skip to main content

๐Ÿค– AgentOS โ€” The Operating System for AI Workers

License Python

Build, deploy, and manage AI agents with 5 lines of code.

AgentOS is an open-source framework that makes it dead simple to create AI agents that can use tools, remember context, and work together in swarms. Think of it as the operating system for your AI workforce.

from agentos import Agent, tool

@tool
def search_web(query: str) -> str:
    """Search the web."""
    return f"Results for: {query}"

agent = Agent(
    name="Researcher",
    instructions="You are a helpful research assistant.",
    tools=[search_web],
)

result = agent.run("What's the latest in AI?")
print(result)

โœจ Why AgentOS?

Feature AgentOS LangChain CrewAI
Lines of code for a simple agent 5 30+ 20+
Built-in tools โœ… 7 tools โŒ โœ…
Multi-agent swarms โœ… Sequential + Parallel โŒ โœ…
Memory management โœ… Built-in Manual โœ…
API server โœ… FastAPI โŒ โŒ
CLI โœ… โŒ โŒ
Open source โœ… Apache 2.0 โœ… MIT โœ… MIT

๐Ÿš€ Quick Start

Installation

pip install agentos

Set your API key:

export OPENAI_API_KEY="sk-..."

Your First Agent

from agentos import Agent

agent = Agent(
    name="Helper",
    instructions="You are a helpful assistant. Be concise.",
)

result = agent.run("Explain AI agents in one sentence.")
print(result)

Agent with Tools

from agentos import Agent, tool

@tool
def get_weather(city: str) -> str:
    """Get current weather for a city."""
    return f"Sunny, 72ยฐF in {city}"

agent = Agent(
    name="WeatherBot",
    instructions="You help people check the weather.",
    tools=[get_weather],
)

result = agent.run("What's the weather in Tokyo?")

Multi-Agent Swarm

from agentos import Agent, Swarm

researcher = Agent(name="Researcher", instructions="Research topics thoroughly.",
                   tools=[web_search])
writer = Agent(name="Writer", instructions="Write clear reports.")

swarm = Swarm(agents=[researcher, writer])
outputs = swarm.run_sequential([
    ("Researcher", "Research AI trends in 2026"),
    ("Writer", "Write a report based on: {Researcher_output}"),
])

CLI

# Run a one-shot task
agentos run "What is 2+2?"

# Start interactive chat
agentos chat

# Run a multi-agent swarm
agentos swarm "Research and write a report" -c swarm_config.json

# Start the API server
agentos serve

API Server

agentos serve -p 8520

Then call the API:

curl -X POST http://localhost:8520/api/agents/run \
  -H "Content-Type: application/json" \
  -d '{"task": "Explain quantum computing in 2 sentences"}'

๐Ÿ› ๏ธ Built-in Tools

AgentOS comes with 7 production-ready tools:

Tool Description
read_file Read file contents
write_file Write content to files
list_directory List directory contents
run_shell Execute shell commands
web_fetch Fetch web page content
calculate Evaluate math expressions
current_time Get current date/time

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚            AgentOS Platform          โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚  CLI  โ”‚  Python SDK  โ”‚  REST API    โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚          Core Engine                 โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚  Agent  โ”‚  โ”‚   Orchestrator   โ”‚  โ”‚
โ”‚  โ”‚  (LLM)  โ”‚  โ”‚   (Swarm)        โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚  Tools  โ”‚  โ”‚    Memory        โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚  OpenAI โ”‚ Anthropic โ”‚ Local Models  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ—บ๏ธ Roadmap

  • Core Agent engine with tool calling
  • Multi-agent orchestration (Swarm)
  • CLI + REST API server
  • Built-in tools library
  • Web Dashboard (agent monitoring)
  • Memory persistence (SQLite/Postgres)
  • Streaming responses
  • Anthropic Claude support
  • Local model support (Ollama)
  • Agent marketplace
  • Enterprise SSO & RBAC

๐Ÿค Contributing

AgentOS is Apache 2.0 licensed. We welcome contributions!

git clone https://github.com/agentos-ai/agentos.git
cd agentos
pip install -e ".[dev]"
pytest

๐Ÿ“„ License

Apache 2.0 โ€” free for personal, academic, and commercial use.


Built with โค๏ธ by the AgentOS team. The OS for your AI workforce.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyagentos-0.1.0.tar.gz (18.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyagentos-0.1.0-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

Details for the file pyagentos-0.1.0.tar.gz.

File metadata

  • Download URL: pyagentos-0.1.0.tar.gz
  • Upload date:
  • Size: 18.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.15

File hashes

Hashes for pyagentos-0.1.0.tar.gz
Algorithm Hash digest
SHA256 76f3e81b3d5b81bf209fb9b2643754b17208e2ee4d7dc5ebacfc64ab6a694832
MD5 d7ea305db55162dbee93171f5679b580
BLAKE2b-256 696ff1d6156a359cd57f856a571846903fdc44554e5dab4de8fa87b5b225c525

See more details on using hashes here.

File details

Details for the file pyagentos-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pyagentos-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 19.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.15

File hashes

Hashes for pyagentos-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bbe0560dbd85927b96eaec7279634d4bc40d0eb39c75c67ed7b0849cb15b547f
MD5 4159462bf3150cff2f3b8159babab07d
BLAKE2b-256 92ef0797c4e35417eb7c04013dbb32190814ac181e0a0bc1bbae19321f40787b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page