bob-runtime
Runtime orchestration layer for the Bob Agent Framework.
Overview
bob-runtime provides the orchestration layer that coordinates agent execution:
- Scheduler: Finite state machine for agent turn execution
- Action Parser: Parses LLM responses into structured actions
- Prompt Builder: Constructs prompts with tool definitions and context
- Composite Tool Port: Aggregates multiple tool sources
This crate depends only on bob-core port traits — never on concrete adapters.
Architecture
┌─────────────────────────────────────────┐
│ AgentRuntime (trait) │
├─────────────────────────────────────────┤
│ ┌──────────┐ ┌──────────┐ ┌───────┐ │
│ │Scheduler │→ │Prompt │→ │Action │ │
│ │ FSM │ │Builder │ │Parser │ │
│ └──────────┘ └──────────┘ └───────┘ │
└─────────────────────────────────────────┘
↓ uses ports from bob-core
Usage
Add this to your Cargo.toml:
[]
= "0.1"
Example: Creating a Runtime
use ;
use ;
use Arc;
Running an Agent Turn
use AgentRequest;
let request = AgentRequest ;
let result = runtime.run.await?;
Features
- Finite State Machine: Robust turn execution with state tracking
- Streaming Support: Real-time event streaming via
run_stream() - Tool Composition: Aggregate multiple MCP servers or tool sources
- Turn Policies: Configurable limits for steps, timeouts, and retries
- Health Monitoring: Built-in health check endpoints
Modules
scheduler: Core FSM implementation for agent executionaction: Action types and parser for LLM responsesprompt: Prompt construction and tool definition formattingcomposite: Multi-source tool aggregation
Documentation
Full API documentation is available at docs.rs/bob-runtime.
Related Crates
- bob-core - Domain types and ports
- bob-adapters - Concrete implementations
- bob-cli - CLI application
License
Licensed under the Apache License, Version 2.0. See LICENSE for details.