← All posts
tutorialapi-toolsagentswebsite-widget

Build an AI Chat Agent for Your Business From Any API

SynapseOrch TeamMay 17, 2026Updated November 14, 20268 min read
Build an AI Chat Agent for Your Business From Any API

Your business already runs on APIs: the product catalogue, the order system, the booking calendar, the help desk. An agent that calls them can answer a customer or a colleague with live data instead of a guess, and do the small jobs those systems already allow, like looking up an order or placing one.

You no longer wire that agent up one endpoint at a time. In SynapseOrch 2.0 you tell Synapse AI, the assistant inside SynapseOrch, which API to use. It reads the API, shows you a plan, and builds the tools and the agent once you approve. This guide walks through each step and what to check before you say yes.

From API spec to shop assistant in one askOn YouTube

What you end up with

  • One tool per call the job needs. Each says what it does (reads, changes or deletes something), so your tool policy can make the risky ones wait for a person.
  • An agent that uses them, with instructions you read before anything is built.
  • Wherever your customers are: a chat widget on your website, where visitors can use only the tools you tick, or your own app through the chat API.

Step 1: Tell Synapse AI about the API

Open Synapse AI from the menu, or type into the ask line on Home. Say what the agent is for and which API it should use. Give it whatever you have:

You haveWhat Synapse AI does with it
An OpenAPI or Swagger spec (its URL, or the file in your Vault)Reads it as the Tools screen's import does. Each operation the plan uses becomes a tool, with the spec's address, inputs and sign-in
A link to the API's docs, or just its addressReads the page and follows a spec it links to. Given only an address, it tries the usual places a spec lives, and asks you for one if it finds none
A curl command you already useKeeps its method, address, headers and body. Only what changes from call to call becomes an input, and the key stays out of the tool
A URL and what it doesMakes that one tool and checks it

The request in the pictures below was one sentence:

Make me an agent I can ask about exchange rates any time, using the Frankfurter API.

Step 2: It reads the API, then asks what only you know

Before it plans anything, Synapse AI looks the API up: what it offers, whether it needs an account or a key, and where its spec is. It tells you what it found, and nothing is connected yet.

Asked to make an agent for exchange rates with the Frankfurter API, Synapse AI reports who can do it: the Frankfurter API, a free, open exchange-rate API with current rates, historical rates and a currency list, no account or key needed. Nothing is connected or booked yet.
Synapse AI found the Frankfurter API: free, with no account or key needed.

If the job depends on something only you know (which shop, which currency, what the agent may do without asking), it asks you, in one form, before it plans.

Step 3: Read the plan before anything is built

The plan says what will be made, in plain words. For an API agent, look at four things before you approve:

  1. The tools. One per call the job needs, each named after what it does. Too many or too few? Press Change something and say so.
  2. The agent's instructions. Open them: your yes covers them too.
  3. The model, and why it was picked. A stronger one is a button away.
  4. What asks you first. A tool that changes something, like placing an order, can wait for your OK every time. The plan says which tools will ask and which will act without asking.
The plan: an Exchange Rate Agent with three Frankfurter tools (latest, historical and currencies), the agent it creates, its instructions to read before approving, the model it will use and why, and Stop instead, Change something and Build it.
The plan for the exchange-rate agent: the agent and its three tools, its instructions and its model.

If the API needs a key, the plan's After your yes lists a Connect card for it. You never type a key into the chat. A key pasted there anyway is taken out before anything reads it, and Synapse AI tells you to rotate it.

Step 4: Build it, then ask your agent something

Press Build it. Synapse AI makes the tools, then the agent, checks them, and takes you to what it built.

After Build it: three tools created (frankfurter_api_get_fx_latest, _historical and _currencies), then the agent and its workflow, and Synapse AI’s summary of what it built.
Three tools, then the agent and its workflow.

Open the agent in Chat and ask it something real. Under each answer, Tools used opens the calls it made, so you can see the answer came from the API and not from the model's memory.

The whole build in 36 seconds: the request, the plan, the tools and the agent's first answer.

Decide what it may do on its own

Every HTTP tool says what it does, and starts from its method:

MethodWhat it doesSafe to repeat
GETReads onlyYes
PUTChanges somethingYes
POST, PATCHChanges somethingNo
DELETEDeletes somethingYes

Every HTTP tool also reaches outside this workspace until you untick it. Your agent's tool policy then decides, for each kind of tool, whether a call runs (Allow), waits for a person (Ask first) or is refused (Block), and a rule for one tool overrides its kind. So "search the catalogue" can just run, while "place an order" waits for a yes in the app.

One thing to check: if a GET on your API changes something (some do), say so in the tool. Synapse AI may mark a tool it makes as riskier than its method suggests, never safer.

Put it in front of your customers

On your website. Under Channels › Widgets, pick the agent, list the sites allowed to show it, and copy one script tag:

<script src="https://your-install/embed/v1.js" data-key="pk_..." async></script>

A visitor doesn't get the agent's tools. Under What visitors can use you tick the ones a visitor's turn may use, and nothing is ticked until you do. A tool that would ask a person first is refused for visitors, since nobody on your site can approve it, and nothing a visitor says goes into the agent's memory. On SynapseOrch Cloud, widgets come with the Solo plan and up.

The Widgets tab of Channels: the Stockist help widget with the script tag to paste, the one allowed site, what visitors may use, its look, and a live preview.
A widget's settings: the tag to paste, the sites allowed, what visitors may use, its look and a live preview.

In your own app. Every agent answers on the chat API, with an API key:

POST /api/v1/chat
Authorization: Bearer sk-syn-...
Content-Type: application/json
 
{
  "message": "Do you have a novel set by the sea?",
  "agent": "Shop assistant",
  "session_id": "visitor-42"
}

Send the same session_id with the next message to carry the conversation on. Each agent is also an OpenAI-compatible model, for tools that speak that format.

In a chat app. On Cloud, agents answer in Telegram. When you run SynapseOrch yourself, also in Slack, Discord, Microsoft Teams and WhatsApp.

Prefer to make each tool yourself?

You still can. In Apps › Tools, press New tool and choose HTTP request, or use Import OpenAPI on the same screen to make one tool per operation in one step. A tool needs:

  • Name: what the agent calls it, like get_order.
  • Description: what it does and when to use it. The agent reads this to decide, so be specific.
  • Method and URL: type {{ in the URL to insert an argument, as in https://api.yourshop.com/orders/{{order_id}}.
  • Headers: for a key, use a variable, Authorization: Bearer {{ global.shop_token }}, rather than pasting it.
  • Input schema: what the agent must pass, as JSON Schema.
{
  "type": "object",
  "properties": {
    "order_id": { "type": "string", "description": "The order number, like 4521" }
  },
  "required": ["order_id"]
}

Then give the tools to an agent under its Tools, and try it from the Agents page.

What people build with this

BusinessThe customer asksThe calls behind it
Online shop"Anything like this under €20, in stock?"Search the catalogue, read stock
Support desk"Where is my order 4521?"Read the order, read its shipment
Bookings"Can I move Thursday's appointment to Friday?"Read free slots, change the booking (can ask you first)
Internal tools"How many units of SKU-9912 are left?"Read the stock record

Where to go next

First published on May 17, 2026, when each tool was made by hand. Rewritten on November 14, 2026 for SynapseOrch 2.0, where Synapse AI builds them from a sentence. The shops and APIs in the pictures are from our demo workspaces; none of them is a customer.