Purpose
Agent, AgentId, AgentContext, lifecycle hooks, and state management. Everything an autonomous unit needs to exist, be addressed, and be driven by a runtime.
Key APIs
- Agent
- AgentId
- AgentContext
- AgentState
- LifecycleHooks
Dependencies
No RustyAI dependencies — this is the foundation.
used by: cognition · messaging · patterns · runtime · rustyai
agent-core.rs
use agent_core::prelude::*;struct Researcher;#[async_trait]impl Agent for Researcher { async fn on_start(&mut self, ctx: &AgentContext) -> Result<()> { ctx.log("researcher online"); Ok(()) }}Cargo.toml
[dependencies]agent-core = "0.2"See it in a running system.
The xbot case study shows agent-core and cognition driving a long-lived autonomous application.