Spexsy
Strongly typed execution pipelines for agents and processes
A framework for building execution pipelines where independent agents process tasks in sequence — and can rewrite the plan at runtime. Type-safe. Deterministic. Built for systems that can't afford ambiguity.
The problem
When business processes span multiple teams, systems, or AI agents, consistency breaks down. Each unit has its own interface, its own assumptions, and its own failure modes. Spexsy forces a shared contract between all participants in a pipeline — while still allowing dynamic adaptation at runtime.
How it works
You define a SystemSpec that declares your agent types and context shape. Then you register agents, build a plan (a sequence of agent kinds), and run it. Each agent receives the full context, does its work, and can optionally modify the plan for the next step.
Type
Safe
Dynamic
Plans
Async
Runtime
0
Ambiguity
Core components
SystemSpec trait
Defines agent kinds and context types for your domain. The contract everything else builds on.
Agent trait
Execution units that process context and optionally mutate the plan. Async by default.
AgentRegistry
Maps agent kinds to implementations at runtime. Register once, reference by kind.
PipelineRunner
Orchestrates the plan execution, passing context between agents.
PlanChange
Agents can InsertNext, Append, Replace, or Abort the pipeline mid-execution.
Use cases
- → Document processing pipelines (intake → classify → extract → validate → store)
- → Fraud detection systems (collect → score → escalate → audit)
- → AI agent orchestration (plan → execute → evaluate → adapt)
- → Multi-step business workflows with conditional branching
Quick start
# Add to Cargo.toml
spexsy = { git = "https://github.com/ikcore/spexsy" }
Design philosophy: Spexsy is opinionated. It forces you to declare your system shape upfront. This isn't flexibility for flexibility's sake — it's a framework for teams and agents that need to agree on a contract before they execute.