Repository navigation
v0.2.0
This release builds on v0.1.0 with a stronger runtime surface for real agent systems: long-term memory, provider-neutral usage reporting, model resolution helpers, better custom-tool ergonomics, OpenAI OAuth support, and more durable team/runtime persistence.
Across v0.1.0..HEAD, this release includes 37 commits and 91 changed files.
Breaking API Changes
-
Agent::send,Agent::run,Agent::resume, andAgent::resume_with_optionsnow returnResult<Message, RuntimeError>instead ofResult<(), RuntimeError>.- Callers can now consume the final assistant message directly.
- Code that previously assumed these methods only signaled success/failure will need to handle the returned
Message.
-
Provider response and streaming APIs now carry token-usage metadata.
Responsenow includesusage: Option<TokenUsage>.ProviderEvent::MessageDeltanow includesusage.- Custom provider integrations that construct
Responsevalues or emit streaming events must be updated to populate or forward usage data.
-
Runtime hook implementations need a signature update.
RuntimeHook::on_eventnow receives&dyn AuditStoreinstead of&dyn RuntimeStore.- Downstream hook implementations will need to update their method signatures accordingly.
-
Runtime persistence was split into narrower traits.
RuntimeStorenow composes smaller seams such asAgentStore,RunStore,TaskStore,AuditStore,LeaseStore, andMemoryStore.- Custom stores may need to implement the new trait set or adjust existing implementations.
-
ToolSpecgainedexecution_timeout.- If you construct
ToolSpecwith a struct literal, you now need to add the new field. ToolSpec::builder(...)is now the preferred construction path.
- If you construct
Features
-
Added a long-term memory subsystem.
- New public memory APIs include
MemoryEngine, memory records/search types, andSqliteHybridMemoryStore. - Added hybrid runtime persistence with
HybridRuntimeStore. - Added builtin memory tools for search, pin, and forget workflows.
- New public memory APIs include
-
Added model resolution helpers.
- New
ModelSelectorandRuntime::resolve_model(...)APIs make it easier to choose an explicit model or resolve the newest available model from a registered provider.
- New
-
Added provider-neutral token usage reporting.
- OpenAI, Anthropic, and Gemini streams now surface normalized usage data through
TokenUsage. - Usage is available in provider responses and runtime hook events.
- OpenAI, Anthropic, and Gemini streams now surface normalized usage data through
-
Added feature-gated OpenAI OAuth support.
- New
openai-oauthfeature exportsmentra::auth::openai. - Includes secure token stores, persistent credential helpers, and an OAuth example.
- New
-
Added typed app context support for tools.
- Runtime builders can now register typed host-side state.
- Tools can retrieve that state through
ToolContextandParallelToolContext.
-
Added public test helpers.
- New
test-utilsfeature exposes deterministic runtime/testing support for scripted providers and public API verification.
- New
Improvements
-
Improved custom tool ergonomics.
- Added
ToolSpec::builder(...). - Added runtime-enforced per-tool execution timeouts.
- Added
ParallelToolContext::spawn_subagent()for disposable delegated work. - Clarified
ToolResultsemantics for tool-level errors vs runtime failures.
- Added
-
Added tool profiles for agent-level tool visibility control.
AgentConfig::tool_profilecan now allowlist or hide tools per operating mode.
-
Improved runtime memory behavior.
- Added hybrid memory ingestion, recall, compaction plumbing, and searchable persisted memory records.
-
Improved team persistence and recovery.
- Persistent teammates are now hosted on shared Tokio tasks and wake correctly on resume/revival.
- Resume/recovery paths are more reliable for persisted team state and pending work.
-
Expanded examples and docs.
- Added examples for CLI runtime, custom tools, subagent tools, team collaboration, and OpenAI OAuth.
- Chat example gained a
--freshreset flow. - README and runtime docs now cover model resolution, persistence seams, app context, and teammate hosting architecture.
-
CI and portability cleanups.
- Improved platform gating for auth/tests.
- Updated CI matrix behavior and Unix/macOS handling.
Migration Notes
- If you call agent lifecycle methods, update call sites to use the returned
Message. - If you implement a custom provider, add
usagehandling to both full responses and streamedMessageDeltaevents. - If you implement custom runtime hooks or stores, update trait implementations for the new hook/store interfaces.
- If you build
ToolSpecmanually, preferToolSpec::builder(...)or addexecution_timeout: None.