Workbench Configuration
Configure routes, authentication, and embed Workbench in custom frontends
This page covers advanced Workbench configuration and embedding. For basic setup and testing agents, see Testing with Workbench.
Configuration
| Option | Type | Description |
|---|---|---|
route | string | Custom route path (default: /workbench) |
headers | Record<string, string> | Custom headers for API requests |
apiKey | string | Bearer token for authentication |
Custom Route
Serve the Workbench at a different path:
const workbench = createWorkbench({
route: '/dev',
});Authentication
Protect the Workbench with an API key:
const workbench = createWorkbench({
apiKey: process.env.WORKBENCH_API_KEY,
});Set the AGENTUITY_WORKBENCH_APIKEY environment variable to enable authentication. Requests without a valid Bearer token will be rejected.
Embedding in Your Frontend
The Workbench exports React components you can embed in your own application:
import { App } from '@agentuity/workbench';
import '@agentuity/workbench/styles';
import { encodeWorkbenchConfig } from '@agentuity/core/workbench';
const config = encodeWorkbenchConfig({
route: '/workbench',
headers: {},
});
function MyApp() {
return <App configBase64={config} />;
}For custom layouts, the package also exports individual components:
Chat- The conversation areaSchema- Schema viewer panelWorkbenchProvider+useWorkbench- Context and hooks for full control
Debug Logging
Enable debug logging in the browser console:
localStorage.setItem('AGENTUITY_LOG_LEVEL', 'debug');Valid levels: debug, info, warn, error. Refresh the page after setting.
Next Steps
- Testing with Workbench: Basic setup and test prompts
- React Hooks: Build custom agent UIs
- Local Development: Dev server options
Need Help?
Join our Community 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!