ProtocolAdapter
Agent Runtimes / types/protocol / ProtocolAdapter
Interface: ProtocolAdapter
Defined in: types/protocol.ts:153
Abstract protocol adapter interface
Properties
connectionState
readonlyconnectionState:ProtocolConnectionState
Defined in: types/protocol.ts:161
Current connection state
protocol
readonlyprotocol:Protocol
Defined in: types/protocol.ts:155
Protocol
protocolTransport
readonlyprotocolTransport:ProtocolTransport
Defined in: types/protocol.ts:158
Transport mechanism used
Methods
connect()
connect():
Promise<void>
Defined in: types/protocol.ts:166
Connect to the protocol endpoint
Returns
Promise<void>
disconnect()
disconnect():
void
Defined in: types/protocol.ts:171
Disconnect from the endpoint
Returns
void
getAgentCard()?
optionalgetAgentCard():Promise<AgentCard|null>
Defined in: types/protocol.ts:214
Get agent card (for A2A protocol)
Returns
Promise<AgentCard | null>
sendMessage()
sendMessage(
message,options?):Promise<void>
Defined in: types/protocol.ts:176
Send a message through the protocol
Parameters
message
options?
builtinTools?
string[]
Built-in MCP tool names to enable
identities?
object[]
Connected identity tokens to pass to backend for tool execution
messages?
Full conversation history to send with the message
metadata?
Record<string, unknown>
model?
string
Model to use for this request (overrides agent default)
skills?
string[]
Skill IDs to enable
threadId?
string
tools?
Returns
Promise<void>
sendToolResult()
sendToolResult(
toolCallId,result):Promise<void>
Defined in: types/protocol.ts:201
Send tool execution result back
Parameters
toolCallId
string
result
Returns
Promise<void>
subscribe()
subscribe(
handler): () =>void
Defined in: types/protocol.ts:209
Subscribe to protocol events
Parameters
handler
Returns
() => void
supportsFeature()
supportsFeature(
feature):boolean
Defined in: types/protocol.ts:219
Check if protocol supports a specific feature
Parameters
feature
string
Returns
boolean