Module: Keycardai::A2A
- Defined in:
- lib/keycardai/a2a.rb,
lib/keycardai/a2a/errors.rb,
lib/keycardai/a2a/version.rb,
lib/keycardai/a2a/delegation_client.rb,
lib/keycardai/a2a/service_discovery.rb
Overview
The A2A delegation client and its result type.
Defined Under Namespace
Classes: DelegationClient, DiscoveryError, InvocationError, Result, ServiceDiscovery
Constant Summary collapse
- AGENT_CARD_PATH =
Well-known path of an agent's card, relative to its base URL.
"/.well-known/agent-card.json"- JSONRPC_PATH =
JSON-RPC invocation path, relative to an agent's base URL.
"/a2a/jsonrpc"- MESSAGE_SEND_METHOD =
JSON-RPC method used to deliver a message to an agent.
"message/send"- PROTOCOL_VERSION =
A2A protocol version sent with each invocation.
"0.3"- VERSION =
"0.1.0"
Class Method Summary collapse
-
.text_message(text) ⇒ Hash
Build A2A message/send params carrying one text part, the common case for driving a downstream agent.
Class Method Details
.text_message(text) ⇒ Hash
Build A2A message/send params carrying one text part, the common case for driving a downstream agent.
99 100 101 102 103 104 105 106 107 |
# File 'lib/keycardai/a2a/delegation_client.rb', line 99 def self.(text) { "message" => { "role" => "user", "parts" => [{ "kind" => "text", "text" => text }], "messageId" => SecureRandom.uuid } } end |