Expand description
§punch-runtime
The agent execution engine for the Punch Agent Combat System.
This crate contains the core fighter loop, LLM driver abstraction, tool execution engine, MCP client, loop guard / circuit breaker, context budget management, and session repair.
§Terminology
- Fighter: An AI agent (conversational or task-oriented)
- Gorilla: An autonomous agent that runs without user prompts
- Bout: A session / conversation
- Move: A tool invocation
Re-exports§
pub use circuit_breaker::CircuitStatus;pub use circuit_breaker::CircuitState;pub use circuit_breaker::ProviderCircuitBreaker;pub use context_budget::ContextBudget;pub use context_budget::TrimAction;pub use driver::AnthropicDriver;pub use driver::AzureOpenAiDriver;pub use driver::BedrockDriver;pub use driver::CompletionRequest;pub use driver::CompletionResponse;pub use driver::GeminiDriver;pub use driver::LlmDriver;pub use driver::OllamaDriver;pub use driver::OpenAiCompatibleDriver;pub use driver::StopReason;pub use driver::TokenUsage;pub use driver::create_driver;pub use driver::create_driver_with_client;pub use http_pool::HttpPool;pub use http_pool::HttpPoolConfig;pub use fighter_loop::FighterLoopParams;pub use fighter_loop::FighterLoopResult;pub use fighter_loop::run_fighter_loop;pub use guard::GuardConfig;pub use guard::GuardVerdict;pub use guard::LoopGuard;pub use guard::LoopGuardVerdict;pub use mcp::McpClient;pub use session_repair::RepairStats;pub use session_repair::repair_session;pub use tool_executor::ToolExecutionContext;pub use tool_executor::execute_tool;pub use tools::all_tools;pub use tools::tools_for_capabilities;
Modules§
- circuit_
breaker - Provider-level circuit breaker for LLM calls.
- context_
budget - Context window budget management.
- driver
- LLM driver trait and provider implementations.
- fighter_
loop - The core agent execution loop.
- guard
- Loop guard / circuit breaker for the fighter loop.
- http_
pool - Shared HTTP connection pool for outbound LLM and tool calls.
- mcp
- MCP (Model Context Protocol) client.
- session_
repair - Session message history repair.
- tool_
executor - Tool execution engine.
- tools
- Built-in tool definitions (JSON schemas for the LLM).