Agentic.Protocol.Registry (agentic v0.2.2)

Copy Markdown

Registry for agent protocol implementations.

Provides lookup and discovery of available protocols, supporting both LLM API protocols and local agent CLI protocols.

Usage

# Register a protocol
Agentic.Protocol.Registry.register(:claude_code, Agentic.Protocol.ClaudeCode)

# Look up a protocol
{:ok, module} = Agentic.Protocol.Registry.lookup(:claude_code)

# List all protocols
Agentic.Protocol.Registry.list()

# Get protocols by transport type
Agentic.Protocol.Registry.for_transport(:local_agent)

Summary

Functions

Check if a protocol is available (CLI present, credentials configured, etc.)

Returns a specification to start this module under a supervisor.

List all protocols for a given transport type.

Get a protocol, raising if not found.

List all registered protocol names.

Look up a protocol by name.

Register a protocol under a name.

Unregister a protocol by name.

Functions

available?(name)

Check if a protocol is available (CLI present, credentials configured, etc.)

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

for_transport(type)

List all protocols for a given transport type.

get!(name)

Get a protocol, raising if not found.

list()

List all registered protocol names.

lookup(name)

Look up a protocol by name.

Returns {:ok, module} or :error.

register(name, protocol_module)

Register a protocol under a name.

The protocol module must implement AgentProtocol behaviour.

start_link(opts \\ [])

unregister(name)

Unregister a protocol by name.