Overview
Theagent_configs table stores configuration data for individual agents within workflows. Each agent element in a workflow can have its own configuration settings stored in this table.
Table Schema
Unique identifier for the configuration record (auto-generated UUID)
Foreign key reference to the authenticated user
Identifier of the workflow element this configuration belongs to
Type of agent (e.g., “processor”, “transformer”, “analyzer”)
Agent-specific configuration data stored as JSON. The structure varies by agent type.
ISO 8601 timestamp of when the configuration was created
ISO 8601 timestamp of the last configuration update
TypeScript Interface
CRUD Operations
Save Configuration
Saves or updates an agent’s configuration. Uses upsert to either create a new configuration or update an existing one based on theuser_id and element_id combination.
Endpoint: manage-agent-configs
Request:
Get Configuration
Retrieves the saved configuration for a specific agent element. Endpoint:manage-agent-configs
Request:
Relationships
- user_id → References the authenticated user’s ID
- element_id → References a workflow element ID from the
user_workflows.data.elementsarray - Configuration is linked to specific workflow elements, allowing each agent instance to have unique settings
Constraints
- Unique constraint: The combination of
user_idandelement_idmust be unique (enforced by upsert withonConflict: 'user_id,element_id') - The
element_idshould correspond to an element in the user’s workflow - The
configfield must contain valid JSON - Both
element_idandagent_typeare required for all operations
Usage Notes
- The
configobject structure is flexible and varies by agent type - Configurations are persisted separately from workflow data for better modularity
- When an agent element is duplicated in a workflow, it should reference a different
element_idto maintain separate configurations - The upsert operation ensures that saving a configuration multiple times updates the existing record rather than creating duplicates