Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Principle:23blocks OS Ai maestro Agent Directory Propagation

From Leeroopedia
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.

Related Pages

Implemented By

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment