Your AI agent can read data from and write data to any of your systems, or any third party systems you use that offer API access. This guide explains how to configure it.

Entity model: Workflows, Tools, APIs / Webhooks

Data access it managed like this: Workflows tell the agent when to use Tools to request data or actions. Tools are connected to either APIs or a Webhook that manage the data fetching and action requests.

A Workflow can include none or many Tools. A Tool is connected to one API or Webhook. But an API or Webhook can be connected to one or more Tools.

For example, a workflow to update a customer’s address may have a Workflow node that asks for the customer’s new address then uses a Tool to update it. That Tool is connected to a /user/update API that updates the address in your system. Later, if the user wants to update the date of birth, a different Tool may call the same user/update API to do that.

Recommended setup steps

Decide on integration strategy for the tool.

Tools can get data from three places:

  • APIs: Tools can call your APIs, or third party APIs.
  • Webhook: Tools can trigger a ping from Lorikeet to a webhook you expose.
  • Mocks: You can mock a tool to return a specific JSON blob. This is particularly useful when testing and iterating.

Set up a tool

Hit the create button on the Tool page.

Give the tool a semantic, meaningful name.

Define the expected inputs, and expected outputs.

Select the tool’s data source (Webook, API, or Mock)

Set up the data source

Webhook

  • Write a webhook handler, and paste the URL here. That page also gives you the signing secret and client id to use.
  • Test it with the validate button.
  • We expect either a 200 response with data, or a 202 response followed by a post to the URL provided in the webhook ping

API

  • Enter the API details here (e.g. HTTP method, any headers, how inputs are provided, the shape of the input object)
  • Set up Auth for the API on the Auth tab. Auth setups can be shared across API configs.

Tips for making your data sources API friendly

Lorikeet’s agent is good at problem solving with your data, if you let it!

In particular it’s common that customers will misspell inputs, meaning that lookups in your system won’t return results (e.g. you don’t find any customer with the email john.doo@example.com).

If your APIs return errors in these situations (e.g. the technically correct 404 response), the Lorikeet agent will bail out and escalate the ticket.

However if you return feedback (e.g. a message field or simply an empty object or array), the agent will work with the customer to debug (e.g. ‘Could you check the seplling of your email?’) and then will retry the tool call with new inputs.