Agentic.Protocol.ACP.Discovery
(agentic v0.2.2)
Copy Markdown
Auto-discovery of ACP-compatible agents on the system.
Probes the filesystem for known ACP-capable CLIs and registers discovered agents in the protocol registry.
The known agents database is derived from the acpx project (https://github.com/openclaw/acpx) and covers 15+ agents.
Discovery Sources
- Built-in known agents database (this module)
config :agentic, :acp_agents(user overrides)ACP_AGENTSenvironment variable (comma-separated):discover_callbackin acp config (programmatic)
Summary
Functions
Return the resolved directories for an agent on the current OS.
Check if a specific agent is available.
Get backend config for a named agent.
Clear the discovery cache.
Parse configured agents from app config and ACP_AGENTS env var.
Discover all available ACP agents on the system.
Discover agents and register them in the Protocol.Registry.
Initialize the ETS table for discovery cache.
Return all known agent entries (before probing).
Get the launch command and args for a named agent.
Look up an agent entry by name.
Look up an agent in the built-in database by name or alias (no ETS required).
Returns the ETS table name (for testing).
Types
@type agent_entry() :: %{ name: atom(), command: String.t(), args: [String.t()], display: String.t(), aliases: [atom()], cache_dirs: [String.t()], directories: %{ linux: os_directories(), macos: os_directories(), windows: os_directories() }, notes: String.t() | nil }
Functions
@spec agent_directories(atom()) :: os_directories() | nil
Return the resolved directories for an agent on the current OS.
Returns a map with config, logs, and cache keys containing
expanded absolute paths. Returns nil if the agent is unknown.
Check if a specific agent is available.
Get backend config for a named agent.
@spec clear_cache() :: :ok
Clear the discovery cache.
@spec configured_agents() :: [agent_entry()]
Parse configured agents from app config and ACP_AGENTS env var.
@spec discover_all() :: [agent_entry()]
Discover all available ACP agents on the system.
Probes each known agent's command for filesystem presence, merges with user-configured agents, and caches results.
@spec discover_and_register() :: [atom()]
Discover agents and register them in the Protocol.Registry.
@spec init() :: :ok
Initialize the ETS table for discovery cache.
@spec known_agents() :: [agent_entry()]
Return all known agent entries (before probing).
Get the launch command and args for a named agent.
@spec lookup(atom()) :: agent_entry() | nil
Look up an agent entry by name.
@spec lookup_known(atom()) :: agent_entry() | nil
Look up an agent in the built-in database by name or alias (no ETS required).
Returns the ETS table name (for testing).