create_run
Create a new run record from a real user/AI dialogue transcript. REQUIRED FOR OPTIMIZATION: You must upload runs before running trigger_optimization - optimization analyzes these dialogues to improve the prompt.
IMPORTANT: The content must contain actual back-and-forth dialogue between a user and AI assistant - NOT system prompts, instructions, or configuration text.
You can either:
Use an existing prompt: provide promptId
Auto-create a new prompt: provide prompt + promptName + llmModel
When auto-creating, the prompt will be created and activated automatically before the run is logged.
TOOL USAGE: If the agent had tools available or made tool calls, pass toolDefinitions (tools available) and toolCalls (calls actually made, with arguments and results) so Converra can grade tool selection and results.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | No | The system prompt content (for auto-create). If provided with promptName and llmModel, a new prompt will be created automatically. | |
| status | No | Run status (default: completed) | |
| agentId | No | The agent ID this run is associated with. Required unless using auto-create (prompt + promptName + llmModel) | |
| content | Yes | The full run transcript with alternating user and AI messages. Format: Use 'User:' and 'AI:' (or 'Assistant:') labels. Example: User: Hi, I need help with my order AI: Hello! I'd be happy to help. Could you provide your order number? User: It's #12345 AI: Thanks! I found your order. What seems to be the issue? DO NOT submit system prompts, prompt instructions, configuration text, or anything that isn't actual user-AI dialogue. | |
| traceId | No | Runtime trace ID this run belongs to. Groups it under a trace for lineage (see get_trace_lineage). | |
| llmModel | No | LLM model used (e.g., 'gpt-4o'). Required when auto-creating a prompt. | |
| toolCalls | No | Tool/function calls the agent actually made, in order. Send these so Converra can evaluate tool selection and results - auto-instrumentation captures tool definitions but not the calls themselves. Each item: { name, arguments, result?, id? }. | |
| customerId | No | (Converra superadmin only) Target customer ID to act on behalf of | |
| promptName | No | Display name for the auto-created prompt (required when providing prompt content) | |
| companyName | No | Name of the company/client in the run (optional) | |
| parentTraceId | No | The traceId of the trace that SPAWNED this one (e.g. a design run that spawned this interview). Requires traceId. Immutable once set. | |
| toolDefinitions | No | Tools that were available to the agent during this run (ground-truth tool contracts). Lets Converra grade whether the agent reached for the right tools. Each item: { name, description?, parameters? }. |