๐ค AgentOS โ The Operating System for AI Workers
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
76f3e81b3d5b81bf209fb9b2643754b17208e2ee4d7dc5ebacfc64ab6a694832
|
|
| MD5 |
d7ea305db55162dbee93171f5679b580
|
|
| BLAKE2b-256 |
696ff1d6156a359cd57f856a571846903fdc44554e5dab4de8fa87b5b225c525
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bbe0560dbd85927b96eaec7279634d4bc40d0eb39c75c67ed7b0849cb15b547f
|
|
| MD5 |
4159462bf3150cff2f3b8159babab07d
|
|
| BLAKE2b-256 |
92ef0797c4e35417eb7c04013dbb32190814ac181e0a0bc1bbae19321f40787b
|