Build/Agents

Testing with Workbench

Use the built-in development UI to test agents, validate schemas, and debug responses

The Workbench is a built-in UI for testing your agents during development. It automatically discovers your agents, displays their input/output schemas, and lets you execute them with real inputs.

Enabling the Workbench

Add the Workbench to your app.ts:

import { createApp } from '@agentuity/runtime';
import { createWorkbench } from '@agentuity/workbench';
 
const workbench = createWorkbench();
 
await createApp({
  services: {
    workbench,
  },
});

Start the dev server and visit http://localhost:3500/workbench.

Adding Test Prompts

Export a welcome function from your agent to customize the Workbench experience:

import { createAgent } from '@agentuity/runtime';
import { z } from 'zod';
 
const agent = createAgent('Support Agent', {
  schema: {
    input: z.object({ message: z.string() }),
    output: z.object({ response: z.string() }),
  },
  handler: async (ctx, input) => {
    // Agent logic
    return { response: 'Hello!' };
  },
});
 
export const welcome = () => ({
  welcome: `Welcome to the **Support Agent**.
 
Ask questions about your account, billing, or technical issues.`,
  prompts: [
    {
      data: JSON.stringify({ message: 'How do I reset my password?' }),
      contentType: 'application/json',
    },
    {
      data: JSON.stringify({ message: 'What are your business hours?' }),
      contentType: 'application/json',
    },
  ],
});
 
export default agent;

The welcome field supports Markdown. The prompts array provides quick-test buttons in the UI.

What You See

The Workbench displays:

  • Agent selector: Switch between agents in your project
  • Input schema: See what fields the agent expects
  • Output schema: See what the agent returns
  • Execution metrics: Token usage and response time
  • Response viewer: Formatted output with copy support

Custom Route

Serve the Workbench at a different path:

const workbench = createWorkbench({
  route: '/dev',
});

Next Steps

Need Help?

Join our DiscordCommunity for assistance or just to hang with other humans building agents.

Send us an email at hi@agentuity.com if you'd like to get in touch.

Please Follow us on

If you haven't already, please Signup for your free account now and start building your first agent!