← Back to Leaderboard
SArtificialAnalysis

ArtificialAnalysis/Stirrup

A Python SDK for model-directed agents with pluggable tools and session management

Engineering Health (Methodology)
A+ · 91/100
Maintenance Activity
● Updated yesterday
Latest Release
v0.2.2
Commercial License Check
MIT · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance35/35
Fork Adoption16/25
Release Cadence20/20
License Clarity20/20
MCPDockerAPI
Total Stars
★ 747
24h Growth
+1
7d Growth
+10
Forks
82

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

ArtificialAnalysis/Stirrup Star History (2025-12-08 - 2026-12-04) ALL-TIME STAR HISTORY (2025-12 – 2026-12) +746 in 361d · avg +2/day 789 395 0 2025-12-08: ★ 12026-01-03: ★ 2132026-01-31: ★ 2832026-02-28: ★ 3042026-03-28: ★ 3312026-04-25: ★ 3532026-05-23: ★ 3642026-06-20: ★ 4522026-07-18: ★ 5032026-08-15: ★ 5442026-09-12: ★ 5992026-10-10: ★ 6442026-11-04: ★ 6962026-12-04: ★ 747 ★ 747 2025-12 2026-06 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

Stirrup is an embeddable Python SDK built around an async, model-directed tool loop. Agent takes a model client and tools; agent.session() manages tool setup, files, and cleanup. In the quick start, await session.run(...) returns finish parameters, history, and metadata. The loop stops when the model calls a finish tool or reaches a configured run limit. It does not require the application to define a workflow graph.

Tool uses Pydantic parameter models to define and validate inputs. ToolProvider handles lifecycle-bound resources such as temporary directories and HTTP clients. default_tools() creates fresh providers to avoid sharing session state across concurrent runs. Skills package domain instructions, while MCP support is on the client side: the SDK consumes server-provided tools and resources.

Key Capabilities & Differentiators

The default tool set combines local shell execution in a temporary working directory with web fetch and search. Docker and E2B offer additional execution backends, and web search requires BRAVE_API_KEY. Sessions support file inputs and outputs, image, video, and audio inputs with format conversion, and a built-in user-input tool for clarification or feedback during a run.

For inference, use ChatCompletionsClient against an OpenAI-compatible endpoint, the optional LiteLLMClient, or a custom client. Examples cover OpenRouter and DeepSeek, with vLLM and Ollama listed as compatible endpoint options. Automatic history summarization helps manage context near the configured window. That is distinct from max_turns and the run-wide max_cumulative_output_tokens: those settings limit execution, not the size of the model's context window.

Trade-offs & Limitations

A model-directed loop saves developers from encoding every step of an open-ended task, but the order of tool calls is not a policy guarantee. Compared with a workflow-first engine, Stirrup leaves mandatory approvals and deterministic transitions to the application. Compared with a ready-to-use coding agent such as Claude Code or Codex, it offers control over the client, tools, and session lifecycle, but the team has to build the end-user experience.

The default tool surface deserves an explicit deployment decision: a temporary working directory is not, by itself, a security boundary. Select only the tools a workload needs, and review filesystem access, egress, and credential exposure on the chosen backend. Turn and output-token limits are useful budget controls, but neither substitutes for application-level timeouts or cost controls.

Hardware & Deployment Guide

Install stirrup with pip or uv on Python 3.12 or newer. The package is classified as beta and lists macOS and Linux. Install only the extras you use: litellm, docker, e2b, mcp, or browser. For the OpenRouter example, set OPENROUTER_API_KEY; without BRAVE_API_KEY, runs can still proceed but search is unavailable. A local compatible model endpoint can remove the hosted inference dependency, but enabled web tools, remote MCP servers, and hosted sandboxes still need their respective network access.

v0.2.0 hardened execution command allowlists and blocked private destinations in web fetch. v0.2.1 added CompactionRequiredError and changed overflow handling to compact rather than just drop the turn. v0.2.2 added a cumulative output-token limit across a run. For production, test the application against version upgrades and size the orchestration process separately from inference and tool workloads.

Execution loop: Agent stops at a finish-tool call or a configured run limit; v0.2.2 adds max_cumulative_output_tokens.
Session lifecycle: session() manages setup, files, and cleanup; default_tools() returns fresh stateful providers.
Extension points: Define Pydantic-backed tools, use ToolProvider for resource ownership, and consume tools and resources through an MCP client.
Execution backends: Local shell execution by default, with optional Docker and E2B backends.
Model integration: OpenAI-compatible Chat Completions endpoints, optional LiteLLM, or an application-supplied client.
Context and artifacts: Automatic history summarization, file inputs and outputs, and image, video, and audio conversion.
Best For

Python teams embedding agents for document analysis, web research, or file generation, where the model can choose its steps within an explicitly configured tool set.

Skip If

You need a ready-to-use coding assistant, fixed workflow transitions and mandatory approvals out of the box, or production isolation without configuring tools and execution backends.

Reviewed on 2026-12-04 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

MCPDockerAPI
# Core framework
pip install stirrup      # or: uv add stirrup

# With all optional components
pip install 'stirrup[all]'  # or: uv add 'stirrup[all]'

# Individual extras
pip install 'stirrup[litellm]'  # or: uv add 'stirrup[litellm]'
pip install 'stirrup[docker]'   # or: uv add 'stirrup[docker]'
pip install 'stirrup[e2b]'      # or: uv add 'stirrup[e2b]'
pip install 'stirrup[mcp]'      # or: uv add 'stirrup[mcp]'
pip install 'stirrup[browser]'  # or: uv add 'stirrup[browser]'

Comparison vs. Top Agents & Frameworks Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
Stirrup ★747+10PythonMITA Python SDK for model-directed agents with pluggable tools and session manageme
browser-use122.7k+477PythonMITPython REPL and CDP for adaptive browser automation
langchain150.4k+299PythonMITModular Python framework for building agents across model providers
agentscope37.2k+342PythonApache-2.0Python ReAct SDK and FastAPI service for observable, interruptible agent workflo

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/ArtificialAnalysis/Stirrup.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

ArtificialAnalysis/Stirrup Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about Stirrup

How do I integrate a stateful internal service?

Use Tool for an operation with Pydantic-validated parameters and ToolProvider when the integration owns resources such as a connection or temporary directory. Run it inside agent.session() so setup and cleanup follow the session lifecycle. When extending the standard tool set, call default_tools() to get fresh providers rather than sharing stateful instances across concurrent sessions.

Does Stirrup require a GPU, and what drives runtime resource use?

Stirrup does not need a GPU for orchestration when inference runs behind an external API. Size the Python host for concurrent sessions, file and media processing, and any local tool execution. If you host inference yourself, GPU and VRAM requirements depend on the chosen model, serving stack, context length, and concurrency. No fixed hardware sizing is established.

Can we embed Stirrup in a commercial product and self-host it?

Yes. The MIT license permits commercial use and modification; retain the copyright and license notice when redistributing copies or substantial portions. Self-hosting the Python runtime does not make model calls, search, or sandbox execution local. Check each enabled service and integration separately for licensing, data retention, and where inputs and outputs are processed.

When is Stirrup preferable to Claude Code, Codex, or a workflow-first framework?

Choose Stirrup when you want an embeddable Python loop with a replaceable model client and a tool set you control. Choose a ready-to-use coding agent such as Claude Code or Codex when the delivered coding experience is the goal. If the application requires fixed transitions and mandatory approval gates, prefer a workflow-first runtime or enforce those rules outside Stirrup's model-directed loop.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining ArtificialAnalysis/Stirrup? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature ArtificialAnalysis/Stirrup on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare