Skip to main content
cubeloop · v0.14.1

CubeLoopA Pythonic, async-native agent framework.

CubeLoop is a Pythonic, async-native agent framework designed for high performance, readability, and production-grade persistence. It provides a leaner alternative to graph-based agent runtimes by modeling agent logic as a linear while loop that developers can easily trace and debug.

CubeLoop powers CubePlex, a cloud-native platform for managed agents in team workspaces — skills, shared memory, MCP tools, persistent sandboxes, governed access, and self-hosted deploy on Docker Compose or Kubernetes.

Quick Start →G Q

Why CubeLoop — a langgraph and pi-agent-core alternative

langgraphCubeLoop
AbstractionGraph nodes + edges + channelsPlain async functions — run_agent_loop is a while loop
StreamingCallback-based, multiple handler typesasync for event in stream — one pattern everywhere
CheckpointingFull snapshot per step; serializes entire message listAppend-only — O(1) DB I/O regardless of conversation length
Dependencieslangchain-core, langgraph-sdk, and transitive deps3 core deps: pydantic, anthropic, openai
Tool executionTools are graph nodes with manual wiringDeclare tools as functions; framework routes and parallelizes
Multi-providerVia langchain chat model adaptersNative Provider protocol — Anthropic, OpenAI built in
MiddlewareGraph-level middleware on node entry/exit8 typed hooks with declarative composition rules
ObservabilityLangSmith / Langfuse integrationNative OpenTelemetry — Tracer, Meter, GenAI semconv, OTLP / JSONL out of the box

Full comparison: CubeLoop vs LangGraph → · CubeLoop vs pi-agent-core →

Hello, agent.

A single async function loop. One Provider, one AgentTool, and you're streaming.

Full quick-start →
import asyncio
from cubeloop import Agent, tool
from cubeloop.providers.anthropic import AnthropicProvider

provider = AnthropicProvider(api_key="sk-...")

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

agent = Agent(
model=provider.model("claude-sonnet-4-6"),
tools=[get_weather],
system_prompt="You are a helpful weather assistant.",
)

def on_event(event, signal=None):
if event.type == "text_delta":
print(event.delta, end="", flush=True)

agent.subscribe(on_event)
asyncio.run(agent.prompt("What's the weather in Tokyo?"))

Install

pippip install cubeloop
uvuv add cubeloop
poetrypoetry add cubeloop
extraspip install cubeloop[sqlite,postgres,mcp,tracing,tracing-otlp]
v0.14.1·py 3.11+·MIT·build bdf88a0·● ci passing·pypi · weekly downloads via shields badge