Call Other Agents

Open in CMS

In this tutorial you connect another agent to yours, so your agent can hand it a question and use the reply in its own answer. You will paste the other agent's share link, review what it can do, add its key, and test the hand-off in Preview.

You work on Atlas, Kirana Group's operations assistant, and connect Ledger, Kirana Group's finance assistant. Atlas's SOPs say who approves a purchase, but not when Finance pays the vendor. Ledger knows that, so Atlas asks Ledger.


Before you start

  • Read Work With Other Agents to understand the outbound and inbound directions.

  • You have two things from the owner of the other agent:

    • its share link (the agent card URL), and
    • a key that lets your agent connect.

    If the other agent is a qlar agent, its owner finds the share link on Channels β†’ Agent-to-Agent and creates the key on Channels β†’ Agent Keys. In the Kirana example, Finance did this on Ledger in Let Other Agents Call Yours. If you own both agents, follow that page on the other agent first.

  • You have Owner or Contributor access to your agent.


Scenario used in this tutorial

Value
Your agentAtlas, Kirana Group's operations assistant
Agent you connectLedger, Kirana Group's finance assistant for vendor payments
Share linkhttps://api.qlar.ai/dialog/a2a/ledger-finance/card
KeyThe Main key that Ledger's owner created for "Atlas (Kirana operations)"
GoalWhen someone asks Atlas when a vendor invoice gets paid, Atlas asks Ledger and passes on the answer

Step 1: Open Other Agents

In Atlas's left sidebar, open Tools β†’ Other Agents.

The page starts with "Agents Atlas can call for help." Below it, a blue box reads This is the outbound direction: here you connect agents that Atlas can ask for help. To let other agents reach Atlas instead, the box links to Channels β€Ί Agent-to-Agent. If no agent is connected yet, you see No agents connected yet.

Other Agents page for Atlas with the intro Agents Atlas can call for help, the blue box This is the outbound direction linking to Channels β€Ί Agent-to-Agent, the Connect agent button and the empty state No agents connected yet

Step 2: Fetch Ledger's card

  1. Click Connect agent. The Connect agent panel opens on the right, under the heading Connect over the A2A standard.
  2. Paste Ledger's share link into Agent card URL: https://api.qlar.ai/dialog/a2a/ledger-finance/card. It must start with http:// or https://.
  3. Click Fetch card.

qlar reads Ledger's card and fills in the rest of the form for you. If something is wrong, an error appears under the field, for example "Could not reach that card URL. Check it and try again." Check the link with the other agent's owner. For a qlar agent, the link only works once that agent has Reachable by other agents turned on and has been published.

Connect agent panel filled in: Agent card URL https://api.qlar.ai/dialog/a2a/ledger-finance/card with the Fetch card button, Name Ledger, a Description about Kirana Group vendor payments, the skill Ledger under Skills this agent advertises, Authentication with Auth Type Bearer and a masked Key, the Usage rules text, and the Add agent button

Step 3: Review the details

After the card is fetched, check these fields:

FieldWhat to doValue for Ledger
NameThe name shown for this agent. Keep it, or rename it to something your team recognises.Ledger
DescriptionWhat this agent does. Your agent reads this to decide when to call it, so make sure it is specific."Answers questions about Kirana Group vendor payments: payment terms, the Tuesday and Friday payment runs, and what an invoice needs before Finance can pay it." (from Ledger's card)
Skills this agent advertisesA read-only list from the other agent's card. When there are many, click See N more to see them all.One skill, Ledger, with the same description

Step 4: Add the key

Open the Authentication section if it is collapsed. The Auth Type is pre-selected from what the card advertises. For a qlar agent this is Bearer: paste the key you received from Ledger's owner into Key.

If the other agent uses a different method, choose it in Auth Type and fill in the fields that appear. The options are the same as for API tools, see Set Authentication.


Step 5: Write usage rules (optional)

Use Usage rules (optional) to tell your agent when to call this agent, or how to use its replies. For Atlas, enter:

Ask Ledger about vendor payments, invoices and payment runs. Do not ask Ledger about project approvals or site safety; answer those yourself from the SOPs.

The second sentence matters: Atlas already answers approval and safety questions from its own SOPs, so it should not spend a hop on Ledger for those.


Step 6: Add the agent and save

  1. Click Add agent at the bottom of the panel. Ledger appears in the list with an A2A badge and a delete icon.
  2. Click Save all changes at the bottom of the page and confirm. You should see Connected agents successfully updated!
Other Agents list with Ledger, its description about Kirana Group vendor payments, the A2A badge and a delete icon, and below it the collapsed row Classic connections (manual key) Β· 0 with the Add classic button

To change a connected agent later, click its row; to remove it, click its delete icon. Then click Save all changes again.


Step 7: Test in Preview, then publish

  1. In the preview panel, click the reload button to start a fresh conversation, then ask something only Ledger can answer:

    A vendor sent a USD 72,000 invoice for the Surabaya warehouse steel. When will Finance pay it, and what does the invoice need?
    
  2. Atlas calls Ledger and answers with Kirana's payment rules: Finance pays on Net 30 from receipt of a complete invoice, in payment runs every Tuesday and Friday. Because the invoice is above USD 50,000, the Finance Controller must sign off before it can enter a payment run. The invoice needs the matching purchase order number, a signed delivery note or service acceptance, and the vendor's tax invoice (Faktur Pajak).

  3. When you are happy, click Publish at the top of the CMS so live users get the new connection. See Preview and Publish Changes.

Atlas preview: to the question about a USD 72,000 invoice for the Surabaya warehouse steel, Atlas replies that Finance pays on Net 30 from receipt of a complete invoice through payment runs every Tuesday and Friday, that the Finance Controller must sign off on this USD 72,000 invoice, and lists what to submit: the purchase order number, a signed delivery note or service acceptance, the vendor's tax invoice (Faktur Pajak) and Finance Controller sign-off

None of this is in Atlas's own knowledge. If Atlas answers without calling Ledger, or says it does not know, make the Description and Usage rules more specific about when to use Ledger.


Classic connections (manual key)

Below the A2A list, a collapsible row Classic connections (manual key) holds older key-based links. It shows how many there are, for example Β· 0. They still work, but the classic method is pending sunset: use Connect agent for anything new.

If you must add one, click Add classic and fill in:

FieldWhat to enter
Action NameA short, unique name, for example ask_ledger
Agent CodeThe other agent's code
Agent KeyA key created on the other agent's Channels β†’ Agent Keys page
DescriptionWhat the other agent does and when to call it
Loading Text TypeHow the "please wait" message is produced while the call runs
Rules and Response PromptHow to use and present the reply

Add it from the panel, then click Save all changes and publish, just like an A2A connection.


Check the result

  1. On Tools β†’ Other Agents, Ledger is listed with the A2A badge.
  2. In a fresh Preview conversation, the USD 72,000 invoice question gets an answer with Net 30, the Tuesday and Friday payment runs, Finance Controller sign-off, and the three documents.
  3. Ask an approval question, for example "Who has to approve a project worth $2.5 million?". Atlas should answer from SOP-FIN-007 itself, without asking Ledger.

Next steps