MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / build_agent_author

Function build_agent_author

atomic-agent/src/identity.rs:582–596  ·  view source on GitHub ↗

Build an `Author` for an agent turn, using the session's identity info. This is the main entry point called by `record_turn()`. It resolves the agent author from the user's default identity with `+tag` email. # Arguments `agent_name` — Agent registry key (e.g., "claude-code") `agent_display_name` — Human-readable name (e.g., "Claude Code") `session_id` — Session identifier for the `+tag` suffix

(
    agent_name: &str,
    agent_display_name: &str,
    session_id: &str,
    agent_identity: Option<&str>,
)

Source from the content-addressed store, hash-verified

580/// - With identity: `claude+60f5 <lee@atomic.dev>` (with public key ref)
581/// - Without: `Claude Code` (no email)
582pub fn build_agent_author(
583 agent_name: &str,
584 agent_display_name: &str,
585 session_id: &str,
586 agent_identity: Option<&str>,
587) -> Author {
588 let options = AgentAuthorOptions {
589 agent_name,
590 agent_display_name,
591 session_id,
592 identity_dir: None,
593 agent_identity: agent_identity.map(str::to_string),
594 };
595 resolve_agent_author(&options)
596}
597
598// Tests
599

Calls 1

resolve_agent_authorFunction · 0.85