Skip to main content

The open-source platform for AI agents. Write logic, deploy everything.

Project description


 ██╗    ██╗ █████╗ ██████╗ ██████╗  ██████╗ ███████╗
 ██║    ██║██╔══██╗██╔══██╗██╔══██╗██╔═══██╗██╔════╝
 ██║ █╗ ██║███████║██████╔╝██████╔╝██║   ██║███████╗
 ██║███╗██║██╔══██║██╔══██╗██╔══██╗██║   ██║╚════██║
 ╚███╔███╔╝██║  ██║██║  ██║██████╔╝╚██████╔╝███████║
  ╚══╝╚══╝ ╚═╝  ╚═╝╚═╝  ╚═╝╚═════╝  ╚═════╝ ╚══════╝

The open-source platform for AI agents.

Write logic, deploy everything.

PyPI Version Python License: MIT GitHub Stars

Website · Docs · PyPI · Examples


What is WarpOS?

WarpOS is a lightweight framework for building AI agents that actually work in production. It handles the messy parts — provider routing, tool orchestration, memory management, and server deployment — so you can focus on writing agent logic.

Ship a working agent in minutes, not days.

from warpos import Agent, tool

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

agent = Agent(
    name="WeatherBot",
    model="gpt-4o",
    tools=[get_weather],
    instructions="You are a helpful weather assistant.",
)

response = agent.run("What's the weather in San Francisco?")
print(response)

Quick Start

pip install warpos

Set your API key:

export OPENAI_API_KEY=sk-...

Run your first agent:

from warpos import Agent

agent = Agent(name="MyAgent", model="gpt-4o")
print(agent.run("Hello! What can you do?"))

Or serve with a chat UI:

warp init my-agent
cd my-agent
warp serve
# → http://localhost:3000

Features

  • Multi-provider — OpenAI, Anthropic, Groq, DeepSeek, Ollama, Cerebras
  • Tool calling — Decorate any Python function with @tool
  • Memory — Built-in persistent conversation memory (SQLite + FTS5)
  • Chat UI — Auto-generated WebSocket chat interface
  • CLIwarp init scaffolds, warp serve deploys
  • Type-safe — Full type hints, Pydantic support
  • Lightweight — Minimal dependencies, fast startup

Providers

Swap providers with one line:

agent = Agent(name="Bot", provider="openai", model="gpt-4o")
agent = Agent(name="Bot", provider="anthropic", model="claude-sonnet-4-20250514")
agent = Agent(name="Bot", provider="groq", model="llama3-70b-8192")
agent = Agent(name="Bot", provider="ollama", model="llama3")
Provider Env Variable Base URL
OpenAI OPENAI_API_KEY api.openai.com
Anthropic ANTHROPIC_API_KEY api.anthropic.com
Groq GROQ_API_KEY api.groq.com
DeepSeek DEEPSEEK_API_KEY api.deepseek.com
Cerebras CEREBRAS_API_KEY api.cerebras.ai
Ollama localhost:11434

CLI

warp init my-agent     # scaffold a new project
warp serve agent.py    # serve with chat UI on :3000
warp serve -p 8080     # custom port

Architecture

┌─────────────────────────────────────────────┐
│                   Agent                      │
│  ┌──────────┐  ┌──────────┐  ┌──────────┐  │
│  │  Memory   │  │  Tools   │  │ Provider │  │
│  └──────────┘  └──────────┘  └──────────┘  │
└─────────────────────────────────────────────┘
                      │
               ┌──────┴──────┐
               │   Server    │
               │  (FastAPI)  │
               └─────────────┘
  • Agent — Orchestrates context, tools, and provider calls
  • Tools — Python functions exposed via @tool decorator
  • Memory — SQLite + FTS5 persistent conversation storage
  • Provider — Unified LLM routing with OpenAI/Anthropic compatibility
  • Server — FastAPI + WebSocket with auto-generated chat UI

Examples


Contributing

git clone https://github.com/warp-os/warpos.git
cd warpos
pip install -e ".[dev]"
pytest

See CONTRIBUTING.md for details.


License

MIT — see LICENSE.


Project details


Download files

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

Source Distribution

warpos-0.1.1.tar.gz (25.9 kB view details)

Uploaded Source

Built Distribution

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

warpos-0.1.1-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

File details

Details for the file warpos-0.1.1.tar.gz.

File metadata

  • Download URL: warpos-0.1.1.tar.gz
  • Upload date:
  • Size: 25.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for warpos-0.1.1.tar.gz
Algorithm Hash digest
SHA256 71a6f91b97c23fb681a20df768415434df26d35b4a13b93fed5b0bb77169085d
MD5 7d71f12ca1e803d26d060ca69cfb2eb8
BLAKE2b-256 d5cb9e601e41f1366120f71950b23f1776587ba55a67f4a0162b1e0fbea9d451

See more details on using hashes here.

File details

Details for the file warpos-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: warpos-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 16.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for warpos-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 13c61ab41ea97afce4e9e49163ab29a91abf92a223f0d4e6a3de7909d1fb4a36
MD5 15010432ebde352371fc9dd756f138af
BLAKE2b-256 6a6101fbd83394c2470ca127a0781c912a2f15b0e3cb0e4d53f0c158c5653735

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