Principle:23blocks OS Ai maestro Agent Directory Propagation
| Knowledge Sources | |
|---|---|
| Domains | Mesh_Networking, Directory_Service |
| Last Updated | 2026-10-26 10:00 GMT |
Overview
A distributed directory pattern where each host maintains a name-to-host mapping, syncs with peers, and prioritizes local entries over remote ones.
Description
The agent directory is a distributed name-to-host lookup. Each host maintains a local directory file mapping agent names to `AgentDirectoryEntry` (host ID, host URL, AMP address). `syncWithPeers` fetches agent lists from all known peers and updates the local directory. `registerRemoteAgent` adds a remote entry but never overwrites a local entry — local knowledge is authoritative for local agents.
Usage
Use this principle when designing a distributed directory where:
- Each host is authoritative for its own agents
- Peer entries are cached but never override local knowledge
- Lookups must resolve agent names to host locations
Theoretical Basis
The directory is a local-authoritative distributed lookup:
lookupAgent(name) = localDirectory[name.toLowerCase()]
registerRemoteAgent(entry) =
if localDirectory[entry.name]?.source == 'local': skip (local wins)
else: localDirectory[entry.name] = { ...entry, source: 'remote' }
syncWithPeers() =
for each peer: fetch /api/agents/directory → registerRemoteAgent(each)
The local-wins rule ensures that a host's own agents are never shadowed by stale remote entries. This is the directory analog of DNS: each authority is authoritative for its own zone.