Agents
Agents in Braintrust allow you to chain together two or more prompts. You can create or edit agents in the playground, and view and execute them from the library.
Agents are in beta. They currently only work in the playground UI, and are limited to prompt chaining functionality. If you are on a hybrid deployment, agents are available starting with v0.0.66
.
Control flow with loops is coming soon, along with full SDK support.
Creating an agent in the playground
To create an agent, navigate to a playground and select +Agent. Start by creating the base prompt or selecting one from your library. Then, create or select another prompt by selecting the + icon in the comparison agent pane.
The prompts will chain together, and they will automatically run consecutively.
Variables
When building agents, you must explicitly reference outputs from the previous nodes using variables.
- To use the output of the immediate previous node, include
{{input}}
in your prompt. - If the previous node outputs structured data, use dot notation, for example,
{{input.foo}}
.
Viewing and executing agents
You can view and execute single runs of agents from your agent library, but you will not be able to edit them or see them run.