pub struct AgentInfo {
pub peer_id: PeerId,
pub name: String,
pub storage_path: PathBuf,
pub dashboard_url: String,
pub ed25519_public_key_hex: String,
pub x25519_public_key_hex: String,
pub claim_token: Option<String>,
}Expand description
Lightweight agent information that can be read without starting the runtime.
Use this for CLI info commands, status checks, or any scenario where you need agent metadata without spawning the full actor system.
Fields§
§peer_id: PeerIdUnique agent identifier derived from Ed25519 public key
name: StringHuman-readable agent name (truncated peer_id)
storage_path: PathBufPath to agent storage directory
dashboard_url: StringDashboard URL for this agent
ed25519_public_key_hex: StringEd25519 public key in hex format
x25519_public_key_hex: StringX25519 public key in hex format (for future encrypted communication)
claim_token: Option<String>Workspace claim token if agent is claimed
Implementations§
Source§impl AgentInfo
impl AgentInfo
Sourcepub fn read(storage_path: &Path) -> Result<Self>
pub fn read(storage_path: &Path) -> Result<Self>
Read agent info from storage without starting the runtime.
This is a lightweight operation that only reads files from disk. No actors, databases, or network connections are started.
§Arguments
storage_path- Path to the agent’s storage directory
§Returns
Returns AgentInfo if the identity file exists, or an error if the
agent has not been initialized yet.
§Example
use elo::AgentInfo;
use std::path::Path;
let info = AgentInfo::read(Path::new("/var/lib/loa"))?;
println!("Agent: {} ({})", info.name, info.peer_id);
println!("Dashboard: {}", info.dashboard_url);