Connecting your agent to your business system's API
Updated
Available on Pro and upAfter this, your agent checks stock, orders, or schedules right in your business system through its API, then answers customers from the result.
On this page
Steps
Open Connections → All connections → Integrations, then press Connect, or Manage if you already have a tool, on the Agent API tools card.
What you'll see: The Agent API tools page opens with your tools, or No API tools yet, and an Add tool button.
Press Add tool, then fill in Name, for example check_stock.
What you'll see: The Add tool window opens with Name, When the agent uses it, Method, URL, and Authentication.
In When the agent uses it, write what the tool does and when to use it, for example when a customer asks about product stock.
What you'll see: Your agent picks tools from this note, so write it as clearly as you'd explain it to a new staff member.
Choose the Method, enter your API's https address in URL, then choose the Authentication: Bearer token or Key in a header if your API asks for one.
What you'll see: A Token field appears for Bearer token, or Header name and Key for Key in a header.
Fill in the Token, or the Header name and Key, from your business system.
Press Add parameter for each value sent to the API, then fill in its Name, for example product.
What you'll see: A Parameter 1 row appears with Name, Type, Source, Note for the agent, and Required.
Choose the Source: Filled by the agent from the chat for what the customer mentions, or Customer number for data that belongs to that customer.
For values from the chat, write in Note for the agent what goes there, for example the product name the customer asks about.
If your API's response is long, fill in Response fields your agent reads, for example product.name, product.stock, then press Save.
What you'll see: The tool is listed with its name, method, and URL.
Press ⋮ on that tool's row, choose Test, fill in sample values, then press Run test.
What you'll see: Below the button it shows HTTP 200 and how long it took, then your API's response shows under What your agent reads. A token or key inside the response shows as ••••.
Open AI agent → Agent settings, choose the Rules tab, then under API tools tick that tool and press Save.
What you'll see: The bar at the bottom says Saved. That profile's agent calls the tool when a chat matches its note.
If something goes wrong
- The Agent API tools card says Available on Pro and up
Agent API tools start on the Pro plan. Press Upgrade plan on that card.
- The test failed: HTTP and a number
Your API answered but turned the request down. 401 or 403 usually means the token or key is wrong, and 404 means the URL doesn't exist. Fix it with Edit in that tool row's ⋮ menu, then test again.
- The test failed: The address points to a private network
SiagaAI doesn't call addresses on a private network, like localhost or 10. and 192.168. addresses. Use an API address that can be reached from the internet.
Related
- Connecting other systems with the API and webhooks
After this, other systems like Zapier, Make, or n8n read and change your business data with an API key, and hear about changes through webhooks.
- Getting to know the AI agent
Your agent answers chats on every channel from your business data, and passes on the chats that need you.
Still need help?Contact →