Import
AgentTransport (Abstract Base Class)
Abstract base class for all agent transport implementations. Defines the contract for agent communication.Abstract Methods
invoke
Parameters
str
required
Target agent’s identifier.
dict[str, Any]
required
Request payload to send.
float
default:"30.0"
Maximum time to wait for response in seconds.
Returns
Raises
TimeoutError: If the agent doesn’t respond within timeout.RuntimeError: If the agent cannot be reached.
LocalTransport
In-process transport that communicates with agents running in the same process via theAgentServer.
Constructor
Parameters
AgentServer
required
The AgentServer instance managing the local agents.
Methods
invoke
Behavior
- Resolve Target: Uses
server.registry.resolve(agent_id)to find the target - Route to Transport: If target is a transport, delegates to it
- Local Execution: If target is a class, instantiates and executes locally
- Queue Processing: Enqueues request and waits for response with timeout