Documentation Index
Fetch the complete documentation index at: https://docs.svantic.com/llms.txt
Use this file to discover all available pages before exploring further.
Calling other agents
This guide covers how to call another A2A agent — another Svantic agent, a public third-party agent, or a local agent you’re developing against. The main tool isRemoteAgent. It handles discovery, authentication, and the A2A protocol so you can focus on the call.
One-shot structured call
Useinvoke_capability when you know exactly which capability you want and the shape of its arguments:
DataPart envelope for you — result is whatever the remote handler returned.
Natural-language prompt
Usesend when you want the remote agent to plan its own work (only useful against smart agents):
response is an A2A Message or Task. Inspect .parts to extract text or data parts.
Streaming responses
send_stream yields A2A events as they arrive — use it for anything that emits intermediate progress (plans, tool calls, partial outputs):
Message, Task, TaskStatusUpdateEvent, TaskArtifactUpdateEvent.
Rich messages (files, context, metadata)
UseMessageBuilder when plain text isn’t enough — attachments, session context, form replies, direct routing:
POST /files/upload) and pass the returned file_id — the platform resolves it to LLM-native format at call time.
Continuing a conversation
Pass acontext_id (usually the Svantic session_id) to keep turns on the same conversation thread:
Inspecting before calling
UseAgentDiscovery to fetch just the agent card:
RemoteAgent discovers internally, so you don’t need AgentDiscovery to call — use it only when inspection is the goal (e.g. building a capability picker).
Authenticating
Most calls to Svantic-hosted agents go through your own agent’s session (the caller’s JWT is forwarded automatically when you’re inside a capability handler or smart-agent turn). For standalone scripts calling a remote that requires auth, pass a bearer token:Error handling
invoke_capability, send, and the stream methods reject or throw on transport, auth, or remote-side errors. Catch and inspect the message — the SDK preserves the A2A error payload in the thrown Error.
