Overview
The Manage Agent Configs endpoint handles CRUD operations for agent configurations. Each agent in a workflow needs configuration (API keys, credentials, settings) which is stored securely per element.Endpoint
Authentication
Requires a valid Supabase JWT token:Operations
Save Configuration
Saves or updates configuration for a specific agent element.Request Body
Must be
"save-config" for save operationsUnique identifier for the workflow element being configured
Type of agent being configured. Must be one of:
text_generatorgmail_readergmail_senderdiscord_messengergithub_reader
Agent-specific configuration object. Structure varies by agent type.
Example Request (Text Generator)
Success Response (200)
Always
true for successful savesConfirmation message
Get Configuration
Retrieves saved configuration for a specific agent element.Request Body
Must be
"get-config" for retrieval operationsUnique identifier for the workflow element
Type of agent (text_generator, gmail_reader, etc.)
Example Request
Success Response (200)
The saved configuration object, or
null if not configuredConfiguration by Agent Type
Text Generator
Gmail Reader
Gmail Sender
Discord Messenger
GitHub Reader
Error Responses
400 Bad Request
401 Unauthorized
500 Internal Server Error
Database Schema
Configurations are stored in theagent_configs table:
Configurations are unique per user and element. Saving a config for the same
elementId will update the existing configuration.Security
Usage Pattern
- Configure Agent: User fills in configuration form in UI
- Save Config: Call with
action: "save-config"and config data - Load on Edit: Call with
action: "get-config"when user reopens config panel - Execute Workflow: Config is automatically loaded by workflow execution based on
elementId
Row Level Security
Theagent_configs table uses RLS to ensure:
- Users can only access their own configurations
- Configs are automatically filtered by
user_id - Cross-user access is prevented
See Also
- Agent Configs Database Schema - Detailed database structure
- Run Workflow - How configs are used during execution
- Agents Overview - Available agent types and their requirements