| Crates.io | loa-core |
| lib.rs | loa-core |
| version | 1.2.2 |
| created_at | 2025-12-14 18:31:48.290391+00 |
| updated_at | 2026-01-18 13:56:51.247427+00 |
| description | Lightweight Observability Agent - Core, a library for building observability agents |
| homepage | |
| repository | https://github.com/wuwei-labs/loa |
| max_upload_size | |
| id | 1984902 |
| size | 224,900 |
Lightweight Observability Agent Core - A Rust library for building observability agents with proper supervision and actor-based architecture.
Add to your Cargo.toml:
[dependencies]
loa-core = "1.2"
use loa_core::Agent;
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let agent = Agent::builder()
.storage_path("/var/lib/loa")
.build()
.await?;
agent.run().await?;
Ok(())
}
Read agent metadata without starting the full runtime - useful for CLI tools and status checks:
use loa_core::AgentInfo;
use std::path::Path;
fn main() -> anyhow::Result<()> {
let info = AgentInfo::read(Path::new("/var/lib/loa"))?;
println!("Peer ID: {}", info.peer_id);
println!("Dashboard: {}", info.dashboard_url);
if let Some(name) = &info.name {
println!("Name: {}", name);
}
Ok(())
}
AgentInfo provides:
peer_id - Unique agent identifiername - Human-readable 3-word name (e.g., conscious-jade-mongoose), None if not registeredstorage_path - Path to agent data directorydashboard_url - Direct link to agent dashboarded25519_public_key_hex / x25519_public_key_hex - Public keysclaim_token - Workspace claim token (if claimed)Agent data is stored in a single agent.toml file:
[identity]
ed25519_secret = "base64-encoded-64-bytes"
x25519_secret = "base64-encoded-32-bytes"
[registration]
name = "conscious-jade-mongoose"
claim_token = "jd7f331ecpb7xhgmrdzch6m13n7yppkf"
The library automatically migrates from the legacy format (separate agent_id.key, claim_token, and agent_name files) on first load.
MIT