Expand description
Runtime library for compiled Sage programs.
This crate provides the types and functions that generated Rust code depends on. It handles:
- Agent spawning and lifecycle
- Message passing between agents
- LLM inference calls
- RFC-0011: Tool execution (Http, Fs, etc.)
- RFC-0012: Mock infrastructure for testing
- Tracing and observability
- Error handling
Re-exports§
pub use mock::MockLlmClient;pub use mock::MockQueue;pub use mock::MockResponse;pub use tools::HttpClient;pub use tools::HttpResponse;pub use tracing as trace;
Modules§
- mock
- Mock infrastructure for the Sage testing framework (RFC-0012).
- prelude
- Prelude for generated code.
- stdlib
- Standard library functions for Sage.
- tools
- RFC-0011: Tool implementations for Sage agents.
- tracing
- Tracing support for Sage programs.
Structs§
- Agent
Context - Context provided to agent handlers.
- Agent
Handle - Handle to a spawned agent.
- LlmClient
- Client for making LLM inference calls.
Enums§
- Error
Kind - RFC-0007: Error kind classification for Sage errors.
- Sage
Error - Error type for Sage runtime errors.
Functions§
- spawn
- Spawn an agent and return a handle to it.
Type Aliases§
- Sage
Result - Result type for Sage operations.