A2A server
nr-llm can answer other agents that speak the Agent2Agent protocol (A2A) 1.0 over JSON-RPC. It publishes selected LLM configurations as skills, and a registered remote client sends a message to one of them. The message becomes an agent run that a worker executes; the client receives the result as an A2A task (ADR-280, ADR-282, ADR-283).
This page covers stages 3 and 4 of spec 051: tasks, and a client that answers a task waiting for input. Streaming, push notifications and file parts are not offered (stages 5a to 5c).
Switch it on
- Set Answer A2A requests (server role)
(
a2a.) in the extension configuration. Off, no site answers an A2A request, whatever its settings say.server. enabled -
Name the base URL in the settings of each site that should answer, for example in
config/:sites/<site>/ settings. yaml nrllm: a2a: baseUrl: 'https://www.example.org/a2a'Copied!The JSON-RPC endpoint is this URL; the agent card is published at
https://. A site without the setting answers neither. Every URL in the card and in a response is built from this setting, never from the request'swww. example. org/ a2a/. well- known/ agent- card. json Hostheader; a request to another host, scheme or port is not an A2A request and passes on to the site. - Run a worker. A task is accepted only while a worker can be shown to run:
a
messenger:consumer with a heartbeat, or a tick ofconsume nrllm:within the last 120 seconds. Scheduleagent: work nrllm:every minute on an installation without a consumer.agent: work nrllm:checks the sweep. Without a worker,agent: status -- transport=sweep -- minimum- workers=1 Sendanswers HTTP 503 withMessage WORKER_and stores nothing.UNAVAILABLE
Publish a skill
Create an A2A Publication Profile record (administrators only).
- Skill id, name, description, tags, examples
- What the agent card lists for the skill. The skill id is how a client names it.
- Domain handler
- What turns the client's message into the run and the run's answer into
the result.
nr_sends the message text to the LLM configuration and returns the answer as one text artifact: a text check or a summary, with the instructions of the configuration's system prompt.llm. text - LLM configuration
- The configuration the runs use. If its answer level keeps no result
(
metadataornone, set on its provider), the profile cannot be public, and a call is refused before a task exists withRESULT_(ADR-282). A configuration that is switched off, or restricted to backend groups the client's technical user is not in, refuses a call withNOT_ RETAINABLE PROFILE_. The agent card lists a skill only while its handler is available and its configuration is switched on and keeps a result.UNAVAILABLE - Tools
- Comma-separated tool names the run may use. Without May write,
a profile offers only tools that declare that they only read: a list with
any other tool is not stored, and an existing list stays as it was. Empty:
no tools. A run can ask the client a question with
ask_when the tool is listed here and enabled in the tool management; the task then waits for the client's answer (see below).choice - May write
- The run may use the profile's writing tools too. They write drafts only,
into the pinned workspace of the calling client (ADR-260);
a writer that does not support workspaces refuses there. A client pinned
to live cannot call a writing skill: the record is not saved that way, and
a call is refused with
-32004. A write that needs an approval waits for a person of this installation, as in every run; the task staysWORKINGmeanwhile. The result of a writing task carries a second artifact,writes, that lists every write the run executed (table, record uid, workspace, kind), taken from the write events, not from the model's answer; a run that wrote nothing says so. - Active task quota
- How many tasks of this skill, from all clients together, may be queued or
running at once.
0: no limit of its own. - Public
- Listed on the card and callable. A profile that is not public cannot be called by any client.
Messages and results are text/ only (files are stage 5c).
Register a client
Create an A2A Client record (administrators only):
- Technical backend user
- Every task of the client runs as this backend user, with exactly its permissions. It must be enabled and must not be an administrator; the record cannot be enabled otherwise, and a request is refused if the user changed since. Prepare a user for this purpose.
- Workspace
- The workspace the client's runs act in;
0is live. A client that may call a writing skill needs a draft workspace. - Skills it may call
- The publication profiles the client may use. A client allowed one skill
needs to name none; a client allowed several names the skill in each
message, as
SendmemberMessage Request. metadata https://with the skill id as value. Otherwise the call is refused withnr- llm. netresearch. de/ a2a/ ext/ profile/ v1 PROFILE_.REQUIRED - Task limit
- How many of the client's tasks may be queued or running at once.
- Enabled, expires
- A disabled or expired client is refused like an unknown one.
Then issue its token:
vendor/bin/typo3 nrllm:a2a:client:token <client uid>
The command prints the token once. The record keeps only its public prefix
and its SHA-256; nobody can read the token from the database. Running the
command again rotates the token: the old one stops working at once, and the
client keeps its tasks, which belong to the record, not to the token. The
client sends the token as Authorization: Bearer <token>.
What a client gets
SendMessage - Creates a task and a queued run. The request never executes the run.
Without
return, the request waits until the task is finished, failed, cancelled, rejected or waiting for input, at mostImmediately a2a.(default 20, at most 100). After that it answers HTTP 504 with JSON-RPCserver. blocking Wait Seconds -32603, reasonBLOCKING_and the task id; the task goes on and is read withDEADLINE_ EXCEEDED Get. A repeatedTask messageof the same client returns the task the first one created.Id - Answering a task (
SendwithMessage task)Id -
A task whose run asks a question is
INPUT_; its status message holds the question and, where the question offers a choice, the answers it accepts. The client answers with a message that carries the task'sREQUIRED task(and itsId context, or none: the task's is used). The text is the answer to a question with one free or chosen answer; a question with several values takes a JSON object. The answer is checked like one from the backend (ADR-281): it must fit the question, and the client's technical user must be allowed to run the tool that asked. It is then stored, the run is handed to the worker and the task isId WORKING; nothing runs in the request. A task that does not wait for the client, or has ended, takes no message (-32004); a finished task is never reopened. Only the client's own task can be answered, in its own context and its own skill. Before the run goes on, and at every later resume, the client record, its technical user, its workspace and the skill are checked again; a client disabled or expired, a skill withdrawn from it or no longer public, a changed technical user or workspace, or a tool the run was given that the skill no longer grants (removed from it, or a writing tool after May write was cleared) fails the task. A repeatedmessagereturns the task.Id AUTH_is never set: no run of this installation waits for a credential that a client supplies out of band.REQUIRED Get,Task List,Tasks CancelTask - Only the client's own tasks. Another client's task and a task that does
not exist are the same
-32001.Listsorts by status time, newest first, pages with an opaque token bound to the client, its skills and the filter, and leaves out artifacts unlessTasks includeis true.Artifacts - Task states
SUBMITTEDwhile queued,WORKINGwhile running (also while the run waits for an approval in the backend or for a remote agent, and after the client answered),INPUT_while the run waits for the client's answer,REQUIRED COMPLETEDwith the answer,FAILEDwith a fixed message that names no internal detail,CANCELED, andREJECTEDwhen the input was refused before the run started. The result is kept at the run's answer level and purged with the run (ADR-282).
Limits and protection
- Proxy timeouts. A waiting request holds a PHP-FPM worker. Keep
a2a.below the read timeout of every proxy in front of PHP-FPM; a proxy that cuts the request earlier leaves the client with a transport error and the task unchanged.server. blocking Wait Seconds - Waiting requests. At most
a2a.(default 4) blocking requests wait at the same time on the installation; one more is refused with HTTP 503,server. max Waiting Requests WAITING_. A request withCAPACITY_ EXHAUSTED returntakes no waiting slot.Immediately - Request size. A body above
a2a.(default 1 MiB) is refused with HTTP 413 before it is parsed; a message has at most 16 parts. A task's history keeps the most recent 100 messages.server. max Request Bytes - Failed logins. A failed authentication is logged with the source
address, never with the token, and counted per address: after 10 failures
in 15 minutes a failed request from that address gets HTTP 429 until the
window passes. A request with a valid token is not limited. The rate
limiter is
nrllm-; override it like TYPO3's own limiters ina2a- auth $GLOBALS. Behind a reverse proxy, name it in['TYPO3_ CONF_ VARS'] ['SYS'] ['rate Limiter'] ['nrllm- a2a- auth'] $GLOBALS; otherwise every client counts as the proxy's address and shares one limit.['TYPO3_ CONF_ VARS'] ['SYS'] ['reverse Proxy IP'] - Refusals name their reason (
error.holds adata google.) and, where a retry may help, arpc. Error Info Retry-header.After