Skip to main content
Upsonic

Upsonic Framework

Upsonic is a Python framework for building autonomous agents like OpenClaw and Claude Cowork, as well as traditional single-task agents and multi-agent teams. One unified API and pipeline covers every primitive you need, including agents, tools, memory, knowledge bases, teams, and deployment.

Install

uv pip install upsonic
# pip install upsonic

Configure API Keys

Put your provider keys in a .env file. Upsonic supports 30+ providers, including OpenAI, Anthropic, Google, Bedrock, Azure, Ollama, vLLM, Groq, and OpenRouter.
OPENAI_API_KEY=sk-***
See the full list in LLM Support.

Two ways to build

Upsonic gives you two agent primitives depending on the problem shape.

Autonomous Agent

For open-ended, multi-step work. The agent plans, executes shell and filesystem operations, and iterates inside a sandboxed workspace that blocks path traversal and dangerous commands.

Traditional Agent

For structured, tool-driven tasks with a defined input/output contract. Bring your own tools, response schemas, and run the agent over a Task.

Autonomous Agent

from upsonic import AutonomousAgent, Task

agent = AutonomousAgent(
    model="anthropic/claude-sonnet-4-5",
    workspace="/path/to/logs"
)

task = Task("Analyze server logs and detect anomaly patterns")

agent.print_do(task)
All file and shell operations are restricted to workspace. For isolated cloud execution, plug in an E2B sandbox.

Traditional Agent

from upsonic import Agent, Task
from upsonic.tools import tool

@tool
def sum_tool(a: float, b: float) -> float:
    """Add two numbers together."""
    return a + b

agent = Agent(model="anthropic/claude-sonnet-4-5", name="Calculator")
task = Task(description="Calculate 15 + 27", tools=[sum_tool])

agent.print_do(task)

Core building blocks

Prebuilt Autonomous Agents

Ready-to-run autonomous agents contributed by the community. Install and go.

Tools

Function tools with @tool, full MCP support, and ready-to-use integrations (Tavily, Firecrawl, E2B, YFinance, and more).

Memory

Conversation, focus, and summary memory with pluggable backends: SQLite, Postgres, Redis, Mongo, and Mem0.

Knowledge Base (RAG)

End-to-end RAG: document loaders, text splitters, 7+ embedding providers, and vector stores (Qdrant, Pinecone, Chroma, pgvector, Weaviate).

Teams

Coordinate multiple agents with Sequential, Coordinate, or Route modes.

Skills

Package reusable agent capabilities and load them from local paths, URLs, or GitHub.

OCR

Unified OCR interface across EasyOCR, Tesseract, PaddleOCR, DeepSeek, and more.

HITL

Human-in-the-loop for confirmations, user input, and durable execution pauses.

Tracing

First-class tracing with Langfuse and PromptLayer.

Safety Engine

Optional guardrails with prebuilt privacy, financial, security, and content policies.

Next steps

Quickstart

Run your first agent in under five minutes.

Framework 101

Seven short guides covering tasks, agents, tools, MCP, memory, and teams.

Examples

Real-world examples: DevOps bots, document analyzers, research agents, sales workflows.

IDE Integration

Add https://docs.upsonic.ai/llms-full.txt to Cursor, VSCode, or Windsurf.

Community

  • Discord: Chat with the team and other developers.
  • GitHub: Source, issues, and discussions.
  • Changelog: What shipped in each release.