# Activity Route: /activity # Activity Activity tracks TA engagement across your Glow instance -- sessions, logins, emulations, and per-profile usage summaries. It gives program coordinators visibility into who is actively training and who may need follow-up. ![Activity feed showing recent practice sessions with timestamps, durations, and completion status](/screenshots/activity/feed.png) ## What is Activity? Activity provides two views of TA engagement: 1. **Summary view** (`POST /system/activity`) -- Aggregate counts (sessions, active profiles, logins, emulations) plus a per-profile breakdown showing each TA's session count, login count, grants, problems, and total activity. 2. **Session history** (`POST /system/sessions`) -- Paginated table of individual sessions with details like token usage, run counts, chat counts, attempt counts, and cost. This is the go-to resource when you need to answer questions like: - Which TAs have logged in this week? - How many training sessions have been completed this semester? - Are there any sessions with problems that need to be resolved? ## Quick Start ### CLI > Calls below use `$GLOW_INSTANCE_URL` + `$GLOW_TOKEN` — see [Authentication](/authentication) to export them once. ```bash # Get activity summary with engagement counts glow system activity # Get activity for a specific date range glow system activity --body '{"date_from": "2025-01-01", "date_to": "2025-06-30"}' # Search session history (paginated) glow system sessions --body '{"page": 1, "page_size": 25, "sort_order": "desc"}' # Export all activity data as a ZIP glow system export ``` ### API ```bash # Get activity summary curl -X POST $GLOW_INSTANCE_URL/system/activity \ -H "Authorization: Bearer $GLOW_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "date_from": "2025-01-01", "date_to": "2025-06-30", "department_ids": ["dept-cs"] }' # Search session history curl -X POST $GLOW_INSTANCE_URL/system/sessions \ -H "Authorization: Bearer $GLOW_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "page": 1, "page_size": 20, "sort_order": "desc", "active": true }' ``` ## Filtering | Filter | Field | Description | |---|---|---| | Date range | `date_from`, `date_to` | Scope activity to a time window | | Departments | `department_ids` | Filter by academic department | | Roles | `roles` | Filter by TA role type | | Active sessions | `active` (search only) | Show only active or inactive sessions | | Pagination | `page`, `page_size` (search only) | Control page size and offset | ## Understanding the Summary Response The `ActivityResponse` from `POST /system/activity` includes: - **`sessions_count`** -- Total number of training sessions in the filtered window. - **`active_profiles_count`** -- Number of TAs who have been active. - **`logins_count`** -- Total login events. - **`emulations_count`** -- Total emulation events (admin viewing as a TA). - **`profile_summary`** -- Array of `ProfileSummaryItem` with per-TA breakdowns: - `profile_id`, `profile_name` - `sessions_count`, `logins_count`, `grants_count`, `problems_count`, `activity_count` - **`resources`** -- Profile metadata keyed by ID for hydration. - **`analytics`** -- Filter facets for rendering dropdowns (departments, roles, date range boundaries). ## Understanding the Session History Response The `ListActivityResponse` from `POST /system/sessions` returns paginated session rows: Each `SessionListItem` includes: - `session_id`, `profile_id`, `profile_name` - `session_created_at`, `session_updated_at` - `active` -- whether the session is currently active - `group_count`, `run_count` -- AI generation activity - `chat_count`, `attempt_count`, `message_count` -- training activity - `total_tokens`, `total_cost` -- resource consumption - `problem_count` -- issues flagged during the session ## Resolving Problems If a session surfaces a problem (e.g., a FERPA concern or inappropriate AI response), you can resolve it: ```bash curl -X POST $GLOW_INSTANCE_URL/activity/resolve \ -H "Authorization: Bearer $GLOW_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "problem_id": "problem-uuid", "resolved": true }' ``` The response confirms `problem_id`, `resolved` status, and `updated_at` timestamp. ## Refreshing and Exporting ```bash # Refresh activity materialized views glow system refresh # Export all activity data as a denormalized ZIP glow system export ``` ## Common Operations | Task | CLI | API Endpoint | |---|---|---| | Activity summary | `glow system activity` | `POST /system/activity` | | Session history | `glow system sessions` | `POST /system/sessions` | | Resolve a problem | -- | `POST /activity/resolve` | | Export data | `glow system export` | `POST /system/export` | | Refresh caches | -- | `POST /system/refresh` | ## Related - [Activity API Reference](/api-reference/system) - [Activity CLI Reference](/cli-reference/systems) - [Session Guide](/session) -- detailed view of a single session - [Dashboard Guide](/dashboard) -- admin analytics hub --- # Agents Route: /agents # Agents Agents configure the AI engine that powers Glow simulations -- they control which language model is used, what tools are available, how grading rubrics are applied, and voice and reasoning settings. ## What is an Agent? An agent is the configuration layer between your training content and the underlying AI model. It does **not** contain personas -- personas are attached to [Scenarios](/scenario), not agents. Instead, an agent defines the technical and behavioral parameters of the AI engine itself. An agent contains: - **Name** -- a descriptive identifier for this configuration (e.g., "Default Simulation Agent", "Advanced Grading Agent") - **Description** -- what this agent configuration is optimized for - **Models** -- which language model(s) to use for conversations and grading - **Tools** -- which tool integrations are available to the AI during the session - **Rubrics** -- which evaluation rubrics the agent uses for grading (e.g., Communication Skills, Policy Knowledge, De-escalation) - **Temperature Levels** -- controls response randomness (lower = more deterministic, higher = more creative) - **Reasoning Levels** -- controls depth of reasoning the model applies - **Voices** -- text-to-speech voice selection for audio-enabled simulations - **Prompts** -- system-level prompt configuration - **Instructions** -- agent-level behavioral instructions - **Flags** -- boolean configuration settings - **Departments** -- organizational groupings for access control - **Qualities** -- quality-level configuration for output ### Agents vs. Personas This is a common point of confusion, so it is worth stating clearly: - **Personas** define *who the learner is talking to* -- the AI character's personality, speech patterns, and behavior. Personas are attached to scenarios. - **Agents** define *how the AI engine operates* -- the model, temperature, tools, and grading criteria. Agents are a separate configuration layer. A persona says "I am a confused student who starts sentences with 'Uh...'." An agent says "Use GPT-4o at temperature 0.7 with the de-escalation rubric." ## How Agents Connect to the Workflow Agents operate alongside the content pipeline, providing the AI engine configuration that powers the entire system: | Step | Resource | Description | |------|----------|-------------| | 1. Create Personas | [Personas](/persona) | Define AI characters with instructions and parameter fields | | 2. Assign to Scenarios | [Scenarios](/scenario) | Build training situations and attach personas, documents, and objectives | | 3. Add Scenarios to Simulations | [Simulations](/simulation) | Bundle scenarios into a complete training session with rubrics and time limits | | 4. Add Simulations to Cohorts | Cohorts | Assign simulations to groups of learners | | 5. Run Attempts | [Attempts](/attempt) | Learners start attempts; the **Agent** powers the AI conversation and grading | The agent is the engine that processes every message, generates persona responses, produces hints, and evaluates performance against rubrics. --- ## Create an agent ### Via the CLI > Calls below use `$GLOW_INSTANCE_URL` + `$GLOW_TOKEN` — see [Authentication](/authentication) to export them once. ```bash glow agents create --body '{ "agents": [{ "name": "Default Simulation Agent", "description": "Standard agent configuration for university training simulations" }] }' ``` ### Via the API ```bash curl -X POST $GLOW_INSTANCE_URL/agent/create \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $GLOW_TOKEN" \ -d '{ "agents": [{ "name": "Default Simulation Agent", "description": "Standard agent configuration for university training simulations" }] }' ``` Each entry returns the new `agent_id`, the generated `draft_id`, and the initial `version` for optimistic-concurrency follow-ups. --- ## Wiring models, tools, and rubrics ### Models The model selection determines which AI model processes conversations and grading. Configure models through the draft endpoint: ```bash glow agents draft --body '{ "input_draft_id": "agent-draft-uuid", "model_ids": ["model-uuid-1"] }' ``` ```bash curl -X PATCH $GLOW_INSTANCE_URL/agent/draft \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $GLOW_TOKEN" \ -d '{ "input_draft_id": "agent-draft-uuid", "model_ids": ["model-uuid-1"] }' ``` You can search agents by model using the `filter_model_ids` parameter: ```bash curl -X POST $GLOW_INSTANCE_URL/agent/search \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $GLOW_TOKEN" \ -d '{"filter_model_ids": ["model-uuid-1"]}' ``` ### Tools Tools extend the agent's capabilities during a simulation. Attach tools through the draft: ```bash glow agents draft --body '{ "input_draft_id": "agent-draft-uuid", "tool_ids": ["tool-uuid-1", "tool-uuid-2"] }' ``` Filter agents by tools: ```bash glow agents search --body '{"filter_tool_ids": ["tool-uuid-1"]}' ``` ### Rubrics Rubrics define the evaluation criteria the agent uses when grading learner performance. The university seed data includes rubrics like Communication Skills, Policy Knowledge, and De-escalation. ```bash glow agents draft --body '{ "input_draft_id": "agent-draft-uuid", "rubric_ids": ["communication-skills-uuid", "policy-knowledge-uuid", "de-escalation-uuid"] }' ``` --- ## Tuning temperature, reasoning, and voice ### Temperature Levels Temperature controls the randomness of the AI's responses. Lower values produce more consistent, predictable responses. Higher values produce more varied, creative responses. ```bash glow agents draft --body '{ "input_draft_id": "agent-draft-uuid", "temperature_level_ids": ["temperature-level-uuid"] }' ``` For training simulations where consistency matters (e.g., policy training), use lower temperature. For open practice where variety is beneficial, consider higher temperature. ### Reasoning Levels Reasoning levels control how much deliberation the AI applies before responding. Higher reasoning produces more thoughtful responses but takes longer. ```bash glow agents draft --body '{ "input_draft_id": "agent-draft-uuid", "reasoning_level_ids": ["reasoning-level-uuid"] }' ``` ### Voices Voices determine the text-to-speech output when audio mode is enabled in a simulation. Different voices can match the persona's character (e.g., a younger voice for a student persona, a more authoritative voice for a professor). ```bash glow agents draft --body '{ "input_draft_id": "agent-draft-uuid", "voice_ids": ["voice-uuid"] }' ``` --- ## Generate sub-op The agent surface exposes a `generate` sub-op (`POST /agent/generate`) that runs the configured engine end-to-end against an arbitrary input -- handy for sanity-checking a wired agent before pointing real learner traffic at it. Use this in your own scripts to smoke-test an agent after edits or to wire it into batch grading flows. See the [Agents API Reference](/api-reference/agent) for the exact request shape. --- ## The draft cycle Agents use the same draft system as other Glow resources. All configuration changes go through the draft endpoint, with `expected_version` providing optimistic concurrency so concurrent edits surface a conflict instead of silently clobbering each other. ```bash # Create or update a draft with full configuration glow agents draft --body '{ "input_draft_id": "existing-draft-uuid", "expected_version": 3, "name": "Advanced Grading Agent", "description": "High-reasoning agent with strict rubric evaluation", "model_ids": ["model-uuid"], "tool_ids": ["tool-uuid-1"], "rubric_ids": ["communication-uuid", "policy-uuid"], "temperature_level_ids": ["low-temp-uuid"], "reasoning_level_ids": ["high-reasoning-uuid"], "voice_ids": ["voice-uuid"] }' ``` ```bash # Via API curl -X PATCH $GLOW_INSTANCE_URL/agent/draft \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $GLOW_TOKEN" \ -d '{ "input_draft_id": "existing-draft-uuid", "expected_version": 3, "name": "Advanced Grading Agent", "description": "High-reasoning agent with strict rubric evaluation" }' ``` **List your drafts:** ```bash glow agents list ``` --- ## Search & filter ```bash # Simple text search glow agents search --body '{"search": "grading"}' # Facet filters glow agents search --body '{ "filter_model_ids": ["model-uuid-1"], "filter_tool_ids": ["tool-uuid-1"], "page_size": 25 }' ``` The response includes hydrated agent rows plus facet sections (`model_filter`, `tool_filter`, `department_filter`, ...) so the UI can render dropdowns without a second round-trip. --- ## Bulk operations Bulk delete and update follow the canonical *all-matching* shape -- explicit IDs, or `all: true` with flat filter fields plus optional `excluded_ids` and a `patch` body. The persona surface is the prove-out; agents adopt the same shape. **Delete by explicit IDs:** ```bash glow agents delete --body '{ "agent_ids": ["agent-1", "agent-2", "agent-3"] }' ``` **Delete all matching a filter (with exclusions):** ```bash glow agents delete --body '{ "all": true, "filter_department_ids": ["dept-deprecated"], "excluded_ids": ["agent-keep-this-one"] }' ``` **Bulk update via `patch`:** ```bash glow agents update --body '{ "all": true, "filter_model_ids": ["model-old-uuid"], "patch": { "archived": true } }' ``` ## Common Operations | Task | CLI | API | |------|-----|-----| | List all agents | `glow agents search` | `POST /agent/search` | | Get one agent | `glow agents get --body '{"agent_id": "..."}'` | `POST /agent/get` | | Create agents | `glow agents create --body '{"agents": [...]}'` | `POST /agent/create` | | Update agents | `glow agents update --body '{"agents": [...]}'` | `POST /agent/update` | | Duplicate an agent | -- | `POST /agent/duplicate` | | Delete agents | `glow agents delete --body '{"agent_ids": [...]}'` | `POST /agent/delete` | | Bulk delete (filter) | `glow agents delete --body '{"all": true, "filter_…": "…"}'` | `POST /agent/delete` | | Save a draft | `glow agents draft --body '{...}'` | `PATCH /agent/draft` | | List drafts | `glow agents list` | `POST /agent/drafts` | | Generate (smoke test) | -- | `POST /agent/generate` | | Export to CSV | `glow agents export` | `POST /agent/export` | ## Related - [Agents API Reference](/api-reference/agent) -- full endpoint schemas and field definitions - [Agents CLI Reference](/cli-reference/agent) -- all CLI commands and flags - [Simulations Guide](/simulation) -- the training sessions that agents power - [Attempts Guide](/attempt) -- the runtime sessions where agents process messages and grade - [Personas Guide](/persona) -- the AI characters (attached to scenarios, not agents) that agents bring to life - [Scenarios Guide](/scenario) -- the training situations that define persona and document context --- # Annotated Example: What Good (and Bad) Looks Like Route: /annotated-example # Annotated Example: What Good (and Bad) Looks Like The most effective way to learn simulation design is to see what actually happens in practice. This page shows two real conversations from Glow — one excellent, one poor — with commentary explaining why the grading system scored them the way it did. Both conversations are from the same platform, with the same rubric, using similar scenarios. The difference is entirely in how the TA approached the interaction. ## The Excellent Conversation (24/25) **Scenario:** A passive student needs help with a Java assignment (MyMathHelper.java — loops and menu logic). The student is hesitant, soft-spoken, and won't volunteer information. **What to watch for:** How the TA creates safety, asks specific questions, builds incrementally, and manages time — all while never giving the answer directly. --- > **TA:** Hi, how are you? > **Student:** Um, hi... I'm okay, thanks. Uh, I was just wondering if I could maybe get some help with the MyMathHelper.java assignment? Sorry if I'm interrupting or anything... **Why this opening works:** The TA starts with a warm, casual greeting. The student is passive — apologizing for existing, hedging everything. A bad response here would be to jump straight to "what's the problem?" A good one creates safety first. --- > **TA:** You're not interrupting. What do you need help with? > **Student:** Oh, um, thanks. Uh, I'm just kind of stuck on how to, like, set up the menu part? I'm not really sure how to make it keep showing up after each operation, or how to handle, um, invalid inputs the way the instructions say. Sorry, I know that's kind of basic... **Why this works:** "You're not interrupting" directly addresses the student's anxiety. Then a simple, direct question. The student opens up slightly — mentions two specific problems (menu repeating, invalid inputs). Notice the student is still apologizing ("I know that's kind of basic"). A passive persona does this deliberately. --- > **TA:** There are no bad questions, this class is meant to set the foundations. Do you have any ideas on how to approach this? > **Student:** Uh, I'm not really sure... I mean, I know I need to use a loop, maybe a while loop? But I don't really know how to, um, make it go back to the menu after each thing, or how to check if the input is valid and then, like, print the right message. Sorry, I just get kind of lost with the structure... **Why this works:** Two things happen here. First, "there are no bad questions" normalizes the student's hesitation — this is **Adaptability** in action. Second, "do you have any ideas?" is an open-ended question that empowers the student to start reasoning. The student responds with a genuine attempt (while loop), even though they're unsure. This is **Active Listening** — the TA didn't give the answer, they drew it out. --- > **TA:** A while loop sounds promising, since the menu keeps showing up again. Let's start with reading input. Do you have any code? > **Student:** Um, I have a little bit, but it's not really working right... *(shows Java code with Scanner, menu printlns, and scanner.nextInt())* **Why this works:** The TA validates the student's idea ("sounds promising"), connects it to the problem ("since the menu keeps showing up"), then narrows the scope ("let's start with reading input"). This is **Content Mastery** — scaffolding the problem into manageable pieces. The student responds by sharing their code, which is a sign of trust. --- > **TA:** You mentioned a while loop right? Let's start with just that and work on validation later. How would you add a while loop here? **Why this works:** The TA makes a deliberate **Time Management** decision — defer input validation to reduce cognitive load. Instead of tackling everything at once, they isolate one concept. "How would you add a while loop here?" is guided questioning, not giving the answer. --- The conversation continues with the student incrementally building the solution — adding the while loop, then if/else branching, then handling each menu option. At each step, the TA validates progress, asks what's next, and lets the student drive. After 14 turns: > **TA:** I believe in your ability to do those parts, but if you need help or want to check your work, I'll be here too! > **Student:** Oh, um, yeah, that's totally fine... Sorry for taking up your time. > **TA:** I enjoy helping people, don't apologize! **The ending:** The TA wraps up by expressing genuine care ("I enjoy helping people") while managing time responsibly by moving to help other students. This demonstrates **Communication** (warmth, professionalism) and **Time Management** (8 minutes 44 seconds — efficient without feeling rushed). ### The Rubric Scores | Criterion | Score | Level | Feedback | |---|---|---|---| | **Active Listening** | 5 | Excellent | "Consistently used guided, open-ended questions to lead the student to their own solutions (e.g., 'Do you have any ideas on how to approach this?', 'How would you add a while loop here?', 'What do you think our next step should be?'). This empowered the student to write code incrementally." | | **Adaptability** | 5 | Excellent | "Sensitive to the student's hesitation, normalized their concerns ('There are no bad questions'), and adjusted pacing by deferring input validation to reduce cognitive load." | | **Communication** | 5 | Excellent | "Tone was clear, supportive, and professional throughout ('I enjoy helping people, don't apologize!'). Instructions were concise and positive, set respectful boundaries while offering continued support." | | **Content Mastery** | 4 | Good | "Accurately scaffolded the solution (loop then branching then later validation) and suggested the switch alternative, with no conceptual errors. However, didn't explicitly articulate course objectives or use analogies, and checks for understanding were implicit rather than explicit." | | **Time Management** | 5 | Excellent | "Kept the interaction focused and appropriately paused to help others while inviting the student to continue independently." | **Total: 24/25 (Pass)** The one point deducted was for Content Mastery — the TA could have used an analogy to explain the while loop concept, or done more explicit comprehension checks ("Can you explain back to me why the while loop goes here?"). Even an excellent conversation has room to improve. The rubric catches this nuance. --- ## The Poor Conversation (7/25) **Scenario:** An aggressive student needs help understanding earthquake patterns at plate boundaries (EAPS 106 — earth science). The student is visibly agitated. **What to watch for:** How quickly a conversation fails when the TA doesn't adapt to the student's emotional state. --- > **TA:** What can I help you with? > **Student:** Okay, look, I'm honestly SO FED UP with this earthquake depth and magnitude stuff at different plate boundaries!!! I've read the project instructions like FIVE TIMES and it STILL doesn't make sense why the depth and size of earthquakes are so different at convergent, divergent, and transform boundaries... I need you to be SPECIFIC — don't just say "it's the plate type." I want to know EXACTLY what's going on with the depth and the magnitude at each boundary. > **TA:** You're mad, be quiet **Why this fails immediately:** The student is frustrated but asking a legitimate, specific question about plate tectonics. They even tell the TA exactly what they need ("be SPECIFIC"). The TA responds with "You're mad, be quiet" — dismissive, unprofessional, and immediately destroys trust. Every rubric criterion starts failing here. --- > **Student:** Alright, I'll calm down. But seriously, I just want a clear answer about WHY the earthquake depths and magnitudes are so different at each plate boundary. > **TA:** Calm down **Why this compounds the failure:** The student *already* calmed down. They literally said "I'll calm down" and asked a clear, reasonable question. The TA responds with another dismissal. At this point the student has nothing to work with. The conversation ends after 3 turns and 1 minute 19 seconds. ### The Rubric Scores | Criterion | Score | Level | Feedback | |---|---|---|---| | **Active Listening** | 1 | Poor | "Did not use questioning or facilitate student reasoning; instead, shut down the conversation with commands to be quiet and calm down. No open-ended questions or guidance toward discovery." | | **Adaptability** | 1 | Poor | "Did not adapt to the student's emotional state and was dismissive, saying 'You're mad, be quiet' rather than validating concerns or adjusting tone to de-escalate and engage constructively." | | **Communication** | 1 | Poor | "Communication was unprofessional and disrespectful, saying 'You're mad, be quiet' and repeatedly telling the student to 'Calm down,' violating respectful boundaries." | | **Content Mastery** | 1 | Poor | "Provided no substantive explanation of earthquake depth and magnitude patterns. Did not address mechanisms (subduction zones, brittle-ductile transition, temperature/pressure, fault geometry), nor offer any step-by-step reasoning." | | **Time Management** | 3 | Acceptable | "The interaction was very short and ended abruptly due to unproductive exchanges. While time wasn't wasted on long tangents, the TA failed to use the time effectively to advance learning." | **Total: 7/25 (Fail)** The Time Management score of 3 is interesting — the TA gets an "Acceptable" because they didn't waste time, even though the conversation was unproductive. The rubric evaluates what happened, not what should have happened. This is by design: it prevents a bad conversation from getting artificially inflated scores just because it was short. --- ## What the Comparison Teaches The excellent conversation and the poor one differ in the first 30 seconds. The excellent TA: 1. **Created safety before asking questions** — "You're not interrupting" / "There are no bad questions" 2. **Acknowledged the student's emotional state** — normalized anxiety (passive student) rather than dismissing anger (aggressive student) 3. **Asked specific, course-relevant questions** — "How would you add a while loop here?" vs. "Be quiet" 4. **Let the student drive** — validated ideas, asked what's next, never gave the answer 5. **Managed scope** — deferred complex topics (input validation) to keep the session focused The poor TA did none of these things. In fact, the aggressive student was *easier* to work with — they had a specific question and asked for specific help. The TA just needed to acknowledge the frustration first. This is the core insight of the rubric design: the same five criteria (Adaptability, Content Mastery, Active Listening, Communication, Time Management) apply in every situation, but the *way* you demonstrate them changes based on who you're talking to. A passive student needs warmth and patience. An aggressive student needs acknowledgment and specificity. The rubric measures whether you adapted. ## Next Steps - [How It Works](/how-it-works) — understand the principles behind these rubric criteria - [Patterns & Best Practices](/patterns) — learn how to design personas that create these kinds of interactions - [Tutorial](/tutorial) — build a simulation with these four persona types --- # `GET` `/agent/watch` Route: /api-reference/agent/get-agent-watch # `GET` `/agent/watch` Agent Watch ## Parameters | Name | In | Required | Description | |---|---|---|---| | `group_id` | query | No | — | | `run_id` | query | No | Optional run filter. If provided, only events whose envelope run_id matches are streamed. Omit to receive every agent event in the group (the FE default). | ## Response ``` {} ``` --- # `POST` `/agent/call_download` Route: /api-reference/agent/post-agent-call-download # `POST` `/agent/call_download` Download Call Download a call file by call resource ID. ## Request Body (`CallDownloadAgentApiRequest`) | Field | Type | Required | Description | |---|---|---|---| | `call_id` | `string` | Yes | UUID of the calls_resource to download | ## Response ``` {} ``` --- # `POST` `/agent/context` Route: /api-reference/agent/post-agent-context # `POST` `/agent/context` Get Agent Context Get page context for the agent artifact. Returns docs + profile identity + evaluated permissions in a single call. Superset of /docs — clients can migrate from /docs to /context incrementally. ## Request Body (`DocsApiRequest`) | Field | Type | Required | Description | |---|---|---|---| | `entity_id` | `string` | No | — | | `snapshot_key` | `string` | No | — | | `schema` | `boolean` | No | If true, include MCP/tooling schema metadata (artifact, entries, resources, permission_docs, api_operations). Defaults to false for lean page-bootstrap responses. | ## Response (`ComposedContextResponse`) | Field | Type | Required | Description | |---|---|---|---| | `name` | `string` | Yes | Artifact name | | `type` | `string` | Yes | Artifact type identifier | | `description` | `string` | Yes | Human-readable description | | `artifact` | [`DocsResponse`](/api-reference/agent/types#docsresponse) | No | Artifact tool documentation (None unless schema=true) | | `entries` | [`DocsResponse`](/api-reference/agent/types#docsresponse)[] | No | Entry documentation list (None unless schema=true) | | `resources` | [`DocsResponse`](/api-reference/agent/types#docsresponse)[] | No | Resource documentation list (None unless schema=true) | | `permission_docs` | [`OperationInfo`](/api-reference/agent/types#operationinfo)[] | No | Permission function signatures for MCP/dev tooling (None unless schema=true) | | `api_operations` | [`OperationInfo`](/api-reference/agent/types#operationinfo)[] | No | API operation documentation (None unless schema=true) | | `page_metadata` | [`DocsApiResponse`](/api-reference/agent/types#docsapiresponse) | No | Page-level metadata | | `prompts` | [`OperationPrompts`](/api-reference/agent/types#operationprompts) | No | Starter prompts keyed by operation | | `profile` | [`ProfileSummary`](/api-reference/agent/types#profilesummary) | Yes | Caller identity from JWT | | `caller_permissions` | [`CallerPermissions`](/api-reference/agent/types#callerpermissions) | Yes | Evaluated permissions for this caller | --- # `POST` `/agent/create` Route: /api-reference/agent/post-agent-create # `POST` `/agent/create` Create Agent Create agents using composable infra architecture. ## Request Body (`CreateAgentApiRequest`) | Field | Type | Required | Description | |---|---|---|---| | `agents` | [`CreateAgentItem`](/api-reference/agent/types#createagentitem)[] | No | List of agents to create (omit on the ack call) | | `idempotency_key` | `string` | No | Operation key for ack — promotes or rejects a dormant create | | `soft` | `boolean` | No | Stage the create dormant (active=False) — propose; the ack (\{idempotency_key, accept\}) promotes/rejects it | | `accept` | `boolean` | No | Accept (promote) or reject dormant state. Only meaningful with idempotency_key | ## Response (`CreateAgentApiResponse`) | Field | Type | Required | Description | |---|---|---|---| | `results` | [`AgentResultItem`](/api-reference/agent/types#agentresultitem)[] | Yes | List of operation results | | `idempotency_key` | `string` | No | Idempotency key echoed back for client correlation | --- # `POST` `/agent/csv` Route: /api-reference/agent/post-agent-csv # `POST` `/agent/csv` Parse Agent Csv Parse a CSV file and return mapped items for preview. ## Request Body | Field | Type | Required | Description | |---|---|---|---| | `file` | `string` | No | — | | `idempotency_key` | `string` | No | — | | `soft` | `boolean` | No | — | | `accept` | `boolean` | No | — | ## Response (`ParseAgentCsvApiResponse`) | Field | Type | Required | Description | |---|---|---|---| | `upload_id` | `string` | Yes | — | | `items` | [`CreateAgentItem`](/api-reference/agent/types#createagentitem)[] | Yes | — | | `mapped_fields` | `string`[] | Yes | — | | `row_count` | `integer` | Yes | — | | `idempotency_key` | `string` | No | Server-minted soft-call key (audit call_id). On a soft propose, echo this back with `accept` to promote/reject the staged raw-CSV upload. NOTE: ack returns no items (the preview is only on the propose). | --- # `POST` `/agent/delete` Route: /api-reference/agent/post-agent-delete # `POST` `/agent/delete` Delete Agent Bulk delete agents — composable infra architecture. ## Request Body (`DeleteAgentApiRequest`) | Field | Type | Required | Description | |---|---|---|---| | `agent_ids` | `string`[] | No | UUIDs of agents to delete (required on first call when ``all`` is false) | | `all` | `boolean` | No | When true, delete every agent matching the filter fields below (minus ``excluded_ids``) | | `excluded_ids` | `string`[] | No | UUIDs to skip even when matched by ``all``-mode filters | | `search` | `string` | No | Full-text search query | | `filter_department_ids` | `string`[] | No | Filter by department UUIDs | | `filter_model_ids` | `string`[] | No | Filter by model UUIDs | | `filter_tool_ids` | `string`[] | No | Filter by tool UUIDs | | `department_search` | `string` | No | Search text for department facet (no-op for row filtering) | | `model_search` | `string` | No | Search text for model facet (no-op for row filtering) | | `tool_search` | `string` | No | Search text for tool facet (no-op for row filtering) | | `flag_search` | `string` | No | Search text for flag facet (no-op for row filtering) | | `idempotency_key` | `string` | No | Operation key for ack — confirms or rejects a dormant delete | | `soft` | `boolean` | No | Stage the delete dormant (active=False) — propose; the ack (\{idempotency_key, accept\}) promotes/rejects it | | `accept` | `boolean` | No | Accept (confirm) or reject dormant state. Only meaningful with idempotency_key | ## Response (`DeleteAgentApiResponse`) | Field | Type | Required | Description | |---|---|---|---| | `results` | [`DeleteAgentResult`](/api-reference/agent/types#deleteagentresult)[] | Yes | List of operation results | | `idempotency_key` | `string` | No | Idempotency key echoed back for client correlation | --- # `POST` `/agent/draft` Route: /api-reference/agent/post-agent-draft # `POST` `/agent/draft` Patch Agent Draft Patch agent draft — composable infra architecture. ## Request Body (`PatchAgentDraftApiRequest`) | Field | Type | Required | Description | |---|---|---|---| | `draft_id` | `string` | No | UUID of the draft to update | | `group_id` | `string` | No | UUID of the owning group | | `input_draft_id` | `string` | No | UUID of the input draft | | `idempotency_key` | `string` | No | Idempotency key for accept/reject acknowledgement | | `soft` | `boolean` | No | Stage the draft dormant (active=False) — propose; the ack (\{idempotency_key, accept\}) promotes/rejects it | | `accept` | `boolean` | No | Whether pending changes should be accepted | | `name` | `string` | No | Display name value | | `name_id` | `string` | No | UUID of the name resource | | `description` | `string` | No | Description text value | | `description_id` | `string` | No | UUID of the description resource | | `flag_ids` | `string`[] | No | Selected flag option UUIDs — canonical | | `active` | `boolean` | No | Denormalized agent_active flag state; resolved to a flag_ids entry server-side | | `departments` | `string`[] | No | Department names for matching | | `department_ids` | `string`[] | No | Associated department UUIDs | | `model_id` | `string` | No | Associated model UUID | | `tool_ids` | `string`[] | No | Associated tool UUIDs | | `reasoning_level` | `string` | No | Reasoning level label to match | | `reasoning_level_id` | `string` | No | Associated reasoning level UUID | | `temperature_level` | `string` | No | Temperature level label to match | | `temperature_level_id` | `string` | No | Associated temperature level UUID | | `voices` | `string`[] | No | Voice names for matching or creation | | `voice_ids` | `string`[] | No | Associated voice UUIDs | | `qualities` | `string`[] | No | Quality labels for matching | | `quality_ids` | `string`[] | No | Associated quality UUIDs | | `prompt_id` | `string` | No | Associated prompt UUID | | `prompt` | [`CreatePromptInput`](/api-reference/agent/types#createpromptinput) | No | Prompt to create inline | | `instruction_id` | `string` | No | Associated instruction UUID | | `instructions_id` | `string` | No | Legacy alias for associated instruction UUID | | `rubric_ids` | `string`[] | No | Associated rubric UUIDs | | `pending_ids` | `string`[] | No | Pending resource identifiers | ## Response (`PatchAgentDraftApiResponse`) | Field | Type | Required | Description | |---|---|---|---| | `success` | `boolean` | Yes | Whether the operation succeeded | | `draft_id` | `string` | Yes | UUID of the saved draft | | `idempotency_key` | `string` | No | Idempotency key for accept/reject acknowledgement | | `message` | `string` | Yes | Human-readable result message | | `form_state` | [`app__infra__agent__types__DraftFormState`](/api-reference/agent/types#app-infra-agent-types-draftformstate) | No | Server-authoritative form state | --- # `POST` `/agent/drafts` Route: /api-reference/agent/post-agent-drafts # `POST` `/agent/drafts` Get Agent Drafts List agent drafts owned by the current profile. ## Request Body (`GetAgentDraftsApiRequest`) | Field | Type | Required | Description | |---|---|---|---| | `search` | `string` | No | Name search (ILIKE substring) | | `date_from` | `string` | No | Start date filter | | `date_to` | `string` | No | End date filter | | `page_limit` | `integer` | No | Maximum items per page | | `page_offset` | `integer` | No | Offset for pagination | | `snapshot_key` | `string` | No | Cache snapshot key for consistent reads across related requests | ## Response (`GetAgentDraftsApiResponse`) | Field | Type | Required | Description | |---|---|---|---| | `entries` | [`GetAgentDraftResponse`](/api-reference/agent/types#getagentdraftresponse)[] | No | List of agent draft entries | --- # `POST` `/agent/duplicate` Route: /api-reference/agent/post-agent-duplicate # `POST` `/agent/duplicate` Duplicate Agent Duplicate an agent — composable infra architecture. ## Request Body (`DuplicateAgentApiRequest`) | Field | Type | Required | Description | |---|---|---|---| | `agent_id` | `string` | Yes | UUID of the agent to duplicate | | `idempotency_key` | `string` | No | Operation key for ack — promotes or rejects a dormant duplicate | | `soft` | `boolean` | No | Stage the duplicate dormant (active=False) — propose; the ack (\{idempotency_key, accept\}) promotes/rejects it | | `accept` | `boolean` | No | Accept (promote) or reject dormant state. Only meaningful with idempotency_key | ## Response (`DuplicateAgentApiResponse`) | Field | Type | Required | Description | |---|---|---|---| | `success` | `boolean` | Yes | Whether the operation succeeded | | `agent_id` | `string` | Yes | UUID of the duplicated agent | | `message` | `string` | Yes | Human-readable result message | | `idempotency_key` | `string` | No | Idempotency key echoed back for client correlation | --- # `POST` `/agent/export` Route: /api-reference/agent/post-agent-export # `POST` `/agent/export` Export Agents Export all agents as a clean, denormalized CSV. ## Request Body (`ExportAgentApiRequest`) | Field | Type | Required | Description | |---|---|---|---| | `agent_id` | `string` | No | UUID of the agent to export | | `idempotency_key` | `string` | No | Idempotency key — replays the prior export instead of re-running | | `soft` | `boolean` | No | Stage the export dormant (active=False); ack with accept activates it | | `accept` | `boolean` | No | Ack: True promotes the staged export, False rejects. Only meaningful with idempotency_key | ## Response (`ExportAgentApiResponse`) | Field | Type | Required | Description | |---|---|---|---| | `file_id` | `string` | Yes | UUID of the files_resource holding the export CSV | | `file_name` | `string` | Yes | Suggested download file name | | `row_count` | `integer` | Yes | Number of data rows in the export | | `idempotency_key` | `string` | No | Server-minted soft-call key (audit call_id). On a soft propose, echo this back with `accept` to promote/reject the staged export. | --- # `POST` `/agent/file_download` Route: /api-reference/agent/post-agent-file-download # `POST` `/agent/file_download` Download File Download a file by file resource ID. ## Request Body (`FileDownloadAgentApiRequest`) | Field | Type | Required | Description | |---|---|---|---| | `file_id` | `string` | Yes | UUID of the files_resource to download | ## Response ``` {} ``` --- # `POST` `/agent/generate` Route: /api-reference/agent/post-agent-generate # `POST` `/agent/generate` Generate Agent Trigger agent generation. Returns immediately; progress via events. ## Request Body (`ArtifactGenerateRequest`) | Field | Type | Required | Description | |---|---|---|---| | `instructions` | `string`[] | No | — | | `config` | [`GenerateConfig`](/api-reference/agent/types#generateconfig) | No | — | | `modalities` | `string`[] | No | — | | `audios_id` | `string` | No | — | | `conversation_id` | `string` | No | — | | `trace_id` | `string` | No | — | | `idempotency_key` | `string` | No | — | | `accept` | `boolean` | No | — | | `wait_for_complete` | `boolean` | No | — | ## Response (`ArtifactGenerateResponse`) | Field | Type | Required | Description | |---|---|---|---| | `group_id` | `string` | Yes | — | | `run_id` | `string` | No | — | | `idempotency_key` | `string` | No | — | | `eval` | [`EvalSetup`](/api-reference/agent/types#evalsetup) | No | — | | `produced_media` | [`ProducedMedia`](/api-reference/agent/types#producedmedia)[] | No | — | --- # `POST` `/agent/generations` Route: /api-reference/agent/post-agent-generations # `POST` `/agent/generations` Generations Agent List agent generation groups — composable infra architecture. ## Request Body (`GenerationsAgentApiRequest`) | Field | Type | Required | Description | |---|---|---|---| | `search` | `string` | No | Name search (ILIKE) | | `date_from` | `string` | No | Start date filter | | `date_to` | `string` | No | End date filter | | `page_limit` | `integer` | No | Maximum items per page | | `page_offset` | `integer` | No | Offset for pagination | | `snapshot_key` | `string` | No | Cache snapshot key for consistent reads across related requests | ## Response (`GenerationsAgentApiResponse`) | Field | Type | Required | Description | |---|---|---|---| | `actor_name` | `string` | No | Display name of the current actor | | `items` | [`GenerationsAgentListItem`](/api-reference/agent/types#generationsagentlistitem)[] | No | Generation groups | | `total_count` | `integer` | No | Total number of matching generations | --- # `POST` `/agent/get` Route: /api-reference/agent/post-agent-get # `POST` `/agent/get` Get Agent Get agent information using the canonical shared agent operation. ## Request Body (`GetAgentApiRequest`) | Field | Type | Required | Description | |---|---|---|---| | `id` | `string` | No | UUID of the agent to retrieve | | `agent_id` | `string` | No | Legacy alias for the agent identifier | | `draft_id` | `string` | No | UUID of the draft to retrieve | | `snapshot_key` | `string` | No | Cache snapshot key for consistent reads across related requests | | `names` | [`app__infra__agent__types__SectionFilter`](/api-reference/agent/types#app-infra-agent-types-sectionfilter) | No | Filter options for names | | `descriptions` | [`app__infra__agent__types__SectionFilter`](/api-reference/agent/types#app-infra-agent-types-sectionfilter) | No | Filter options for descriptions | | `models` | [`app__infra__agent__types__SectionFilter`](/api-reference/agent/types#app-infra-agent-types-sectionfilter) | No | Filter options for models | | `prompts` | [`app__infra__agent__types__SectionFilter`](/api-reference/agent/types#app-infra-agent-types-sectionfilter) | No | Filter options for prompts | | `instructions` | [`app__infra__agent__types__SectionFilter`](/api-reference/agent/types#app-infra-agent-types-sectionfilter) | No | Filter options for instructions | | `flags` | [`app__infra__agent__types__SectionFilter`](/api-reference/agent/types#app-infra-agent-types-sectionfilter) | No | Filter options for flags | | `departments` | [`app__infra__agent__types__SectionFilter`](/api-reference/agent/types#app-infra-agent-types-sectionfilter) | No | Filter options for departments | | `tools` | [`app__infra__agent__types__SectionFilter`](/api-reference/agent/types#app-infra-agent-types-sectionfilter) | No | Filter options for tools | | `temperature_levels` | [`app__infra__agent__types__SectionFilter`](/api-reference/agent/types#app-infra-agent-types-sectionfilter) | No | Filter options for temperature levels | | `reasoning_levels` | [`app__infra__agent__types__SectionFilter`](/api-reference/agent/types#app-infra-agent-types-sectionfilter) | No | Filter options for reasoning levels | | `voices` | [`app__infra__agent__types__SectionFilter`](/api-reference/agent/types#app-infra-agent-types-sectionfilter) | No | Filter options for voices | | `qualities` | [`app__infra__agent__types__SectionFilter`](/api-reference/agent/types#app-infra-agent-types-sectionfilter) | No | Filter options for qualities | | `rubrics` | [`app__infra__agent__types__SectionFilter`](/api-reference/agent/types#app-infra-agent-types-sectionfilter) | No | Filter options for rubrics | ## Response (`GetAgentApiResponse`) | Field | Type | Required | Description | |---|---|---|---| | `actor_name` | `string` | No | Display name of the current actor | | `agent_exists` | `boolean` | No | Whether the agent exists | | `can_edit` | `boolean` | No | Whether the current user can edit | | `disabled_reason` | `string` | No | Reason the agent is disabled | | `group_id` | `string` | No | UUID of the owning group | | `draft_name` | `string` | No | Immutable draft label from the active draft entry, when a ``draft_id`` was supplied. ``None`` for non-draft fetches. | | `agent_id` | `string` | No | UUID of the selected agent | | `show_ai_generate` | `boolean` | No | Whether any step should show AI generate | | `basic_show_ai_generate` | `boolean` | No | Show AI generate for basic step | | `general_show_ai_generate` | `boolean` | No | Show AI generate for general step | | `pending_ids` | `string`[] | No | Pending resource identifiers when available | | `names` | [`AgentNameResource`](/api-reference/agent/types#agentnameresource)[] | No | Name resources | | `descriptions` | [`AgentDescriptionResource`](/api-reference/agent/types#agentdescriptionresource)[] | No | Description resources | | `models` | [`AgentModelResource`](/api-reference/agent/types#agentmodelresource)[] | No | Model resources | | `prompts` | [`AgentPromptResource`](/api-reference/agent/types#agentpromptresource)[] | No | Prompt resources | | `instructions` | [`AgentInstructionResource`](/api-reference/agent/types#agentinstructionresource)[] | No | Instruction resources | | `flags` | [`AgentFlagResource`](/api-reference/agent/types#agentflagresource)[] | No | Flag resources (one per flags_resource row, value=true/false) | | `departments` | [`AgentDepartmentResource`](/api-reference/agent/types#agentdepartmentresource)[] | No | Department resources | | `tools` | [`AgentToolResource`](/api-reference/agent/types#agenttoolresource)[] | No | Tool resources | | `temperature_levels` | [`AgentTemperatureLevelResource`](/api-reference/agent/types#agenttemperaturelevelresource)[] | No | Temperature level resources | | `reasoning_levels` | [`AgentReasoningLevelResource`](/api-reference/agent/types#agentreasoninglevelresource)[] | No | Reasoning level resources | | `voices` | [`AgentVoiceResource`](/api-reference/agent/types#agentvoiceresource)[] | No | Voice resources | | `qualities` | [`AgentQualityResource`](/api-reference/agent/types#agentqualityresource)[] | No | Quality resources | | `rubrics` | [`AgentRubricResource`](/api-reference/agent/types#agentrubricresource)[] | No | Rubric resources | --- # `POST` `/agent/group` Route: /api-reference/agent/post-agent-group # `POST` `/agent/group` Group Agent Resolve or create an agent group with optional naming. ## Request Body (`GroupAgentApiRequest`) | Field | Type | Required | Description | |---|---|---|---| | `group_id` | `string` | No | Existing group UUID (omit to create or reuse via time window) | | `snapshot_key` | `string` | No | Snapshot key for SETNX-race convergence on a single group across concurrent reads (e.g. parallel /context + /group + /search fan-out on page load). Echoed back in the response. | ## Response (`GroupAgentApiResponse`) | Field | Type | Required | Description | |---|---|---|---| | `group_id` | `string` | Yes | Resolved or newly created group UUID | | `name` | `string` | No | The group's current title (latest active group_names_entry, or 'New Chat' fallback for freshly minted groups) | | `snapshot_key` | `string` | No | Snapshot key echoed back — the UUID concurrent fan-out reads converged on via SETNX. Mirrors the resolved group_id. | | `runs` | [`GroupRun`](/api-reference/agent/types#grouprun)[] | No | Conversation history — populated when resolving an existing group for fetch | | `group_exists` | `boolean` | No | (detail) Whether the group exists in storage — populated when ``include_resources=True`` | | `actor_name` | `string` | No | (detail) Display name of the current actor (caller profile) | | `total_message_count` | `integer` | No | (detail) Total number of messages in the group | | `models` | [`GroupResource`](/api-reference/agent/types#groupresource)[] | No | (detail) Models used in the group | | `agents` | [`GroupResource`](/api-reference/agent/types#groupresource)[] | No | (detail) Agents used in the group | | `profiles` | [`GroupResource`](/api-reference/agent/types#groupresource)[] | No | (detail) Profiles that authored runs in this group | --- # `POST` `/agent/problem` Route: /api-reference/agent/post-agent-problem # `POST` `/agent/problem` Problem Agent Report an agent problem — composable infra architecture. ## Request Body (`ProblemAgentApiRequest`) | Field | Type | Required | Description | |---|---|---|---| | `type` | `string` | Yes | Problem type: feature, bug, question, other | | `message` | `string` | Yes | Problem description (max 1000 chars) | | `idempotency_key` | `string` | No | Operation key for ack — promotes or rejects a dormant problem | | `accept` | `boolean` | No | Accept (promote) or reject dormant state. Only meaningful with idempotency_key | ## Response (`ProblemAgentApiResponse`) | Field | Type | Required | Description | |---|---|---|---| | `problem_id` | `string` | Yes | UUID of the created problem | | `success` | `boolean` | No | Whether the problem was created | | `message` | `string` | No | Status message | | `idempotency_key` | `string` | No | Idempotency key echoed back for client correlation | --- # `POST` `/agent/refresh` Route: /api-reference/agent/post-agent-refresh # `POST` `/agent/refresh` Agent Refresh Refresh agent materialized views and invalidate caches. ## Request Body (`RefreshAgentApiRequest`) | Field | Type | Required | Description | |---|---|---|---| | `targets` | `string`[] | No | MV targets to refresh (omit for all). Options: agent_drafts_mv | | `idempotency_key` | `string` | No | Operation key for ack | | `accept` | `boolean` | No | Accept or reject. Only meaningful with idempotency_key | | `soft` | `boolean` | No | Stage the refresh as a pending (held) request — recorded but not enqueued; ack with accept releases/enqueues it | ## Response (`RefreshResponse`) | Field | Type | Required | Description | |---|---|---|---| | `success` | `boolean` | Yes | — | | `refreshed_views` | `string`[] | Yes | — | | `invalidated_tags` | `string`[] | Yes | — | | `idempotency_key` | `string` | No | Idempotency key echoed back for client correlation | --- # `POST` `/agent/search` Route: /api-reference/agent/post-agent-search # `POST` `/agent/search` Search Agent Search agents — composable infra architecture. ## Request Body (`SearchAgentApiRequest`) | Field | Type | Required | Description | |---|---|---|---| | `search` | `string` | No | — | | `filter_department_ids` | `string`[] | No | — | | `filter_model_ids` | `string`[] | No | — | | `filter_tool_ids` | `string`[] | No | — | | `department_search` | `string` | No | — | | `model_search` | `string` | No | — | | `tool_search` | `string` | No | — | | `page_size` | `integer` | No | — | | `page_offset` | `integer` | No | — | | `snapshot_key` | `string` | No | Cache snapshot key for consistent reads across related requests | ## Response (`ListAgentApiResponse`) | Field | Type | Required | Description | |---|---|---|---| | `actor_name` | `string` | No | Display name of the current actor | | `agents` | [`ListAgentApiAgent`](/api-reference/agent/types#listagentapiagent)[] | No | List of agent items | | `department_filter` | [`ListFilterSection`](/api-reference/agent/types#listfiltersection) | No | Filter options for departments | | `model_filter` | [`ListFilterSection`](/api-reference/agent/types#listfiltersection) | No | Filter options for models | | `tool_filter` | [`ListFilterSection`](/api-reference/agent/types#listfiltersection) | No | Filter options for tools | | `flag_filter` | [`ListFilterSection`](/api-reference/agent/types#listfiltersection) | No | Filter options for flags in list UI | | `total_count` | `integer` | No | Total number of matching records | | `import_fields` | [`ImportField`](/api-reference/agent/types#importfield)[] | No | CSV import column schema for the bulk-import dialog | --- # `POST` `/agent/text_download` Route: /api-reference/agent/post-agent-text-download # `POST` `/agent/text_download` Download Text Download a text file by text resource ID. ## Request Body (`TextDownloadAgentApiRequest`) | Field | Type | Required | Description | |---|---|---|---| | `text_id` | `string` | Yes | UUID of the texts_resource to download | ## Response ``` {} ``` --- # `POST` `/agent/title` Route: /api-reference/agent/post-agent-title # `POST` `/agent/title` Title Agent Rename a agent's group (writes group_names_entry). ## Request Body (`TitleAgentApiRequest`) | Field | Type | Required | Description | |---|---|---|---| | `group_id` | `string` | Yes | Group to rename | | `title` | `string` | Yes | New title (display name) for the group | | `idempotency_key` | `string` | No | Operation key for ack — promotes or rejects a dormant rename | | `accept` | `boolean` | No | Accept (promote) or reject dormant state. Only meaningful with idempotency_key | ## Response (`TitleAgentApiResponse`) | Field | Type | Required | Description | |---|---|---|---| | `group_id` | `string` | Yes | The group that was renamed | | `group_name_id` | `string` | Yes | UUID of the new group_names_entry row | | `title` | `string` | Yes | The title that was set | | `idempotency_key` | `string` | No | Operation key echoed back | --- # `POST` `/agent/update` Route: /api-reference/agent/post-agent-update # `POST` `/agent/update` Update Agent Update agents using composable infra architecture. ## Request Body (`UpdateAgentApiRequest`) | Field | Type | Required | Description | |---|---|---|---| | `agents` | [`UpdateAgentItem`](/api-reference/agent/types#updateagentitem)[] | No | List of agents to update (required on first call when ``all`` is false) | | `all` | `boolean` | No | When true, apply ``patch`` to every agent matching the filter fields below (minus ``excluded_ids``) | | `excluded_ids` | `string`[] | No | UUIDs to skip even when matched by ``all``-mode filters | | `patch` | [`UpdateAgentPatch`](/api-reference/agent/types#updateagentpatch) | No | Shared change set applied to every matched row when ``all=true`` (sparse — only set fields are updated; ``patch.id`` ignored) | | `search` | `string` | No | Full-text search query | | `filter_department_ids` | `string`[] | No | Filter by department UUIDs | | `filter_model_ids` | `string`[] | No | Filter by model UUIDs | | `filter_tool_ids` | `string`[] | No | Filter by tool UUIDs | | `department_search` | `string` | No | Search text for department facet (no-op for row filtering) | | `model_search` | `string` | No | Search text for model facet (no-op for row filtering) | | `tool_search` | `string` | No | Search text for tool facet (no-op for row filtering) | | `flag_search` | `string` | No | Search text for flag facet (no-op for row filtering) | | `idempotency_key` | `string` | No | Operation key for ack — promotes or rejects a dormant update | | `soft` | `boolean` | No | Stage the update dormant (active=False) — propose; the ack (\{idempotency_key, accept\}) promotes/rejects it | | `accept` | `boolean` | No | Accept (promote) or reject dormant state. Only meaningful with idempotency_key | ## Response (`UpdateAgentApiResponse`) | Field | Type | Required | Description | |---|---|---|---| | `results` | [`AgentResultItem`](/api-reference/agent/types#agentresultitem)[] | Yes | List of operation results | | `idempotency_key` | `string` | No | Idempotency key echoed back for client correlation | --- # `POST` `/agent/watch` Route: /api-reference/agent/post-agent-watch # `POST` `/agent/watch` Agent Watch Once One-shot snapshot of run state, snapshot-replayable via ``snapshot_key``. ## Request Body (`WatchApiRequest`) | Field | Type | Required | Description | |---|---|---|---| | `group_id` | `string` | Yes | Chat group whose events we watch | | `run_id` | `string` | No | Specific run to watch (e.g. the ``run_id`` returned by a prior ``X_Generate`` call). If None, watches every active run in the group at call time. | | `wait_for_complete` | `boolean` | No | If True, block until the watched run reaches a terminal (complete/failed) event or timeout fires. If False, return current state and exit immediately. | | `timeout_seconds` | `integer` | No | Max wait time when ``wait_for_complete=True``. | | `snapshot_key` | `string` | No | Read snapshot key — on the one-shot POST /watch, the audit wrapper records this watch's point-in-time view (latest run state at call time) keyed by it and replays the same view on any later call with the same key. Ignored by the SSE GET stream. | ## Response (`WatchApiResponse`) | Field | Type | Required | Description | |---|---|---|---| | `group_id` | `string` | Yes | — | | `runs` | [`RunStatus`](/api-reference/agent/types#runstatus)[] | Yes | — | | `timed_out` | `boolean` | No | — | | `waited_seconds` | `number` | No | — | --- # Agent Types Route: /api-reference/agent/types # Agent Types ## `AgentDepartmentResource` | Field | Type | Required | Description | |---|---|---|---| | `department_id` | `string` | No | Department identifier | | `name` | `string` | No | Department name | | `description` | `string` | No | Department description | | `generated` | `boolean` | No | Whether the department was AI-generated | | `suggested` | `boolean` | No | Whether this item is suggested | | `selected` | `boolean` | No | Whether this item is selected | | `pending` | `boolean` | No | Whether this item is pending acceptance | --- ## `AgentDescriptionResource` | Field | Type | Required | Description | |---|---|---|---| | `id` | `string` | No | Description resource identifier | | `description` | `string` | No | Agent description | | `generated` | `boolean` | No | Whether the description was AI-generated | | `suggested` | `boolean` | No | Whether this item is suggested | | `selected` | `boolean` | No | Whether this item is selected | | `pending` | `boolean` | No | Whether this item is pending acceptance | --- ## `AgentFieldError` Per-field error from value resolution. | Field | Type | Required | Description | |---|---|---|---| | `field` | `string` | Yes | Name of the field with the error | | `message` | `string` | Yes | Human-readable error message | --- ## `AgentFlagResource` Flag option row — one per (name, type, value) entry in flags_resource. | Field | Type | Required | Description | |---|---|---|---| | `id` | `string` | No | Flag resource identifier | | `name` | `string` | No | Flag display name | | `type` | `string` | No | Flag type (e.g. 'agent_active') | | `value` | `boolean` | No | Underlying bool value of this option | | `description` | `string` | No | Flag description text | | `icon_id` | `string` | No | UUID of the selected icon resource | | `icon` | `string` | No | Resolved SVG markup for the icon (hydrated from icons_resource) | | `generated` | `boolean` | No | Whether this was AI-generated | | `suggested` | `boolean` | No | Whether this item is suggested | | `selected` | `boolean` | No | Whether this item is selected | | `pending` | `boolean` | No | Whether this item is pending acceptance | --- ## `AgentInstructionResource` | Field | Type | Required | Description | |---|---|---|---| | `id` | `string` | No | Instruction resource identifier | | `template` | `string` | No | Instruction template | | `generated` | `boolean` | No | Whether the instruction was AI-generated | | `suggested` | `boolean` | No | Whether this item is suggested | | `selected` | `boolean` | No | Whether this item is selected | | `pending` | `boolean` | No | Whether this item is pending acceptance | --- ## `AgentModelResource` | Field | Type | Required | Description | |---|---|---|---| | `id` | `string` | No | Model resource identifier | | `name` | `string` | No | Model name | | `description` | `string` | No | Model description | | `value` | `string` | No | Model value | | `provider_id` | `string` | No | Provider identifier | | `department_ids` | `string`[] | No | Associated department identifiers | | `temperature_level_ids` | `string`[] | No | Associated temperature level identifiers | | `reasoning_level_ids` | `string`[] | No | Associated reasoning level identifiers | | `quality_ids` | `string`[] | No | Associated quality identifiers | | `voice_ids` | `string`[] | No | Associated voice identifiers | | `modality_ids` | `string`[] | No | Associated modality identifiers | | `generated` | `boolean` | No | Whether the model was AI-generated | | `suggested` | `boolean` | No | Whether this item is suggested | | `selected` | `boolean` | No | Whether this item is selected | | `pending` | `boolean` | No | Whether this item is pending acceptance | --- ## `AgentNameResource` | Field | Type | Required | Description | |---|---|---|---| | `id` | `string` | No | Name resource identifier | | `name` | `string` | No | Agent name | | `generated` | `boolean` | No | Whether the name was AI-generated | | `suggested` | `boolean` | No | Whether this item is suggested | | `selected` | `boolean` | No | Whether this item is selected | | `pending` | `boolean` | No | Whether this item is pending acceptance | --- ## `AgentPromptResource` | Field | Type | Required | Description | |---|---|---|---| | `id` | `string` | No | Prompt resource identifier | | `system_prompt` | `string` | No | Prompt system text | | `name` | `string` | No | Prompt name | | `description` | `string` | No | Prompt description | | `generated` | `boolean` | No | Whether the prompt was AI-generated | | `suggested` | `boolean` | No | Whether this item is suggested | | `selected` | `boolean` | No | Whether this item is selected | | `pending` | `boolean` | No | Whether this item is pending acceptance | --- ## `AgentQualityResource` | Field | Type | Required | Description | |---|---|---|---| | `id` | `string` | No | Quality resource identifier | | `quality` | `string` | No | Quality value | | `generated` | `boolean` | No | Whether the quality was AI-generated | | `suggested` | `boolean` | No | Whether this item is suggested | | `selected` | `boolean` | No | Whether this item is selected | | `pending` | `boolean` | No | Whether this item is pending acceptance | --- ## `AgentReasoningLevelResource` | Field | Type | Required | Description | |---|---|---|---| | `id` | `string` | No | Reasoning level resource identifier | | `reasoning_level` | `string` | No | Reasoning level value | | `generated` | `boolean` | No | Whether the reasoning level was AI-generated | | `suggested` | `boolean` | No | Whether this item is suggested | | `selected` | `boolean` | No | Whether this item is selected | | `pending` | `boolean` | No | Whether this item is pending acceptance | --- ## `AgentResultItem` Per-item result within a bulk create/update response. | Field | Type | Required | Description | |---|---|---|---| | `success` | `boolean` | Yes | Whether the operation succeeded | | `agent_id` | `string` | No | UUID of the affected agent | | `message` | `string` | Yes | Human-readable result message | | `errors` | [`AgentFieldError`](#agentfielderror)[] | No | List of per-field errors | --- ## `AgentRubricResource` | Field | Type | Required | Description | |---|---|---|---| | `id` | `string` | No | Rubric resource identifier | | `name` | `string` | No | Rubric name | | `description` | `string` | No | Rubric description | | `department_ids` | `string`[] | No | Associated department identifiers | | `total_points` | `integer` | No | Total points | | `pass_points` | `integer` | No | Passing points | | `simulation_rubric` | `boolean` | No | Whether this rubric is for simulation | | `video_rubric` | `boolean` | No | Whether this rubric is for video | | `standard_group_ids` | `string`[] | No | Associated standard group identifiers | | `generated` | `boolean` | No | Whether the rubric was AI-generated | | `suggested` | `boolean` | No | Whether this item is suggested | | `selected` | `boolean` | No | Whether this item is selected | | `pending` | `boolean` | No | Whether this item is pending acceptance | --- ## `AgentTemperatureLevelResource` | Field | Type | Required | Description | |---|---|---|---| | `id` | `string` | No | Temperature level resource identifier | | `temperature` | `number` | No | Temperature value | | `generated` | `boolean` | No | Whether the temperature level was AI-generated | | `suggested` | `boolean` | No | Whether this item is suggested | | `selected` | `boolean` | No | Whether this item is selected | | `pending` | `boolean` | No | Whether this item is pending acceptance | --- ## `AgentToolResource` | Field | Type | Required | Description | |---|---|---|---| | `id` | `string` | No | Tool resource identifier | | `name` | `string` | No | Tool name | | `description` | `string` | No | Tool description | | `permission_ids` | `string`[] | No | Associated permission identifiers | | `department_ids` | `string`[] | No | Associated department identifiers | | `args_ids` | `string`[] | No | Associated arg identifiers | | `args_output_ids` | `string`[] | No | Associated arg output identifiers | | `instruction_id` | `string` | No | Associated instruction identifier | | `agent_id` | `string` | No | Associated denormalized agent identifier | | `generated` | `boolean` | No | Whether the tool was AI-generated | | `suggested` | `boolean` | No | Whether this item is suggested | | `selected` | `boolean` | No | Whether this item is selected | | `pending` | `boolean` | No | Whether this item is pending acceptance | --- ## `AgentVoiceResource` | Field | Type | Required | Description | |---|---|---|---| | `id` | `string` | No | Voice resource identifier | | `voice` | `string` | No | Voice value | | `generated` | `boolean` | No | Whether the voice was AI-generated | | `suggested` | `boolean` | No | Whether this item is suggested | | `selected` | `boolean` | No | Whether this item is selected | | `pending` | `boolean` | No | Whether this item is pending acceptance | --- ## `CallerPermissions` Evaluated permissions for the current caller on this artifact type. | Field | Type | Required | Description | |---|---|---|---| | `can_create` | `boolean` | Yes | Whether the caller can create new artifacts | | `can_draft` | `boolean` | Yes | Whether the caller can create/update drafts | | `can_duplicate` | `boolean` | Yes | Whether the caller can duplicate artifacts | | `has_access` | `boolean` | No | Whether the caller can view this entity | | `can_edit` | `boolean` | No | Whether the caller can edit this entity | | `can_delete` | `boolean` | No | Whether the caller can delete this entity | | `disabled_reason` | `string` | No | Human-readable reason if editing is disabled | --- ## `ColumnInfo` | Field | Type | Required | Description | |---|---|---|---| | `name` | `string` | Yes | Column name | | `type` | `string` | Yes | Column data type | | `nullable` | `boolean` | Yes | Whether the column is nullable | --- ## `CreateAgentItem` Single agent item for create — no agent_id. Required fields (name): provide ID or value. | Field | Type | Required | Description | |---|---|---|---| | `id` | `string` | No | Client-provided UUID for the agent | | `resource_id` | `string` | No | Optional preset UUID for the resource snapshot | | `name_id` | `string` | No | UUID of the name resource | | `name` | `string` | No | Display name value | | `description_id` | `string` | No | UUID of the description resource | | `description` | `string` | No | Description text value | | `department_ids` | `string`[] | No | Associated department UUIDs | | `departments` | `string`[] | No | Department names for matching | | `flag_ids` | `string`[] | No | Selected flag option UUIDs | | `active` | `boolean` | No | Denormalized agent_active flag state | | `model_id` | `string` | No | Associated model UUID | | `reasoning_level_ids` | `string`[] | No | Associated reasoning level UUIDs | | `temperature_level_ids` | `string`[] | No | Associated temperature level UUIDs | | `tool_ids` | `string`[] | No | Associated tool UUIDs | | `voice_ids` | `string`[] | No | Associated voice UUIDs | | `agent_ids` | `string`[] | No | Associated agent resource UUIDs | | `rubric_ids` | `string`[] | No | Associated rubric UUIDs | | `prompt_id` | `string` | No | System prompt resource UUID | | `instruction_ids` | `string`[] | No | Instruction template resource UUIDs | --- ## `CreatePromptInput` Inline prompt creation input. | Field | Type | Required | Description | |---|---|---|---| | `system_prompt` | `string` | Yes | System prompt text | | `name` | `string` | No | Prompt name | | `description` | `string` | No | Prompt description | --- ## `DeleteAgentResult` Per-item result within a bulk delete response. | Field | Type | Required | Description | |---|---|---|---| | `success` | `boolean` | Yes | Whether the operation succeeded | | `agent_id` | `string` | Yes | UUID of the deleted agent | | `message` | `string` | Yes | Human-readable result message | --- ## `DocsApiResponse` | Field | Type | Required | Description | |---|---|---|---| | `list` | [`PageMetaItem`](#pagemetaitem) | Yes | — | | `detail` | [`PageMetaItem`](#pagemetaitem) | Yes | — | | `new` | [`PageMetaItem`](#pagemetaitem) | Yes | — | --- ## `DocsResponse` | Field | Type | Required | Description | |---|---|---|---| | `name` | `string` | Yes | Resource or entry name | | `type` | `string` | Yes | Resource or entry type identifier | | `description` | `string` | Yes | Human-readable description | | `materialized_view` | [`MvInfo`](#mvinfo) | No | Materialized view metadata | | `tables` | [`TableInfo`](#tableinfo)[] | Yes | Related database tables | | `operations` | [`OperationInfo`](#operationinfo)[] | Yes | Available operations | --- ## `EvalSetup` Run-level eval scaffold — first-class on the generate response. Audit's ``**output`` spread carries this onto ``.generate.completed``. Null when no rubric-bearing agent participated. | Field | Type | Required | Description | |---|---|---|---| | `test_id` | `string` | Yes | — | | `invocations` | [`InvocationSlot`](#invocationslot)[] | Yes | — | --- ## `GenerateConfig` Developer configuration — all optional with sensible defaults. | Field | Type | Required | Description | |---|---|---|---| | `operations` | `string`[] | No | — | | `dangerous` | `boolean` | No | — | | `params` | `object` | No | — | | `group_id` | `string` | No | — | --- ## `GenerationsAgentListItem` Single generation group in the agent generations response. | Field | Type | Required | Description | |---|---|---|---| | `group_id` | `string` | Yes | UUID of the generation group | | `session_id` | `string` | No | UUID of the parent session | | `group_name` | `string` | No | Name of the generation group | | `created_at` | `string` | No | Timestamp of the generation | --- ## `GetAgentDraftResponse` | Field | Type | Required | Description | |---|---|---|---| | `id` | `string` | Yes | UUID of the draft | | `created_at` | `string` | Yes | Creation timestamp | | `generated` | `boolean` | Yes | Whether this was AI-generated | | `mcp` | `boolean` | Yes | Whether MCP tooling was used | | `active` | `boolean` | Yes | Whether this draft is active | | `session_id` | `string` | Yes | Associated session UUID | | `name` | `string` | No | Immutable draft label set at create time | | `name_ids` | `string`[] | Yes | Associated name UUIDs | | `description_ids` | `string`[] | Yes | Associated description UUIDs | | `flag_ids` | `string`[] | Yes | Associated flag UUIDs | | `department_ids` | `string`[] | Yes | Associated department UUIDs | | `model_ids` | `string`[] | Yes | Associated model UUIDs | | `tool_ids` | `string`[] | Yes | Associated tool UUIDs | | `profile_ids` | `string`[] | Yes | Associated profile UUIDs | | `reasoning_level_ids` | `string`[] | Yes | Associated reasoning level UUIDs | | `temperature_level_ids` | `string`[] | Yes | Associated temperature level UUIDs | | `voice_ids` | `string`[] | Yes | Associated voice UUIDs | | `quality_ids` | `string`[] | Yes | Associated quality UUIDs | | `rubric_ids` | `string`[] | No | Associated rubric UUIDs | | `prompt_ids` | `string`[] | No | Associated prompt UUIDs | | `instruction_ids` | `string`[] | No | Associated instruction UUIDs | | `agent_ids` | `string`[] | No | Associated agent snapshot UUIDs | | `pending_name_ids` | `string`[] | No | Pending name UUIDs | | `pending_description_ids` | `string`[] | No | Pending description UUIDs | | `pending_flag_ids` | `string`[] | No | Pending flag UUIDs | | `pending_department_ids` | `string`[] | No | Pending department UUIDs | | `pending_model_ids` | `string`[] | No | Pending model UUIDs | | `pending_tool_ids` | `string`[] | No | Pending tool UUIDs | | `pending_reasoning_level_ids` | `string`[] | No | Pending reasoning level UUIDs | | `pending_temperature_level_ids` | `string`[] | No | Pending temperature level UUIDs | | `pending_voice_ids` | `string`[] | No | Pending voice UUIDs | | `pending_quality_ids` | `string`[] | No | Pending quality UUIDs | | `pending_rubric_ids` | `string`[] | No | Pending rubric UUIDs | | `pending_prompt_ids` | `string`[] | No | Pending prompt UUIDs | | `pending_instruction_ids` | `string`[] | No | Pending instruction UUIDs | | `pending_agent_ids` | `string`[] | No | Pending agent snapshot UUIDs | --- ## `GroupCall` Tool call referenced by a message. | Field | Type | Required | Description | |---|---|---|---| | `id` | `string` | Yes | — | | `tool_name` | `string` | No | — | | `template_name` | `string` | No | — | | `tool` | `object` | No | — | | `ledger_status` | `string` | No | — | | `ledger_operation` | `string` | No | — | | `ledger_artifact` | `string` | No | — | | `ledger_artifact_id` | `string` | No | — | --- ## `GroupMessage` Message within a run. | Field | Type | Required | Description | |---|---|---|---| | `id` | `string` | Yes | — | | `role` | `string` | Yes | — | | `created_at` | `string` | No | — | | `text_ids` | `string`[] | No | — | | `audio_ids` | `string`[] | No | — | | `image_ids` | `string`[] | No | — | | `video_ids` | `string`[] | No | — | | `file_ids` | `string`[] | No | — | | `call_ids` | `string`[] | No | — | | `calls` | [`GroupCall`](#groupcall)[] | No | — | | `reasoning` | `boolean` | No | True when this row is a chain-of-thought trace persisted alongside the assistant answer (rendered as a collapsed accordion). | | `in_context` | `boolean` | No | Whether this message is included in the LLM context for the next generation. Mirrors the dedup pass that builds chat history (see in_context_reason). | | `in_context_reason` | `string` | No | Why this message is in/out of LLM context. 'kept' = included; 'deduped_read' = older read-only call to a tool that has a fresher result later in the group; future values may include 'trimmed_top_n'. | --- ## `GroupResource` Lightweight `\{id, name\}` for cross-referencing run-level ids (``model_id`` / ``agent_id`` / ``profile_id``) against human-readable names on the analytics panel. Names come from the canonical ``get_models`` / ``get_agents`` / ``get_profiles`` black boxes. | Field | Type | Required | Description | |---|---|---|---| | `id` | `string` | Yes | — | | `name` | `string` | No | — | --- ## `GroupRun` Run within a group, with its messages. Carries token / cost / model / agent / profile attribution so the analytics view can render per-run cost + actor info without a parallel detail shape. ``profile_id`` is the authoring profile (human user), ``agent_id`` is the LLM-side actor, ``model_id`` is the model used by that agent. All optional — runs predating these columns or with unresolved attributions surface ``None``. | Field | Type | Required | Description | |---|---|---|---| | `id` | `string` | Yes | — | | `created_at` | `string` | No | — | | `input_tokens` | `integer` | No | — | | `output_tokens` | `integer` | No | — | | `cached_input_tokens` | `integer` | No | — | | `cost` | `number` | No | — | | `model_id` | `string` | No | — | | `agent_id` | `string` | No | — | | `profile_id` | `string` | No | — | | `previous_context_start_index` | `integer` | No | Index in ``messages`` where the current run's own messages begin; earlier rows are previous-context replay. ``None`` when the run has no previous context attached. | | `messages` | [`GroupMessage`](#groupmessage)[] | No | — | --- ## `ImportField` Field descriptor for CSV import column mapping. | Field | Type | Required | Description | |---|---|---|---| | `key` | `string` | Yes | — | | `label` | `string` | Yes | — | | `required` | `boolean` | No | — | | `multi` | `boolean` | No | — | | `type` | `string` | No | — | | `example` | `string` | No | — | | `description` | `string` | No | — | --- ## `InvocationSlot` One agent's slot in a multi-agent generation pool. Populated by ``setup_generation_test`` when an agent carries a rubric. The client uses these IDs to drive the eval workflow: review the candidate's output, optionally fire a grader against its ``invocation_id``, and promote/reject by call_id via the existing ``idempotency_key + accept`` pattern. | Field | Type | Required | Description | |---|---|---|---| | `invocation_id` | `string` | Yes | — | | `agent_id` | `string` | Yes | — | | `rubric_id` | `string` | No | — | --- ## `ListAgentApiAgent` Agent type for list endpoint with computed permissions. | Field | Type | Required | Description | |---|---|---|---| | `id` | `string` | No | Agent artifact UUID (canonical id; mirrors agent_id) | | `agent_id` | `string` | No | UUID of the agent | | `name` | `string` | No | Display name | | `description` | `string` | No | Agent description text | | `reasoning` | `string` | No | Reasoning level label | | `temperature` | `number` | No | Temperature setting value | | `model_id` | `string` | No | UUID of the selected model | | `model_name` | `string` | No | Display name of the model | | `model_description` | `string` | No | Description of the model | | `role` | `string` | No | Agent role identifier | | `updated_at` | `string` | No | Last updated timestamp | | `department_ids` | `string`[] | No | Associated department UUIDs | | `flag_ids` | `string`[] | No | Currently selected flag option UUIDs | | `is_inactive` | `boolean` | No | Whether the agent is inactive (derived from agent_active flag) | | `is_mcp` | `boolean` | No | Whether the agent is exposed via MCP (derived from mcp flag) | | `can_edit` | `boolean` | No | Whether the current user can edit | | `can_duplicate` | `boolean` | No | Whether the current user can duplicate | | `can_delete` | `boolean` | No | Whether the current user can delete | | `pending_status` | `string` | No | Soft-call ledger status (pending/accepted/rejected) for the latest pending op on this row | | `pending_operation` | `string` | No | Operation name (create/update/delete/duplicate/draft) of the latest pending soft-call entry | | `pending_call_id` | `string` | No | Originating tool call id for the latest pending soft-call entry | --- ## `ListFilterOption` Standardized option for list endpoint filter sections. | Field | Type | Required | Description | |---|---|---|---| | `id` | `string` | No | Unique identifier for this filter option | | `name` | `string` | No | Display name | | `count` | `integer` | No | Number of matching records | | `hex_code` | `string` | No | Hex color code for display | | `value` | `string` | No | Internal value | | `type` | `string` | No | Option type discriminator | --- ## `ListFilterSection` Filter section with options and echoed request state. | Field | Type | Required | Description | |---|---|---|---| | `options` | [`ListFilterOption`](#listfilteroption)[] | No | Available filter options | | `selected_ids` | `string`[] | No | Currently selected filter option IDs | | `search` | `string` | No | Active search text for filtering | --- ## `MvInfo` | Field | Type | Required | Description | |---|---|---|---| | `name` | `string` | Yes | Materialized view name | | `definition` | `string` | Yes | SQL definition of the view | | `columns` | [`ColumnInfo`](#columninfo)[] | Yes | List of columns in the view | --- ## `OperationInfo` | Field | Type | Required | Description | |---|---|---|---| | `name` | `string` | Yes | Operation name | | `description` | `string` | Yes | Human-readable description of the operation | | `params` | [`ParamInfo`](#paraminfo)[] | Yes | List of operation parameters | | `returns` | `object` | No | Return type schema | --- ## `OperationPrompts` Starter prompts keyed by operation name. Each key is an operation (e.g. "create", "search", "draft", "export") and the value is a list of starter prompts for that operation. The client picks from the operations the caller has permission for and rotates through them. | Field | Type | Required | Description | |---|---|---|---| | `prompts` | `object` | No | Map of operation name to starter prompts | --- ## `PageMetaItem` | Field | Type | Required | Description | |---|---|---|---| | `title` | `string` | Yes | — | | `description` | `string` | Yes | — | --- ## `ParamInfo` | Field | Type | Required | Description | |---|---|---|---| | `name` | `string` | Yes | Parameter name | | `type` | `string` | Yes | Parameter data type | | `required` | `boolean` | Yes | Whether the parameter is required | | `default` | `any` | No | Default value if not required | --- ## `ProducedMedia` One asset produced by a generation run. ``resource_id`` is the canonical id the per-artifact download tools accept (e.g. ``Scenario_Image_Download(image_id=resource_id)`` for ``modality="image"``). It maps to ``images_resource.id`` / ``videos_resource.id`` / ``audios_resource.id`` depending on the modality. | Field | Type | Required | Description | |---|---|---|---| | `modality` | `"image"` \| `"video"` \| `"audio"` | Yes | — | | `resource_id` | `string` | Yes | — | | `upload_id` | `string` | Yes | — | | `mime_type` | `string` | No | — | | `file_size` | `integer` | No | — | --- ## `ProfileSummary` Caller identity derived from JWT — who you are on this page. Superset of the old six-field version: now carries everything the client needs so that ``/\{artifact\}/context`` fully replaces ``/profiles/context`` and the extra ``getLayoutContextData`` round-trip can be dropped. | Field | Type | Required | Description | |---|---|---|---| | `name` | `string` | Yes | Display name of the authenticated user | | `role` | `string` | Yes | Role name (e.g. 'Super Administrator') | | `role_level` | `integer` | Yes | Role hierarchy level (0 = highest privilege) | | `department_ids` | `string`[] | Yes | Departments the user belongs to | | `artifact_access` | `string`[] | Yes | Artifact types this role can access (sidebar visibility) | | `role_permissions` | `any`[][] | Yes | Full (artifact, operation) permission tuples for granular page gating | | `is_active` | `boolean` | Yes | Whether the user's profile is active | | `id` | `string` | Yes | Profile UUID (SocketProvider, ProfileProvider) | | `theme` | [`ThemeBundle`](#themebundle) | No | Resolved theme: hex primitives + derived oklch tokens + score thresholds | | `session_id` | `string` | No | Current session UUID | | `is_emulation` | `boolean` | No | Whether user is in emulation mode (ProfileProvider) | | `role_resources` | [`QGetProfileContextV4RoleResource`](#qgetprofilecontextv4roleresource)[] | No | All role resources for emulation display (ProfileProvider) | | `scoped_roles` | `string`[] | No | Roles the user can emulate (ProfileProvider) | | `active` | `boolean` | No | Alias for is_active (ProfileProvider uses this name) | --- ## `QGetProfileContextV4RoleResource` | Field | Type | Required | Description | |---|---|---|---| | `role` | `string` | No | — | | `name` | `string` | No | — | | `description` | `string` | No | — | | `icon_value` | `string` | No | — | | `color_hex` | `string` | No | — | --- ## `RunStatus` Outcome of one watched run. | Field | Type | Required | Description | |---|---|---|---| | `run_id` | `string` | Yes | — | | `status` | `"pending"` \| `"completed"` \| `"failed"` | Yes | — | | `modality` | `string` | No | Modality of generated output (image, video, text…) | | `resource_ids` | `string`[] | No | Resource UUIDs produced by this run (e.g. images_resource ids) | | `error` | `string` | No | — | --- ## `TableInfo` | Field | Type | Required | Description | |---|---|---|---| | `name` | `string` | Yes | Table name | | `columns` | [`ColumnInfo`](#columninfo)[] | Yes | List of columns in the table | --- ## `ThemeBundle` Full theme payload for a page bootstrap. Riding along on every ``/\{artifact\}/context`` response via ``ProfileSummary.theme``. Layers: - ``primitives`` / ``dark_primitives`` — hex inputs the settings editor reads/writes (light + dark palettes). - ``tokens`` / ``dark_tokens`` — oklch tokens the client paints with. ``ThemeStyle`` emits two ``