Skip to main content

Use a remote A2A agent

What it is

A remote agent runs on another server and speaks the A2A protocol. Loomcoding downloads its card, which describes what the agent does, and delegates work to it only after you approve it.

What it is for

  • Delegating part of a task to an agent that someone else runs.
  • Checking what a remote agent can do before you trust it.

How

  1. Set role = "consume" in the [a2a] section of the project loomcoding.toml, then restart Loomcoding.
  2. Create a profile .md with transport: a2a-remote and a2a.endpoint.
  3. Open /agents, check the card, and press a to approve.

Example​

# loomcoding.toml of the project
[a2a]
role = "consume"
---
name: devops
description: Answers questions about the deployment pipeline.
transport: a2a-remote
a2a:
endpoint: https://agents.example.invalid/.well-known/agent-card.json
---

Put the profile in ~/.agents/agents/ for all projects, or in .agents/agents/ for one project.

Credentials​

If the remote agent needs a key, map its security scheme to the name of an environment variable. Never write the secret in the file.

a2a:
endpoint: https://agents.example.invalid/.well-known/agent-card.json
credentials:
apiKey: DEVOPS_API_KEY

The profile does not load if the value looks like a secret instead of a variable name.

Settings and defaults​

NameDefaultRequires restart
[a2a] roleoffYes
[a2a] request_timeout_secs30 secondsYes
[a2a] card_refresh_secs3600 seconds. 0 turns the refresh off. The minimum is 60.Yes
[a2a] max_card_bytes65536 (64 KiB)Yes
[a2a] max_result_bytes262144 (256 KiB)Yes
[a2a] ca_filenot set. A PEM file with extra certificate authorities.Yes
[a2a] trusted_jwksnot set. A JWKS file for card signatures.Yes
CommandWhat it doesRequires restart
/agentsLists the agents. Press a to approve and r to revoke.No
/refresh-agentsDownloads the cards of the remote agents again.No
/a2aShows cards, tasks and exchanges.No

Result​

After you approve it, /agents shows the agent as approved, and the agent can receive work. A remote agent can ask you a question while it works. The phase for that is awaiting parent input.

Approval is tied to the endpoint and to the card. If the remote agent changes its card, the agent goes back to pending until you approve it again.

If it does not work​

SymptomFix
The message "Remote agents are not enabled" appears.Set role = "consume" and restart Loomcoding.
The agent is pending and says its card is not downloaded.Run /refresh-agents. An agent without a card cannot be approved.
The profile does not load because of the endpoint.The endpoint must use HTTPS. Plain HTTP is accepted only for loopback addresses.
An approved agent went back to pending.The card changed. Review it, then approve it again.

Next steps​