Skip to main content

Module agents

Module agents 

Source

Modules§

friction
Friction signals of agent coordination, counted locally for the retro loop: <data>/agents/friction.jsonl, one {"at", "signal", "agent"?, "root"?} line per event (fixed keys and ids, never message text), summed by lean-ctx agent friction [--since <dur>] and per hour, worker and vault by the Hive connector’s friction counter for the vault bus (V16.1).
host_mirror
Mirror of a host’s own agent-to-agent message (Claude Code SendMessage) onto the local bus scratchpad, so ctx_agent read and the dashboard see direct traffic the host delivers outside lean-ctx.

Structs§

AgentDiary
AgentEntry
AgentRegistry
ContextDepthConfig
DiaryEntry
FileLock
LogicalSessionPresence
ProcessIdentityIndex
Compatibility store for process identities.
ScratchpadEntry
TransportClient
The host behind an MCP transport, from the initialize handshake.

Enums§

AgentRole
AgentStatus
DiaryEntryType
RoleSource

Constants§

BINDING_METADATA_KEY
Metadata key under which a bus message carries its admission binding. The on-disk shape of ScratchpadEntry is unchanged: metadata already is a string map, and an entry written before bindings existed simply has no such key (the legacy rule of context_admission::stored applies to it).
HIVE_INBOUND_KEY_PREFIX
Idempotency-key prefix of bus entries another machine’s worker delivered through Hive (the relay writes them with it).

Functions§

declared_session_role
The session role stated through the environment (LEAN_CTX_ROLE, then LEAN_CTX_AGENT_ROLE). Anything else an MCP session gets is assumed.
register_announce
Register the announce request; the first registration wins.
take_renewed
Whether agent_id’s registration had expired and was renewed since the last call (each renewal is reported once).