Run an agent and read its answer
Running an agent alone is the fastest way to test it: you give it a task, you read the answer, you adjust the instructions, you try again.
What you need
Section titled “What you need”- An agent with a model and instructions, published. See Create an agent.
- A model connection that works. Each execution uses the AI model, and your provider bills you for it.
Give a task
Section titled “Give a task”Open Studio > Agents and open the agent.
In the switch at the top, select Execution. The panel on the right asks “What would you like the agent to do?”
In the field Describe the task for the agent…, type the task. For the
Reminder Writer:Customer: Northgate Bakery. Invoice INV-2041, 1,250 euros, due on 15 September. Write the reminder.Send it.
The answer arrives in the same panel, as it is written.
Answer when the agent asks
Section titled “Answer when the agent asks”If the agent has a channel, it can stop and ask you something. The field at the bottom then says Type your response… Type your answer and send it. See Let an agent ask a person before it decides.
Control the execution
Section titled “Control the execution”The panel has buttons to Pause run, Resume run and Cancel run. Pause run shows while the execution runs, and Resume run only once you paused it: it undoes your pause. An execution that waits for a person is not paused: you answer it, there is no Resume run to select. After an execution, it also has Run again and Reset.
Read what happened
Section titled “Read what happened”Below the canvas, three tabs show the execution:
| Tab | What it shows |
|---|---|
| Inspector | The steps of the execution. Select a step to see its inputs, its outputs and its logs. |
| Errors | What went wrong. When all is well, it says “No runtime errors detected.” |
| Logs | The technical record of the execution. |
Improve and try again
Section titled “Improve and try again”- Read the answer as the person who will receive it.
- Go back to Editor, in the switch at the top, and change the instructions.
- Select Publish.
- Go to Execution and give the same task again.
Change one thing at a time. You then know which change improved the answer.
Find an execution again
Section titled “Find an execution again”The section Executions, in the menu on the left, lists the executions of your whole workspace, with their state. See Run a workflow and follow each step for what this page shows.
How to know it worked
Section titled “How to know it worked”- The panel shows the answer of the agent.
- The tab Errors says “No runtime errors detected.”
If it does not work
Section titled “If it does not work”- The execution fails at once. The agent has no model, or the credentials of its model are not chosen. See Choose or change the model of an agent.
- The answer ignores your documents or your tools. Say in the instructions when to use them.
- The agent asks a question you did not expect. Change its instructions, or stop it from asking. See Let an agent ask a person before it decides.
Next step
Section titled “Next step”Put the agent in a team: Create a team of agents.