agentspan  by agentspan-ai

Runtime for durable, distributed AI agents

Created 4 months ago
493 stars

Top 62.0% on SourcePulse

GitHubView on GitHub
Project Summary

AI agents that persist through process crashes, scale across machines, and allow for extended human approval workflows. Agentspan provides a durable, distributed runtime for AI agents, targeting developers and researchers building complex agentic systems, offering enhanced reliability and operational control.

How It Works

Agentspan acts as an execution layer, compiling agents into server-side processes that survive client restarts. It enables cross-process agent access, allowing monitoring and control from any machine. Core features include distributed workers deployable in any language, a unified Agent primitive for diverse agent structures, and robust production guardrails for error handling and validation.

Quick Start & Requirements

Install the CLI via curl -fsSL https://raw.githubusercontent.com/agentspan-ai/agentspan/main/cli/install.sh | sh (macOS/Linux) or equivalent PowerShell/CMD scripts. Install SDKs with pip install agentspan (Python), npm install @agentspan-ai/sdk (TypeScript/JavaScript), or dotnet add package Agentspan (C#). Start the server with agentspan server start, which runs on localhost:6767 and provides a UI. LLM API keys (e.g., OPENAI_API_KEY) are required. Official documentation, a quickstart guide, and over 180 examples are available.

Highlighted Details

  • True durable execution: Agents compile to server-side processes, continuing execution even if the client application crashes or restarts.
  • Cross-process agent access: Monitor status, stream events, approve tool calls, pause, resume, or cancel agents from any process or machine.
  • Distributed workers in any language: Tools can be implemented as distributed tasks in Python, Java, Go, or other languages, allowing independent scaling.
  • Unified Agent primitive: A single Agent class handles single agents, multi-agent teams, and nested hierarchies.
  • Real human-in-the-loop: @tool(approval_required=True) enables durable pauses for human approval, lasting days across different machines.
  • Production guardrails: Supports custom functions, regex, or LLM judges with four failure modes: retry, raise, fix, or human escalation.
  • Server-side tools: HTTP endpoints and MCP servers execute as server-side tasks without requiring dedicated workers.
  • Full observability: Includes Prometheus metrics, a visual execution UI, execution history, token usage tracking, and optional OpenTelemetry integration.
  • Framework compatible: Seamlessly integrates with Google ADK, OpenAI Agents SDK, LangChain, and LangGraph.

Maintenance & Community

The project is developed in the open with a focus on community contribution. Support and discussion are available via Discord, and bug reports or feature requests can be submitted through GitHub Issues. A contributing guide is provided for those wishing to participate.

Licensing & Compatibility

Agentspan is released under the MIT license. This permissive license allows for commercial use and integration into closed-source projects without significant restrictions.

Limitations & Caveats

The provided documentation does not explicitly detail limitations such as alpha status, known bugs, or unsupported platforms. The extensive examples and feature set suggest a mature project, but users should consult GitHub issues for the most current information on potential caveats.

Health Check
Last Commit

21 hours ago

Responsiveness

Inactive

Pull Requests (30d)
29
Issues (30d)
3
Star History
283 stars in the last 30 days

Explore Similar Projects

Starred by Gagan Bansal Gagan Bansal(Coauthor of AutoGen; Research Scientist at Microsoft Research), Elvis Saravia Elvis Saravia(Founder of DAIR.AI), and
1 more.

agent-framework by microsoft

1.0%
12k
AI agent and multi-agent workflow framework
Created 1 year ago
Updated 14 hours ago
Feedback? Help us improve.