# Maitai ## Docs - [Introduction](https://docs.trymaitai.com/get_started/introduction.md): What Maitai is, and the fastest way to get value - [Quickstart](https://docs.trymaitai.com/get_started/quickstart.md): Install the CLI, log in, and let your coding agent wire Maitai into your app. - [Base URL](https://docs.trymaitai.com/get_started/base_url.md): Integrate Maitai with your existing OpenAI SDK implementation by changing the base URL and adding a few headers. - [Authentication](https://docs.trymaitai.com/get_started/authentication.md): Authenticate using a Maitai API key (and optionally provider keys). - [Core Concepts](https://docs.trymaitai.com/get_started/core_concepts.md): The mental model: Company > Application > Intent, plus Sessions, Intent Groups, and quality tooling. - [Build](https://docs.trymaitai.com/build/overview.md): Improve the model and orchestrate real work: fine-tuned models, agents, and workflows. - [Dataset Creation](https://docs.trymaitai.com/build/models/dataset_creation.md): How to capture and generate data for fine-tuning - [Dataset Preparation](https://docs.trymaitai.com/build/models/dataset_preparation.md): Reviewing, fixing, and augmenting your training data - [Reasoning Augmentation](https://docs.trymaitai.com/build/models/reasoning_augmentation.md): Teach your model to think step-by-step with structured chain-of-thought augmentation - [Compositions](https://docs.trymaitai.com/build/models/compositions.md): Creating dataset recipes for optimal fine-tuning - [Fine-tune Runs](https://docs.trymaitai.com/build/models/fine_tune_runs.md): Executing and monitoring managed training - [Validation](https://docs.trymaitai.com/build/models/validation.md): Reviewing automated results and checking for regressions - [Deployment](https://docs.trymaitai.com/build/models/deployment.md): Promoting fine-tuned models to production endpoints - [Create Agent](https://docs.trymaitai.com/build/agents/create_agent.md): Defining the identity, context, and execution mode of your AI Agent - [Execution Mode](https://docs.trymaitai.com/build/agents/execution_mode.md): How your agent processes each request: full reasoning loop or single-step routing - [Agent Flow Steps](https://docs.trymaitai.com/build/agents/agent_flow.md): The reasoning loop, step by step, and how to configure each one - [Agent State](https://docs.trymaitai.com/build/agents/agent_state.md): Structured, session-scoped memory your agent maintains and acts on - [Import from code](https://docs.trymaitai.com/build/agents/import_from_code.md): Translate your existing Python agent code into Maitai Agents: any framework, or none at all - [LLM Action](https://docs.trymaitai.com/build/agents/capabilities/llm_action.md): Specialized sub-tasks with unique prompts and model configs - [API Action](https://docs.trymaitai.com/build/agents/capabilities/api_action.md): Integrating external services into your agent workflows - [Workflow Action](https://docs.trymaitai.com/build/agents/capabilities/workflow.md): Run a Maitai Workflow as an agent capability - [Webhook](https://docs.trymaitai.com/build/agents/capabilities/webhook.md): Handling asynchronous callbacks and long-running tasks - [Subagent](https://docs.trymaitai.com/build/agents/capabilities/subagent.md): Recursive hierarchical delegation to specialized agents - [Supplied Actions](https://docs.trymaitai.com/build/agents/capabilities/supplied_actions.md): Ready-made capabilities from the Maitai catalog you can add to any agent - [Workflows](https://docs.trymaitai.com/build/workflows/overview.md): Execute complex AI workflows through a single API call. - [Workflow Structure](https://docs.trymaitai.com/build/workflows/structure.md): How a workflow script is organized: the execute entrypoint, input/output schemas, and helpers. - [Workflow Context (ctx)](https://docs.trymaitai.com/build/workflows/context.md): The runtime API passed to every workflow: LLMs, agents, HTTP, datastores, streaming, and logging. - [Datastores & Accessories](https://docs.trymaitai.com/build/workflows/data.md): Give a workflow reference data: small bundled files, or large indexed, queryable record stores. - [Test](https://docs.trymaitai.com/test/overview.md): Curate test sets and run them against a model, workflow, or agent (scored by evaluation criteria) before you ship. - [Test Set Creation](https://docs.trymaitai.com/test/test_sets/creation.md): Build a test set from any mix of production requests, workflow runs, agent tasks, manual entries, or a file upload. - [Test Run Execution](https://docs.trymaitai.com/test/test_sets/execution.md): Run a test set against a model, workflow, or agent, then score it with evaluation criteria. - [Interpreting Results](https://docs.trymaitai.com/test/test_sets/results.md): Understand Test Run match rates, criteria breakdowns, and comparisons in the Portal. - [Regression Monitoring](https://docs.trymaitai.com/test/test_sets/regression.md): Use Test Runs and comparisons to detect regressions over time - [Evaluation Criteria](https://docs.trymaitai.com/test/test_sets/criteria.md): The reusable checks that score Test Runs: deterministic, LLM-judge, and agent-trajectory. - [Scoring & Criteria](https://docs.trymaitai.com/test/test_sets/rubrics.md): How Test Runs are scored: structural match rate plus evaluation criteria. - [Observe](https://docs.trymaitai.com/observe/overview.md): See what your LLM traffic is actually doing, organized by Application and Intent, down to a single request. - [Applications](https://docs.trymaitai.com/observe/resources/applications.md): How Applications are represented in the Portal (lists, detail pages, and tabs) - [Intents](https://docs.trymaitai.com/observe/resources/intents.md): How Intents (ApplicationActions) work in the Portal - [Intent Groups](https://docs.trymaitai.com/observe/resources/intent_groups.md): How Intent Groups work in the Portal (cross-application organization) - [Request Overview](https://docs.trymaitai.com/observe/request_overview.md): Inspect a single request, create reruns, and compare prompt/model changes. - [Sessions](https://docs.trymaitai.com/observe/agent_sessions.md): Debug multi-turn behavior (including agent runs) via session timelines and task details. - [Sentinels](https://docs.trymaitai.com/observe/sentinels/overview.md): Intent-group-level watchers that evaluate model outputs - [Generating Sentinels](https://docs.trymaitai.com/observe/sentinels/generation.md): Create a new Sentinel from an Intent Group using expectation + condition - [Sentinel Configuration](https://docs.trymaitai.com/observe/sentinels/configuration.md): Edit directives, examples, severity, and include options - [Regenerating Sentinels](https://docs.trymaitai.com/observe/sentinels/regeneration.md): Iterate quickly: regenerate qualification/evaluation/correction logic with feedback - [Monitoring with Sentinels](https://docs.trymaitai.com/observe/sentinels/monitoring.md): Find faults, drill into requests, and track fault rate over time - [Evaluating a Request](https://docs.trymaitai.com/observe/sentinels/request_evaluations.md): Run one-off evaluations on a single request (and compare versions) - [Monitors](https://docs.trymaitai.com/observe/monitors/overview.md): Sample live production traffic, judge outputs against rules, and surface verdicts for review - [Monitor Configuration](https://docs.trymaitai.com/observe/monitors/configuration.md): Pick a runner type, write a resolution, and design against a real sample - [Monitor Targets](https://docs.trymaitai.com/observe/monitors/targets.md): Attach a Monitor to one or more intents, workflows, or agents at a sample rate - [Versions and Releases](https://docs.trymaitai.com/observe/monitors/versions.md): Freeze a Monitor as an immutable snapshot and pin production to it - [Reviewing Monitor Results](https://docs.trymaitai.com/observe/monitors/results.md): Track error rate over time and answer 'is this Monitor healthy?' - [Examples](https://docs.trymaitai.com/examples/overview.md): End-to-end walkthroughs and recipes, grouped by what you're trying to do. - [Configuration](https://docs.trymaitai.com/examples/configuration.md): Common Portal configuration patterns (application / intent / intent group) - [Import Data](https://docs.trymaitai.com/examples/import_data.md): Upload your data to the Portal to build custom models specific to your application - [Fine-tune a Model](https://docs.trymaitai.com/examples/fine_tuning.md): End-to-end workflow: Dataset, Composition, Run, then Validation - [Build an Agent](https://docs.trymaitai.com/examples/build_agent.md): Create a new Agent, add capabilities, and configure how it executes - [API to Agent](https://docs.trymaitai.com/examples/api_to_agent.md): Turn an API into a structured Agent by importing endpoints as API Call actions, organizing them into domain subagents, and encoding the API docs as instructions. - [Create Test Sets](https://docs.trymaitai.com/examples/test_sets.md): Turn real requests into a regression suite you can rerun as you iterate - [Execute Test Runs](https://docs.trymaitai.com/examples/test_runs.md): Monitor model performance improvements with Test Runs - [Quality Loop (Fault, Fix, then Regression Test)](https://docs.trymaitai.com/examples/quality_loop.md): A repeatable Portal workflow to fix failures and prevent them from coming back - [Sentinel Workflow](https://docs.trymaitai.com/examples/sentinel_workflow.md): How to create a Sentinel for an Intent Group and validate it against real traffic - [Debug a Request with Reruns + Evaluations](https://docs.trymaitai.com/examples/debug_request_reruns.md): Test variations of a single request (model/messages) and evaluate them with Sentinels - [SDK Reference](https://docs.trymaitai.com/sdk/overview.md): The Maitai SDK, from chat completions to agents, tools, files, and logging. - [Model Request](https://docs.trymaitai.com/sdk/chat.md): Create chat completions with Maitai metadata (Application, Intent, Session). - [File Inputs](https://docs.trymaitai.com/sdk/file_inputs.md): Send images, video, and documents to multimodal models as part of a chat completion. - [Reasoning](https://docs.trymaitai.com/sdk/reasoning.md): Use chain-of-thought and extended thinking with a single, provider-agnostic API. - [Agent Call](https://docs.trymaitai.com/sdk/agent_call.md): Send a request to an Agent you built in the Portal. - [Logging (Bring Your Own Inference)](https://docs.trymaitai.com/sdk/indexing.md): Run inference with your own provider client, then send Maitai the raw request/response with maitai.log() for monitoring, debugging, and Test Sets, without routing inference through Maitai. - [Observe (Bring Your Own Agent)](https://docs.trymaitai.com/sdk/observe.md): Instrument existing agent frameworks with one call — optional agent name, intent, and session stamps so multi-agent apps stay distinct in the Portal. - [Workflow logging (Bring Your Own Workflow)](https://docs.trymaitai.com/sdk/workflow_logging.md): Log externally executed workflows into Maitai with a 1–2 line Python SDK, raw HTTP, or n8n — same Portal Runs experience as native workflows. - [Evaluate](https://docs.trymaitai.com/sdk/evaluate.md): Detect faults in LLM output - [Structured Output](https://docs.trymaitai.com/sdk/structured_output.md): Generate consistent JSON using JSON Schema (or Pydantic models in Python). - [Tool Calling](https://docs.trymaitai.com/sdk/tool_calling.md): Define tools and let the model call them (OpenAI-style tool calling). - [Speech to text](https://docs.trymaitai.com/sdk/transcription.md): Convert audio files to text using Maitai's speech-to-text API. - [CLI Reference](https://docs.trymaitai.com/cli-reference/overview.md): Command-line interface for the Maitai Platform Developer API. - [Commands](https://docs.trymaitai.com/cli-reference/commands.md): Full CLI command reference for resource commands and raw API. - [API Reference](https://docs.trymaitai.com/api-reference/overview.md): Programmatically manage Maitai resources using the REST API. - [API Coverage](https://docs.trymaitai.com/api-reference/coverage.md): What the Developer API covers, what is intentionally excluded, and where to find generated references. - [List applications](https://docs.trymaitai.com/api-reference/applications/list-applications.md): List all applications belonging to your company. Use `detailed=true` to include full configuration. - [Create application](https://docs.trymaitai.com/api-reference/applications/create-application.md): Create a new application under your company. - [Get application](https://docs.trymaitai.com/api-reference/applications/get-application.md): Retrieve a single application by ID with full detail. - [Update application](https://docs.trymaitai.com/api-reference/applications/update-application.md): Update an application's name, reference name, or other fields. - [Delete application](https://docs.trymaitai.com/api-reference/applications/delete-application.md): Permanently delete an application and all its associated intents. - [Get application config](https://docs.trymaitai.com/api-reference/applications/get-application-config.md): Retrieve the configuration object for an application. - [Update application config](https://docs.trymaitai.com/api-reference/applications/update-application-config.md): Replace the configuration object for an application. - [List application sessions](https://docs.trymaitai.com/api-reference/applications/list-application-sessions.md): List paginated chat sessions for an application. - [List application workflow runs](https://docs.trymaitai.com/api-reference/applications/list-application-workflow-runs.md): List paginated workflow execution runs for an application. - [List application models](https://docs.trymaitai.com/api-reference/applications/list-application-models.md): List all models assigned to an application. - [Get application request analytics](https://docs.trymaitai.com/api-reference/analytics/get-application-request-analytics.md): Get request analytics for an application. - [Get company request analytics](https://docs.trymaitai.com/api-reference/analytics/get-company-request-analytics.md): Get company-level request analytics. - [Get company application activity analytics](https://docs.trymaitai.com/api-reference/analytics/get-company-application-activity-analytics.md): Get per-application request activity for the company. - [Get company model usage analytics](https://docs.trymaitai.com/api-reference/analytics/get-company-model-usage-analytics.md): Get per-model token usage for the company. - [Get application action request analytics](https://docs.trymaitai.com/api-reference/analytics/get-application-action-request-analytics.md): Get request analytics for an application intent. - [Get application action fault rate analytics](https://docs.trymaitai.com/api-reference/analytics/get-application-action-fault-rate-analytics.md): Get fault-rate analytics for an application intent. - [Get intent group request analytics](https://docs.trymaitai.com/api-reference/analytics/get-intent-group-request-analytics.md): Get request analytics for an intent group. - [Get intent group fault rate analytics](https://docs.trymaitai.com/api-reference/analytics/get-intent-group-fault-rate-analytics.md): Get fault-rate analytics for an intent group. - [Get application fault rate analytics](https://docs.trymaitai.com/api-reference/analytics/get-application-fault-rate-analytics.md): Get fault-rate analytics for an application. - [Get agent request analytics](https://docs.trymaitai.com/api-reference/analytics/get-agent-request-analytics.md): Get request analytics for an agent. - [List application intents](https://docs.trymaitai.com/api-reference/intents/list-application-intents.md): List all intents (application actions) for an application with details. - [Create application intent](https://docs.trymaitai.com/api-reference/intents/create-application-intent.md): Create a new intent (application action) for an application. - [Get application intent](https://docs.trymaitai.com/api-reference/intents/get-application-intent.md): Retrieve a single intent by ID within an application. - [Delete application intent](https://docs.trymaitai.com/api-reference/intents/delete-application-intent.md): Delete an intent (application action) from an application. - [Get intent config](https://docs.trymaitai.com/api-reference/intents/get-intent-config.md): Retrieve the configuration for a specific intent. - [Update intent config](https://docs.trymaitai.com/api-reference/intents/update-intent-config.md): Replace the configuration for a specific intent. - [Reset intent config](https://docs.trymaitai.com/api-reference/intents/reset-intent-config.md): Reset an intent's configuration to the application/default configuration. - [Enable intent notifications](https://docs.trymaitai.com/api-reference/intents/enable-intent-notifications.md): Enable fault notifications for an intent. - [Disable intent notifications](https://docs.trymaitai.com/api-reference/intents/disable-intent-notifications.md): Disable fault notifications for an intent. - [List intent groups](https://docs.trymaitai.com/api-reference/intent-groups/list-intent-groups.md): List all intent groups for your company with pagination. - [Get intent group](https://docs.trymaitai.com/api-reference/intent-groups/get-intent-group.md): Retrieve a single intent group by ID. Use `detailed=true` (default) for full details. - [Get intent group config](https://docs.trymaitai.com/api-reference/intent-groups/get-intent-group-config.md): Retrieve the configuration for an intent group. - [Update intent group config](https://docs.trymaitai.com/api-reference/intent-groups/update-intent-group-config.md): Replace the configuration for an intent group. - [List intents by group](https://docs.trymaitai.com/api-reference/intent-groups/list-intents-by-group.md): List all intents belonging to an intent group across applications. - [List intent group requests](https://docs.trymaitai.com/api-reference/intent-groups/list-intent-group-requests.md): List paginated requests for an intent group with optional date range and message filtering. - [List intent group sentinels](https://docs.trymaitai.com/api-reference/intent-groups/list-intent-group-sentinels.md): List all sentinels attached to an intent group. - [List intent group models](https://docs.trymaitai.com/api-reference/intent-groups/list-intent-group-models.md): List all models assigned to an intent group. - [List intent group test sets](https://docs.trymaitai.com/api-reference/intent-groups/list-intent-group-test-sets.md): List all test sets associated with an intent group. - [List intent group datasets](https://docs.trymaitai.com/api-reference/intent-groups/list-intent-group-datasets.md): List all training datasets for an intent group. - [List intent group compositions](https://docs.trymaitai.com/api-reference/intent-groups/list-intent-group-compositions.md): List all dataset compositions for an intent group. - [List agents](https://docs.trymaitai.com/api-reference/agents/list-agents.md): List all agents belonging to your company. Optionally include sub-agents and actions. Pass ``application_id`` to scope the listing to one application, avoids O(total agents) work on large tenants when callers (e.g. ``maitai agents import --diff``) only need agents under one app. - [Create agent](https://docs.trymaitai.com/api-reference/agents/create-agent.md): Create a new agent under an application. Requires `application_id` and `agent_name`. - [Get agent](https://docs.trymaitai.com/api-reference/agents/get-agent.md): Retrieve an agent by ID. Use `detailed=true` to include actions, sub-agents, and full config. - [Update agent](https://docs.trymaitai.com/api-reference/agents/update-agent.md): Update agent fields such as name, description, config, or status. - [Patch agent](https://docs.trymaitai.com/api-reference/agents/patch-agent.md): Partially update an agent using JSON Merge Patch semantics (RFC 7386): nested objects merge recursively, `null` deletes a key, scalars/arrays replace. Unlike PUT, `agent_config` and `meta` are merged onto the existing values instead of replaced wholesale, e.g. `{"agent_config": {"high_performance":… - [Delete agent](https://docs.trymaitai.com/api-reference/agents/delete-agent.md): Permanently delete an agent and its actions. - [Import agents](https://docs.trymaitai.com/api-reference/agents/import-agents.md): Import one or more code-defined agents into Maitai from a canonical manifest. The manifest describes the agents, their capabilities (actions), and handoffs (sub-agents) in a framework-agnostic shape. The endpoint: 1. Resolves or creates the target application. 2. Pre-flights every manifest agent aga… - [List supplied actions](https://docs.trymaitai.com/api-reference/agents/list-supplied-actions.md): List Maitai-supplied actions available to clone onto an agent. Returns curated catalog entries only (no action_config). Cloned actions become normal agent actions and are managed via the standard action CRUD endpoints. - [Add supplied action](https://docs.trymaitai.com/api-reference/agents/add-supplied-action.md): Clone a supplied action from the catalog onto an agent. The catalog row is never modified. The clone is a new agent_action with provenance stamped in ``meta.supplied``. Returns 409 when the agent already has an action with the same name. - [List agent actions](https://docs.trymaitai.com/api-reference/agents/list-agent-actions.md): List all actions (capabilities) configured for an agent. - [Create agent action](https://docs.trymaitai.com/api-reference/agents/create-agent-action.md): Add a new action (LLM, API, or webhook capability) to an agent. - [Get agent action](https://docs.trymaitai.com/api-reference/agents/get-agent-action.md): Retrieve a single action by ID. Pass `include_intent=true` to also resolve the backing intent (application action): LLM actions are captured in the chat pipeline under `intent = action_name` within the agent's application, so intent-level tooling (test sets, configs with fallback models, monitors) k… - [Update agent action](https://docs.trymaitai.com/api-reference/agents/update-agent-action.md): Update an action's name, type, description, config, or invocation mode. - [Patch agent action](https://docs.trymaitai.com/api-reference/agents/patch-agent-action.md): Partially update an action using JSON Merge Patch semantics (RFC 7386). Unlike PUT (which replaces `action_config` wholesale), nested objects merge recursively and `null` deletes a key, e.g. `{"action_config": {"prompt": "..."}}` changes just the prompt, and `{"action_config": {"model_config": {"mod… - [Delete agent action](https://docs.trymaitai.com/api-reference/agents/delete-agent-action.md): Permanently remove an action from an agent. - [Enable action](https://docs.trymaitai.com/api-reference/agents/enable-action.md): Re-enable a previously disabled action. - [Disable action](https://docs.trymaitai.com/api-reference/agents/disable-action.md): Disable an action so the agent no longer invokes it. - [List sub agents](https://docs.trymaitai.com/api-reference/agents/list-sub-agents.md): List all sub-agents attached to a parent agent. - [Add sub agent](https://docs.trymaitai.com/api-reference/agents/add-sub-agent.md): Attach an existing agent as a sub-agent of a parent agent. - [Remove sub agent](https://docs.trymaitai.com/api-reference/agents/remove-sub-agent.md): Detach a sub-agent from its parent. - [Enable sub agent](https://docs.trymaitai.com/api-reference/agents/enable-sub-agent.md): Re-enable a previously disabled sub-agent relationship. - [Disable sub agent](https://docs.trymaitai.com/api-reference/agents/disable-sub-agent.md): Disable a sub-agent relationship without removing it. - [List agent versions](https://docs.trymaitai.com/api-reference/agents/list-agent-versions.md): List published versions of an agent, ordered by most recent. - [Diff agent versions](https://docs.trymaitai.com/api-reference/agents/diff-agent-versions.md): Structured diff between two agent versions. Pass `from` and `to` as version strings (e.g. "1.2.0"), a release name, or "draft" (the default for `to`). Returns per-section deltas: agent fields, actions added/removed/ changed (dotted config paths), sub-agents, and routing rules. - [Get agent status](https://docs.trymaitai.com/api-reference/agents/get-agent-status.md): One-shot release/version status: whether the draft has unpublished changes, the latest published version, total version count, and every named release with the version it pins. - [Get agent version](https://docs.trymaitai.com/api-reference/agents/get-agent-version.md): Retrieve a specific agent version snapshot by version string. - [Publish agent version](https://docs.trymaitai.com/api-reference/agents/publish-agent-version.md): Publish the current draft agent configuration as a new versioned snapshot. - [Restore agent version](https://docs.trymaitai.com/api-reference/agents/restore-agent-version.md): Restore a published version into the editable draft, so new changes build on it. Overwrites the current draft with that version's snapshot (publish again to create a new version from it). - [List action versions](https://docs.trymaitai.com/api-reference/agents/list-action-versions.md): List published versions of an action. - [Publish action version](https://docs.trymaitai.com/api-reference/agents/publish-action-version.md): Publish the current action configuration as a new versioned snapshot. - [Restore action version](https://docs.trymaitai.com/api-reference/agents/restore-action-version.md): Restore a published action version into the editable draft, so new changes build on it. Overwrites the current action draft with that version's snapshot. - [List agent releases](https://docs.trymaitai.com/api-reference/agents/list-agent-releases.md): List all named releases (e.g. production, staging) for an agent. - [Upsert agent release](https://docs.trymaitai.com/api-reference/agents/upsert-agent-release.md): Create or update a named release, optionally pinning it to a version. - [Delete agent release](https://docs.trymaitai.com/api-reference/agents/delete-agent-release.md): Remove a named release. - [Invoke agent](https://docs.trymaitai.com/api-reference/agents/invoke-agent.md): Run an agent and wait for its final response. Targets the draft by default; pass `version` (e.g. "1.2.0") or `release` (e.g. "production") to pin. Body: `{message}` or `{messages: [...]}`, plus optional `session_id`, `max_iterations`, and `secrets` ({NAME: value} for actions that declare `{{secrets.… - [Get agent invocation](https://docs.trymaitai.com/api-reference/agents/get-agent-invocation.md): Poll an asynchronous agent invocation started with `wait=false`. Requires the `request_id` returned by the invoke call. - [List agent sessions](https://docs.trymaitai.com/api-reference/agents/list-agent-sessions.md): List paginated agent sessions, optionally filtered by version. - [Get agent session detail](https://docs.trymaitai.com/api-reference/agents/get-agent-session-detail.md): Retrieve an agent session including all its requests and responses. - [Get agent session timeline](https://docs.trymaitai.com/api-reference/agents/get-agent-session-timeline.md): Retrieve the chronological timeline of events in an agent session. - [Get agent task timeline](https://docs.trymaitai.com/api-reference/agents/get-agent-task-timeline.md): Retrieve the timeline for a specific task within an agent session. - [Get agent task tree](https://docs.trymaitai.com/api-reference/agents/get-agent-task-tree.md): Retrieve the hierarchical tree of sub-tasks spawned from a root task. - [Get routing config](https://docs.trymaitai.com/api-reference/agents/get-routing-config.md): Retrieve the routing configuration and all routing rules for an agent. - [Update routing config](https://docs.trymaitai.com/api-reference/agents/update-routing-config.md): Update the routing mode (llm or rules) and default route for an agent. - [Create routing rule](https://docs.trymaitai.com/api-reference/agents/create-routing-rule.md): Create a new conditional routing rule for an agent. - [Update routing rule](https://docs.trymaitai.com/api-reference/agents/update-routing-rule.md): Update the conditions, route, or label of an existing routing rule. - [Delete routing rule](https://docs.trymaitai.com/api-reference/agents/delete-routing-rule.md): Permanently delete a routing rule. - [Reorder routing rule](https://docs.trymaitai.com/api-reference/agents/reorder-routing-rule.md): Reorder a routing rule to a new position. - [Test routing rule](https://docs.trymaitai.com/api-reference/agents/test-routing-rule.md): Test a routing rule against provided input values. - [Get routing result](https://docs.trymaitai.com/api-reference/agents/get-routing-result.md): Retrieve detailed routing result evaluations for an agent. - [Get form fields](https://docs.trymaitai.com/api-reference/agents/get-form-fields.md): Retrieve the form field definitions for an agent's input form. - [Update form fields](https://docs.trymaitai.com/api-reference/agents/update-form-fields.md): Replace all form field definitions for an agent. - [Delete form fields](https://docs.trymaitai.com/api-reference/agents/delete-form-fields.md): Remove all form fields from an agent, clearing its input form. - [List agent system steps](https://docs.trymaitai.com/api-reference/agents/list-agent-system-steps.md): List the agent runtime system steps for this agent. Prompts and model/params are stored per-agent in agent_config, editing affects only this agent. - [Get agent system step prompt](https://docs.trymaitai.com/api-reference/agents/get-agent-system-step-prompt.md): Get a system step's prompt: `template` (ordered {{reference}} tokens) and `blocks` (segment metadata + content), plus whether it's an override. Stored per-agent in agent_config, affects only this agent. - [Update agent system step prompt](https://docs.trymaitai.com/api-reference/agents/update-agent-system-step-prompt.md): Update a system step's prompt. Body: `{template, blocks:[{reference, content}]}`. Only editable block content and template token order may change, blocks cannot be added or removed. Stored per-agent in agent_config, affects only this agent. - [Reset agent system step prompt](https://docs.trymaitai.com/api-reference/agents/reset-agent-system-step-prompt.md): Reset a system step's prompt to the canonical seed default (preserves the step's model/params config). Affects only this agent. - [Get agent system step config](https://docs.trymaitai.com/api-reference/agents/get-agent-system-step-config.md): Get this agent's model/params config for a system step (model, temperature, max_tokens, etc.). Stored per-agent in agent_config, affects only this agent. - [Update agent system step config](https://docs.trymaitai.com/api-reference/agents/update-agent-system-step-config.md): Update this agent's model/params for a system step. Body is a config object, e.g. `{model, temperature, max_tokens}`. For the respond step, set structured JSON via `response_format`. Top-level keys merge. Stored per-agent in agent_config, affects only this agent. - [Reset agent system step config](https://docs.trymaitai.com/api-reference/agents/reset-agent-system-step-config.md): Reset this agent's model/params config for a system step to the seed default. - [Enable agent system step](https://docs.trymaitai.com/api-reference/agents/enable-agent-system-step.md): Enable an optional runtime system step (`processing` or `progress`). - [Disable agent system step](https://docs.trymaitai.com/api-reference/agents/disable-agent-system-step.md): Disable an optional runtime system step (`processing` or `progress`). - [List compositions](https://docs.trymaitai.com/api-reference/compositions/list-compositions.md): List dataset compositions for your company. - [Get composition](https://docs.trymaitai.com/api-reference/compositions/get-composition.md): Retrieve a single composition by ID. - [Create composition](https://docs.trymaitai.com/api-reference/compositions/create-composition.md): Create a dataset composition. - [Update composition](https://docs.trymaitai.com/api-reference/compositions/update-composition.md): Update a composition by creating a new version. - [Delete composition](https://docs.trymaitai.com/api-reference/compositions/delete-composition.md): Delete a composition. - [List composition versions](https://docs.trymaitai.com/api-reference/compositions/list-composition-versions.md): List all versions for a composition lineage. - [List compositions by intent group](https://docs.trymaitai.com/api-reference/compositions/list-compositions-by-intent-group.md): List compositions for an intent group. - [List compositions by application intent](https://docs.trymaitai.com/api-reference/compositions/list-compositions-by-application-intent.md): List compositions for an application intent. - [Validate rl composition](https://docs.trymaitai.com/api-reference/compositions/validate-rl-composition.md): Validate that datasets can form an RL composition. - [List sentinels](https://docs.trymaitai.com/api-reference/sentinels/list-sentinels.md): List all sentinels (evaluation watchers) for your company. - [Get sentinel](https://docs.trymaitai.com/api-reference/sentinels/get-sentinel.md): Retrieve a single sentinel by ID. - [Create sentinel](https://docs.trymaitai.com/api-reference/sentinels/create-sentinel.md): Create a new sentinel to monitor model output quality for an intent group. - [Update sentinel](https://docs.trymaitai.com/api-reference/sentinels/update-sentinel.md): Update a sentinel's name, severity, directives, or configuration. - [Delete sentinel](https://docs.trymaitai.com/api-reference/sentinels/delete-sentinel.md): Permanently delete a sentinel. - [List simple sentinels](https://docs.trymaitai.com/api-reference/sentinels/list-simple-sentinels.md): List lightweight sentinel rows. - [List sentinels by application](https://docs.trymaitai.com/api-reference/sentinels/list-sentinels-by-application.md): List sentinels for an application. - [List sentinels by application human needs](https://docs.trymaitai.com/api-reference/sentinels/list-sentinels-by-application-human-needs.md): List human-needs sentinels for an application. - [List sentinels by intent group](https://docs.trymaitai.com/api-reference/sentinels/list-sentinels-by-intent-group.md): List sentinels for an intent group. - [List sentinels by intent name](https://docs.trymaitai.com/api-reference/sentinels/list-sentinels-by-intent-name.md): List sentinels for an intent group name. - [Update sentinel directive](https://docs.trymaitai.com/api-reference/sentinels/update-sentinel-directive.md): Update a sentinel directive. - [Generate new sentinel](https://docs.trymaitai.com/api-reference/sentinels/generate-new-sentinel.md): Generate a new sentinel. - [Generate sentinels](https://docs.trymaitai.com/api-reference/sentinels/generate-sentinels.md): Generate sentinels. - [Regenerate sentinel](https://docs.trymaitai.com/api-reference/sentinels/regenerate-sentinel.md): Regenerate a sentinel. - [Regenerate sentinel qualification](https://docs.trymaitai.com/api-reference/sentinels/regenerate-sentinel-qualification.md): Regenerate a sentinel qualification prompt. - [Regenerate sentinel evaluation](https://docs.trymaitai.com/api-reference/sentinels/regenerate-sentinel-evaluation.md): Regenerate a sentinel evaluation prompt. - [Regenerate sentinel correction](https://docs.trymaitai.com/api-reference/sentinels/regenerate-sentinel-correction.md): Regenerate a sentinel correction prompt. - [Regenerate sentinels](https://docs.trymaitai.com/api-reference/sentinels/regenerate-sentinels.md): Regenerate multiple sentinels. - [List monitors](https://docs.trymaitai.com/api-reference/monitors/list-monitors.md): List monitors for your company. Supports `search`, `status`, pagination. - [Get monitor](https://docs.trymaitai.com/api-reference/monitors/get-monitor.md): Retrieve a monitor by ID. Use `include_targets=false` to skip target loading. - [Create monitor](https://docs.trymaitai.com/api-reference/monitors/create-monitor.md): Create a reusable production monitor. New monitors land in `DRAFT`. - [Update monitor](https://docs.trymaitai.com/api-reference/monitors/update-monitor.md): Update name, description, status, runner config, resolution config, or meta. - [Delete monitor](https://docs.trymaitai.com/api-reference/monitors/delete-monitor.md): Soft-delete a monitor (also detaches all targets). - [Activate monitor](https://docs.trymaitai.com/api-reference/monitors/activate-monitor.md): Set status to ACTIVE so production sampling fires. Idempotent. - [Pause monitor](https://docs.trymaitai.com/api-reference/monitors/pause-monitor.md): Set status to PAUSED so production sampling stops. Idempotent. - [List monitor targets](https://docs.trymaitai.com/api-reference/monitors/list-monitor-targets.md): List targets attached to a monitor. - [Create monitor target](https://docs.trymaitai.com/api-reference/monitors/create-monitor-target.md): Attach the monitor to an intent / workflow / agent with a sample rate. - [Update monitor target](https://docs.trymaitai.com/api-reference/monitors/update-monitor-target.md): Update the attachment's sample rate, enabled flag, or meta bag. - [Delete monitor target](https://docs.trymaitai.com/api-reference/monitors/delete-monitor-target.md): Detach (soft-delete) a monitor target. - [Enable monitor target](https://docs.trymaitai.com/api-reference/monitors/enable-monitor-target.md): Re-enable a monitor target so sampling resumes for it. Idempotent. - [Disable monitor target](https://docs.trymaitai.com/api-reference/monitors/disable-monitor-target.md): Disable a target without detaching it (sampling stops). Idempotent. - [Get target sample](https://docs.trymaitai.com/api-reference/monitors/get-target-sample.md): Return the most recent production payload for a monitor target. Powers the wizard's "design against a real sample" UX (autocomplete JSON paths, preview the runner-input shape) and is also useful for agents asking "what does this intent / workflow / agent actually emit?" before they author resolution… - [List monitors by target](https://docs.trymaitai.com/api-reference/monitors/list-monitors-by-target.md): Find every active monitor attached to ``(target_type, target_id)``. Useful for agents asking "what monitors are watching workflow 123?" or "is anything monitoring this intent group?". Required query params: ``target_type``, ``target_id``. Optional: ``enabled_only=true``. - [List monitor versions](https://docs.trymaitai.com/api-reference/monitors/list-monitor-versions.md): List published versions for a monitor (newest first). - [Get monitor version](https://docs.trymaitai.com/api-reference/monitors/get-monitor-version.md): Retrieve a specific monitor version snapshot. - [Publish monitor version](https://docs.trymaitai.com/api-reference/monitors/publish-monitor-version.md): Publish a new version of the monitor (snapshot + semver bump). - [List monitor releases](https://docs.trymaitai.com/api-reference/monitors/list-monitor-releases.md): List named releases for a monitor (default release first). - [Get default monitor version](https://docs.trymaitai.com/api-reference/monitors/get-default-monitor-version.md): Return the version runtime would use right now (default release or latest). - [Upsert monitor release](https://docs.trymaitai.com/api-reference/monitors/upsert-monitor-release.md): Create or update a named release pointing at a specific monitor version. - [Delete monitor release](https://docs.trymaitai.com/api-reference/monitors/delete-monitor-release.md): Delete a named release. - [Promote monitor release](https://docs.trymaitai.com/api-reference/monitors/promote-monitor-release.md): Make ``release_name`` the default release for the monitor. Convenience for agents, same as ``POST /releases`` with the existing name + ``is_default=true``, but doesn't require knowing the version. - [Get monitor activity](https://docs.trymaitai.com/api-reference/monitors/get-monitor-activity.md): Time-bucketed monitor outcome counts (overall or per target). Query params: `monitor_target_id`, `bucket_seconds`, `start_seconds`, `end_seconds`. Defaults: 24h lookback, 1h buckets. - [Get monitor target sparkline](https://docs.trymaitai.com/api-reference/monitors/get-monitor-target-sparkline.md): Per-target error rate sparkline (used by the At-a-Glance cards). - [Get monitor metrics](https://docs.trymaitai.com/api-reference/monitors/get-monitor-metrics.md): Aggregated counts + rates for the monitor over a window. Query params: `monitor_target_id` (scope to one target), `start_seconds`, `end_seconds`. Defaults match the activity endpoint (24h lookback). - [Get monitor metrics by target](https://docs.trymaitai.com/api-reference/monitors/get-monitor-metrics-by-target.md): Per-target metrics rollup (one row per attached target). Targets with zero activity in the window still appear (with zeroed counts) so the caller can compare against the configured sample rate. - [Get monitor target metrics](https://docs.trymaitai.com/api-reference/monitors/get-monitor-target-metrics.md): Aggregated counts + rates for a single attached target. - [List runs global](https://docs.trymaitai.com/api-reference/monitors/list-runs-global.md): List monitor runs across every monitor in your company. All filters are optional. Useful for "show me failures from the last hour" style queries, pass ``outcome=failed&start_seconds=...``. - [Get run global](https://docs.trymaitai.com/api-reference/monitors/get-run-global.md): Drill into a single ``monitor_run`` (resolution trace, source ids, etc.). - [List runs by source](https://docs.trymaitai.com/api-reference/monitors/list-runs-by-source.md): Reverse lookup: every monitor run that evaluated the given event. Required: ``source_type`` (request|workflow|agent), ``source_type_id``. Optional: ``limit`` (default 25, max 100). - [List runs for monitor](https://docs.trymaitai.com/api-reference/monitors/list-runs-for-monitor.md): List runs scoped to a single monitor. - [Get run scoped](https://docs.trymaitai.com/api-reference/monitors/get-run-scoped.md): Get a single run and verify it belongs to the given monitor. - [Preview monitor](https://docs.trymaitai.com/api-reference/monitors/preview-monitor.md): Run the monitor judge + resolution against an ad-hoc payload. Body is :class:`MonitorPreviewRequest`. Defaults to the working draft so agents iterating on ``monitor.config`` can see the verdict immediately. Pass ``use=version`` / ``use=release`` / ``use=adhoc`` to preview a different config. No ``mo… - [List sessions](https://docs.trymaitai.com/api-reference/sessions/list-sessions.md): List classic (non-agent) chat sessions. Optionally filter by `application_id`. - [Get session](https://docs.trymaitai.com/api-reference/sessions/get-session.md): Retrieve a single session by ID. Requires `application_id` query param. - [Get session timeline](https://docs.trymaitai.com/api-reference/sessions/get-session-timeline.md): Retrieve the chronological request timeline for a session. Requires `application_id` query param. - [Set session feedback](https://docs.trymaitai.com/api-reference/sessions/set-session-feedback.md): Submit feedback (rating, notes) for a session. - [List requests](https://docs.trymaitai.com/api-reference/requests/list-requests.md): List requests filtered by application_id + intent_id, with date range. - [Get request](https://docs.trymaitai.com/api-reference/requests/get-request.md): Retrieve a single request and its corresponding response. - [Update request response](https://docs.trymaitai.com/api-reference/requests/update-request-response.md): Update/correct a response for a request. Send `message_content` (string) in the body. - [List datasets](https://docs.trymaitai.com/api-reference/datasets/list-datasets.md): List all training datasets for your company. - [Get dataset](https://docs.trymaitai.com/api-reference/datasets/get-dataset.md): Retrieve a single dataset by ID. - [Create dataset](https://docs.trymaitai.com/api-reference/datasets/create-dataset.md): Create a new training dataset linked to an intent group. - [Update dataset](https://docs.trymaitai.com/api-reference/datasets/update-dataset.md): Update a dataset's name, description, or sampling configuration. - [Delete dataset](https://docs.trymaitai.com/api-reference/datasets/delete-dataset.md): Permanently delete a dataset and disassociate its requests. Pass ``?cascade=lineage`` to delete the entire version lineage instead of only the specified version. Returns 409 if a continuous learning run still references any targeted version. - [List dataset requests](https://docs.trymaitai.com/api-reference/datasets/list-dataset-requests.md): List the request/response pairs included in a dataset. - [Add requests to dataset](https://docs.trymaitai.com/api-reference/datasets/add-requests-to-dataset.md): Add request/response pairs to a dataset. Accepts either body shape: - `{"requests": [{"request_id": "..."}]}` (canonical) - `{"request_ids": ["...", "..."]}` (convenience, flat string array) - [Remove requests from dataset](https://docs.trymaitai.com/api-reference/datasets/remove-requests-from-dataset.md): Remove request/response pairs from a dataset. Accepts either body shape: - `{"requests": [{"request_id": "..."}]}` (canonical) - `{"request_ids": ["...", "..."]}` (convenience, flat string array) - [List datasets by intent group](https://docs.trymaitai.com/api-reference/datasets/list-datasets-by-intent-group.md): List datasets for an intent group. - [List datasets by intent](https://docs.trymaitai.com/api-reference/datasets/list-datasets-by-intent.md): List datasets for an application intent. - [List datasets by test set](https://docs.trymaitai.com/api-reference/datasets/list-datasets-by-test-set.md): List datasets that are associated with a test set. - [Validate dataset s3 source](https://docs.trymaitai.com/api-reference/datasets/validate-dataset-s3-source.md): Validate an S3 source before dataset import. - [Get dataset s3 syncer info](https://docs.trymaitai.com/api-reference/datasets/get-dataset-s3-syncer-info.md): Get S3 syncer service account and external ID details. - [Get estimated dataset request count](https://docs.trymaitai.com/api-reference/datasets/get-estimated-dataset-request-count.md): Estimate dataset request count for the provided filters. - [List datasets by tags](https://docs.trymaitai.com/api-reference/datasets/list-datasets-by-tags.md): List datasets matching tag filters. - [List valid dataset tags](https://docs.trymaitai.com/api-reference/datasets/list-valid-dataset-tags.md): List valid dataset tags. - [Preview dataset generation](https://docs.trymaitai.com/api-reference/datasets/preview-dataset-generation.md): Preview AI-generated dataset rows. - [Estimate dataset generation cost](https://docs.trymaitai.com/api-reference/datasets/estimate-dataset-generation-cost.md): Estimate AI dataset generation cost. - [Start dataset generation](https://docs.trymaitai.com/api-reference/datasets/start-dataset-generation.md): Start AI dataset generation. - [Clone dataset](https://docs.trymaitai.com/api-reference/datasets/clone-dataset.md): Clone a dataset. - [Sample clone dataset](https://docs.trymaitai.com/api-reference/datasets/sample-clone-dataset.md): Create a sampled clone of a dataset. - [Cancel dataset s3 import](https://docs.trymaitai.com/api-reference/datasets/cancel-dataset-s3-import.md): Cancel an in-progress S3 dataset import. - [Reimport dataset s3 source](https://docs.trymaitai.com/api-reference/datasets/reimport-dataset-s3-source.md): Re-run S3 import for a dataset. - [Get dataset status](https://docs.trymaitai.com/api-reference/datasets/get-dataset-status.md): Get dataset import/generation status. - [List dataset request ids](https://docs.trymaitai.com/api-reference/datasets/list-dataset-request-ids.md): List request IDs included in a dataset. - [Get dataset request distribution](https://docs.trymaitai.com/api-reference/datasets/get-dataset-request-distribution.md): Get request distribution facets for a dataset. - [List eligible dataset requests](https://docs.trymaitai.com/api-reference/datasets/list-eligible-dataset-requests.md): List requests eligible for addition to a dataset. - [Search eligible dataset requests](https://docs.trymaitai.com/api-reference/datasets/search-eligible-dataset-requests.md): Search requests eligible for addition to a dataset. - [Search added dataset requests](https://docs.trymaitai.com/api-reference/datasets/search-added-dataset-requests.md): Search requests already added to a dataset. - [Add dataset requests bulk](https://docs.trymaitai.com/api-reference/datasets/add-dataset-requests-bulk.md): Add requests to a dataset using the Portal bulk payload shape. - [Remove dataset requests bulk](https://docs.trymaitai.com/api-reference/datasets/remove-dataset-requests-bulk.md): Remove requests from a dataset using the Portal bulk payload shape. - [Get dataset regex replacements applicable count](https://docs.trymaitai.com/api-reference/datasets/get-dataset-regex-replacements-applicable-count.md): Count dataset rows that would be affected by regex replacements. - [Apply dataset regex replacements](https://docs.trymaitai.com/api-reference/datasets/apply-dataset-regex-replacements.md): Apply regex replacements to dataset rows. - [Preview dataset prune](https://docs.trymaitai.com/api-reference/datasets/preview-dataset-prune.md): Preview dataset pruning. - [Apply dataset prune](https://docs.trymaitai.com/api-reference/datasets/apply-dataset-prune.md): Apply dataset pruning. - [Get dataset prompt](https://docs.trymaitai.com/api-reference/datasets/get-dataset-prompt.md): Get a generated prompt summary for a dataset. - [List dataset versions](https://docs.trymaitai.com/api-reference/datasets/list-dataset-versions.md): List dataset versions. - [Get dataset delete impact](https://docs.trymaitai.com/api-reference/datasets/get-dataset-delete-impact.md): Describe what would be deleted if this dataset (or its lineage) were removed. - [List dataset tags](https://docs.trymaitai.com/api-reference/datasets/list-dataset-tags.md): List tags for a dataset. - [Add dataset tag](https://docs.trymaitai.com/api-reference/datasets/add-dataset-tag.md): Add a tag to a dataset. - [Remove dataset tag](https://docs.trymaitai.com/api-reference/datasets/remove-dataset-tag.md): Remove a tag from a dataset. - [Set dataset tags](https://docs.trymaitai.com/api-reference/datasets/set-dataset-tags.md): Replace all tags on a dataset. - [Cancel dataset generation](https://docs.trymaitai.com/api-reference/datasets/cancel-dataset-generation.md): Cancel AI dataset generation. - [Pause dataset generation](https://docs.trymaitai.com/api-reference/datasets/pause-dataset-generation.md): Pause AI dataset generation. - [Resume dataset generation](https://docs.trymaitai.com/api-reference/datasets/resume-dataset-generation.md): Resume AI dataset generation. - [Augment dataset reasoning](https://docs.trymaitai.com/api-reference/datasets/augment-dataset-reasoning.md): Augment dataset rows with reasoning. - [Get dataset request reasoning](https://docs.trymaitai.com/api-reference/datasets/get-dataset-request-reasoning.md): Get reasoning for one dataset request. - [List available evaluation criteria](https://docs.trymaitai.com/api-reference/evaluation-criteria/list-available-evaluation-criteria.md): List built-in evaluation criteria options. - [List evaluation criteria](https://docs.trymaitai.com/api-reference/evaluation-criteria/list-evaluation-criteria.md): List saved evaluation criteria. - [Create evaluation criteria](https://docs.trymaitai.com/api-reference/evaluation-criteria/create-evaluation-criteria.md): Create evaluation criteria. - [Update evaluation criteria](https://docs.trymaitai.com/api-reference/evaluation-criteria/update-evaluation-criteria.md): Update evaluation criteria. - [Delete evaluation criteria](https://docs.trymaitai.com/api-reference/evaluation-criteria/delete-evaluation-criteria.md): Delete evaluation criteria. - [Import request into unified test set](https://docs.trymaitai.com/api-reference/unified-test-sets/import-request-into-unified-test-set.md): Import a production `chat_completion_request` into this test set. Body: * ``request_id`` (str, required), the `chat_completion_request` id * ``meta`` (object, optional), free-form provenance for the item Idempotent at the service layer via the ``idx_test_set_item_unique_request`` partial unique inde… - [Import workflow run into unified test set](https://docs.trymaitai.com/api-reference/unified-test-sets/import-workflow-run-into-unified-test-set.md): Import a `workflow_run` into this test set. Body: * ``workflow_run_id`` (int, required) * ``meta`` (object, optional) Idempotent via ``idx_test_set_item_unique_workflow_run``. - [Import agent task into unified test set](https://docs.trymaitai.com/api-reference/unified-test-sets/import-agent-task-into-unified-test-set.md): Import a completed agent task into this test set. Body: * ``agent_task_id`` (str, required), the top-level agent task's UUID * ``flatten_variant`` (str, optional), one of ``agent_first_user_message`` (default; drops system prompt) or ``agent_first_user_message_with_system_prompt``. Same variants the… - [Upsert unified test set item expected output override](https://docs.trymaitai.com/api-reference/unified-test-sets/upsert-unified-test-set-item-expected-output-override.md): Insert or replace this item's `expected_output` override. Body must validate against ``UpdateTestSetItemExpectedOutputRequest``: a single ``output_content`` field carrying a canonical assistant message. When present, scoring reads from the override table instead of the item's own ``expected_output``… - [Create unified test set](https://docs.trymaitai.com/api-reference/unified-test-sets/create-unified-test-set.md): Create an empty unified test set. Body: ``CreateTestSetRequest``, ``test_set_name`` and ``application_id`` are required. The unique constraint on ``(company_id, application_id, test_set_name)`` is surfaced as a 400 by the service (``ValueError``) so callers get a clear duplicate message. - [Upload unified test set jsonl](https://docs.trymaitai.com/api-reference/unified-test-sets/upload-unified-test-set-jsonl.md): Create a unified test set from a typed JSONL upload (non-blocking). Multipart form fields: * ``file`` (required), ``.jsonl`` with one object per line; each line must include ``type`` in ``request|workflow|agent|manual`` * ``name`` (required) * ``application_id`` (required) * ``description`` (optiona… - [List unified test sets](https://docs.trymaitai.com/api-reference/unified-test-sets/list-unified-test-sets.md): List unified test sets for this company, newest first. Runs the lazy legacy-shell backfill on every call (idempotent), so Intent Group / company lists see both native unified sets and pending shells for still-unmigrated legacy rows. Query params: * ``application_id`` (int, optional), narrow to one a… - [Get unified test set](https://docs.trymaitai.com/api-reference/unified-test-sets/get-unified-test-set.md): Fetch a single set (with ``item_count`` populated). - [Patch unified test set](https://docs.trymaitai.com/api-reference/unified-test-sets/patch-unified-test-set.md): Patch mutable metadata (name / description / is_golden). Body: ``UpdateTestSetRequest``, every field is optional. The unique ``(company_id, application_id, test_set_name)`` constraint is surfaced as a 400 via ``ValueError``. - [Clone unified test set](https://docs.trymaitai.com/api-reference/unified-test-sets/clone-unified-test-set.md): Full-clone a unified test set. Returns a job id (async). Body: * ``new_test_set_name`` (str, required) -- must be unique per ``(company_id, application_id)``. * ``new_test_set_description`` (str, optional) -- defaults to source's description. Response: ``202 Accepted`` with ``{job_id, status: "pendi… - [List unified test set items](https://docs.trymaitai.com/api-reference/unified-test-sets/list-unified-test-set-items.md): List items on a set, in insertion order. Query params: ``offset`` / ``limit`` (standard pagination). - [Create unified manual test set item](https://docs.trymaitai.com/api-reference/unified-test-sets/create-unified-manual-test-set-item.md): Insert a hand-authored (MANUAL) item. Body: ``CreateManualTestSetItemRequest``, ``input`` is required and must validate against ``CanonicalInput`` (i.e. the canonical chat-completion params shape). ``expected_output``, if present, must be a ``CanonicalAssistantMessage``. Source-import items go throu… - [Get unified test set item](https://docs.trymaitai.com/api-reference/unified-test-sets/get-unified-test-set-item.md): Fetch a single item, scoped to the set + company. - [Delete unified test set item](https://docs.trymaitai.com/api-reference/unified-test-sets/delete-unified-test-set-item.md): Delete a single item. Any ``test_set_item_response_sub`` override on the item cascades via FK, and the item is dropped from future runs. Existing ``unified_test_run_item`` rows are unaffected (they FK to the item id but were snapshotted at prepare-time). - [Create unified test run](https://docs.trymaitai.com/api-reference/unified-test-runs/create-unified-test-run.md): Create a run in ``status=CREATED``. Body: ``CreateUnifiedTestRunRequest``. Consumer config is validated against the Pydantic variant matching ``consumer_type`` at the service layer, so wire-shape mistakes surface as a clean 400. Insertion is atomic: no items are created here, callers hit ``/prepare`… - [List unified test runs](https://docs.trymaitai.com/api-reference/unified-test-runs/list-unified-test-runs.md): List runs for this company, newest first. Query params: * ``test_set_id`` (int, optional), narrow to runs against one set. * ``application_id`` (int, optional), narrow to runs whose set belongs to one application. * ``offset`` / ``limit``, standard pagination. - [Get unified test run](https://docs.trymaitai.com/api-reference/unified-test-runs/get-unified-test-run.md): Fetch a single run row. - [Delete unified test run](https://docs.trymaitai.com/api-reference/unified-test-runs/delete-unified-test-run.md): Hard-delete the run and its items. ``unified_test_run_item.fk_utri_run`` is ``ON DELETE CASCADE``, so items are removed in the same statement. Test set items and their ``response_sub`` overrides are untouched. - [List unified test run items](https://docs.trymaitai.com/api-reference/unified-test-runs/list-unified-test-run-items.md): List all items on a run, in insertion order. Not paginated: run items are bounded by test-set size (the same set that scored `run.test_set_id`), and every UI that consumes this endpoint needs all of them at once for the results table. - [Prepare unified test run](https://docs.trymaitai.com/api-reference/unified-test-runs/prepare-unified-test-run.md): Snapshot adapted inputs for every item and move to RUNNING. Walks every item on the set, calls the input adapter registered for the run's ``consumer_type``, and inserts a run-item row with the adapted payload. Idempotent-ish: rejects any status other than CREATED with a 400 so an accidental double-c… - [Execute unified test run](https://docs.trymaitai.com/api-reference/unified-test-runs/execute-unified-test-run.md): Schedule execution across MODEL / WORKFLOW / AGENT and return immediately. Requires ``status=RUNNING`` (i.e. ``/prepare`` was called). **Non-blocking**: the service validates state, resolves the API key when required, and schedules a conductor (in-proc asyncio task in dev, K8s Job named ``unified-te… - [Get unified test run progress](https://docs.trymaitai.com/api-reference/unified-test-runs/get-unified-test-run-progress.md): Aggregate counts + duration percentiles for a run. Returns:: { "test_run_id": int, "run_status": "CREATED" | "PREPARING_INPUTS" | "RUNNING" | ..., "total": int, # every item on the run "done": int, # COMPLETED + FAILED "matched": int, # matched == true after scoring "mismatched": int,… - [Score unified test run](https://docs.trymaitai.com/api-reference/unified-test-runs/score-unified-test-run.md): Kick off a background scoring pass, **non-blocking**. Requires ``status=COMPLETED``. Transitions the run to ``status=SCORING`` and returns the updated ``UnifiedTestRun`` row immediately; the actual structural-diff + evaluation-criteria pass runs as an ``asyncio`` task in the API process. Poll ``GET… - [Cancel unified test run](https://docs.trymaitai.com/api-reference/unified-test-runs/cancel-unified-test-run.md): Stop an in-flight run and mark it FAILED. Fails any items still in ``CREATED``/``RUNNING`` and stamps ``error_message='Cancelled by user'``, then signals the conductor (in-proc asyncio task in dev, K8s Job in prod) to unwind. Returns ``400`` if the run has already terminated (``COMPLETED`` / ``FAILE… - [Reset failed unified test run items](https://docs.trymaitai.com/api-reference/unified-test-runs/reset-failed-unified-test-run-items.md): Reset items on a terminal run so it can be re-executed. Default mode (``?include_completed=false`` or body ``{"include_completed": false}``) resets only the ``FAILED`` items, a "rerun failed only" operation that preserves successful items' outcomes. Full-rerun mode (``include_completed=true``) also… - [Preview adapted input](https://docs.trymaitai.com/api-reference/unified-test-runs/preview-adapted-input.md): Dry-run the input adapter for one item + hypothetical consumer config. Body: * ``test_set_id`` (int, required) * ``test_set_item_id`` (int, required) * ``consumer_type`` (str, required), MODEL / WORKFLOW / AGENT * ``consumer_id`` (int, optional) * ``consumer_config`` (object, optional) Same validati… - [List workflows](https://docs.trymaitai.com/api-reference/workflows/list-workflows.md): List workflows available to your company. - [Create workflow](https://docs.trymaitai.com/api-reference/workflows/create-workflow.md): Create a workflow and upload its script. - [Upload workflow bundle](https://docs.trymaitai.com/api-reference/workflows/upload-workflow-bundle.md): Upload or upsert a workflow bundle (script, accessories, optional version publish). - [Get workflow](https://docs.trymaitai.com/api-reference/workflows/get-workflow.md): Retrieve a workflow by ID. - [Update workflow](https://docs.trymaitai.com/api-reference/workflows/update-workflow.md): Update workflow metadata, script, schemas, or transform code. - [Delete workflow](https://docs.trymaitai.com/api-reference/workflows/delete-workflow.md): Soft-delete a workflow. - [Get workflow script](https://docs.trymaitai.com/api-reference/workflows/get-workflow-script.md): Fetch a workflow script decomposed into code, schemas, and transform. - [Get workflow schema](https://docs.trymaitai.com/api-reference/workflows/get-workflow-schema.md): Fetch workflow input schema and transform availability. - [Get workflow transform info](https://docs.trymaitai.com/api-reference/workflows/get-workflow-transform-info.md): Fetch workflow transform_session availability. - [Get workflow artifact files](https://docs.trymaitai.com/api-reference/workflows/get-workflow-artifact-files.md): List deployed workflow script and accessory artifacts. - [Upload workflow accessory](https://docs.trymaitai.com/api-reference/workflows/upload-workflow-accessory.md): Upload or replace a workflow accessory file. - [Delete workflow accessory](https://docs.trymaitai.com/api-reference/workflows/delete-workflow-accessory.md): Delete a workflow accessory file by key. - [List workflow datastores](https://docs.trymaitai.com/api-reference/workflows/list-workflow-datastores.md): List workflow datastores that can provide data to executions. - [Upsert workflow datastore](https://docs.trymaitai.com/api-reference/workflows/upsert-workflow-datastore.md): Create or update a workflow datastore schema. - [Delete workflow datastore](https://docs.trymaitai.com/api-reference/workflows/delete-workflow-datastore.md): Delete a workflow datastore schema. - [Upload workflow datastore](https://docs.trymaitai.com/api-reference/workflows/upload-workflow-datastore.md): Upload records or link an S3 URI for a workflow datastore. - [Validate workflow script](https://docs.trymaitai.com/api-reference/workflows/validate-workflow-script.md): Validate workflow code, transform code, or schema snippets. - [Create workflow chat completion](https://docs.trymaitai.com/api-reference/workflows/create-workflow-chat-completion.md): Execute a workflow using the chat-completions contract. - [List workflow versions](https://docs.trymaitai.com/api-reference/workflows/list-workflow-versions.md): List published workflow versions. - [Publish workflow version](https://docs.trymaitai.com/api-reference/workflows/publish-workflow-version.md): Publish a new immutable workflow version. - [Get workflow version artifact files](https://docs.trymaitai.com/api-reference/workflows/get-workflow-version-artifact-files.md): List artifact files frozen in a workflow version. - [List workflow releases](https://docs.trymaitai.com/api-reference/workflows/list-workflow-releases.md): List workflow release pointers. - [Create workflow release](https://docs.trymaitai.com/api-reference/workflows/create-workflow-release.md): Create a named workflow release pointer. - [Update workflow release](https://docs.trymaitai.com/api-reference/workflows/update-workflow-release.md): Update a named workflow release pointer. - [Delete workflow release](https://docs.trymaitai.com/api-reference/workflows/delete-workflow-release.md): Delete a named workflow release pointer. - [Clear workflow default release](https://docs.trymaitai.com/api-reference/workflows/clear-workflow-default-release.md): Clear the workflow default release pointer. - [Get default workflow script](https://docs.trymaitai.com/api-reference/workflows/get-default-workflow-script.md): Fetch the default workflow script template. - [Preview workflow transform](https://docs.trymaitai.com/api-reference/workflows/preview-workflow-transform.md): Dry-run transform_session for one session without persisting output. - [Check workflow transforms](https://docs.trymaitai.com/api-reference/workflows/check-workflow-transforms.md): Check if a workflow script defines transform_session. - [List workflow runs](https://docs.trymaitai.com/api-reference/workflows/list-workflow-runs.md): List workflow runs by workflow_id or application_id. - [Log workflow run](https://docs.trymaitai.com/api-reference/workflows/log-workflow-run.md): Log an externally executed (bring-your-own) workflow run. - [Get workflow run](https://docs.trymaitai.com/api-reference/workflows/get-workflow-run.md): Fetch a single workflow run by session ID. - [List finetune runs](https://docs.trymaitai.com/api-reference/finetune-runs/list-finetune-runs.md): List all finetune runs for your company. Optionally filter by `status`. - [Get finetune run](https://docs.trymaitai.com/api-reference/finetune-runs/get-finetune-run.md): Retrieve a finetune run with its configuration and current status. - [Estimate finetune vram](https://docs.trymaitai.com/api-reference/finetune-runs/estimate-finetune-vram.md): Run the pre-flight VRAM estimator against a proposed finetune config. - [Create finetune run](https://docs.trymaitai.com/api-reference/finetune-runs/create-finetune-run.md): Start a new model finetuning job using a training dataset. Pass ``?force=true`` to bypass the pre-flight VRAM estimator; otherwise a config predicted to OOM returns 409 with a `recommendation` payload. - [Cancel finetune run](https://docs.trymaitai.com/api-reference/finetune-runs/cancel-finetune-run.md): Cancel a running finetune job. - [Get finetune run metrics](https://docs.trymaitai.com/api-reference/finetune-runs/get-finetune-run-metrics.md): Retrieve training loss and accuracy metrics for a finetune run. - [Get finetune status](https://docs.trymaitai.com/api-reference/finetune-runs/get-finetune-status.md): Get the current status of a finetune run. Reports a single `phase`: one of `training`, `trained`, `testing`, `deploying`, `deployed`, `deploy_failed`, `deploy_cancelled`, `failed`, `cancelled`, `deleted`: that folds together the training lifecycle, any hosted-model deployment, and any auto-test run.… - [Deploy finetune run](https://docs.trymaitai.com/api-reference/finetune-runs/deploy-finetune-run.md): Deploy a completed finetune run as a hosted model. Promotes the finetune into a servable model addressed by `model_name`: - a new `model_name` publishes the finetune as a new model; - an existing model's `model_name` with `promote_existing: true` swaps that model's underlying finetune to this run wh… - [Cancel finetune deploy](https://docs.trymaitai.com/api-reference/finetune-runs/cancel-finetune-deploy.md): Cancel an in-progress hosted-model deployment for a finetune run. Only works while the deployment is still active; a completed or already-terminal deployment returns 400. - [List evaluations](https://docs.trymaitai.com/api-reference/evaluations/list-evaluations.md): List all evaluation runs for your company. - [Get evaluation](https://docs.trymaitai.com/api-reference/evaluations/get-evaluation.md): Retrieve an evaluation run. Use `full=true` to include all request data. - [Create evaluation](https://docs.trymaitai.com/api-reference/evaluations/create-evaluation.md): Start a batch evaluation run against selected sentinels and requests. - [Get evaluation results](https://docs.trymaitai.com/api-reference/evaluations/get-evaluation-results.md): Retrieve per-request evaluation scores and sentinel verdicts for a run. - [List models](https://docs.trymaitai.com/api-reference/models/list-models.md): List enabled models for your company. Optionally filter by `model_type`. - [List available models](https://docs.trymaitai.com/api-reference/models/list-available-models.md): List all models available to your company, including base and finetuned models. - [Disable model](https://docs.trymaitai.com/api-reference/models/disable-model.md): Disable a model so it is no longer used for inference. - [Enable model](https://docs.trymaitai.com/api-reference/models/enable-model.md): Re-enable a previously disabled model for inference. - [Create base model](https://docs.trymaitai.com/api-reference/models/create-base-model.md): Create a Maitai base model registry entry. - [Get model](https://docs.trymaitai.com/api-reference/models/get-model.md): Get model details. - [Get model inference pool](https://docs.trymaitai.com/api-reference/models/get-model-inference-pool.md): Get the inference pool attached to a model. - [Get model inference pool debug](https://docs.trymaitai.com/api-reference/models/get-model-inference-pool-debug.md): Get debug details for a model's inference pool. - [List model inference pool attach candidates](https://docs.trymaitai.com/api-reference/models/list-model-inference-pool-attach-candidates.md): List inference pools that can be attached to a model. - [Attach model inference pool](https://docs.trymaitai.com/api-reference/models/attach-model-inference-pool.md): Attach an inference pool to a model. - [Detach model inference pool](https://docs.trymaitai.com/api-reference/models/detach-model-inference-pool.md): Detach an inference pool from a model. - [Get model repoint options](https://docs.trymaitai.com/api-reference/models/get-model-repoint-options.md): Get repointing options for a model. - [Patch model registry](https://docs.trymaitai.com/api-reference/models/patch-model-registry.md): Patch model registry metadata. - [Preview swap model ref](https://docs.trymaitai.com/api-reference/models/preview-swap-model-ref.md): Preview replacing a model ref. - [Execute swap model ref](https://docs.trymaitai.com/api-reference/models/execute-swap-model-ref.md): Execute a model ref replacement. - [Repoint model](https://docs.trymaitai.com/api-reference/models/repoint-model.md): Repoint a model. - [List models by intent group](https://docs.trymaitai.com/api-reference/models/list-models-by-intent-group.md): List models for an intent group. - [List models by application](https://docs.trymaitai.com/api-reference/models/list-models-by-application.md): List models for an application. - [List models by intent](https://docs.trymaitai.com/api-reference/models/list-models-by-intent.md): List models for an intent. - [List faults](https://docs.trymaitai.com/api-reference/reports/list-faults.md): List recent faults. - [List fallbacks](https://docs.trymaitai.com/api-reference/reports/list-fallbacks.md): List recent fallbacks. - [List faults by intent](https://docs.trymaitai.com/api-reference/reports/list-faults-by-intent.md): List recent faults for an intent. - [List fallbacks by intent](https://docs.trymaitai.com/api-reference/reports/list-fallbacks-by-intent.md): List recent fallbacks for an intent. - [Search](https://docs.trymaitai.com/api-reference/search/search.md): Return a recommended Maitai CLI/API execution plan for a free-form query. Useful for agent IDEs (Cursor, Claude Code) that want to translate a natural-language ask like "how do I import an OpenAI agent" into a concrete sequence of Maitai operations, known pitfalls, and related tools, the same shape… - [Help query](https://docs.trymaitai.com/api-reference/help/help-query.md): Answer a free-form question about building with Maitai in natural-language markdown. The information-only sibling of ``POST /search``: instead of a structured execution plan, returns an expert prose answer with working code examples (SDK integration, Developer API, CLI, or Portal) for agent IDEs (Cu… ## OpenAPI Specs - [openapi](https://docs.trymaitai.com/openapi.yaml)