$ show agentspan-ai/agentspan
Agentspan is a comprehensive, multi-language agent orchestration platform built on top of Orkes Conductor. It provides SDKs in Python, TypeScript, Java, and C# for defining, running, and deploying AI agents with rich features: tools, guardrails, multi-agent strategies (handoff, sequential, parallel, router, swarm, plan-execute), streaming, human-in-the-loop, code execution in sandboxes, credential management, and scheduling. The architecture follows a server/client pattern where agent definitions compile to Conductor workflows, with a Java/Spring Boot server, a Go CLI with a Bubble Tea TUI, and a React/Material-UI web interface for visual workflow editing and execution monitoring. The repository is archived (read-only) as of August 2026, with its active development having merged into the Orkes Conductor repository. Despite being archived, the codebase represents a mature, well-crafted multi-agent runtime with extensive examples, comprehensive testing, and clean abstractions across all supported languages. The SDKs demonstrate consistent design patternsβagent composition via strategies, tool registration via decorators/annotations, guardrail chains with composable termination conditions, and thread-safe credential injectionβmaking the codebase a valuable reference for building agent orchestration systems.
The LLM identified 5 files worth highlighting for reuse:
The `Agent` class (and its equivalents in Java, TypeScript, C#) provides a clean, fluent interface for defining AI agents with instructions, tools, guardrails, callbacks, output schemas, and multi-agent strategies. This abstraction is the core of the platform and demonstrates a reusable, cross-language pattern for agent configuration that can be extracted and applied to other orchestration frameworks.
Implements a composable guardrail system supporting regex, LLM-based, and custom guardrails with positions (input/output) and on-fail behaviors (retry, raise, fix, human). Combined with composable termination conditions (AndTermination, OrTermination) that can be chained with .and()/.or(), this module presents a clean, reusable pattern for safe agent execution that could be adapted to any conversational AI system.
Defines the multi-agent orchestration strategies (handoff, sequential, parallel, router, swarm, random) with a `pipe()` operator for sequential pipelines and condition-based handoffs (OnToolResult, OnTextMention, OnCondition). This pattern enables complex agent topologies to be composed declaratively and is a highly reusable abstraction for building hierarchical or dynamic agent teams.
Implements thread-safe credential injection using Python's `contextvars` (and AsyncLocal in C#) to scope credentials to individual tool executions without mutating global environment variables. This pattern solves a common problem in multi-tenant agent systems and demonstrates a production-grade approach to secret isolation that can be reused in any secure execution environment.
Provides a reusable XState state machine for workflow graph editing, including undo/redo, node selection, pan/zoom, and save protection. This pattern encapsulates complex interaction logic into a testable, composable state machine that can be extracted and applied to other visual editors requiring similar graph manipulation and state management.