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 notice titled This is the outbound direction explains that here you connect agents that Atlas can ask for help. To let other agents reach Atlas instead, the notice links to Channels โ€บ Agent-to-Agent. The toolbar has a search box, a Connect agent button and a More ways to connect (โ‹ฎ) menu. 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 notice This is the outbound direction linking to Channels โ€บ Agent-to-Agent, a Search agents field, a More ways to connect menu, the Connect agent button, and a table with the columns Agent, Description and Type listing Ledger

Step 2: Fetch Ledger's card

  1. Click Connect agent. The Connect agent drawer opens on the right. Its Agent card section says you 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 "Couldn't 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 drawer filled in: the Agent card section with Agent card URL https://api.qlar.ai/dialog/a2a/ledger-finance/card and the Fetch card button, the Agent details section with Name Ledger, a Description about Kirana Group vendor payments and the skill Ledger, the Connection section with Authentication type Bearer and a masked Key, the Usage rules text box, and the Cancel and Add agent buttons

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)
SkillsA read-only list from the other agent's card. When there are many, click Show N more to see them all, then Show fewer to collapse.One skill, Ledger, with the same description

Step 4: Add the key

In the Connection section, the Authentication block shows an Authentication type that 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 Authentication 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, which is 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 in the drawer footer, next to Cancel. Ledger appears in the table with an A2A chip in the Type column.
  2. Click Save all changes in the bar that appears at the bottom of the page, then confirm. You should see Connected agents saved.
Other Agents table with the columns Agent, Description and Type: Ledger, its description about Kirana Group vendor payments, the A2A chip in the Type column and a Row actions menu, and below the table the note that classic connections are older key-based links

To change a connected agent later, click its row. To remove it, open Row actions on its row and choose Delete. 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)

Classic connections are older key-based links. They appear in the same table with a Classic chip. They still work, but the classic method is pending sunset: use Connect agent for anything new.

If you must add one, open More ways to connect (the โ‹ฎ button beside Connect agent), choose Add classic connection, and fill in:

FieldWhat to enter
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 messageHow the "please wait" message is produced while the call runs
Rules and Response promptHow to use and present the reply

Add it in the drawer with Add connection, 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 chip.
  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