Overview
Thecreate_execution_context function creates a new execution context for AI operations, establishing a session for agent interactions.
Function Signature
Parameters
The execution context configuration including:
agent_id: ID of the AI agent to use (required)workflow_id: ID of the workflow (optional)user_id: ID of the user initiating the context (optional)session_id: Unique session identifier (optional)context: Custom context data as JSON (optional)
Return Value
ReturnsResult<AiExecutionContext> containing the created execution context details.
Basic Usage
Advanced Usage
Error Handling
Important Notes
- Execution contexts are required for agent interactions
- Contexts maintain conversation state and history
- Each context is tied to a specific agent and user
- Contexts expire after a period of inactivity
Rate Limits
- Create operations: 100 requests per minute per user
- Burst limit: 10 requests per second
Related Functions
- fetch_execution_contexts - List all contexts
- fetch_execution_context - Get specific context
- update_execution_context - Update context data
- delete_execution_context - Delete context
