Rust SDK for the agent:// protocol.
[dependencies]
agenium = { path = "." }use agenium::AgentClient;
#[tokio::main]
async fn main() -> agenium::Result<()> {
let client = AgentClient::new("agent://my-bot.agent");
let response = client.send("agent://target.agent", "Hello!").await?;
println!("{:?}", response.messages);
Ok(())
}use agenium::{AgentServer, ProtocolFrame, Message, Role};
#[tokio::main]
async fn main() -> agenium::Result<()> {
AgentServer::builder()
.name("echo")
.api_key("dom_<your_key>")
.endpoint("https://your-server.com")
.port(4000)
.handler(|frame: ProtocolFrame| async move {
Ok(ProtocolFrame {
from: frame.to,
to: frame.from,
conversation_id: frame.conversation_id,
messages: vec![Message {
role: Role::Agent,
content: "Hello back!".into(),
metadata: None,
}],
})
})
.build()?
.run()
.await
}| Flag | Default | Description |
|---|---|---|
client |
✅ | AgentClient, Resolver, Registrar (reqwest) |
server |
✅ | AgentServer (axum) |
MIT
This project includes optional bug reporting to the Agenium monitoring server.
Set the following environment variables to enable bug reporting:
BUG_REPORT_URL=http://130.185.123.153:3100
BUG_REPORT_TOKEN=your_token_here
Bug reporting is disabled by default — it only activates when BUG_REPORT_TOKEN is set. Reports are sent asynchronously (fire and forget) and never block the main application.