Kissflow DocsHelp center

Test an agent

Run an agent's example in AI Builder, test your own inputs, and know that a test run uses real tools.

Before anyone runs your agent, you can try it yourself. You need App Admin or Edit permission in the development environment to test the Draft. This article shows you how to run an agent's example, how to test with your own inputs, how to read the result, and what to check before you generate.

Video: Test an agent

Draft and Live

Every agent has two versions.

  • Draft is the version you edit and test. App users never see it.
  • Live is the published version. People and integrations always run Live, never the Draft.

A test run uses Draft. Tests leave Live unchanged, but their tools can change real records.

Run a test

  1. Open your app in AI Builder.
  2. Open the Blueprint and select the Custom Agents tab.
  3. On the agent's card, expand Instructions & example run.
  4. Under Example run, pick Example 1 or Example 2. What the person enters shows sample values ("sample values, not live data"), and What comes back shows the declared sample.
  5. Click Run the example. It "Runs the Agent's Draft live on your dev account with these values." The run uses real tools, so any tool action really happens.

An agent's Instructions and Example run panels with sample inputs, declared sample outputs and the Run the example button

An animated walkthrough of the example run: the Custom Agents tab, the Invoice Checker card expanded with its instructions, and the Example run panel with sample values and the Run the example button

The example run uses the sample values shown on the card. Use the API test route to supply other values.

Test with your own inputs

To try a typical case, a messy one, or one with missing information, use the API test route.

  • Call the API test route (developers). POST /agent/2/{AccountId}/application/{AppId}/custom-agent/{AgentId}/test takes the same body as a normal run, with InputData that matches your agent's declared inputs:
{ "InputData": { "ExpectedAmount": 1200, "Currency": "USD" } }

This example assumes ExpectedAmount is a Number input and Currency is a Text input. Supply all required inputs declared by your agent. Authenticate with a signed-in session or the X-Access-Key-Id and X-Access-Key-Secret headers for a user with App Admin or Edit permission in development.

The inputs are validated like a normal run, and Draft runs with them. The API returns an ExecutionId before results are ready. Read GET /agent/2/{AccountId}/application/{AppId}/custom-agent/{AgentId}/execution/{ExecutionId} until the status is Completed or Failed. Test runs don't take a Live run slot. See Limits.

Important

A test run is a real run. If the agent has tools, such as creating an item on a board or updating a dataform record, they act for real. Test with data you don't mind changing.

Read the result

Results come back as the output fields you defined. Compare them with the declared sample and with what you expect. Check these things.

CheckWhat to look for
Right answerDoes each field match what you expect for this input?
Right shapeAre numbers numbers and Yes/No fields really Yes or No?
Missing informationWhen the input lacks something, does the agent say so instead of guessing?
Tool useIf the agent has tools, did it act on the right record, and only when it should?
ExplanationIf you added a Reason output, does it explain the answer in a way you can follow?

Run results include status, results, timestamps and any error, not the agent's working. If you want to see why it answered the way it did, add a text output called Reason and tell the agent in its instructions to fill it in.

Change it and run again

If the result is wrong, don't edit around it. Tell AI Builder in chat what to change, for example "Only flag mismatches above 2%" or "If the total is missing, explain that in the Reason text output". Saving the agent definition updates Draft. Run the example again.

Results can vary slightly between runs of the same input. If a result looks borderline, run it more than once before you decide.

Generate when you are ready

AI Builder creates and publishes agents when you click Generate, together with the app, so Live matches what you built and tested. To change an agent later, see Change an app after it's generated. For a careful, repeatable way to decide whether an agent is good enough, see Evaluate agent quality.

Tip

Test with real, messy examples: a blurry scan, a missing field, an unusual layout. Clean sample data hides the problems that appear later.

On this page