{"components":{"responses":{},"schemas":{"IdempotencyKey":{"description":"Required unique idempotency key for this item. Must be 8–128 characters and unique within the request. Used to identify the result in the response map.","example":"create-agent-2024-01-15-001","maxLength":128,"minLength":8,"title":"IdempotencyKey","type":"string"},"ApiToken_DetailsForUpdate":{"properties":{"role":{"description":"Access role of the token (omit or null to keep the current value)","oneOf":[{"enum":["read_only","full_access"],"example":"read_only","type":"string"},{"$ref":"#/components/schemas/Null"}]}},"title":"ApiToken_DetailsForUpdate","type":"object"},"Uri":{"description":"URL to accept the invite","example":"https://example.com","format":"uri","title":"Uri","type":"string"},"AgentSchemaVersion_Id":{"description":"A valid agent schema version ID","example":"013xrzp12g3nqk8ns6jadrqmpgrjkeny","title":"AgentSchemaVersion_Id","type":"string"},"AccountIntegration_Details":{"properties":{"config":{"additionalProperties":true,"description":"Versioned integration config. Secrets such as the Slack webhook URL are redacted.","example":{"_version":1,"enabled_events":["agent_created"],"webhook_url":{"$sensitive":"string","labels":["authentication_and_secrets"]}},"type":"object"},"id":{"$ref":"#/components/schemas/AccountIntegration_Id"},"integration_type":{"description":"Integration type key for this account","example":"slack","type":"string"},"status":{"description":"Whether this integration is active or paused","enum":["active","paused"],"example":"active","type":"string"},"type":{"description":"Type of resource (always 'account_integration')","enum":["account_integration"],"example":"account_integration","type":"string"}},"required":["config","id","integration_type","status","type"],"title":"AccountIntegration_Details","type":"object"},"AdminUser_Id":{"description":"A valid admin user ID","example":"013xrzp12g3nqk8ns6jadrqmpgrjkeny","title":"AdminUser_Id","type":"string"},"AgentInstance_CostBreakdown":{"properties":{"cache_read":{"description":"Total cache-read tokens across all models","example":0,"minimum":0,"type":"integer"},"cache_read_cost":{"oneOf":[{"description":"Estimated total USD cost for cache-read tokens","example":0.0,"type":"number"},{"$ref":"#/components/schemas/Null"}]},"groups":{"description":"Per-model breakdown","items":{"$ref":"#/components/schemas/AgentInstance_CostBreakdown_Group"},"type":"array"},"input":{"description":"Total input tokens across all models","example":10000,"minimum":0,"type":"integer"},"input_cost":{"oneOf":[{"description":"Estimated total USD cost for input tokens","example":0.025,"type":"number"},{"$ref":"#/components/schemas/Null"}]},"output":{"description":"Total output tokens across all models","example":5000,"minimum":0,"type":"integer"},"output_cost":{"oneOf":[{"description":"Estimated total USD cost for output tokens","example":0.05,"type":"number"},{"$ref":"#/components/schemas/Null"}]},"total_cost":{"oneOf":[{"description":"Estimated total USD cost","example":0.075,"type":"number"},{"$ref":"#/components/schemas/Null"}]}},"required":["cache_read","cache_read_cost","groups","input","input_cost","output","output_cost","total_cost"],"title":"AgentInstance_CostBreakdown","type":"object"},"ActionProfile":{"properties":{"create_data":{"description":"Creates data","enum":["unknown","allowed","disallowed"],"example":"unknown","type":"string"},"destroy_data":{"description":"Destroys data","enum":["unknown","allowed","disallowed"],"example":"unknown","type":"string"},"external_communication":{"description":"Sends external communications","enum":["unknown","allowed","disallowed"],"example":"unknown","type":"string"},"financial_transactions":{"description":"Performs financial transactions","enum":["unknown","allowed","disallowed"],"example":"unknown","type":"string"},"read_data":{"description":"Reads data","enum":["unknown","allowed","disallowed"],"example":"unknown","type":"string"},"update_data":{"description":"Updates data","enum":["unknown","allowed","disallowed"],"example":"unknown","type":"string"}},"required":["create_data","destroy_data","external_communication","financial_transactions","read_data","update_data"],"title":"ActionProfile","type":"object"},"Team_ForUpdate":{"description":"Parameters for updating a team","properties":{"name":{"description":"Team name, unique within the account ignoring case (omit to keep current)","example":"Sales","type":"string"}},"title":"Team_ForUpdate","type":"object"},"LlmProviderModel_Id":{"description":"A valid LLM provider model ID","example":"013xrzp12g3nqk8ns6jadrqmpgrjkeny","title":"LlmProviderModel_Id","type":"string"},"RiskProfile_Ruleset_ActionMultipliers":{"properties":{"create_data":{"oneOf":[{"description":"Multiplier when the span creates data (null = N/A, valid range 1.0–5.0 in steps of 0.5)","type":"number"},{"$ref":"#/components/schemas/Null"}]},"destroy_data":{"oneOf":[{"description":"Multiplier when the span destroys data (null = N/A, valid range 1.0–5.0 in steps of 0.5)","type":"number"},{"$ref":"#/components/schemas/Null"}]},"external_communication":{"oneOf":[{"description":"Multiplier for external communication actions (null = N/A, valid range 1.0–5.0 in steps of 0.5)","type":"number"},{"$ref":"#/components/schemas/Null"}]},"financial_transactions":{"oneOf":[{"description":"Multiplier for financial transaction actions (null = N/A, valid range 1.0–5.0 in steps of 0.5)","type":"number"},{"$ref":"#/components/schemas/Null"}]},"read_data":{"oneOf":[{"description":"Multiplier when the span reads data (null = N/A, valid range 1.0–5.0 in steps of 0.5)","type":"number"},{"$ref":"#/components/schemas/Null"}]},"update_data":{"oneOf":[{"description":"Multiplier when the span updates data (null = N/A, valid range 1.0–5.0 in steps of 0.5)","type":"number"},{"$ref":"#/components/schemas/Null"}]}},"required":["create_data","destroy_data","external_communication","financial_transactions","read_data","update_data"],"title":"RiskProfile_Ruleset_ActionMultipliers","type":"object"},"Person_Summary":{"properties":{"email":{"description":"Person email address","example":"jane@example.com","type":"string"},"id":{"$ref":"#/components/schemas/Person_Id"},"name":{"description":"Person name","example":"Jane Doe","type":"string"},"team_ids":{"description":"Team IDs this person belongs to","items":{"$ref":"#/components/schemas/Team_Id"},"type":"array"},"title":{"oneOf":[{"description":"Optional job title","example":"Engineer","type":"string"},{"$ref":"#/components/schemas/Null"}]},"type":{"description":"Type of resource (always 'person')","enum":["person"],"example":"person","type":"string"}},"required":["email","id","name","team_ids","title","type"],"title":"Person_Summary","type":"object"},"Agent_GetDetailsOutput":{"properties":{"details":{"$ref":"#/components/schemas/Agent_Details"},"risk_rollup":{"$ref":"#/components/schemas/Agent_RiskRollup"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"title":"Agent_GetDetailsOutput","type":"object"},"IdempotencyKeyOrNull":{"oneOf":[{"description":"Optional idempotency key for ensuring request idempotency","type":"string"},{"$ref":"#/components/schemas/Null"}],"title":"IdempotencyKeyOrNull"},"KnowledgebaseRevision_Document":{"description":"A document as it appeared in one knowledgebase revision","properties":{"content_type":{"description":"MIME type of the document in this revision","enum":["text/markdown","text/plain","application/json","application/yaml","text/csv"],"example":"text/markdown","type":"string"},"knowledgebase_document_id":{"$ref":"#/components/schemas/KnowledgebaseDocument_Id"},"knowledgebase_document_revision_id":{"$ref":"#/components/schemas/KnowledgebaseDocumentRevision_Id"},"path":{"description":"Document path in this revision","example":"guides/setup.md","type":"string"},"size_bytes":{"description":"Size of the document in bytes in this revision","example":128,"minimum":0,"type":"integer"}},"required":["content_type","knowledgebase_document_id","knowledgebase_document_revision_id","path","size_bytes"],"title":"KnowledgebaseRevision_Document","type":"object"},"Account_Id":{"description":"A valid account ID","example":"013xrzp12g3nqk8ns6jadrqmpgrjkeny","title":"Account_Id","type":"string"},"AgentSpan_Control":{"additionalProperties":false,"properties":{"reason":{"type":"string"},"terminate":{"type":"boolean"}},"required":["reason","terminate"],"title":"AgentSpan_Control","type":"object"},"AgentSpan_Details":{"properties":{"account_id":{"$ref":"#/components/schemas/Account_Id"},"agent_id":{"$ref":"#/components/schemas/Agent_Id"},"agent_instance_id":{"$ref":"#/components/schemas/AgentInstance_Id"},"data_risk":{"description":"Data risk for this span from its schema. Only populated for activity-purpose spans.","oneOf":[{"$ref":"#/components/schemas/DataRisk"},{"$ref":"#/components/schemas/Null"}]},"finished_at":{"oneOf":[{"description":"When the span finished (null if still in progress)","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},{"$ref":"#/components/schemas/Null"}]},"id":{"$ref":"#/components/schemas/AgentSpan_Id"},"parent_span_id":{"description":"ID of the parent span (null if this is a root span)","oneOf":[{"$ref":"#/components/schemas/AgentSpan_Id"},{"$ref":"#/components/schemas/Null"}]},"payload":{"additionalProperties":true,"description":"Span payload data (arbitrary JSON object)","type":"object"},"payload_byte_size_estimate":{"description":"Approximate JSON-encoded byte size of the span's stored payload columns. This is an estimate, not an exact on-disk size.","minimum":0,"type":"integer"},"purpose":{"description":"Purpose of the span: 'activity' (normal agent activity), 'quality' (system-written span recording an agent instance quality payload update), or 'alert' (system-written span recording an alert lifecycle event). Quality-purpose and alert-purpose spans are excluded from standard span metrics.","enum":["activity","quality","alert"],"example":"activity","type":"string"},"result_payload":{"oneOf":[{"additionalProperties":true,"description":"Result payload (arbitrary JSON), only present when span is finished","type":"object"},{"$ref":"#/components/schemas/Null"}]},"schema_name":{"description":"Name of the schema for this span","example":"llm","type":"string"},"schema_title":{"description":"Human-readable title for the schema (from JSON schema, defaults to schema_name)","example":"LLM","type":"string"},"sensitive_encoding":{"description":"When true, both payload and result_payload should be interpreted as containing sensitive markers as per the specification","type":"boolean"},"started_at":{"description":"When the span started","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},"status":{"description":"Status of the span: 'active' (started but not finished), 'complete' (finished successfully), 'failed' (ended with failure), or 'cancelled' (started but cancelled before completion)","enum":["active","complete","failed","cancelled"],"example":"active","type":"string"},"summary":{"oneOf":[{"description":"Human-readable summary rendered from the schema template using payload and result_payload (null when template is missing). When the request sets `redacted` to true, sensitive values in the summary are replaced with redaction labels.","type":"string"},{"$ref":"#/components/schemas/Null"}]},"type":{"description":"Type of resource (always 'agent_span')","enum":["agent_span"],"example":"agent_span","type":"string"}},"required":["account_id","agent_id","agent_instance_id","data_risk","finished_at","id","parent_span_id","payload","payload_byte_size_estimate","purpose","result_payload","schema_name","schema_title","sensitive_encoding","started_at","status","summary","type"],"title":"AgentSpan_Details","type":"object"},"AgentAssociation_Summary":{"properties":{"account_id":{"$ref":"#/components/schemas/Account_Id"},"association_type":{"description":"Kind of association. For judge, from_agent is the judge and to_agent is the agent it scores","enum":["judge"],"example":"judge","type":"string"},"from_agent_id":{"$ref":"#/components/schemas/Agent_Id"},"id":{"$ref":"#/components/schemas/AgentAssociation_Id"},"inserted_at":{"description":"When the association was created","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},"to_agent_id":{"$ref":"#/components/schemas/Agent_Id"},"trigger":{"description":"When the association runs: on_demand or on_completion. There is no default","enum":["on_demand","on_completion"],"example":"on_demand","type":"string"},"type":{"description":"Type of resource (always 'agent_association')","enum":["agent_association"],"example":"agent_association","type":"string"},"updated_at":{"description":"When the association was last updated","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"}},"required":["account_id","association_type","from_agent_id","id","inserted_at","to_agent_id","trigger","type","updated_at"],"title":"AgentAssociation_Summary","type":"object"},"Team_ForCreate":{"description":"Parameters for creating a team","properties":{"id":{"description":"Team ID (optional; a new ID is generated if omitted). Its embedded timestamp must not be more than 7 days in the past.","oneOf":[{"$ref":"#/components/schemas/Team_Id"},{"$ref":"#/components/schemas/Null"}]},"name":{"description":"Team name, unique within the account ignoring case","example":"Sales","type":"string"}},"required":["name"],"title":"Team_ForCreate","type":"object"},"AgentDeployment_Details":{"properties":{"account_id":{"$ref":"#/components/schemas/Account_Id"},"agent_id":{"$ref":"#/components/schemas/Agent_Id"},"current_version_id":{"description":"Pinned current version for this deployment, if any.","oneOf":[{"$ref":"#/components/schemas/AgentVersion_Id"},{"$ref":"#/components/schemas/Null"}]},"environment_id":{"$ref":"#/components/schemas/Environment_Id"},"id":{"$ref":"#/components/schemas/AgentDeployment_Id"},"inserted_at":{"description":"When the deployment was created","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},"type":{"description":"Type of resource (always 'agent_deployment')","enum":["agent_deployment"],"example":"agent_deployment","type":"string"},"updated_at":{"description":"When the deployment was last updated","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"}},"required":["account_id","agent_id","current_version_id","environment_id","id","inserted_at","type","updated_at"],"title":"AgentDeployment_Details","type":"object"},"Items":{"description":"List of items to process in bulk. Each item is processed sequentially in its own database transaction. Processing stops immediately on the first error: the failing item is included in the response as an error entry, and any items after it are not processed and are omitted from the response.","items":{"additionalProperties":true,"description":"A single item in a bulk request. Each item must include `_type` and `idempotency_key`, plus any additional parameters required by the specific query/action type (e.g., `details` for agents/create, `agent_id` for agents/show).","example":{"_type":"agents/create","details":{"description":"Handles customer support inquiries","name":"Customer Support Bot"},"idempotency_key":"create-agent-2024-01-15-001"},"properties":{"_type":{"description":"The type of query/action to execute (e.g., 'agents/list', 'agents/create')","example":"agents/list","title":"Type","type":"string"},"idempotency_key":{"description":"Required unique idempotency key for this item. Must be 8–128 characters and unique within the request. Used to identify the result in the response map.","example":"create-agent-2024-01-15-001","maxLength":128,"minLength":8,"title":"IdempotencyKey","type":"string"}},"required":["_type","idempotency_key"],"title":"BulkItem","type":"object"},"minItems":1,"title":"Items","type":"array"},"AgentAssociation_Id":{"description":"A valid agent association ID","example":"013xrzp12g3nqk8ns6jadrqmpgrjkeny","title":"AgentAssociation_Id","type":"string"},"RiskProfile_ForUpdate":{"properties":{"description":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/Null"}]},"name":{"type":"string"},"ruleset":{"oneOf":[{"$ref":"#/components/schemas/RiskProfile_Ruleset"},{"$ref":"#/components/schemas/Null"}]}},"title":"RiskProfile_ForUpdate","type":"object"},"AgentInstance_Id":{"description":"A valid agent instance ID","example":"013xrzp12g3nqk8ns6jadrqmpgrjkeny","title":"AgentInstance_Id","type":"string"},"LlmProviderModel_Details":{"properties":{"api_name":{"description":"API model name, unique within the provider ignoring case","example":"claude-haiku-4-5","type":"string"},"id":{"$ref":"#/components/schemas/LlmProviderModel_Id"},"llm_provider_id":{"$ref":"#/components/schemas/LlmProvider_Id"},"models_dev_name":{"description":"models.dev identifier. Null when the model is not listed on models.dev","oneOf":[{"example":"anthropic/claude-haiku-4-5","type":"string"},{"$ref":"#/components/schemas/Null"}]},"name":{"description":"Model display name, unique within the provider ignoring case","example":"Claude Haiku 4.5","type":"string"},"type":{"description":"Type of resource (always 'llm_provider_model')","enum":["llm_provider_model"],"example":"llm_provider_model","type":"string"}},"required":["api_name","id","llm_provider_id","models_dev_name","name","type"],"title":"LlmProviderModel_Details","type":"object"},"PaginationOutput":{"description":"Pagination information","example":{"item_count":200,"item_end":100,"item_start":91,"next_page_offset":110,"page_count":20,"page_index":10,"page_offset":90,"page_size":10,"previous_page_offset":80},"properties":{"item_count":{"description":"The total number of items","type":"integer"},"item_end":{"description":"The index of the last item in the page (one-based)","type":"integer"},"item_start":{"description":"The index of the first item in the page (one-based)","type":"integer"},"next_page_offset":{"oneOf":[{"description":"The offset of the next page (null if last page)","type":"integer"},{"$ref":"#/components/schemas/Null"}]},"page_count":{"description":"The total number of pages","type":"integer"},"page_index":{"description":"The index of the current page (one-based)","type":"integer"},"page_offset":{"description":"The offset of the first item in the page (zero-based)","type":"integer"},"page_size":{"description":"The number of items per page","type":"integer"},"previous_page_offset":{"oneOf":[{"description":"The offset of the previous page (null if first page)","type":"integer"},{"$ref":"#/components/schemas/Null"}]}},"required":["item_count","item_end","item_start","next_page_offset","page_count","page_index","page_offset","page_size","previous_page_offset"],"title":"PaginationOutput","type":"object"},"SpanTypeSchemaDetails_ForCreate":{"description":"One span type with name, params_schema and optional result_schema","properties":{"data_risk":{"oneOf":[{"$ref":"#/components/schemas/DataRisk"},{"$ref":"#/components/schemas/Null"}]},"description":{"oneOf":[{"description":"Optional description","type":"string"},{"$ref":"#/components/schemas/Null"}]},"name":{"description":"Span type name (e.g. llm, tool)","type":"string"},"params_schema":{"additionalProperties":true,"description":"JSON schema for the span payload","type":"object"},"result_schema":{"oneOf":[{"additionalProperties":true,"description":"JSON schema for the span result payload. Defaults to empty object if omitted.","type":"object"},{"$ref":"#/components/schemas/Null"}]},"template":{"oneOf":[{"description":"Display template. Use {{field}} to interpolate params and result fields.","type":"string"},{"$ref":"#/components/schemas/Null"}]},"title":{"oneOf":[{"description":"Human-readable title. Defaults to name when omitted.","type":"string"},{"$ref":"#/components/schemas/Null"}]}},"required":["name","params_schema"],"title":"SpanTypeSchemaDetails_ForCreate","type":"object"},"Agent_AvailableActions":{"description":"Available actions for this agent based on its status and instance counts","properties":{"delete":{"description":"Whether the agent can be deleted","type":"boolean"},"reinstate":{"description":"Whether the agent can be reinstated from retired","type":"boolean"},"retire":{"description":"Whether the agent can be retired","type":"boolean"},"update":{"description":"Whether the agent can be updated","type":"boolean"}},"required":["delete","reinstate","retire","update"],"title":"Agent_AvailableActions","type":"object"},"AdminUserInvite_Details":{"properties":{"account_id":{"$ref":"#/components/schemas/Account_Id"},"email":{"description":"Email address the invite was sent to","example":"user@example.com","type":"string"},"id":{"$ref":"#/components/schemas/AdminUserInvite_Id"},"inserted_at":{"description":"When the invite was created","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},"invite_url":{"description":"URL to accept the invite","example":"https://example.com","format":"uri","title":"Uri","type":"string"},"last_invite_email_sent_at":{"description":"When the most recent invite email was queued","oneOf":[{"example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},{"$ref":"#/components/schemas/Null"}]},"role":{"description":"Access role the invited admin user will receive","enum":["read_only","full_access"],"example":"read_only","type":"string"},"status":{"description":"Current status of the invite","enum":["pending","used","revoked"],"example":"pending","type":"string"},"token":{"description":"Unique token for the invite","example":"abc123def456...","type":"string"},"type":{"description":"Type of resource (always 'admin_user_invite')","enum":["admin_user_invite"],"example":"admin_user_invite","type":"string"},"updated_at":{"description":"When the invite was last updated","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"}},"required":["account_id","email","id","inserted_at","invite_url","last_invite_email_sent_at","role","status","token","type","updated_at"],"title":"AdminUserInvite_Details","type":"object"},"RiskProfile_Ruleset_Thresholds":{"properties":{"critical":{"description":"Scores above this map to critical risk","type":"integer"},"high":{"description":"Scores above this map to at least high risk","type":"integer"},"medium":{"description":"Scores above this (after medium) map to at least medium risk","type":"integer"}},"required":["critical","high","medium"],"title":"RiskProfile_Ruleset_Thresholds","type":"object"},"LlmProvider_Id":{"description":"A valid LLM provider ID","example":"013xrzp12g3nqk8ns6jadrqmpgrjkeny","title":"LlmProvider_Id","type":"string"},"Output":{"additionalProperties":true,"description":"Output from a query or action. Contains either a success response (with 'status': 'success' and operation-specific data) or an error response (with 'status': 'error', 'code', 'message', and optionally 'errors').","properties":{},"title":"Output","type":"object"},"ApiToken_AvailableActions":{"description":"Available actions for this token based on its status","properties":{"activate":{"description":"Whether the token can be activated","type":"boolean"},"delete":{"description":"Whether the token can be deleted","type":"boolean"},"revoke":{"description":"Whether the token can be revoked","type":"boolean"},"suspend":{"description":"Whether the token can be suspended","type":"boolean"}},"required":["activate","delete","revoke","suspend"],"title":"ApiToken_AvailableActions","type":"object"},"Agent_RiskRollup":{"properties":{"observed_risk":{"description":"Risk profile from actual span executions (what the agent has done). null if no spans executed.","oneOf":[{"properties":{"all_data_categories":{"description":"List of all data categories included across span types","items":{"description":"Data category name","type":"string"},"maxItems":18,"type":"array"},"assessed_span_types":{"description":"Number of span types with risk data","minimum":0,"type":"integer"},"classification_counts":{"description":"Count of span types at each classification level","properties":{"confidential":{"minimum":0,"type":"integer"},"internal":{"minimum":0,"type":"integer"},"public":{"minimum":0,"type":"integer"},"restricted":{"minimum":0,"type":"integer"},"secret":{"minimum":0,"type":"integer"},"unknown":{"minimum":0,"type":"integer"}},"type":"object"},"external_communication_count":{"description":"Number of span types with external communication allowed","minimum":0,"type":"integer"},"highest_classification":{"description":"Highest classification level across all span types","enum":["unknown","public","internal","confidential","restricted","secret"],"example":"unknown","type":"string"},"total_span_types":{"description":"Total number of span types","minimum":0,"type":"integer"},"unassessed_span_types":{"description":"Number of span types without risk data","minimum":0,"type":"integer"}},"required":["all_data_categories","assessed_span_types","classification_counts","external_communication_count","highest_classification","total_span_types","unassessed_span_types"],"title":"Agent_RiskSummary","type":"object"},{"$ref":"#/components/schemas/Null"}]},"theoretical_risk":{"description":"Risk profile from the schema definition (what the agent could do)","oneOf":[{"properties":{"all_data_categories":{"description":"List of all data categories included across span types","items":{"description":"Data category name","type":"string"},"maxItems":18,"type":"array"},"assessed_span_types":{"description":"Number of span types with risk data","minimum":0,"type":"integer"},"classification_counts":{"description":"Count of span types at each classification level","properties":{"confidential":{"minimum":0,"type":"integer"},"internal":{"minimum":0,"type":"integer"},"public":{"minimum":0,"type":"integer"},"restricted":{"minimum":0,"type":"integer"},"secret":{"minimum":0,"type":"integer"},"unknown":{"minimum":0,"type":"integer"}},"type":"object"},"external_communication_count":{"description":"Number of span types with external communication allowed","minimum":0,"type":"integer"},"highest_classification":{"description":"Highest classification level across all span types","enum":["unknown","public","internal","confidential","restricted","secret"],"example":"unknown","type":"string"},"total_span_types":{"description":"Total number of span types","minimum":0,"type":"integer"},"unassessed_span_types":{"description":"Number of span types without risk data","minimum":0,"type":"integer"}},"required":["all_data_categories","assessed_span_types","classification_counts","external_communication_count","highest_classification","total_span_types","unassessed_span_types"],"title":"Agent_RiskSummary","type":"object"},{"$ref":"#/components/schemas/Null"}]}},"required":["observed_risk","theoretical_risk"],"title":"Agent_RiskRollup","type":"object"},"AgentInstance_AgentContext":{"properties":{"body":{"additionalProperties":true,"description":"Minimal JSON context with agent_instance, agent, and spans","type":"object"},"generated_at":{"description":"When this context was generated","format":"date-time","type":"string"},"span_count":{"description":"Number of spans on the main agent instance","minimum":0,"type":"integer"}},"required":["body","generated_at","span_count"],"title":"AgentInstance_AgentContext","type":"object"},"AgentSchemaVersion_Summary":{"properties":{"account_id":{"$ref":"#/components/schemas/Account_Id"},"agent_id":{"$ref":"#/components/schemas/Agent_Id"},"current_agent_deployment_refs":{"description":"Agent deployments whose current version uses this schema version (empty if none).","items":{"$ref":"#/components/schemas/AgentDeployment_Id"},"type":"array"},"external_identifier":{"description":"External identifier for the agent schema version","example":"v0","type":"string"},"external_identifier_repeats":{"description":"Count of rows sharing this external identifier (helps distinguish duplicates).","minimum":0,"type":"integer"},"id":{"$ref":"#/components/schemas/AgentSchemaVersion_Id"},"inserted_at":{"description":"When the agent schema version was created","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},"span_schemas_count":{"description":"Number of span schemas in this schema version","example":3,"minimum":0,"type":"integer"},"type":{"description":"Type of resource (always 'agent_schema_version')","enum":["agent_schema_version"],"example":"agent_schema_version","type":"string"},"updated_at":{"description":"When the agent schema version was last updated","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"}},"required":["account_id","agent_id","current_agent_deployment_refs","external_identifier","external_identifier_repeats","id","inserted_at","span_schemas_count","type","updated_at"],"title":"AgentSchemaVersion_Summary","type":"object"},"DataCategories":{"properties":{"authentication_and_secrets":{"description":"Authentication and secrets present","enum":["unknown","included","excluded"],"example":"unknown","type":"string"},"behavioural_and_inferred":{"description":"Behavioural and inferred data present","enum":["unknown","included","excluded"],"example":"unknown","type":"string"},"classification":{"description":"Classification level","enum":["unknown","public","internal","confidential","restricted","secret"],"example":"unknown","type":"string"},"contact_information":{"description":"Contact information present","enum":["unknown","included","excluded"],"example":"unknown","type":"string"},"criminal_justice":{"description":"Criminal justice data present","enum":["unknown","included","excluded"],"example":"unknown","type":"string"},"financial_information":{"description":"Financial information present","enum":["unknown","included","excluded"],"example":"unknown","type":"string"},"gdpr_biometric_for_identification":{"description":"GDPR: biometric data for identification","enum":["unknown","included","excluded"],"example":"unknown","type":"string"},"gdpr_genetic_data":{"description":"GDPR: genetic data","enum":["unknown","included","excluded"],"example":"unknown","type":"string"},"gdpr_political_opinions":{"description":"GDPR: political opinions","enum":["unknown","included","excluded"],"example":"unknown","type":"string"},"gdpr_racial_or_ethnic_origin":{"description":"GDPR: racial or ethnic origin","enum":["unknown","included","excluded"],"example":"unknown","type":"string"},"gdpr_religious_or_philosophical_beliefs":{"description":"GDPR: religious or philosophical beliefs","enum":["unknown","included","excluded"],"example":"unknown","type":"string"},"gdpr_sex_life_or_sexual_orientation":{"description":"GDPR: sex life or sexual orientation","enum":["unknown","included","excluded"],"example":"unknown","type":"string"},"gdpr_trade_union_membership":{"description":"GDPR: trade union membership","enum":["unknown","included","excluded"],"example":"unknown","type":"string"},"health_and_medical":{"description":"Health and medical data present","enum":["unknown","included","excluded"],"example":"unknown","type":"string"},"location_and_tracking":{"description":"Location and tracking data present","enum":["unknown","included","excluded"],"example":"unknown","type":"string"},"minors_data":{"description":"Minors data present","enum":["unknown","included","excluded"],"example":"unknown","type":"string"},"organisational_confidential":{"description":"Organisational confidential data present","enum":["unknown","included","excluded"],"example":"unknown","type":"string"},"personal_identifiers":{"description":"Personal identifiers present","enum":["unknown","included","excluded"],"example":"unknown","type":"string"}},"required":["authentication_and_secrets","behavioural_and_inferred","classification","contact_information","criminal_justice","financial_information","gdpr_biometric_for_identification","gdpr_genetic_data","gdpr_political_opinions","gdpr_racial_or_ethnic_origin","gdpr_religious_or_philosophical_beliefs","gdpr_sex_life_or_sexual_orientation","gdpr_trade_union_membership","health_and_medical","location_and_tracking","minors_data","organisational_confidential","personal_identifiers"],"title":"DataCategories","type":"object"},"LlmProvider_DetailsForCreate":{"properties":{"account_id":{"description":"Account ID (defaults to token's account if not provided)","oneOf":[{"$ref":"#/components/schemas/Account_Id"},{"$ref":"#/components/schemas/Null"}]},"api_base_url":{"description":"Base URL for the provider API. Must be present when provider is custom_openai and must be absent otherwise","oneOf":[{"example":"https://api.example.com/v1","type":"string"},{"$ref":"#/components/schemas/Null"}]},"api_key":{"description":"API key for this provider. Stored encrypted and never returned in API responses","example":"sk-test-key","type":"string"},"id":{"description":"LLM provider ID. Must be a valid PFID whose partition matches the account, with an embedded timestamp no more than 7 days in the past (optional; a new ID is generated if omitted)","oneOf":[{"$ref":"#/components/schemas/LlmProvider_Id"},{"$ref":"#/components/schemas/Null"}]},"name":{"description":"Provider name, unique within the account ignoring case","example":"Anthropic production","type":"string"},"provider":{"description":"LLM provider kind","enum":["anthropic","openai","ollama_cloud","together","custom_openai"],"example":"anthropic","type":"string"}},"required":["api_key","name","provider"],"title":"LlmProvider_DetailsForCreate","type":"object"},"AdminUserInvite_Summary":{"properties":{"account_id":{"$ref":"#/components/schemas/Account_Id"},"email":{"description":"Email address the invite was sent to","example":"user@example.com","type":"string"},"id":{"$ref":"#/components/schemas/AdminUserInvite_Id"},"inserted_at":{"description":"When the invite was created","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},"invite_url":{"description":"URL to accept the invite","example":"https://example.com","format":"uri","title":"Uri","type":"string"},"last_invite_email_sent_at":{"description":"When the most recent invite email was queued","oneOf":[{"example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},{"$ref":"#/components/schemas/Null"}]},"role":{"description":"Access role the invited admin user will receive","enum":["read_only","full_access"],"example":"read_only","type":"string"},"status":{"description":"Current status of the invite","enum":["pending","used","revoked"],"example":"pending","type":"string"},"type":{"description":"Type of resource (always 'admin_user_invite')","enum":["admin_user_invite"],"example":"admin_user_invite","type":"string"},"updated_at":{"description":"When the invite was last updated","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"}},"required":["account_id","email","id","inserted_at","invite_url","last_invite_email_sent_at","role","status","type","updated_at"],"title":"AdminUserInvite_Summary","type":"object"},"Knowledgebase_Id":{"description":"A valid knowledgebase ID","example":"013xrzp12g3nqk8ns6jadrqmpgrjkeny","title":"Knowledgebase_Id","type":"string"},"RiskProfile_Summary":{"properties":{"description":{"oneOf":[{"description":"Risk profile description","example":"Restrictive risk profile for sensitive operations","type":"string"},{"$ref":"#/components/schemas/Null"}]},"id":{"$ref":"#/components/schemas/RiskProfile_Id"},"name":{"description":"Risk profile name","example":"High Risk","type":"string"},"type":{"description":"Type of resource (always 'risk_profile')","enum":["risk_profile"],"example":"risk_profile","type":"string"}},"required":["description","id","name","type"],"title":"RiskProfile_Summary","type":"object"},"AdminUser_DetailsForUpdate":{"properties":{"job_title":{"oneOf":[{"description":"Job title within the account","type":"string"},{"$ref":"#/components/schemas/Null"}]},"name":{"description":"Admin user name","type":"string"},"profile_completed_at":{"oneOf":[{"description":"When the user completed their profile (set on profile completion)","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},{"$ref":"#/components/schemas/Null"}]}},"title":"AdminUser_DetailsForUpdate","type":"object"},"AgentAssociation_DetailsForUpdate":{"properties":{"trigger":{"description":"When the association runs: on_demand or on_completion","enum":["on_demand","on_completion"],"example":"on_demand","type":"string"}},"required":["trigger"],"title":"AgentAssociation_DetailsForUpdate","type":"object"},"ApiToken_Summary":{"properties":{"account_id":{"$ref":"#/components/schemas/Account_Id"},"agent_deployment_id":{"description":"Set when token_scope is agent_deployment","oneOf":[{"$ref":"#/components/schemas/AgentDeployment_Id"},{"$ref":"#/components/schemas/Null"}]},"agent_id":{"description":"Set when token_scope is agent_deployment (deployment's agent)","oneOf":[{"$ref":"#/components/schemas/Agent_Id"},{"$ref":"#/components/schemas/Null"}]},"created_by_admin_user_id":{"description":"ID of the admin user who created this token","oneOf":[{"$ref":"#/components/schemas/AdminUser_Id"},{"$ref":"#/components/schemas/Null"}]},"environment_id":{"description":"Set when token_scope is agent_deployment (deployment's environment)","oneOf":[{"$ref":"#/components/schemas/Environment_Id"},{"$ref":"#/components/schemas/Null"}]},"expires_at":{"description":"When the token expires","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},"id":{"$ref":"#/components/schemas/ApiToken_Id"},"inserted_at":{"description":"When the token was created","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},"last_used_at":{"oneOf":[{"description":"When the token was last used for authentication","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},{"$ref":"#/components/schemas/Null"}]},"role":{"description":"Access role of the token","enum":["read_only","full_access"],"example":"read_only","type":"string"},"status":{"description":"Current status of the token","enum":["active","suspended","revoked"],"example":"active","type":"string"},"token_scope":{"description":"Scope of the token","enum":["account","agent_deployment"],"example":"account","type":"string"},"type":{"description":"Type of resource (always 'api_token')","enum":["api_token"],"example":"api_token","type":"string"},"updated_at":{"description":"When the token was last updated","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"}},"required":["account_id","agent_deployment_id","agent_id","created_by_admin_user_id","environment_id","expires_at","id","inserted_at","last_used_at","role","status","token_scope","type","updated_at"],"title":"ApiToken_Summary","type":"object"},"RiskProfile_ForCreate":{"properties":{"description":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/Null"}]},"id":{"description":"Optional ID for the risk profile. If not provided, a new ID will be generated. Its embedded timestamp must not be more than 7 days in the past.","oneOf":[{"$ref":"#/components/schemas/RiskProfile_Id"},{"$ref":"#/components/schemas/Null"}]},"name":{"type":"string"},"ruleset":{"$ref":"#/components/schemas/RiskProfile_Ruleset"}},"required":["name","ruleset"],"title":"RiskProfile_ForCreate","type":"object"},"AgentDeployment_Id":{"description":"A valid agent deployment ID","example":"013xrzp12g3nqk8ns6jadrqmpgrjkeny","title":"AgentDeployment_Id","type":"string"},"KnowledgebaseDocumentRevision_Summary":{"description":"Summary of a knowledgebase document revision for list responses","properties":{"change_kind":{"description":"The change this revision records","enum":["create","update","rename","archive","unarchive"],"example":"create","type":"string"},"content_sha256":{"description":"SHA-256 of the content after this revision, as lowercase hex","example":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","type":"string"},"content_type":{"description":"MIME type of the document after this revision","enum":["text/markdown","text/plain","application/json","application/yaml","text/csv"],"example":"text/markdown","type":"string"},"created_by_admin_user_id":{"description":"Admin user who wrote this revision, when the caller was an admin session","oneOf":[{"$ref":"#/components/schemas/AdminUser_Id"},{"$ref":"#/components/schemas/Null"}]},"created_by_api_token_id":{"description":"API token that wrote this revision, when the caller was an API token","oneOf":[{"$ref":"#/components/schemas/ApiToken_Id"},{"$ref":"#/components/schemas/Null"}]},"id":{"$ref":"#/components/schemas/KnowledgebaseDocumentRevision_Id"},"inserted_at":{"description":"When the revision was created","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},"knowledgebase_document_id":{"$ref":"#/components/schemas/KnowledgebaseDocument_Id"},"knowledgebase_revision_number":{"description":"Knowledgebase revision number this change belongs to","example":4,"minimum":1,"type":"integer"},"path":{"description":"Document path after this revision","example":"guides/setup.md","type":"string"},"revision_number":{"description":"Revision number of this document, starting at 1","example":2,"minimum":1,"type":"integer"},"size_bytes":{"description":"Size of the content in bytes after this revision","example":128,"minimum":0,"type":"integer"},"type":{"description":"Type of resource (always 'knowledgebase_document_revision')","enum":["knowledgebase_document_revision"],"example":"knowledgebase_document_revision","type":"string"}},"required":["change_kind","content_sha256","content_type","created_by_admin_user_id","created_by_api_token_id","id","inserted_at","knowledgebase_document_id","knowledgebase_revision_number","path","revision_number","size_bytes","type"],"title":"KnowledgebaseDocumentRevision_Summary","type":"object"},"Status":{"description":"Response status, always 'success' when the request is processed","enum":["success"],"example":"success","title":"Status","type":"string"},"ApiToken_DetailsForCreate":{"properties":{"account_id":{"description":"Account ID (defaults to token's account if not provided)","oneOf":[{"$ref":"#/components/schemas/Account_Id"},{"$ref":"#/components/schemas/Null"}]},"agent_id":{"description":"Required when token_scope is agent_deployment; must be omitted for account scope","oneOf":[{"$ref":"#/components/schemas/Agent_Id"},{"$ref":"#/components/schemas/Null"}]},"environment_id":{"description":"Required when token_scope is agent_deployment; must be omitted for account scope","oneOf":[{"$ref":"#/components/schemas/Environment_Id"},{"$ref":"#/components/schemas/Null"}]},"expires_at":{"oneOf":[{"description":"When the token expires (defaults to 2 years from now)","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},{"$ref":"#/components/schemas/Null"}]},"role":{"description":"Access role of the token (optional; defaults to full_access if omitted)","oneOf":[{"enum":["read_only","full_access"],"example":"read_only","type":"string"},{"$ref":"#/components/schemas/Null"}]},"token_scope":{"description":"Token scope","enum":["account","agent_deployment"],"example":"account","type":"string"}},"title":"ApiToken_DetailsForCreate","type":"object"},"SpanTypeSchemaDetails":{"properties":{"data_risk":{"$ref":"#/components/schemas/DataRisk"},"description":{"oneOf":[{"description":"Optional description","type":"string"},{"$ref":"#/components/schemas/Null"}]},"name":{"description":"Span type name","type":"string"},"params_schema":{"additionalProperties":true,"description":"JSON schema for the span payload","type":"object"},"params_schema_validation":{"$ref":"#/components/schemas/SchemaValidationResult"},"result_schema":{"additionalProperties":true,"description":"JSON schema for the span result payload (defaults to empty object if omitted when creating)","type":"object"},"result_schema_validation":{"$ref":"#/components/schemas/SchemaValidationResult"},"template":{"oneOf":[{"description":"Display template describing what happened in the span. Use {{field}} to interpolate params and result fields. Use imperative/command tense for params (e.g. \"Generate {{content}}\") and past tense for result (e.g. \"completed with {{finish_reason}}\").","type":"string"},{"$ref":"#/components/schemas/Null"}]},"title":{"description":"Human-readable title (defaults to name)","type":"string"}},"required":["data_risk","description","name","params_schema","params_schema_validation","result_schema","result_schema_validation","template","title"],"title":"SpanTypeSchemaDetails","type":"object"},"KnowledgebaseRevision_Id":{"description":"A valid knowledgebase revision ID","example":"013xrzp12g3nqk8ns6jadrqmpgrjkeny","title":"KnowledgebaseRevision_Id","type":"string"},"AccountIntegration_Summary":{"properties":{"id":{"$ref":"#/components/schemas/AccountIntegration_Id"},"integration_type":{"description":"Integration type key for this account","example":"slack","type":"string"},"status":{"description":"Whether this integration is active or paused","enum":["active","paused"],"example":"active","type":"string"},"type":{"description":"Type of resource (always 'account_integration')","enum":["account_integration"],"example":"account_integration","type":"string"}},"required":["id","integration_type","status","type"],"title":"AccountIntegration_Summary","type":"object"},"ApiToken_Id":{"description":"A valid API token ID","example":"013xrzp12g3nqk8ns6jadrqmpgrjkeny","title":"ApiToken_Id","type":"string"},"Knowledgebase_ForCreate":{"description":"Parameters for creating a knowledgebase","properties":{"account_id":{"description":"Account ID (defaults to token's account if not provided)","oneOf":[{"$ref":"#/components/schemas/Account_Id"},{"$ref":"#/components/schemas/Null"}]},"description":{"description":"Agents will see the description as part of tool descriptions. The description is at most 2000 characters (optional)","oneOf":[{"example":"Policies and runbooks","type":"string"},{"$ref":"#/components/schemas/Null"}]},"id":{"description":"Knowledgebase ID (optional; a new ID is generated if omitted). Its embedded timestamp must not be more than 7 days in the past.","oneOf":[{"$ref":"#/components/schemas/Knowledgebase_Id"},{"$ref":"#/components/schemas/Null"}]},"name":{"description":"Knowledgebase name, unique within the account ignoring case, at most 255 characters","example":"Engineering notes","type":"string"}},"required":["name"],"title":"Knowledgebase_ForCreate","type":"object"},"AgentInstanceAssociation_Id":{"description":"A valid agent instance association ID","example":"013xrzp12g3nqk8ns6jadrqmpgrjkeny","title":"AgentInstanceAssociation_Id","type":"string"},"Team_Details":{"description":"Full details of a team","properties":{"agent_count":{"description":"Number of agents assigned to this team","example":2,"minimum":0,"type":"integer"},"id":{"$ref":"#/components/schemas/Team_Id"},"inserted_at":{"description":"When the team was created","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},"name":{"description":"Team name","example":"Sales","type":"string"},"people_count":{"description":"Number of people on this team","example":3,"minimum":0,"type":"integer"},"type":{"description":"Type of resource (always 'team')","enum":["team"],"example":"team","type":"string"},"updated_at":{"description":"When the team was last updated","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"}},"required":["agent_count","id","inserted_at","name","people_count","type","updated_at"],"title":"Team_Details","type":"object"},"LlmProvider_Details":{"properties":{"account_id":{"$ref":"#/components/schemas/Account_Id"},"api_base_url":{"description":"Base URL for the provider API. Present for custom_openai and null otherwise","oneOf":[{"example":"https://api.example.com/v1","type":"string"},{"$ref":"#/components/schemas/Null"}]},"api_type":{"description":"API dialect derived from the provider kind","enum":["claude","openai"],"example":"claude","type":"string"},"id":{"$ref":"#/components/schemas/LlmProvider_Id"},"name":{"description":"Provider name, unique within the account ignoring case","example":"Anthropic production","type":"string"},"provider":{"description":"LLM provider kind","enum":["anthropic","openai","ollama_cloud","together","custom_openai"],"example":"anthropic","type":"string"},"type":{"description":"Type of resource (always 'llm_provider')","enum":["llm_provider"],"example":"llm_provider","type":"string"}},"required":["account_id","api_base_url","api_type","id","name","provider","type"],"title":"LlmProvider_Details","type":"object"},"AdminUser_Summary":{"properties":{"account_id":{"$ref":"#/components/schemas/Account_Id"},"email":{"description":"Admin user email","example":"john@example.com","type":"string"},"id":{"$ref":"#/components/schemas/AdminUser_Id"},"inserted_at":{"description":"When the admin user was created","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},"job_title":{"oneOf":[{"description":"Job title within the account","example":"Developer","type":"string"},{"$ref":"#/components/schemas/Null"}]},"last_active_at":{"oneOf":[{"description":"When the admin user was last active; nil means no recorded activity","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},{"$ref":"#/components/schemas/Null"}]},"name":{"oneOf":[{"description":"Admin user name","example":"John Doe","type":"string"},{"$ref":"#/components/schemas/Null"}]},"profile_completed_at":{"oneOf":[{"description":"When the user completed their profile (set on profile completion)","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},{"$ref":"#/components/schemas/Null"}]},"role":{"description":"Access role of the admin user","enum":["read_only","full_access"],"example":"read_only","type":"string"},"type":{"description":"Type of resource (always 'admin_user')","enum":["admin_user"],"example":"admin_user","type":"string"},"updated_at":{"description":"When the admin user was last updated","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"}},"required":["account_id","email","id","inserted_at","job_title","last_active_at","name","profile_completed_at","role","type","updated_at"],"title":"AdminUser_Summary","type":"object"},"LlmProvider_Summary":{"properties":{"account_id":{"$ref":"#/components/schemas/Account_Id"},"api_base_url":{"description":"Base URL for the provider API. Present for custom_openai and null otherwise","oneOf":[{"example":"https://api.example.com/v1","type":"string"},{"$ref":"#/components/schemas/Null"}]},"api_type":{"description":"API dialect derived from the provider kind","enum":["claude","openai"],"example":"claude","type":"string"},"id":{"$ref":"#/components/schemas/LlmProvider_Id"},"name":{"description":"Provider name, unique within the account ignoring case","example":"Anthropic production","type":"string"},"provider":{"description":"LLM provider kind","enum":["anthropic","openai","ollama_cloud","together","custom_openai"],"example":"anthropic","type":"string"},"type":{"description":"Type of resource (always 'llm_provider')","enum":["llm_provider"],"example":"llm_provider","type":"string"}},"required":["account_id","api_base_url","api_type","id","name","provider","type"],"title":"LlmProvider_Summary","type":"object"},"Agent_DetailsForCreate":{"properties":{"description":{"description":"Optional agent description","example":"Handles tier-1 support requests","type":"string"},"execution_mode":{"description":"Whether this agent is expected to run hosted or remote (optional; defaults to hosted for a judge and remote otherwise). This does not limit which versions the agent can have.","enum":["hosted","remote"],"example":"remote","type":"string"},"external_identifier":{"description":"Optional external identifier for this agent in an external system (unique per account)","example":"workflow-abc123","type":"string"},"id":{"description":"Optional ID for the agent. If not provided, a new ID will be generated. The ID must be a valid PFID with a partition matching the account. Its embedded timestamp must not be more than 7 days in the past.","oneOf":[{"$ref":"#/components/schemas/Agent_Id"},{"$ref":"#/components/schemas/Null"}]},"name":{"description":"Agent name","example":"Support bot","type":"string"},"owner_person_id":{"description":"The owner of this agent (optional)","oneOf":[{"$ref":"#/components/schemas/Person_Id"},{"$ref":"#/components/schemas/Null"}]},"risk_profile_id":{"description":"The risk profile assigned to this agent (optional). Used to calculate risk scores.","oneOf":[{"$ref":"#/components/schemas/RiskProfile_Id"},{"$ref":"#/components/schemas/Null"}]},"role":{"description":"What this agent does. Use judge for an agent that scores other agents' runs (optional; standard if omitted).","enum":["standard","judge"],"example":"standard","type":"string"},"team_id":{"description":"The team this agent belongs to (optional)","oneOf":[{"$ref":"#/components/schemas/Team_Id"},{"$ref":"#/components/schemas/Null"}]}},"title":"Agent_DetailsForCreate","type":"object"},"Agent_Summary":{"properties":{"available_actions":{"description":"Available actions for this agent based on its status and instance counts","properties":{"delete":{"description":"Whether the agent can be deleted","type":"boolean"},"reinstate":{"description":"Whether the agent can be reinstated from retired","type":"boolean"},"retire":{"description":"Whether the agent can be retired","type":"boolean"},"update":{"description":"Whether the agent can be updated","type":"boolean"}},"required":["delete","reinstate","retire","update"],"title":"Agent_AvailableActions","type":"object"},"description":{"oneOf":[{"description":"Agent description","example":"Agent description","type":"string"},{"$ref":"#/components/schemas/Null"}]},"execution_mode":{"description":"Whether this agent is expected to run hosted or remote. This does not limit which versions the agent can have","enum":["hosted","remote"],"example":"remote","type":"string"},"external_identifier":{"oneOf":[{"description":"External identifier for this agent in an external system (unique per account)","example":"workflow-abc123","type":"string"},{"$ref":"#/components/schemas/Null"}]},"id":{"$ref":"#/components/schemas/Agent_Id"},"inserted_at":{"description":"When the agent was created","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},"instance_counts":{"properties":{"active":{"description":"Number of instances with status active (running)","example":2,"minimum":0,"type":"integer"},"cancelled":{"description":"Number of instances with status cancelled","example":0,"minimum":0,"type":"integer"},"complete":{"description":"Number of instances with status complete","example":5,"minimum":0,"type":"integer"},"failed":{"description":"Number of instances with status failed","example":0,"minimum":0,"type":"integer"},"finished":{"description":"Number of instances in a finished state (complete + failed + cancelled + terminated)","example":5,"minimum":0,"type":"integer"},"pending":{"description":"Number of instances with status pending","example":0,"minimum":0,"type":"integer"},"preparing":{"description":"Number of instances with status preparing","example":0,"minimum":0,"type":"integer"},"terminated":{"description":"Number of instances with status terminated","example":0,"minimum":0,"type":"integer"},"total":{"description":"Total number of agent instances","example":10,"minimum":0,"type":"integer"}},"required":["active","cancelled","complete","failed","finished","pending","preparing","terminated","total"],"title":"Agent_InstanceCounts","type":"object"},"last_activity_span_at":{"description":"When this agent last had an activity span, quantised to the nearest 30 seconds, or null if none yet","oneOf":[{"example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},{"$ref":"#/components/schemas/Null"}]},"name":{"description":"Agent name","example":"My Agent","type":"string"},"owner_person_id":{"description":"The owner of this agent (if any)","oneOf":[{"$ref":"#/components/schemas/Person_Id"},{"$ref":"#/components/schemas/Null"}]},"role":{"description":"What this agent does: 'standard' for a customer agent, or 'judge' for an agent that scores other agents' runs","enum":["standard","judge"],"example":"standard","type":"string"},"status":{"description":"Agent status","enum":["pending","active","dormant","retired"],"example":"pending","type":"string"},"team_id":{"description":"The team this agent belongs to (if any)","oneOf":[{"$ref":"#/components/schemas/Team_Id"},{"$ref":"#/components/schemas/Null"}]},"type":{"description":"Type of resource (always 'agent')","enum":["agent"],"example":"agent","type":"string"},"updated_at":{"description":"When the agent was last updated","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"}},"required":["available_actions","description","execution_mode","external_identifier","id","inserted_at","instance_counts","last_activity_span_at","name","owner_person_id","role","status","team_id","type","updated_at"],"title":"Agent_Summary","type":"object"},"RiskProfile_Ruleset":{"properties":{"action_multipliers":{"$ref":"#/components/schemas/RiskProfile_Ruleset_ActionMultipliers"},"category_weights":{"$ref":"#/components/schemas/RiskProfile_Ruleset_CategoryWeights"},"thresholds":{"$ref":"#/components/schemas/RiskProfile_Ruleset_Thresholds"}},"required":["action_multipliers","category_weights","thresholds"],"title":"RiskProfile_Ruleset","type":"object"},"KnowledgebaseDocument_Summary":{"description":"Summary of a knowledgebase document for list responses","properties":{"content_sha256":{"description":"SHA-256 of the content, as lowercase hex","example":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","type":"string"},"content_type":{"description":"MIME type of the document","enum":["text/markdown","text/plain","application/json","application/yaml","text/csv"],"example":"text/markdown","type":"string"},"id":{"$ref":"#/components/schemas/KnowledgebaseDocument_Id"},"knowledgebase_id":{"$ref":"#/components/schemas/Knowledgebase_Id"},"latest_revision_id":{"$ref":"#/components/schemas/KnowledgebaseDocumentRevision_Id"},"latest_revision_number":{"description":"Revision number of the latest document revision","example":1,"minimum":1,"type":"integer"},"path":{"description":"Document path, relative, with segments separated by /","example":"guides/setup.md","type":"string"},"size_bytes":{"description":"Size of the content in bytes","example":128,"minimum":0,"type":"integer"},"status":{"description":"Whether this document is active or archived","enum":["active","archived"],"example":"active","type":"string"},"type":{"description":"Type of resource (always 'knowledgebase_document')","enum":["knowledgebase_document"],"example":"knowledgebase_document","type":"string"}},"required":["content_sha256","content_type","id","knowledgebase_id","latest_revision_id","latest_revision_number","path","size_bytes","status","type"],"title":"KnowledgebaseDocument_Summary","type":"object"},"LlmProvider_DetailsForUpdate":{"description":"Parameters for updating an LLM provider","properties":{"api_base_url":{"description":"Base URL for the provider API. Required when provider is custom_openai and must be absent otherwise (omit to keep current; null to clear)","oneOf":[{"example":"https://api.example.com/v1","type":"string"},{"$ref":"#/components/schemas/Null"}]},"api_key":{"description":"API key for this provider. Stored encrypted and never returned in API responses (omit to keep current)","example":"sk-test-key","type":"string"},"name":{"description":"Provider name, unique within the account ignoring case (omit to keep current)","example":"Anthropic production","type":"string"}},"title":"LlmProvider_DetailsForUpdate","type":"object"},"AgentDeployment_Promotion":{"description":"source_agent_deployment_id is the deployment whose current version can be promoted. source_environment_id is the environment of that deployment. agent_version_id is the version that would be pinned on the target environment. target_environment_id is the environment the version would be promoted to. target_agent_deployment_id is the deployment in the target environment, or null when that environment has no deployment yet.","properties":{"agent_version_id":{"$ref":"#/components/schemas/AgentVersion_Id"},"source_agent_deployment_id":{"$ref":"#/components/schemas/AgentDeployment_Id"},"source_environment_id":{"$ref":"#/components/schemas/Environment_Id"},"target_agent_deployment_id":{"description":"Deployment in the target environment. Null when that environment has no deployment yet.","oneOf":[{"$ref":"#/components/schemas/AgentDeployment_Id"},{"$ref":"#/components/schemas/Null"}]},"target_environment_id":{"$ref":"#/components/schemas/Environment_Id"}},"required":["agent_version_id","source_agent_deployment_id","source_environment_id","target_agent_deployment_id","target_environment_id"],"title":"AgentDeployment_Promotion","type":"object"},"AdminUserInvite_Id":{"description":"A valid admin user invite ID","example":"013xrzp12g3nqk8ns6jadrqmpgrjkeny","title":"AdminUserInvite_Id","type":"string"},"Environment_Id":{"description":"A valid environment ID","example":"013xrzp12g3nqk8ns6jadrqmpgrjkeny","title":"Environment_Id","type":"string"},"Alert_Summary":{"properties":{"account_id":{"$ref":"#/components/schemas/Account_Id"},"agent_id":{"$ref":"#/components/schemas/Agent_Id"},"agent_instance_id":{"$ref":"#/components/schemas/AgentInstance_Id"},"cleared_at":{"oneOf":[{"description":"When the alert was cleared (null while raised)","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},{"$ref":"#/components/schemas/Null"}]},"environment_id":{"$ref":"#/components/schemas/Environment_Id"},"id":{"$ref":"#/components/schemas/Alert_Id"},"inserted_at":{"description":"When the alert row was created","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},"name":{"description":"Name of the alert (key in the agent schema version alert_schemas)","example":"high_error_rate","type":"string"},"raised_at":{"description":"When the alert was raised","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},"severity":{"description":"Severity of the alert","enum":["critical","error","warning","info"],"example":"warning","type":"string"},"status":{"description":"Lifecycle status of the alert: 'raised' or 'cleared'","enum":["raised","cleared"],"example":"raised","type":"string"},"summary":{"oneOf":[{"description":"Short display text for the alert, rendered from the alert schema template (null when the schema has no template).","example":"Error rate exceeded threshold","type":"string"},{"$ref":"#/components/schemas/Null"}]},"title":{"description":"Human-readable title from the alert schema (defaults to name when the schema has no title)","example":"High error rate","type":"string"},"type":{"description":"Type of resource (always 'alert')","enum":["alert"],"example":"alert","type":"string"},"updated_at":{"description":"When the alert row was last updated","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},"version":{"description":"Monotonic version of this alert row. Starts at 1 and increments on each real update.","example":1,"minimum":1,"type":"integer"}},"required":["account_id","agent_id","agent_instance_id","cleared_at","environment_id","id","inserted_at","name","raised_at","severity","status","summary","title","type","updated_at","version"],"title":"Alert_Summary","type":"object"},"SchemaDetails_ForCreate":{"description":"Named schema with schema and optional title, description, template and data_risk","properties":{"data_risk":{"oneOf":[{"$ref":"#/components/schemas/DataRisk"},{"$ref":"#/components/schemas/Null"}]},"description":{"oneOf":[{"description":"Optional description","type":"string"},{"$ref":"#/components/schemas/Null"}]},"name":{"description":"Schema name (key)","type":"string"},"schema":{"additionalProperties":true,"description":"JSON schema for the payload","type":"object"},"template":{"oneOf":[{"description":"Display template. Use {{field}} to interpolate payload fields.","type":"string"},{"$ref":"#/components/schemas/Null"}]},"title":{"oneOf":[{"description":"Human-readable title. Defaults to name when omitted.","type":"string"},{"$ref":"#/components/schemas/Null"}]}},"required":["name","schema"],"title":"SchemaDetails_ForCreate","type":"object"},"Alert_Details":{"properties":{"account_id":{"$ref":"#/components/schemas/Account_Id"},"agent_id":{"$ref":"#/components/schemas/Agent_Id"},"agent_instance_id":{"$ref":"#/components/schemas/AgentInstance_Id"},"cleared_at":{"oneOf":[{"description":"When the alert was cleared (null while raised)","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},{"$ref":"#/components/schemas/Null"}]},"environment_id":{"$ref":"#/components/schemas/Environment_Id"},"id":{"$ref":"#/components/schemas/Alert_Id"},"inserted_at":{"description":"When the alert row was created","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},"name":{"description":"Name of the alert (key in the agent schema version alert_schemas)","example":"high_error_rate","type":"string"},"payload":{"additionalProperties":true,"description":"Alert payload data (arbitrary JSON object)","type":"object"},"payload_sensitive_encoding":{"description":"When true, payload should be interpreted as containing sensitive markers as per the specification","type":"boolean"},"raised_at":{"description":"When the alert was raised","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},"severity":{"description":"Severity of the alert","enum":["critical","error","warning","info"],"example":"warning","type":"string"},"status":{"description":"Lifecycle status of the alert: 'raised' or 'cleared'","enum":["raised","cleared"],"example":"raised","type":"string"},"summary":{"oneOf":[{"description":"Short display text for the alert, rendered from the alert schema template (null when the schema has no template).","example":"Error rate exceeded threshold","type":"string"},{"$ref":"#/components/schemas/Null"}]},"title":{"description":"Human-readable title from the alert schema (defaults to name when the schema has no title)","example":"High error rate","type":"string"},"type":{"description":"Type of resource (always 'alert')","enum":["alert"],"example":"alert","type":"string"},"updated_at":{"description":"When the alert row was last updated","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},"version":{"description":"Monotonic version of this alert row. Starts at 1 and increments on each real update.","example":1,"minimum":1,"type":"integer"}},"required":["account_id","agent_id","agent_instance_id","cleared_at","environment_id","id","inserted_at","name","payload","payload_sensitive_encoding","raised_at","severity","status","summary","title","type","updated_at","version"],"title":"Alert_Details","type":"object"},"AgentSpan_Summary":{"properties":{"account_id":{"$ref":"#/components/schemas/Account_Id"},"agent_id":{"$ref":"#/components/schemas/Agent_Id"},"agent_instance_id":{"$ref":"#/components/schemas/AgentInstance_Id"},"data_risk":{"description":"Data risk for this span from its schema. Only populated for activity-purpose spans.","oneOf":[{"$ref":"#/components/schemas/DataRisk"},{"$ref":"#/components/schemas/Null"}]},"finished_at":{"oneOf":[{"description":"When the span finished (null if still in progress)","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},{"$ref":"#/components/schemas/Null"}]},"id":{"$ref":"#/components/schemas/AgentSpan_Id"},"parent_span_id":{"description":"ID of the parent span (null if this is a root span)","oneOf":[{"$ref":"#/components/schemas/AgentSpan_Id"},{"$ref":"#/components/schemas/Null"}]},"payload":{"additionalProperties":true,"description":"Span payload data (arbitrary JSON object)","type":"object"},"payload_byte_size_estimate":{"description":"Approximate JSON-encoded byte size of the span's stored payload columns. This is an estimate, not an exact on-disk size.","minimum":0,"type":"integer"},"purpose":{"description":"Purpose of the span: 'activity' (normal agent activity), 'quality' (system-written span recording an agent instance quality payload update), or 'alert' (system-written span recording an alert lifecycle event). Quality-purpose and alert-purpose spans are excluded from standard span metrics.","enum":["activity","quality","alert"],"example":"activity","type":"string"},"result_payload":{"oneOf":[{"additionalProperties":true,"description":"Result payload (arbitrary JSON), only present when span is finished","type":"object"},{"$ref":"#/components/schemas/Null"}]},"risk_level":{"oneOf":[{"description":"Risk level for this span based on its schema's data_risk and the agent's risk profile. Only populated for activity-purpose spans when the request includes `include_risk_level`, the agent has a risk profile, and the span's schema has scoreable data_risk.","enum":["low","medium","high","critical"],"example":"low","type":"string"},{"$ref":"#/components/schemas/Null"}]},"risk_score":{"oneOf":[{"description":"Numeric risk score for this span based on its schema's data_risk and the agent's risk profile. Only populated for activity-purpose spans, together with `risk_level`, when the request includes `include_risk_level`.","example":40.0,"type":"number"},{"$ref":"#/components/schemas/Null"}]},"schema_name":{"description":"Name of the schema for this span","example":"llm","type":"string"},"schema_title":{"description":"Human-readable title for the schema (from JSON schema, defaults to schema_name)","example":"LLM","type":"string"},"sensitive_encoding":{"description":"When true, both payload and result_payload should be interpreted as containing sensitive markers as per the specification","type":"boolean"},"started_at":{"description":"When the span started","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},"status":{"description":"Status of the span: 'active' (started but not finished), 'complete' (finished successfully), 'failed' (ended with failure), or 'cancelled' (started but cancelled before completion)","enum":["active","complete","failed","cancelled"],"example":"active","type":"string"},"summary":{"oneOf":[{"description":"Human-readable summary rendered from the schema template using payload and result_payload (null when template is missing). When the request sets `redacted` to true, sensitive values in the summary are replaced with redaction labels.","type":"string"},{"$ref":"#/components/schemas/Null"}]},"type":{"description":"Type of resource (always 'agent_span')","enum":["agent_span"],"example":"agent_span","type":"string"}},"required":["account_id","agent_id","agent_instance_id","data_risk","finished_at","id","parent_span_id","payload","payload_byte_size_estimate","purpose","result_payload","risk_level","risk_score","schema_name","schema_title","sensitive_encoding","started_at","status","summary","type"],"title":"AgentSpan_Summary","type":"object"},"Knowledgebase_Summary":{"description":"Summary of a knowledgebase for list responses","properties":{"account_id":{"$ref":"#/components/schemas/Account_Id"},"active_document_count":{"description":"Number of active documents","example":4,"minimum":0,"type":"integer"},"description":{"description":"Agents will see the description as part of tool descriptions","oneOf":[{"example":"Policies and runbooks","type":"string"},{"$ref":"#/components/schemas/Null"}]},"id":{"$ref":"#/components/schemas/Knowledgebase_Id"},"name":{"description":"Knowledgebase name","example":"Engineering notes","type":"string"},"revision_number":{"description":"Number of the revision agents read. It starts at 0 when the knowledgebase is created and increases by one for each document change. Agents read the revision with this number, which is always the latest revision.","example":3,"minimum":0,"type":"integer"},"status":{"description":"Whether this knowledgebase is active or archived","enum":["active","archived"],"example":"active","type":"string"},"type":{"description":"Type of resource (always 'knowledgebase')","enum":["knowledgebase"],"example":"knowledgebase","type":"string"}},"required":["account_id","active_document_count","description","id","name","revision_number","status","type"],"title":"Knowledgebase_Summary","type":"object"},"SingleSchemaDetails":{"properties":{"data_risk":{"$ref":"#/components/schemas/DataRisk"},"description":{"description":"Optional description","oneOf":[{"type":"string"},{"$ref":"#/components/schemas/Null"}]},"schema":{"additionalProperties":true,"description":"JSON schema for the payload. Title and description are sibling fields on this object and are not present inside schema.","type":"object"},"schema_validation":{"$ref":"#/components/schemas/SchemaValidationResult"},"template":{"description":"Display template. Use {{field}} to interpolate payload fields.","oneOf":[{"type":"string"},{"$ref":"#/components/schemas/Null"}]},"title":{"description":"Human-readable title","type":"string"}},"required":["data_risk","description","schema","schema_validation","template","title"],"title":"SingleSchemaDetails","type":"object"},"AgentVersion_Summary":{"properties":{"account_id":{"$ref":"#/components/schemas/Account_Id"},"agent_id":{"$ref":"#/components/schemas/Agent_Id"},"agent_schema_version_id":{"$ref":"#/components/schemas/AgentSchemaVersion_Id"},"current_agent_deployment_refs":{"description":"Agent deployments that pin this version as their current version (empty if none).","items":{"$ref":"#/components/schemas/AgentDeployment_Id"},"type":"array"},"execution_mode":{"description":"Whether Prefactor executes this version (hosted) or an external agent reports telemetry (remote)","enum":["hosted","remote"],"example":"hosted","type":"string"},"external_identifier":{"description":"External identifier for the agent version","example":"v1.0.0","type":"string"},"external_identifier_repeats":{"description":"Count of rows sharing this external identifier (helps distinguish duplicates).","minimum":0,"type":"integer"},"id":{"$ref":"#/components/schemas/AgentVersion_Id"},"inserted_at":{"description":"When the agent version was created","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},"observed_classification":{"oneOf":[{"description":"Observed highest classification level from actual executed spans (null if no spans have executed).","enum":["unknown","public","internal","confidential","restricted","secret"],"example":"internal","type":"string"},{"$ref":"#/components/schemas/Null"}]},"theoretical_classification":{"oneOf":[{"description":"Theoretical highest classification level based on schema-defined scope and data categories (null if not assessed).","enum":["unknown","public","internal","confidential","restricted","secret"],"example":"confidential","type":"string"},{"$ref":"#/components/schemas/Null"}]},"type":{"description":"Type of resource (always 'agent_version')","enum":["agent_version"],"example":"agent_version","type":"string"},"updated_at":{"description":"When the agent version was last updated","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"}},"required":["account_id","agent_id","agent_schema_version_id","current_agent_deployment_refs","execution_mode","external_identifier","external_identifier_repeats","id","inserted_at","type","updated_at"],"title":"AgentVersion_Summary","type":"object"},"SchemaDetails":{"properties":{"data_risk":{"$ref":"#/components/schemas/DataRisk"},"description":{"oneOf":[{"description":"Optional description","type":"string"},{"$ref":"#/components/schemas/Null"}]},"name":{"description":"Schema name (key)","type":"string"},"schema":{"additionalProperties":true,"description":"JSON schema for the payload. Title and description are sibling fields on this object and are not present inside schema.","type":"object"},"schema_validation":{"$ref":"#/components/schemas/SchemaValidationResult"},"template":{"oneOf":[{"description":"Display template. Use {{field}} to interpolate payload fields.","type":"string"},{"$ref":"#/components/schemas/Null"}]},"title":{"description":"Human-readable title (defaults to name)","type":"string"}},"required":["data_risk","description","name","schema","schema_validation","template","title"],"title":"SchemaDetails","type":"object"},"LlmProviderModel_DetailsForCreate":{"properties":{"api_name":{"description":"API model name, unique within the provider ignoring case","example":"claude-haiku-4-5","type":"string"},"id":{"description":"LLM provider model ID. Must be a valid PFID whose partition matches the account, with an embedded timestamp no more than 7 days in the past (optional; a new ID is generated if omitted)","oneOf":[{"$ref":"#/components/schemas/LlmProviderModel_Id"},{"$ref":"#/components/schemas/Null"}]},"llm_provider_id":{"$ref":"#/components/schemas/LlmProvider_Id"},"models_dev_name":{"description":"models.dev identifier. Derived from api_name for managed providers (optional)","oneOf":[{"example":"anthropic/claude-haiku-4-5","type":"string"},{"$ref":"#/components/schemas/Null"}]},"name":{"description":"Model display name, unique within the provider ignoring case. Derived from api_name for managed providers. Must be present when provider is custom_openai","oneOf":[{"example":"Claude Haiku 4.5","type":"string"},{"$ref":"#/components/schemas/Null"}]}},"required":["api_name","llm_provider_id"],"title":"LlmProviderModel_DetailsForCreate","type":"object"},"SchemaValidationResult":{"description":"Result of validating a JSON schema","properties":{"message":{"oneOf":[{"description":"Validation error message when status is 'error'","type":"string"},{"$ref":"#/components/schemas/Null"}]},"status":{"description":"Whether the schema is valid","enum":["success","error"],"example":"success","type":"string"}},"required":["message","status"],"title":"SchemaValidationResult","type":"object"},"AgentVersion_RuntimeEnvironment":{"properties":{"agent_sdk":{"description":"Agent framework/SDK packages (e.g. [\"langchain@4.0.0\"])","oneOf":[{"description":"List of package name and version strings (e.g. \"package@1.0.0\")","items":{"type":"string"},"type":"array"},{"$ref":"#/components/schemas/Null"}]},"os":{"oneOf":[{"description":"Operating system (e.g. \"linux\")","type":"string"},{"$ref":"#/components/schemas/Null"}]},"prefactor_sdk":{"description":"Prefactor SDK packages and versions (e.g. [\"prefactor-core@1.0.0\", \"prefactor-langchain@1.1.0\"])","oneOf":[{"description":"List of package name and version strings (e.g. \"package@1.0.0\")","items":{"type":"string"},"type":"array"},{"$ref":"#/components/schemas/Null"}]},"runtime":{"oneOf":[{"description":"Language runtime version (e.g. \"python@3.12\")","type":"string"},{"$ref":"#/components/schemas/Null"}]}},"title":"AgentVersion_RuntimeEnvironment","type":"object"},"Team_Id":{"description":"A valid team ID","example":"013xrzp12g3nqk8ns6jadrqmpgrjkeny","title":"Team_Id","type":"string"},"Agent_Details":{"properties":{"available_actions":{"description":"Available actions for this agent based on its status and instance counts","properties":{"delete":{"description":"Whether the agent can be deleted","type":"boolean"},"reinstate":{"description":"Whether the agent can be reinstated from retired","type":"boolean"},"retire":{"description":"Whether the agent can be retired","type":"boolean"},"update":{"description":"Whether the agent can be updated","type":"boolean"}},"required":["delete","reinstate","retire","update"],"title":"Agent_AvailableActions","type":"object"},"description":{"oneOf":[{"description":"Agent description","example":"Agent description","type":"string"},{"$ref":"#/components/schemas/Null"}]},"execution_mode":{"description":"Whether this agent is expected to run hosted or remote. This does not limit which versions the agent can have","enum":["hosted","remote"],"example":"remote","type":"string"},"external_identifier":{"oneOf":[{"description":"External identifier for this agent in an external system (unique per account)","example":"workflow-abc123","type":"string"},{"$ref":"#/components/schemas/Null"}]},"id":{"$ref":"#/components/schemas/Agent_Id"},"inserted_at":{"description":"When the agent was created","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},"instance_counts":{"properties":{"active":{"description":"Number of instances with status active (running)","example":2,"minimum":0,"type":"integer"},"cancelled":{"description":"Number of instances with status cancelled","example":0,"minimum":0,"type":"integer"},"complete":{"description":"Number of instances with status complete","example":5,"minimum":0,"type":"integer"},"failed":{"description":"Number of instances with status failed","example":0,"minimum":0,"type":"integer"},"finished":{"description":"Number of instances in a finished state (complete + failed + cancelled + terminated)","example":5,"minimum":0,"type":"integer"},"pending":{"description":"Number of instances with status pending","example":0,"minimum":0,"type":"integer"},"preparing":{"description":"Number of instances with status preparing","example":0,"minimum":0,"type":"integer"},"terminated":{"description":"Number of instances with status terminated","example":0,"minimum":0,"type":"integer"},"total":{"description":"Total number of agent instances","example":10,"minimum":0,"type":"integer"}},"required":["active","cancelled","complete","failed","finished","pending","preparing","terminated","total"],"title":"Agent_InstanceCounts","type":"object"},"last_activity_span_at":{"description":"When this agent last had an activity span, quantised to the nearest 30 seconds, or null if none yet","oneOf":[{"example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},{"$ref":"#/components/schemas/Null"}]},"name":{"description":"Agent name","example":"My Agent","type":"string"},"owner_person_id":{"description":"The owner of this agent (if any)","oneOf":[{"$ref":"#/components/schemas/Person_Id"},{"$ref":"#/components/schemas/Null"}]},"risk_profile_id":{"description":"The risk profile assigned to this agent (if any). Used to calculate risk scores.","oneOf":[{"$ref":"#/components/schemas/RiskProfile_Id"},{"$ref":"#/components/schemas/Null"}]},"role":{"description":"What this agent does: 'standard' for a customer agent, or 'judge' for an agent that scores other agents' runs","enum":["standard","judge"],"example":"standard","type":"string"},"status":{"description":"Agent status","enum":["pending","active","dormant","retired"],"example":"pending","type":"string"},"team_id":{"description":"The team this agent belongs to (if any)","oneOf":[{"$ref":"#/components/schemas/Team_Id"},{"$ref":"#/components/schemas/Null"}]},"type":{"description":"Type of resource (always 'agent')","enum":["agent"],"example":"agent","type":"string"},"updated_at":{"description":"When the agent was last updated","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"}},"required":["available_actions","description","execution_mode","external_identifier","id","inserted_at","instance_counts","last_activity_span_at","name","owner_person_id","risk_profile_id","role","status","team_id","type","updated_at"],"title":"Agent_Details","type":"object"},"Agent_InstanceCounts":{"properties":{"active":{"description":"Number of instances with status active (running)","example":2,"minimum":0,"type":"integer"},"cancelled":{"description":"Number of instances with status cancelled","example":0,"minimum":0,"type":"integer"},"complete":{"description":"Number of instances with status complete","example":5,"minimum":0,"type":"integer"},"failed":{"description":"Number of instances with status failed","example":0,"minimum":0,"type":"integer"},"finished":{"description":"Number of instances in a finished state (complete + failed + cancelled + terminated)","example":5,"minimum":0,"type":"integer"},"pending":{"description":"Number of instances with status pending","example":0,"minimum":0,"type":"integer"},"preparing":{"description":"Number of instances with status preparing","example":0,"minimum":0,"type":"integer"},"terminated":{"description":"Number of instances with status terminated","example":0,"minimum":0,"type":"integer"},"total":{"description":"Total number of agent instances","example":10,"minimum":0,"type":"integer"}},"required":["active","cancelled","complete","failed","finished","pending","preparing","terminated","total"],"title":"Agent_InstanceCounts","type":"object"},"AgentInstance_CostBreakdown_Group":{"properties":{"cache_read":{"description":"Total cache-read tokens for this model","example":0,"minimum":0,"type":"integer"},"cache_read_cost":{"oneOf":[{"description":"Estimated USD cost for cache-read tokens","example":0.0,"type":"number"},{"$ref":"#/components/schemas/Null"}]},"context_limit":{"oneOf":[{"description":"Context window size from models.dev pricing, when known","example":128000,"type":"integer"},{"$ref":"#/components/schemas/Null"}]},"input":{"description":"Total input tokens for this model","example":1000,"minimum":0,"type":"integer"},"input_cost":{"oneOf":[{"description":"Estimated USD cost for input tokens","example":0.0025,"type":"number"},{"$ref":"#/components/schemas/Null"}]},"model_name":{"description":"Model identifier from span payloads","example":"openai/gpt-4o","type":"string"},"output":{"description":"Total output tokens for this model","example":500,"minimum":0,"type":"integer"},"output_cost":{"oneOf":[{"description":"Estimated USD cost for output tokens","example":0.01,"type":"number"},{"$ref":"#/components/schemas/Null"}]},"provider":{"oneOf":[{"description":"Provider identifier from span payloads","example":"openrouter","type":"string"},{"$ref":"#/components/schemas/Null"}]},"total_cost":{"oneOf":[{"description":"Estimated total USD cost for this model","example":0.0125,"type":"number"},{"$ref":"#/components/schemas/Null"}]}},"required":["cache_read","cache_read_cost","context_limit","input","input_cost","model_name","output","output_cost","provider","total_cost"],"title":"AgentInstance_CostBreakdown_Group","type":"object"},"KnowledgebaseDocumentRevision_Details":{"description":"Full details of a knowledgebase document revision","properties":{"change_kind":{"description":"The change this revision records","enum":["create","update","rename","archive","unarchive"],"example":"create","type":"string"},"content":{"description":"Document content after this revision","example":"# Setup","type":"string"},"content_sha256":{"description":"SHA-256 of the content after this revision, as lowercase hex","example":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","type":"string"},"content_type":{"description":"MIME type of the document after this revision","enum":["text/markdown","text/plain","application/json","application/yaml","text/csv"],"example":"text/markdown","type":"string"},"created_by_admin_user_id":{"description":"Admin user who wrote this revision, when the caller was an admin session","oneOf":[{"$ref":"#/components/schemas/AdminUser_Id"},{"$ref":"#/components/schemas/Null"}]},"created_by_api_token_id":{"description":"API token that wrote this revision, when the caller was an API token","oneOf":[{"$ref":"#/components/schemas/ApiToken_Id"},{"$ref":"#/components/schemas/Null"}]},"id":{"$ref":"#/components/schemas/KnowledgebaseDocumentRevision_Id"},"inserted_at":{"description":"When the revision was created","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},"knowledgebase_document_id":{"$ref":"#/components/schemas/KnowledgebaseDocument_Id"},"knowledgebase_revision_number":{"description":"Knowledgebase revision number this change belongs to","example":4,"minimum":1,"type":"integer"},"path":{"description":"Document path after this revision","example":"guides/setup.md","type":"string"},"revision_number":{"description":"Revision number of this document, starting at 1","example":2,"minimum":1,"type":"integer"},"size_bytes":{"description":"Size of the content in bytes after this revision","example":128,"minimum":0,"type":"integer"},"type":{"description":"Type of resource (always 'knowledgebase_document_revision')","enum":["knowledgebase_document_revision"],"example":"knowledgebase_document_revision","type":"string"}},"required":["change_kind","content","content_sha256","content_type","created_by_admin_user_id","created_by_api_token_id","id","inserted_at","knowledgebase_document_id","knowledgebase_revision_number","path","revision_number","size_bytes","type"],"title":"KnowledgebaseDocumentRevision_Details","type":"object"},"ApiToken_Details":{"properties":{"account_id":{"$ref":"#/components/schemas/Account_Id"},"agent_deployment_id":{"description":"Set when token_scope is agent_deployment","oneOf":[{"$ref":"#/components/schemas/AgentDeployment_Id"},{"$ref":"#/components/schemas/Null"}]},"agent_id":{"description":"Set when token_scope is agent_deployment (deployment's agent)","oneOf":[{"$ref":"#/components/schemas/Agent_Id"},{"$ref":"#/components/schemas/Null"}]},"available_actions":{"description":"Available actions for this token based on its status","properties":{"activate":{"description":"Whether the token can be activated","type":"boolean"},"delete":{"description":"Whether the token can be deleted","type":"boolean"},"revoke":{"description":"Whether the token can be revoked","type":"boolean"},"suspend":{"description":"Whether the token can be suspended","type":"boolean"}},"required":["activate","delete","revoke","suspend"],"title":"ApiToken_AvailableActions","type":"object"},"created_by_admin_user_id":{"description":"ID of the admin user who created this token","oneOf":[{"$ref":"#/components/schemas/AdminUser_Id"},{"$ref":"#/components/schemas/Null"}]},"environment_id":{"description":"Set when token_scope is agent_deployment (deployment's environment)","oneOf":[{"$ref":"#/components/schemas/Environment_Id"},{"$ref":"#/components/schemas/Null"}]},"expires_at":{"description":"When the token expires","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},"id":{"$ref":"#/components/schemas/ApiToken_Id"},"inserted_at":{"description":"When the token was created","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},"last_used_at":{"oneOf":[{"description":"When the token was last used for authentication","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},{"$ref":"#/components/schemas/Null"}]},"role":{"description":"Access role of the token","enum":["read_only","full_access"],"example":"read_only","type":"string"},"status":{"description":"Current status of the token","enum":["active","suspended","revoked"],"example":"active","type":"string"},"token_scope":{"description":"Scope of the token","enum":["account","agent_deployment"],"example":"account","type":"string"},"type":{"description":"Type of resource (always 'api_token')","enum":["api_token"],"example":"api_token","type":"string"},"updated_at":{"description":"When the token was last updated","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"}},"required":["account_id","agent_deployment_id","agent_id","available_actions","created_by_admin_user_id","environment_id","expires_at","id","inserted_at","last_used_at","role","status","token_scope","type","updated_at"],"title":"ApiToken_Details","type":"object"},"Account_DetailsForUpdate":{"properties":{"name":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/Null"}]},"organisation_name":{"oneOf":[{"description":"Organisation name (required when purpose is not personal)","type":"string"},{"$ref":"#/components/schemas/Null"}]},"purpose":{"oneOf":[{"enum":["business","personal","nonprofit","education","government"],"example":"business","type":"string"},{"$ref":"#/components/schemas/Null"}]},"website":{"oneOf":[{"description":"Website URL","type":"string"},{"$ref":"#/components/schemas/Null"}]}},"title":"Account_DetailsForUpdate","type":"object"},"RiskProfile_Details":{"properties":{"agreed_data_risk":{"$ref":"#/components/schemas/DataRisk"},"description":{"oneOf":[{"description":"Risk profile description","type":"string"},{"$ref":"#/components/schemas/Null"}]},"id":{"$ref":"#/components/schemas/RiskProfile_Id"},"inserted_at":{"description":"When the risk profile was created","format":"date-time","type":"string"},"name":{"description":"Risk profile name","example":"High Risk","type":"string"},"ruleset":{"$ref":"#/components/schemas/RiskProfile_Ruleset"},"type":{"description":"Type of resource (always 'risk_profile')","enum":["risk_profile"],"example":"risk_profile","type":"string"},"updated_at":{"description":"When the risk profile was last updated","format":"date-time","type":"string"}},"required":["agreed_data_risk","description","id","inserted_at","name","ruleset","type","updated_at"],"title":"RiskProfile_Details","type":"object"},"AgentVersion_Id":{"description":"A valid agent version ID","example":"013xrzp12g3nqk8ns6jadrqmpgrjkeny","title":"AgentVersion_Id","type":"string"},"AgentInstanceAssociation_Details":{"properties":{"account_id":{"$ref":"#/components/schemas/Account_Id"},"agent_association_id":{"$ref":"#/components/schemas/AgentAssociation_Id"},"association_type":{"description":"Kind of association. For judge, from_agent_instance is the judge run and to_agent_instance is the instance it scores","enum":["judge"],"example":"judge","type":"string"},"from_agent_instance_id":{"$ref":"#/components/schemas/AgentInstance_Id"},"id":{"$ref":"#/components/schemas/AgentInstanceAssociation_Id"},"inserted_at":{"description":"When the association was created","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},"to_agent_instance_id":{"$ref":"#/components/schemas/AgentInstance_Id"},"type":{"description":"Type of resource (always 'agent_instance_association')","enum":["agent_instance_association"],"example":"agent_instance_association","type":"string"},"updated_at":{"description":"When the association was last updated","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"}},"required":["account_id","agent_association_id","association_type","from_agent_instance_id","id","inserted_at","to_agent_instance_id","type","updated_at"],"title":"AgentInstanceAssociation_Details","type":"object"},"RiskProfile_Ruleset_CategoryWeights":{"description":"Weights per sensitive data category; each field is a non-negative integer (included; 0 contributes no score) or null (excluded from this profile)","properties":{"authentication_and_secrets":{"oneOf":[{"description":"Non-negative integer weight (0 is included with no contribution) or null if the category is not part of this profile","minimum":0,"type":"integer"},{"$ref":"#/components/schemas/Null"}]},"behavioural_and_inferred":{"oneOf":[{"description":"Non-negative integer weight (0 is included with no contribution) or null if the category is not part of this profile","minimum":0,"type":"integer"},{"$ref":"#/components/schemas/Null"}]},"contact_information":{"oneOf":[{"description":"Non-negative integer weight (0 is included with no contribution) or null if the category is not part of this profile","minimum":0,"type":"integer"},{"$ref":"#/components/schemas/Null"}]},"criminal_justice":{"oneOf":[{"description":"Non-negative integer weight (0 is included with no contribution) or null if the category is not part of this profile","minimum":0,"type":"integer"},{"$ref":"#/components/schemas/Null"}]},"financial_information":{"oneOf":[{"description":"Non-negative integer weight (0 is included with no contribution) or null if the category is not part of this profile","minimum":0,"type":"integer"},{"$ref":"#/components/schemas/Null"}]},"gdpr_biometric_for_identification":{"oneOf":[{"description":"Non-negative integer weight (0 is included with no contribution) or null if the category is not part of this profile","minimum":0,"type":"integer"},{"$ref":"#/components/schemas/Null"}]},"gdpr_genetic_data":{"oneOf":[{"description":"Non-negative integer weight (0 is included with no contribution) or null if the category is not part of this profile","minimum":0,"type":"integer"},{"$ref":"#/components/schemas/Null"}]},"gdpr_political_opinions":{"oneOf":[{"description":"Non-negative integer weight (0 is included with no contribution) or null if the category is not part of this profile","minimum":0,"type":"integer"},{"$ref":"#/components/schemas/Null"}]},"gdpr_racial_or_ethnic_origin":{"oneOf":[{"description":"Non-negative integer weight (0 is included with no contribution) or null if the category is not part of this profile","minimum":0,"type":"integer"},{"$ref":"#/components/schemas/Null"}]},"gdpr_religious_or_philosophical_beliefs":{"oneOf":[{"description":"Non-negative integer weight (0 is included with no contribution) or null if the category is not part of this profile","minimum":0,"type":"integer"},{"$ref":"#/components/schemas/Null"}]},"gdpr_sex_life_or_sexual_orientation":{"oneOf":[{"description":"Non-negative integer weight (0 is included with no contribution) or null if the category is not part of this profile","minimum":0,"type":"integer"},{"$ref":"#/components/schemas/Null"}]},"gdpr_trade_union_membership":{"oneOf":[{"description":"Non-negative integer weight (0 is included with no contribution) or null if the category is not part of this profile","minimum":0,"type":"integer"},{"$ref":"#/components/schemas/Null"}]},"health_and_medical":{"oneOf":[{"description":"Non-negative integer weight (0 is included with no contribution) or null if the category is not part of this profile","minimum":0,"type":"integer"},{"$ref":"#/components/schemas/Null"}]},"location_and_tracking":{"oneOf":[{"description":"Non-negative integer weight (0 is included with no contribution) or null if the category is not part of this profile","minimum":0,"type":"integer"},{"$ref":"#/components/schemas/Null"}]},"minors_data":{"oneOf":[{"description":"Non-negative integer weight (0 is included with no contribution) or null if the category is not part of this profile","minimum":0,"type":"integer"},{"$ref":"#/components/schemas/Null"}]},"organisational_confidential":{"oneOf":[{"description":"Non-negative integer weight (0 is included with no contribution) or null if the category is not part of this profile","minimum":0,"type":"integer"},{"$ref":"#/components/schemas/Null"}]},"personal_identifiers":{"oneOf":[{"description":"Non-negative integer weight (0 is included with no contribution) or null if the category is not part of this profile","minimum":0,"type":"integer"},{"$ref":"#/components/schemas/Null"}]}},"required":["authentication_and_secrets","behavioural_and_inferred","contact_information","criminal_justice","financial_information","gdpr_biometric_for_identification","gdpr_genetic_data","gdpr_political_opinions","gdpr_racial_or_ethnic_origin","gdpr_religious_or_philosophical_beliefs","gdpr_sex_life_or_sexual_orientation","gdpr_trade_union_membership","health_and_medical","location_and_tracking","minors_data","organisational_confidential","personal_identifiers"],"title":"RiskProfile_Ruleset_CategoryWeights","type":"object"},"AgentDeployment_DetailsForCreate":{"properties":{"agent_id":{"$ref":"#/components/schemas/Agent_Id"},"current_version_id":{"description":"Optional pinned version for this deployment; omit if none.","oneOf":[{"$ref":"#/components/schemas/AgentVersion_Id"},{"$ref":"#/components/schemas/Null"}]},"environment_id":{"$ref":"#/components/schemas/Environment_Id"},"id":{"description":"Optional deployment id. If omitted, a generated id is used (partition matches account). Its embedded timestamp must not be more than 7 days in the past.","oneOf":[{"$ref":"#/components/schemas/AgentDeployment_Id"},{"$ref":"#/components/schemas/Null"}]}},"required":["agent_id","environment_id"],"title":"AgentDeployment_DetailsForCreate","type":"object"},"AgentSpan_DetailsForCreate":{"properties":{"agent_instance_id":{"$ref":"#/components/schemas/AgentInstance_Id"},"finished_at":{"oneOf":[{"description":"When the span finished (ISO 8601 format). Omit or null for active spans. For complete, failed, or cancelled, omit to use the current time. When provided, must not be more than 7 days in the past.","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},{"$ref":"#/components/schemas/Null"}]},"id":{"description":"Optional ID for the span. If not provided, a new ID will be generated. The ID must be a valid PFID with a partition matching the account. Its embedded timestamp must not be more than 7 days in the past.","oneOf":[{"$ref":"#/components/schemas/AgentSpan_Id"},{"$ref":"#/components/schemas/Null"}]},"parent_span_id":{"description":"ID of the parent span (null if this is a root span)","oneOf":[{"$ref":"#/components/schemas/AgentSpan_Id"},{"$ref":"#/components/schemas/Null"}]},"payload":{"additionalProperties":true,"description":"Span payload data (arbitrary JSON object)","type":"object"},"result_payload":{"oneOf":[{"additionalProperties":true,"description":"Result payload (arbitrary JSON). Only valid when status is complete, failed, or cancelled.","type":"object"},{"$ref":"#/components/schemas/Null"}]},"schema_name":{"description":"Name of the schema for this span","example":"llm","type":"string"},"sensitive_encoding":{"default":false,"description":"When true, payload and result_payload are parsed as sensitive-encoded JSON; values marked with $sensitive are extracted and stored securely, separate from the rest of the payload. Defaults to false.","type":"boolean"},"started_at":{"oneOf":[{"description":"When the span started (ISO 8601 format). If not provided, current time is used. Must not be more than 7 days in the past.","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},{"$ref":"#/components/schemas/Null"}]},"status":{"description":"Status of the span (required)","enum":["active","complete","failed","cancelled"],"example":"active","type":"string"}},"required":["agent_instance_id","schema_name","status","payload"],"title":"AgentSpan_DetailsForCreate","type":"object"},"AccountIntegration_DetailsForCreate":{"properties":{"config":{"additionalProperties":true,"description":"Versioned integration config, including any required secrets","example":{"_version":1,"webhook_url":"https://hooks.slack.com/services/T123/B456/secret"},"type":"object"},"integration_type":{"description":"Integration type key","example":"slack","type":"string"},"status":{"description":"Whether this integration is active or paused","enum":["active","paused"],"example":"active","type":"string"}},"required":["config","integration_type","status"],"title":"AccountIntegration_DetailsForCreate","type":"object"},"LlmProviderModel_Summary":{"properties":{"api_name":{"description":"API model name, unique within the provider ignoring case","example":"claude-haiku-4-5","type":"string"},"id":{"$ref":"#/components/schemas/LlmProviderModel_Id"},"llm_provider_id":{"$ref":"#/components/schemas/LlmProvider_Id"},"models_dev_name":{"description":"models.dev identifier. Null when the model is not listed on models.dev","oneOf":[{"example":"anthropic/claude-haiku-4-5","type":"string"},{"$ref":"#/components/schemas/Null"}]},"name":{"description":"Model display name, unique within the provider ignoring case","example":"Claude Haiku 4.5","type":"string"},"type":{"description":"Type of resource (always 'llm_provider_model')","enum":["llm_provider_model"],"example":"llm_provider_model","type":"string"}},"required":["api_name","id","llm_provider_id","models_dev_name","name","type"],"title":"LlmProviderModel_Summary","type":"object"},"AgentInstanceAssociation_Summary":{"properties":{"account_id":{"$ref":"#/components/schemas/Account_Id"},"agent_association_id":{"$ref":"#/components/schemas/AgentAssociation_Id"},"association_type":{"description":"Kind of association. For judge, from_agent_instance is the judge run and to_agent_instance is the instance it scores","enum":["judge"],"example":"judge","type":"string"},"from_agent_instance_id":{"$ref":"#/components/schemas/AgentInstance_Id"},"id":{"$ref":"#/components/schemas/AgentInstanceAssociation_Id"},"inserted_at":{"description":"When the association was created","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},"to_agent_instance_id":{"$ref":"#/components/schemas/AgentInstance_Id"},"type":{"description":"Type of resource (always 'agent_instance_association')","enum":["agent_instance_association"],"example":"agent_instance_association","type":"string"},"updated_at":{"description":"When the association was last updated","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"}},"required":["account_id","agent_association_id","association_type","from_agent_instance_id","id","inserted_at","to_agent_instance_id","type","updated_at"],"title":"AgentInstanceAssociation_Summary","type":"object"},"Person_Details":{"properties":{"email":{"description":"Person email address","example":"jane@example.com","type":"string"},"id":{"$ref":"#/components/schemas/Person_Id"},"inserted_at":{"description":"When the person was created","format":"date-time","type":"string"},"name":{"description":"Person name","example":"Jane Doe","type":"string"},"team_ids":{"description":"Team IDs this person belongs to","items":{"$ref":"#/components/schemas/Team_Id"},"type":"array"},"title":{"oneOf":[{"description":"Optional job title","example":"Engineer","type":"string"},{"$ref":"#/components/schemas/Null"}]},"type":{"description":"Type of resource (always 'person')","enum":["person"],"example":"person","type":"string"},"updated_at":{"description":"When the person was last updated","format":"date-time","type":"string"}},"required":["email","id","inserted_at","name","team_ids","title","type","updated_at"],"title":"Person_Details","type":"object"},"Account_Details":{"properties":{"id":{"$ref":"#/components/schemas/Account_Id"},"inserted_at":{"description":"When the account was created","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},"name":{"description":"Account name","example":"My Account","type":"string"},"organisation_name":{"oneOf":[{"description":"Organisation name (when purpose is not personal)","type":"string"},{"$ref":"#/components/schemas/Null"}]},"promo_code":{"oneOf":[{"description":"Promo code","type":"string"},{"$ref":"#/components/schemas/Null"}]},"purpose":{"description":"Account purpose","enum":["business","personal","nonprofit","education","government"],"example":"business","type":"string"},"type":{"description":"Type of resource (always 'account')","enum":["account"],"example":"account","type":"string"},"website":{"oneOf":[{"description":"Website URL","type":"string"},{"$ref":"#/components/schemas/Null"}]}},"required":["id","inserted_at","name","organisation_name","promo_code","purpose","type","website"],"title":"Account_Details","type":"object"},"Person_Id":{"description":"A valid person ID","example":"013xrzp12g3nqk8ns6jadrqmpgrjkeny","title":"Person_Id","type":"string"},"AgentVersion_DetailsForCreateHostedJudge":{"properties":{"agent_id":{"$ref":"#/components/schemas/Agent_Id"},"criterion":{"description":"The rubric this judge applies. Stored as hosted_judge_criterion and rendered into the system prompt when a run starts","example":"Decide whether the agent completed every request.","type":"string"},"external_identifier":{"description":"External identifier for the agent version. A matching hosted judge version with the same identifier, system prompt template, criterion, and model is returned instead of creating a new row (optional; defaults to the current time in YYYY-MM-DD HH:MM if omitted)","oneOf":[{"example":"2026-10-01 15:03","type":"string"},{"$ref":"#/components/schemas/Null"}]},"hosted_llm_provider_model_id":{"$ref":"#/components/schemas/LlmProviderModel_Id"},"id":{"description":"Agent version ID. Used only when creating a new row; ignored if a matching version already exists. The ID must be a valid PFID with a partition matching the account, and its embedded timestamp must not be more than 7 days in the past (optional; a new ID is generated if omitted)","oneOf":[{"$ref":"#/components/schemas/AgentVersion_Id"},{"$ref":"#/components/schemas/Null"}]},"system_prompt_template":{"description":"Liquid template for the system prompt. The only variable is criterion (optional; defaults to the built-in judge template if omitted)","oneOf":[{"example":"You are a judge.\n\n{{ criterion }}\n\nAnswer with a verdict.","type":"string"},{"$ref":"#/components/schemas/Null"}]}},"required":["agent_id","criterion","hosted_llm_provider_model_id"],"title":"AgentVersion_DetailsForCreateHostedJudge","type":"object"},"AccountIntegration_DetailsForUpdate":{"description":"Parameters for updating an account integration","properties":{"config":{"additionalProperties":true,"description":"Replacement integration config (omit to keep current)","example":{"_version":1,"webhook_url":"https://hooks.slack.com/services/T123/B456/secret"},"type":"object"},"status":{"description":"Whether this integration is active or paused (omit to keep current)","enum":["active","paused"],"example":"active","type":"string"}},"title":"AccountIntegration_DetailsForUpdate","type":"object"},"Account_Summary":{"properties":{"id":{"$ref":"#/components/schemas/Account_Id"},"name":{"description":"Account name","example":"My Account","type":"string"},"type":{"description":"Type of resource (always 'account')","enum":["account"],"example":"account","type":"string"}},"required":["id","name","type"],"title":"Account_Summary","type":"object"},"KnowledgebaseDocument_Details":{"description":"Full details of a knowledgebase document","properties":{"content":{"description":"Document content from the latest revision. Empty content is allowed","example":"# Setup","type":"string"},"content_sha256":{"description":"SHA-256 of the content, as lowercase hex","example":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","type":"string"},"content_type":{"description":"MIME type of the document","enum":["text/markdown","text/plain","application/json","application/yaml","text/csv"],"example":"text/markdown","type":"string"},"id":{"$ref":"#/components/schemas/KnowledgebaseDocument_Id"},"knowledgebase_id":{"$ref":"#/components/schemas/Knowledgebase_Id"},"latest_revision_id":{"$ref":"#/components/schemas/KnowledgebaseDocumentRevision_Id"},"latest_revision_number":{"description":"Revision number of the latest document revision","example":1,"minimum":1,"type":"integer"},"path":{"description":"Document path, relative, with segments separated by /","example":"guides/setup.md","type":"string"},"size_bytes":{"description":"Size of the content in bytes","example":128,"minimum":0,"type":"integer"},"status":{"description":"Whether this document is active or archived","enum":["active","archived"],"example":"active","type":"string"},"type":{"description":"Type of resource (always 'knowledgebase_document')","enum":["knowledgebase_document"],"example":"knowledgebase_document","type":"string"}},"required":["content","content_sha256","content_type","id","knowledgebase_id","latest_revision_id","latest_revision_number","path","size_bytes","status","type"],"title":"KnowledgebaseDocument_Details","type":"object"},"AgentDeployment_Summary":{"properties":{"account_id":{"$ref":"#/components/schemas/Account_Id"},"agent_id":{"$ref":"#/components/schemas/Agent_Id"},"current_version_id":{"description":"Pinned current version for this deployment, if any.","oneOf":[{"$ref":"#/components/schemas/AgentVersion_Id"},{"$ref":"#/components/schemas/Null"}]},"environment_id":{"$ref":"#/components/schemas/Environment_Id"},"id":{"$ref":"#/components/schemas/AgentDeployment_Id"},"inserted_at":{"description":"When the deployment was created","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},"type":{"description":"Type of resource (always 'agent_deployment')","enum":["agent_deployment"],"example":"agent_deployment","type":"string"},"updated_at":{"description":"When the deployment was last updated","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"}},"required":["account_id","agent_id","current_version_id","environment_id","id","inserted_at","type","updated_at"],"title":"AgentDeployment_Summary","type":"object"},"AgentInstance_RiskScore":{"properties":{"all_data_categories":{"description":"Unique included data categories across params and results of span types that ran, in canonical order","items":{"description":"Included data category from an observed span type","enum":["personal_identifiers","contact_information","financial_information","health_and_medical","criminal_justice","authentication_and_secrets","organisational_confidential","minors_data","location_and_tracking","behavioural_and_inferred","gdpr_racial_or_ethnic_origin","gdpr_political_opinions","gdpr_religious_or_philosophical_beliefs","gdpr_trade_union_membership","gdpr_genetic_data","gdpr_biometric_for_identification","gdpr_sex_life_or_sexual_orientation"],"example":"personal_identifiers","type":"string"},"type":"array"},"allowed_actions":{"description":"Actions allowed by at least one span type that ran in this instance, in canonical order","items":{"description":"Action allowed by at least one observed span type","enum":["create_data","read_data","update_data","destroy_data","financial_transactions","external_communication"],"example":"create_data","type":"string"},"type":"array"},"any_assessable":{"description":"Whether the instance has at least one span type with scoreable data_risk","type":"boolean"},"critical_threshold":{"description":"Critical threshold from the agent's risk profile ruleset","example":100.0,"type":"number"},"peak_classification":{"oneOf":[{"description":"Peak observed data risk classification across all spans in this instance. null if no spans have executed.","enum":["unknown","public","internal","confidential","restricted","secret"],"example":"confidential","type":"string"},{"$ref":"#/components/schemas/Null"}]},"per_type":{"description":"Per-schema-type score breakdown","items":{"$ref":"#/components/schemas/AgentInstance_RiskScore_PerType"},"type":"array"},"risk_level":{"oneOf":[{"description":"Overall risk level bucket for this instance, or null when not assessable","enum":["low","medium","high","critical"],"example":"low","type":"string"},{"$ref":"#/components/schemas/Null"}]},"total_score":{"description":"Total risk score across all span types for this instance","example":90.0,"type":"number"}},"required":["all_data_categories","allowed_actions","any_assessable","critical_threshold","peak_classification","per_type","risk_level","total_score"],"title":"AgentInstance_RiskScore","type":"object"},"Environment_Details":{"properties":{"account_id":{"$ref":"#/components/schemas/Account_Id"},"description":{"oneOf":[{"description":"Optional free-form description","type":"string"},{"$ref":"#/components/schemas/Null"}]},"external_identifier":{"oneOf":[{"description":"External identifier for this environment in an external system (unique per account)","example":"env-abc123","type":"string"},{"$ref":"#/components/schemas/Null"}]},"id":{"$ref":"#/components/schemas/Environment_Id"},"name":{"description":"Environment name","example":"Development","type":"string"},"purpose":{"description":"Environment purpose","enum":["development","staging","testing","production"],"example":"development","type":"string"},"type":{"description":"Type of resource (always 'environment')","enum":["environment"],"example":"environment","type":"string"}},"required":["account_id","description","external_identifier","id","name","purpose","type"],"title":"Environment_Details","type":"object"},"AgentInstance_Details":{"properties":{"account_id":{"$ref":"#/components/schemas/Account_Id"},"agent_deployment_id":{"$ref":"#/components/schemas/AgentDeployment_Id"},"agent_id":{"$ref":"#/components/schemas/Agent_Id"},"agent_runtime_engine_id":{"description":"The engine running this instance, present only when a hosted instance has an engine","oneOf":[{"$ref":"#/components/schemas/AgentRuntimeEngine_Id"},{"$ref":"#/components/schemas/Null"}]},"agent_version_id":{"$ref":"#/components/schemas/AgentVersion_Id"},"cost_breakdown":{"description":"LLM token usage and estimated USD costs. Null when the request omits `include_costs`, when costs do not apply, or when there is no token usage.","oneOf":[{"$ref":"#/components/schemas/AgentInstance_CostBreakdown"},{"$ref":"#/components/schemas/Null"}]},"environment_id":{"$ref":"#/components/schemas/Environment_Id"},"execution_mode":{"description":"Whether Prefactor executes this instance (hosted) or an external agent reports telemetry (remote)","enum":["hosted","remote"],"example":"hosted","type":"string"},"external_identifier":{"oneOf":[{"description":"External identifier for this agent instance in an external system (unique per agent)","example":"run-abc123","type":"string"},{"$ref":"#/components/schemas/Null"}]},"finished_at":{"oneOf":[{"description":"When the agent instance finished (null if still in progress)","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},{"$ref":"#/components/schemas/Null"}]},"id":{"$ref":"#/components/schemas/AgentInstance_Id"},"inserted_at":{"description":"When the agent instance was created","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},"last_activity_span_at":{"description":"When this agent instance last had an activity span, quantised to the nearest 30 seconds, or null if none yet","oneOf":[{"example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},{"$ref":"#/components/schemas/Null"}]},"metadata":{"description":"Metadata recorded when the instance was registered, validated against the agent schema version's instance_metadata_schema when present. Values marked $sensitive were stored securely, separate from the rest of the payload, and are returned encoded with $sensitive markers.","oneOf":[{"additionalProperties":true,"type":"object"},{"$ref":"#/components/schemas/Null"}]},"params_payload":{"description":"Input payload recorded when the instance was registered, validated against the agent schema version's instance_params_payload_schema when present. Values marked $sensitive were stored securely, separate from the rest of the payload, and are returned encoded with $sensitive markers.","oneOf":[{"additionalProperties":true,"type":"object"},{"$ref":"#/components/schemas/Null"}]},"purpose":{"description":"Why this instance ran: 'live' for an actual agent run, 'smoke_test' for a pipeline check, or 'eval' for an evaluation run","enum":["live","smoke_test","eval"],"example":"live","type":"string"},"quality_payloads":{"additionalProperties":{"additionalProperties":true,"type":"object"},"description":"Map of quality schema name to evaluation payload for this instance. May contain $judge: keys written by Prefactor, which are not in the schema version's quality_schemas.","type":"object"},"quality_summaries":{"additionalProperties":{"description":"Human-readable quality summary rendered from the quality schema template using the matching quality payload","type":"string"},"description":"Map of quality schema name to rendered summary (only names whose template renders)","type":"object"},"raised_alert_count":{"description":"Number of raised alerts for this instance. Null when the request omits `include_alert_count`.","oneOf":[{"minimum":0,"type":"integer"},{"$ref":"#/components/schemas/Null"}]},"result_payload":{"description":"Result payload recorded when the instance finished as complete or failed, validated against the agent schema version's instance_result_payload_schema when present. Null when the instance has not finished, finished as cancelled or terminated, finished as failed, or finished as complete when the result schema allows null. Values marked $sensitive were stored securely, separate from the rest of the payload, and are returned encoded with $sensitive markers.","oneOf":[{"additionalProperties":true,"type":"object"},{"$ref":"#/components/schemas/Null"}]},"risk_score":{"description":"Computed risk score for this instance. Null when the request omits `include_risk_score`, when the agent has no risk profile, or when scoring inputs are unavailable.","oneOf":[{"$ref":"#/components/schemas/AgentInstance_RiskScore"},{"$ref":"#/components/schemas/Null"}]},"span_counts":{"$ref":"#/components/schemas/AgentSpan_SpanCounts"},"span_schema_counts":{"oneOf":[{"$ref":"#/components/schemas/AgentSpan_SpanSchemaCounts"},{"$ref":"#/components/schemas/Null"}]},"started_at":{"oneOf":[{"description":"When the agent instance started (null if not started yet)","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},{"$ref":"#/components/schemas/Null"}]},"status":{"description":"Status of the agent instance: 'preparing' (input not ready yet), 'pending' (ready to start), 'active' (started but not finished), 'complete' (finished successfully), 'failed' (ended with failure), 'cancelled' (never started, cancelled), or 'terminated' (externally terminated)","enum":["preparing","pending","active","complete","failed","cancelled","terminated"],"example":"active","type":"string"},"termination_reason":{"oneOf":[{"description":"Reason for termination (only present when status is 'terminated')","example":"User requested termination","type":"string"},{"$ref":"#/components/schemas/Null"}]},"type":{"description":"Type of resource (always 'agent_instance')","enum":["agent_instance"],"example":"agent_instance","type":"string"},"updated_at":{"description":"When the agent instance was last updated","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"}},"required":["account_id","agent_deployment_id","agent_id","agent_version_id","cost_breakdown","environment_id","execution_mode","external_identifier","finished_at","id","inserted_at","last_activity_span_at","metadata","params_payload","purpose","quality_payloads","quality_summaries","raised_alert_count","result_payload","risk_score","span_counts","span_schema_counts","started_at","status","termination_reason","type","updated_at"],"title":"AgentInstance_Details","type":"object"},"Person_ForCreate":{"properties":{"email":{"type":"string"},"id":{"description":"Optional ID for the person. If not provided, a new ID will be generated. Its embedded timestamp must not be more than 7 days in the past.","oneOf":[{"$ref":"#/components/schemas/Person_Id"},{"$ref":"#/components/schemas/Null"}]},"name":{"type":"string"},"team_ids":{"description":"Team IDs to assign on create (optional)","items":{"$ref":"#/components/schemas/Team_Id"},"type":"array"},"title":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/Null"}]}},"required":["name","email"],"title":"Person_ForCreate","type":"object"},"Alert_Id":{"description":"A valid alert ID","example":"013xrzp12g3nqk8ns6jadrqmpgrjkeny","title":"Alert_Id","type":"string"},"BulkRequest":{"description":"Request body for bulk query/action operations. Allows executing multiple API operations in a single request. Each item runs in its own transaction, processing stops at the first error, and any items after the failing item are omitted from the response.","example":{"items":[{"_type":"agents/list","idempotency_key":"list-agents-2024-01-15-001"},{"_type":"agents/create","details":{"description":"Handles customer support inquiries","name":"Customer Support Bot"},"idempotency_key":"create-agent-2024-01-15-002"},{"_type":"agents/show","agent_id":"agent_xyz789ghi012","idempotency_key":"show-agent-2024-01-15-003"}]},"properties":{"items":{"description":"List of items to process in bulk. Each item is processed sequentially in its own database transaction. Processing stops immediately on the first error: the failing item is included in the response as an error entry, and any items after it are not processed and are omitted from the response.","items":{"additionalProperties":true,"description":"A single item in a bulk request. Each item must include `_type` and `idempotency_key`, plus any additional parameters required by the specific query/action type (e.g., `details` for agents/create, `agent_id` for agents/show).","example":{"_type":"agents/create","details":{"description":"Handles customer support inquiries","name":"Customer Support Bot"},"idempotency_key":"create-agent-2024-01-15-001"},"properties":{"_type":{"description":"The type of query/action to execute (e.g., 'agents/list', 'agents/create')","example":"agents/list","title":"Type","type":"string"},"idempotency_key":{"description":"Required unique idempotency key for this item. Must be 8–128 characters and unique within the request. Used to identify the result in the response map.","example":"create-agent-2024-01-15-001","maxLength":128,"minLength":8,"title":"IdempotencyKey","type":"string"}},"required":["_type","idempotency_key"],"title":"BulkItem","type":"object"},"minItems":1,"title":"Items","type":"array"}},"required":["items"],"title":"BulkRequest","type":"object"},"Environment_DetailsForCreate":{"properties":{"account_id":{"$ref":"#/components/schemas/Account_Id"},"description":{"oneOf":[{"description":"Optional free-form description","type":"string"},{"$ref":"#/components/schemas/Null"}]},"external_identifier":{"oneOf":[{"description":"Optional external identifier for this environment in an external system (unique per account)","example":"env-abc123","type":"string"},{"$ref":"#/components/schemas/Null"}]},"id":{"description":"Optional ID for the environment. If not provided, a new ID will be generated. The ID must be a valid PFID with a partition matching the account. Its embedded timestamp must not be more than 7 days in the past.","oneOf":[{"$ref":"#/components/schemas/Environment_Id"},{"$ref":"#/components/schemas/Null"}]},"name":{"type":"string"},"purpose":{"description":"Environment purpose","enum":["development","staging","testing","production"],"example":"development","type":"string"}},"title":"Environment_DetailsForCreate","type":"object"},"RiskProfile_Id":{"description":"A valid risk profile ID","example":"013xrzp12g3nqk8ns6jadrqmpgrjkeny","title":"RiskProfile_Id","type":"string"},"BulkItem":{"additionalProperties":true,"description":"A single item in a bulk request. Each item must include `_type` and `idempotency_key`, plus any additional parameters required by the specific query/action type (e.g., `details` for agents/create, `agent_id` for agents/show).","example":{"_type":"agents/create","details":{"description":"Handles customer support inquiries","name":"Customer Support Bot"},"idempotency_key":"create-agent-2024-01-15-001"},"properties":{"_type":{"description":"The type of query/action to execute (e.g., 'agents/list', 'agents/create')","example":"agents/list","title":"Type","type":"string"},"idempotency_key":{"description":"Required unique idempotency key for this item. Must be 8–128 characters and unique within the request. Used to identify the result in the response map.","example":"create-agent-2024-01-15-001","maxLength":128,"minLength":8,"title":"IdempotencyKey","type":"string"}},"required":["_type","idempotency_key"],"title":"BulkItem","type":"object"},"BulkResponse":{"description":"Response from bulk query/action operations. Contains a map of results keyed by the idempotency_key from each request item. Processing stops on the first error, so the map includes successful items up to the error plus an error entry for the failing item; items after the failing item are omitted because they were not processed.","example":{"outputs":{"create-agent-2024-01-15-002":{"code":"bad_request","message":"Invalid agent details","status":"error"},"list-agents-2024-01-15-001":{"status":"success","summaries":[{"environment_id":"env_abc123def456","id":"agent_xyz789ghi012","name":"Existing Agent","type":"agent"}]}},"status":"success"},"properties":{"outputs":{"additionalProperties":{"additionalProperties":true,"description":"Output from a query or action. Contains either a success response (with 'status': 'success' and operation-specific data) or an error response (with 'status': 'error', 'code', 'message', and optionally 'errors').","properties":{},"title":"Output","type":"object"},"description":"Map where keys are the idempotency_key values from the request, and values are the corresponding query/action outputs or error responses. Each item is executed in its own transaction and processing stops immediately on the first error: outputs include successful items up to the error plus an error entry for the failing idempotency_key, and items after the failing item are not processed and are omitted from this map.","title":"Outputs","type":"object"},"status":{"description":"Response status, always 'success' when the request is processed","enum":["success"],"example":"success","title":"Status","type":"string"}},"required":["outputs","status"],"title":"BulkResponse","type":"object"},"AgentInstance_Summary":{"properties":{"account_id":{"$ref":"#/components/schemas/Account_Id"},"agent_id":{"$ref":"#/components/schemas/Agent_Id"},"agent_version_id":{"$ref":"#/components/schemas/AgentVersion_Id"},"environment_id":{"$ref":"#/components/schemas/Environment_Id"},"execution_mode":{"description":"Whether Prefactor executes this instance (hosted) or an external agent reports telemetry (remote)","enum":["hosted","remote"],"example":"hosted","type":"string"},"external_identifier":{"oneOf":[{"description":"External identifier for this agent instance in an external system (unique per agent)","example":"run-abc123","type":"string"},{"$ref":"#/components/schemas/Null"}]},"finished_at":{"oneOf":[{"description":"When the agent instance finished (null if still in progress)","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},{"$ref":"#/components/schemas/Null"}]},"id":{"$ref":"#/components/schemas/AgentInstance_Id"},"inserted_at":{"description":"When the agent instance was created","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},"last_activity_span_at":{"description":"When this agent instance last had an activity span, quantised to the nearest 30 seconds, or null if none yet","oneOf":[{"example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},{"$ref":"#/components/schemas/Null"}]},"purpose":{"description":"Why this instance ran: 'live' for an actual agent run, 'smoke_test' for a pipeline check, or 'eval' for an evaluation run","enum":["live","smoke_test","eval"],"example":"live","type":"string"},"raised_alert_count":{"description":"Number of raised alerts for this instance. Null when the request omits `include_alert_count`.","oneOf":[{"minimum":0,"type":"integer"},{"$ref":"#/components/schemas/Null"}]},"risk_score":{"description":"Computed risk score for this instance. Null when the request omits `include_risk_score`, when the agent has no risk profile, or when scoring inputs are unavailable.","oneOf":[{"$ref":"#/components/schemas/AgentInstance_RiskScore"},{"$ref":"#/components/schemas/Null"}]},"started_at":{"oneOf":[{"description":"When the agent instance started (null if not started yet)","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},{"$ref":"#/components/schemas/Null"}]},"status":{"description":"Status of the agent instance: 'preparing' (input not ready yet), 'pending' (ready to start), 'active' (started but not finished), 'complete' (finished successfully), 'failed' (ended with failure), 'cancelled' (never started, cancelled), or 'terminated' (externally terminated)","enum":["preparing","pending","active","complete","failed","cancelled","terminated"],"example":"active","type":"string"},"termination_reason":{"oneOf":[{"description":"Reason for termination (only present when status is 'terminated')","example":"User requested termination","type":"string"},{"$ref":"#/components/schemas/Null"}]},"type":{"description":"Type of resource (always 'agent_instance')","enum":["agent_instance"],"example":"agent_instance","type":"string"},"updated_at":{"description":"When the agent instance was last updated","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"}},"required":["account_id","agent_id","agent_version_id","environment_id","execution_mode","external_identifier","finished_at","id","inserted_at","last_activity_span_at","purpose","raised_alert_count","risk_score","started_at","status","termination_reason","type","updated_at"],"title":"AgentInstance_Summary","type":"object"},"Environment_DetailsForUpdate":{"properties":{"description":{"oneOf":[{"description":"Optional free-form description","type":"string"},{"$ref":"#/components/schemas/Null"}]},"external_identifier":{"oneOf":[{"description":"External identifier for this environment in an external system (omit to keep current)","example":"env-abc123","type":"string"},{"$ref":"#/components/schemas/Null"}]},"name":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/Null"}]},"purpose":{"oneOf":[{"description":"Environment purpose","enum":["development","staging","testing","production"],"example":"development","type":"string"},{"$ref":"#/components/schemas/Null"}]}},"title":"Environment_DetailsForUpdate","type":"object"},"ApiError":{"description":"An error response from the API. A conflict means another request updated the record, and the client may retry that request as is. A revision_conflict must be resubmitted with latest_revision_id as the base revision.","oneOf":[{"properties":{"code":{"enum":["bad_request","bad_authtoken","not_authenticated","not_permitted","not_implemented","unknown","not_found","unexpected_ref_type","unexpected","invalid_action","invalid_state","alert_unknown","alert_already_cleared","invalid_value","required_value","idempotency_key_already_used","temporarily_unavailable","conflict"],"example":"bad_request","type":"string"},"message":{"type":"string"},"status":{"enum":["error"],"example":"error","type":"string"}},"required":["code","message","status"],"type":"object"},{"properties":{"code":{"enum":["validation_errors"],"example":"validation_errors","type":"string"},"errors":{"additionalProperties":{"$ref":"#/components/schemas/ApiError"},"type":"object"},"message":{"type":"string"},"status":{"enum":["error"],"example":"error","type":"string"}},"required":["code","errors","message","status"],"type":"object"},{"properties":{"code":{"enum":["rate_limited"],"example":"rate_limited","type":"string"},"message":{"type":"string"},"retry_after_ms":{"description":"Milliseconds until the client may retry.","minimum":0,"type":"integer"},"status":{"enum":["error"],"example":"error","type":"string"}},"required":["code","message","retry_after_ms","status"],"type":"object"},{"properties":{"code":{"enum":["revision_conflict"],"example":"revision_conflict","type":"string"},"latest_revision_id":{"$ref":"#/components/schemas/KnowledgebaseDocumentRevision_Id"},"message":{"type":"string"},"status":{"enum":["error"],"example":"error","type":"string"}},"required":["code","latest_revision_id","message","status"],"type":"object"}],"title":"ApiError"},"KnowledgebaseRevision_Details":{"description":"Full details of a knowledgebase revision","properties":{"created_by_admin_user_id":{"description":"Admin user who wrote this revision, when the caller was an admin session","oneOf":[{"$ref":"#/components/schemas/AdminUser_Id"},{"$ref":"#/components/schemas/Null"}]},"created_by_api_token_id":{"description":"API token that wrote this revision, when the caller was an API token","oneOf":[{"$ref":"#/components/schemas/ApiToken_Id"},{"$ref":"#/components/schemas/Null"}]},"current":{"description":"Whether this is the revision agents read. Agents read the current revision, which is always the latest revision.","example":true,"type":"boolean"},"document_count":{"description":"Number of active documents after this revision","example":2,"minimum":0,"type":"integer"},"id":{"$ref":"#/components/schemas/KnowledgebaseRevision_Id"},"inserted_at":{"description":"When the revision was created","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},"knowledgebase_id":{"$ref":"#/components/schemas/Knowledgebase_Id"},"revision_number":{"description":"Revision number. It starts at 0 when the knowledgebase is created and increases by one for each document change","example":3,"minimum":0,"type":"integer"},"total_size_bytes":{"description":"Total size in bytes of active documents after this revision","example":128,"minimum":0,"type":"integer"},"type":{"description":"Type of resource (always 'knowledgebase_revision')","enum":["knowledgebase_revision"],"example":"knowledgebase_revision","type":"string"}},"required":["created_by_admin_user_id","created_by_api_token_id","current","document_count","id","inserted_at","knowledgebase_id","revision_number","total_size_bytes","type"],"title":"KnowledgebaseRevision_Details","type":"object"},"AgentSpan_Id":{"description":"A valid agent span ID","example":"013xrzp12g3nqk8ns6jadrqmpgrjkeny","title":"AgentSpan_Id","type":"string"},"AgentSchemaVersionForRegister":{"properties":{"alert_schemas":{"oneOf":[{"description":"Array of alert schemas with name, schema and optional title, description, template and data_risk.","items":{"$ref":"#/components/schemas/SchemaDetails_ForCreate"},"type":"array"},{"$ref":"#/components/schemas/Null"}]},"external_identifier":{"type":"string"},"instance_metadata_schema":{"description":"Single JSON schema validating each agent instance's metadata registered against this schema version. Omit or null for no metadata schema.","oneOf":[{"$ref":"#/components/schemas/SingleSchemaDetails_ForCreate"},{"$ref":"#/components/schemas/Null"}]},"instance_params_payload_schema":{"description":"Single JSON schema validating each agent instance's params_payload registered against this schema version. Omit or null for no params payload schema.","oneOf":[{"$ref":"#/components/schemas/SingleSchemaDetails_ForCreate"},{"$ref":"#/components/schemas/Null"}]},"instance_result_payload_schema":{"description":"Single JSON schema validating each agent instance's result_payload recorded on finish against this schema version. Omit or null for no result payload schema.","oneOf":[{"$ref":"#/components/schemas/SingleSchemaDetails_ForCreate"},{"$ref":"#/components/schemas/Null"}]},"quality_schemas":{"oneOf":[{"description":"Array of quality schemas with name, schema and optional title, description, template and data_risk. Names starting with $ are reserved.","items":{"$ref":"#/components/schemas/SchemaDetails_ForCreate"},"type":"array"},{"$ref":"#/components/schemas/Null"}]},"span_result_schemas":{"deprecated":true,"description":"Deprecated. Use span_type_schemas instead. Optional map of span type names to their result payload JSON schemas. Only used when span_schemas is provided; keys may be a subset of span_schemas; missing keys default to a schema requiring empty object.","oneOf":[{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object"},{"$ref":"#/components/schemas/Null"}]},"span_schemas":{"deprecated":true,"description":"Deprecated. Use span_type_schemas instead. Map of span type names to their JSON schemas.","oneOf":[{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object"},{"$ref":"#/components/schemas/Null"}]},"span_type_schemas":{"oneOf":[{"description":"Array of span types with name, params_schema and optional result_schema.","items":{"$ref":"#/components/schemas/SpanTypeSchemaDetails_ForCreate"},"type":"array"},{"$ref":"#/components/schemas/Null"}]}},"title":"AgentSchemaVersionForRegister","type":"object"},"Person_ForUpdate":{"description":"Parameters for updating a person","properties":{"email":{"description":"Person email address (omit to keep current)","example":"jane@example.com","type":"string"},"name":{"description":"Person name (omit to keep current)","example":"Jane Doe","type":"string"},"team_ids":{"description":"Team IDs to assign (omit to keep current; empty array to clear)","items":{"$ref":"#/components/schemas/Team_Id"},"type":"array"},"title":{"description":"Optional job title (omit to keep current; null to clear)","oneOf":[{"example":"Engineer","type":"string"},{"$ref":"#/components/schemas/Null"}]}},"title":"Person_ForUpdate","type":"object"},"Agent_DetailsForUpdate":{"properties":{"description":{"type":"string"},"name":{"type":"string"},"owner_person_id":{"description":"The owner of this agent (omit to keep current; null to clear)","oneOf":[{"$ref":"#/components/schemas/Person_Id"},{"$ref":"#/components/schemas/Null"}]},"risk_profile_id":{"description":"The risk profile assigned to this agent (omit to keep current; null to clear)","oneOf":[{"$ref":"#/components/schemas/RiskProfile_Id"},{"$ref":"#/components/schemas/Null"}]},"team_id":{"description":"The team this agent belongs to (omit to keep current; null to clear)","oneOf":[{"$ref":"#/components/schemas/Team_Id"},{"$ref":"#/components/schemas/Null"}]}},"title":"Agent_DetailsForUpdate","type":"object"},"AgentAssociation_Details":{"properties":{"account_id":{"$ref":"#/components/schemas/Account_Id"},"association_type":{"description":"Kind of association. For judge, from_agent is the judge and to_agent is the agent it scores","enum":["judge"],"example":"judge","type":"string"},"from_agent_id":{"$ref":"#/components/schemas/Agent_Id"},"id":{"$ref":"#/components/schemas/AgentAssociation_Id"},"inserted_at":{"description":"When the association was created","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},"to_agent_id":{"$ref":"#/components/schemas/Agent_Id"},"trigger":{"description":"When the association runs: on_demand or on_completion. There is no default","enum":["on_demand","on_completion"],"example":"on_demand","type":"string"},"type":{"description":"Type of resource (always 'agent_association')","enum":["agent_association"],"example":"agent_association","type":"string"},"updated_at":{"description":"When the association was last updated","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"}},"required":["account_id","association_type","from_agent_id","id","inserted_at","to_agent_id","trigger","type","updated_at"],"title":"AgentAssociation_Details","type":"object"},"Knowledgebase_Details":{"description":"Full details of a knowledgebase","properties":{"account_id":{"$ref":"#/components/schemas/Account_Id"},"active_document_count":{"description":"Number of active documents","example":4,"minimum":0,"type":"integer"},"description":{"description":"Agents will see the description as part of tool descriptions","oneOf":[{"example":"Policies and runbooks","type":"string"},{"$ref":"#/components/schemas/Null"}]},"id":{"$ref":"#/components/schemas/Knowledgebase_Id"},"name":{"description":"Knowledgebase name","example":"Engineering notes","type":"string"},"revision_number":{"description":"Number of the revision agents read. It starts at 0 when the knowledgebase is created and increases by one for each document change. Agents read the revision with this number, which is always the latest revision.","example":3,"minimum":0,"type":"integer"},"status":{"description":"Whether this knowledgebase is active or archived","enum":["active","archived"],"example":"active","type":"string"},"type":{"description":"Type of resource (always 'knowledgebase')","enum":["knowledgebase"],"example":"knowledgebase","type":"string"}},"required":["account_id","active_document_count","description","id","name","revision_number","status","type"],"title":"Knowledgebase_Details","type":"object"},"LlmProviderModel_DetailsForUpdate":{"description":"Parameters for updating an LLM provider model","properties":{"api_name":{"description":"API model name, unique within the provider ignoring case (omit to keep current)","example":"claude-haiku-4-5","type":"string"},"models_dev_name":{"description":"models.dev identifier. Derived from api_name for managed providers (omit to keep current; null to clear)","oneOf":[{"example":"anthropic/claude-haiku-4-5","type":"string"},{"$ref":"#/components/schemas/Null"}]},"name":{"description":"Model display name, unique within the provider ignoring case. Derived from api_name for managed providers. Required for custom_openai (omit to keep current)","example":"Claude Haiku 4.5","type":"string"}},"title":"LlmProviderModel_DetailsForUpdate","type":"object"},"AdminUser_Details":{"properties":{"account_id":{"$ref":"#/components/schemas/Account_Id"},"email":{"description":"Admin user email","example":"john@example.com","type":"string"},"id":{"$ref":"#/components/schemas/AdminUser_Id"},"inserted_at":{"description":"When the admin user was created","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},"job_title":{"oneOf":[{"description":"Job title within the account","example":"Developer","type":"string"},{"$ref":"#/components/schemas/Null"}]},"last_active_at":{"oneOf":[{"description":"When the admin user was last active; nil means no recorded activity","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},{"$ref":"#/components/schemas/Null"}]},"name":{"oneOf":[{"description":"Admin user name","example":"John Doe","type":"string"},{"$ref":"#/components/schemas/Null"}]},"profile_completed_at":{"oneOf":[{"description":"When the user completed their profile (set on profile completion)","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},{"$ref":"#/components/schemas/Null"}]},"role":{"description":"Access role of the admin user","enum":["read_only","full_access"],"example":"read_only","type":"string"},"switchable_account_summaries":{"description":"Accounts this admin user can switch to","items":{"$ref":"#/components/schemas/Account_Summary"},"type":"array"},"type":{"description":"Type of resource (always 'admin_user')","enum":["admin_user"],"example":"admin_user","type":"string"},"updated_at":{"description":"When the admin user was last updated","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"}},"required":["account_id","email","id","inserted_at","job_title","last_active_at","name","profile_completed_at","role","switchable_account_summaries","type","updated_at"],"title":"AdminUser_Details","type":"object"},"Agent_Id":{"description":"A valid agent ID","example":"013xrzp12g3nqk8ns6jadrqmpgrjkeny","title":"Agent_Id","type":"string"},"KnowledgebaseRevision_Summary":{"description":"Summary of a knowledgebase revision for list responses","properties":{"created_by_admin_user_id":{"description":"Admin user who wrote this revision, when the caller was an admin session","oneOf":[{"$ref":"#/components/schemas/AdminUser_Id"},{"$ref":"#/components/schemas/Null"}]},"created_by_api_token_id":{"description":"API token that wrote this revision, when the caller was an API token","oneOf":[{"$ref":"#/components/schemas/ApiToken_Id"},{"$ref":"#/components/schemas/Null"}]},"current":{"description":"Whether this is the revision agents read. Agents read the current revision, which is always the latest revision.","example":true,"type":"boolean"},"document_count":{"description":"Number of active documents after this revision","example":2,"minimum":0,"type":"integer"},"id":{"$ref":"#/components/schemas/KnowledgebaseRevision_Id"},"inserted_at":{"description":"When the revision was created","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},"knowledgebase_id":{"$ref":"#/components/schemas/Knowledgebase_Id"},"revision_number":{"description":"Revision number. It starts at 0 when the knowledgebase is created and increases by one for each document change","example":3,"minimum":0,"type":"integer"},"total_size_bytes":{"description":"Total size in bytes of active documents after this revision","example":128,"minimum":0,"type":"integer"},"type":{"description":"Type of resource (always 'knowledgebase_revision')","enum":["knowledgebase_revision"],"example":"knowledgebase_revision","type":"string"}},"required":["created_by_admin_user_id","created_by_api_token_id","current","document_count","id","inserted_at","knowledgebase_id","revision_number","total_size_bytes","type"],"title":"KnowledgebaseRevision_Summary","type":"object"},"KnowledgebaseDocument_ForCreate":{"description":"Parameters for creating a knowledgebase document","properties":{"content":{"description":"Document content. Empty content is allowed. Must be valid UTF-8 with no NUL characters, at most 1048576 bytes","example":"# Setup","type":"string"},"content_type":{"description":"MIME type of the document. When omitted, it is inferred from the path extension: .md, .json, .yaml, .yml, and .csv, with text/plain for anything else (optional)","oneOf":[{"enum":["text/markdown","text/plain","application/json","application/yaml","text/csv"],"example":"text/markdown","type":"string"},{"$ref":"#/components/schemas/Null"}]},"id":{"description":"Knowledgebase document ID (optional; a new ID is generated if omitted). Its embedded timestamp must not be more than 7 days in the past.","oneOf":[{"$ref":"#/components/schemas/KnowledgebaseDocument_Id"},{"$ref":"#/components/schemas/Null"}]},"knowledgebase_id":{"$ref":"#/components/schemas/Knowledgebase_Id"},"path":{"description":"Document path, relative, with segments separated by /. At most 1024 characters, with at most 255 characters per segment. Unique among documents in the knowledgebase, ignoring case","example":"guides/setup.md","type":"string"}},"required":["content","knowledgebase_id","path"],"title":"KnowledgebaseDocument_ForCreate","type":"object"},"AgentSchemaVersion_Details":{"properties":{"account_id":{"$ref":"#/components/schemas/Account_Id"},"agent_id":{"$ref":"#/components/schemas/Agent_Id"},"alert_schemas":{"additionalProperties":{"$ref":"#/components/schemas/SchemaDetails"},"description":"Map of alert schema names to their schemas and optional title, description, template and data_risk","type":"object"},"current_agent_deployment_refs":{"description":"Agent deployments whose current version uses this schema version (empty if none).","items":{"$ref":"#/components/schemas/AgentDeployment_Id"},"type":"array"},"external_identifier":{"description":"External identifier for the agent schema version","example":"v0","type":"string"},"external_identifier_repeats":{"description":"Count of rows sharing this external identifier (helps distinguish duplicates).","minimum":0,"type":"integer"},"id":{"$ref":"#/components/schemas/AgentSchemaVersion_Id"},"inserted_at":{"description":"When the agent schema version was created","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},"instance_metadata_schema":{"description":"Single JSON schema validating each agent instance's metadata registered against this schema version. Null when no metadata schema is set.","oneOf":[{"$ref":"#/components/schemas/SingleSchemaDetails"},{"$ref":"#/components/schemas/Null"}]},"instance_params_payload_schema":{"description":"Single JSON schema validating each agent instance's params_payload registered against this schema version. Null when no params payload schema is set.","oneOf":[{"$ref":"#/components/schemas/SingleSchemaDetails"},{"$ref":"#/components/schemas/Null"}]},"instance_result_payload_schema":{"description":"Single JSON schema validating each agent instance's result_payload recorded on finish against this schema version. Null when no result payload schema is set.","oneOf":[{"$ref":"#/components/schemas/SingleSchemaDetails"},{"$ref":"#/components/schemas/Null"}]},"quality_schemas":{"additionalProperties":{"$ref":"#/components/schemas/SchemaDetails"},"description":"Map of quality schema names to their schemas and optional title, description, template and data_risk. Names starting with $ are reserved.","type":"object"},"span_type_schemas":{"additionalProperties":{"$ref":"#/components/schemas/SpanTypeSchemaDetails"},"description":"Map of span type names to their params and result JSON schemas","example":{"llm":{"name":"llm","params_schema":{"properties":{"max_tokens":{"type":"integer"},"model":{"type":"string"},"temperature":{"type":"number"}},"type":"object"},"result_schema":{"properties":{"tokens":{"type":"integer"}},"type":"object"}},"tool":{"name":"tool","params_schema":{"properties":{"input":{"type":"object"},"name":{"type":"string"}},"type":"object"},"result_schema":{"additionalProperties":false,"type":"object"}}},"type":"object"},"type":{"description":"Type of resource (always 'agent_schema_version')","enum":["agent_schema_version"],"example":"agent_schema_version","type":"string"},"updated_at":{"description":"When the agent schema version was last updated","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"}},"required":["account_id","agent_id","alert_schemas","current_agent_deployment_refs","external_identifier","external_identifier_repeats","id","inserted_at","instance_metadata_schema","instance_params_payload_schema","instance_result_payload_schema","quality_schemas","span_type_schemas","type","updated_at"],"title":"AgentSchemaVersion_Details","type":"object"},"SingleSchemaDetails_ForCreate":{"description":"Single schema with schema and optional title, description, template and data_risk","properties":{"data_risk":{"oneOf":[{"$ref":"#/components/schemas/DataRisk"},{"$ref":"#/components/schemas/Null"}]},"description":{"description":"Optional description","oneOf":[{"type":"string"},{"$ref":"#/components/schemas/Null"}]},"schema":{"additionalProperties":true,"description":"JSON schema for the payload","type":"object"},"template":{"description":"Display template. Use {{field}} to interpolate payload fields.","oneOf":[{"type":"string"},{"$ref":"#/components/schemas/Null"}]},"title":{"description":"Human-readable title. Defaults to a fixed internal name when omitted.","oneOf":[{"type":"string"},{"$ref":"#/components/schemas/Null"}]}},"required":["schema"],"title":"SingleSchemaDetails_ForCreate","type":"object"},"AgentAssociation_DetailsForCreate":{"properties":{"association_type":{"description":"Kind of association. Only judge is allowed for now. For a judge association, from_agent must have role judge","enum":["judge"],"example":"judge","type":"string"},"from_agent_id":{"$ref":"#/components/schemas/Agent_Id"},"id":{"description":"Association ID (optional; a new ID is generated if omitted). Its embedded timestamp must not be more than 7 days in the past","oneOf":[{"$ref":"#/components/schemas/AgentAssociation_Id"},{"$ref":"#/components/schemas/Null"}]},"to_agent_id":{"$ref":"#/components/schemas/Agent_Id"},"trigger":{"description":"When the association runs: on_demand or on_completion. There is no default; you must set it","enum":["on_demand","on_completion"],"example":"on_demand","type":"string"}},"required":["association_type","from_agent_id","to_agent_id","trigger"],"title":"AgentAssociation_DetailsForCreate","type":"object"},"Team_Summary":{"description":"Summary of a team for list responses","properties":{"agent_count":{"description":"Number of agents assigned to this team","example":2,"minimum":0,"type":"integer"},"id":{"$ref":"#/components/schemas/Team_Id"},"name":{"description":"Team name","example":"Sales","type":"string"},"people_count":{"description":"Number of people on this team","example":3,"minimum":0,"type":"integer"},"type":{"description":"Type of resource (always 'team')","enum":["team"],"example":"team","type":"string"}},"required":["agent_count","id","name","people_count","type"],"title":"Team_Summary","type":"object"},"Knowledgebase_ForUpdate":{"description":"Parameters for updating a knowledgebase","properties":{"description":{"description":"Agents will see the description as part of tool descriptions. The description is at most 2000 characters (omit to keep current; null to clear)","oneOf":[{"example":"Policies and runbooks","type":"string"},{"$ref":"#/components/schemas/Null"}]},"name":{"description":"Knowledgebase name, unique within the account ignoring case, at most 255 characters (omit to keep current)","example":"Engineering notes","type":"string"}},"title":"Knowledgebase_ForUpdate","type":"object"},"Agent_RiskSummary":{"properties":{"all_data_categories":{"description":"List of all data categories included across span types","items":{"description":"Data category name","type":"string"},"maxItems":18,"type":"array"},"assessed_span_types":{"description":"Number of span types with risk data","minimum":0,"type":"integer"},"classification_counts":{"description":"Count of span types at each classification level","properties":{"confidential":{"minimum":0,"type":"integer"},"internal":{"minimum":0,"type":"integer"},"public":{"minimum":0,"type":"integer"},"restricted":{"minimum":0,"type":"integer"},"secret":{"minimum":0,"type":"integer"},"unknown":{"minimum":0,"type":"integer"}},"type":"object"},"external_communication_count":{"description":"Number of span types with external communication allowed","minimum":0,"type":"integer"},"highest_classification":{"description":"Highest classification level across all span types","enum":["unknown","public","internal","confidential","restricted","secret"],"example":"unknown","type":"string"},"total_span_types":{"description":"Total number of span types","minimum":0,"type":"integer"},"unassessed_span_types":{"description":"Number of span types without risk data","minimum":0,"type":"integer"}},"required":["all_data_categories","assessed_span_types","classification_counts","external_communication_count","highest_classification","total_span_types","unassessed_span_types"],"title":"Agent_RiskSummary","type":"object"},"AdminUser_DetailsForUpdateRole":{"properties":{"role":{"description":"Access role of the admin user","enum":["read_only","full_access"],"example":"read_only","type":"string"}},"required":["role"],"title":"AdminUser_DetailsForUpdateRole","type":"object"},"Sorting":{"description":"Sorting information","properties":{"direction":{"description":"The direction to sort by","enum":["asc","desc"],"example":"asc","type":"string"},"field":{"description":"The field to sort by (values depend on the type of list)","enum":["id","status","started_at","finished_at","email","name","external_identifier","raised_at","cleared_at","severity","last_active_at","last_activity_span_at","last_analyzed_at","last_used_at","inserted_at","mode","agent_instance_id","job_title","pending_clickhouse","pending_s3","profile_completed_at","promo_code","purpose","row_count","size_bytes","token_scope","total","website","expires_at","path","revision_number"],"example":"id","type":"string"},"nulls":{"description":"Where to place null values. `auto` leaves placement to the database default.","enum":["first","last","auto"],"example":"first","type":"string"}},"title":"Sorting","type":"object"},"AgentDeployment_DetailsForUpdate":{"properties":{"current_version_id":{"description":"Current agent version for this deployment.","oneOf":[{"$ref":"#/components/schemas/AgentVersion_Id"},{"$ref":"#/components/schemas/Null"}]}},"title":"AgentDeployment_DetailsForUpdate","type":"object"},"AdminUserInvite_DetailsForCreate":{"properties":{"account_id":{"description":"Account ID (defaults to token's account if not provided)","oneOf":[{"$ref":"#/components/schemas/Account_Id"},{"$ref":"#/components/schemas/Null"}]},"email":{"description":"Email address to send the invite to","example":"user@example.com","type":"string"},"role":{"description":"Access role the invited admin user will receive (optional; defaults to full_access if omitted)","oneOf":[{"enum":["read_only","full_access"],"example":"read_only","type":"string"},{"$ref":"#/components/schemas/Null"}]}},"title":"AdminUserInvite_DetailsForCreate","type":"object"},"KnowledgebaseDocument_Id":{"description":"A valid knowledgebase document ID","example":"013xrzp12g3nqk8ns6jadrqmpgrjkeny","title":"KnowledgebaseDocument_Id","type":"string"},"Environment_Summary":{"properties":{"account_id":{"$ref":"#/components/schemas/Account_Id"},"description":{"oneOf":[{"description":"Optional free-form description","type":"string"},{"$ref":"#/components/schemas/Null"}]},"external_identifier":{"oneOf":[{"description":"External identifier for this environment in an external system (unique per account)","example":"env-abc123","type":"string"},{"$ref":"#/components/schemas/Null"}]},"id":{"$ref":"#/components/schemas/Environment_Id"},"name":{"description":"Environment name","example":"Development","type":"string"},"purpose":{"description":"Environment purpose","enum":["development","staging","testing","production"],"example":"development","type":"string"},"type":{"description":"Type of resource (always 'environment')","enum":["environment"],"example":"environment","type":"string"}},"required":["account_id","description","external_identifier","id","name","purpose","type"],"title":"Environment_Summary","type":"object"},"Type":{"description":"The type of query/action to execute (e.g., 'agents/list', 'agents/create')","example":"agents/list","title":"Type","type":"string"},"AgentSpan_SpanCounts":{"properties":{"active":{"description":"Number of spans with status active (running)","example":2,"minimum":0,"type":"integer"},"cancelled":{"description":"Number of spans with status cancelled","example":0,"minimum":0,"type":"integer"},"complete":{"description":"Number of spans with status complete","example":5,"minimum":0,"type":"integer"},"failed":{"description":"Number of spans with status failed","example":0,"minimum":0,"type":"integer"},"finished":{"description":"Number of spans in a finished state (complete + failed + cancelled)","example":5,"minimum":0,"type":"integer"},"pending":{"deprecated":true,"description":"Deprecated and always zero; span pending status no longer exists","example":0,"minimum":0,"type":"integer"},"total":{"description":"Total number of agent spans","example":10,"minimum":0,"type":"integer"}},"required":["active","cancelled","complete","failed","finished","pending","total"],"title":"AgentSpan_SpanCounts","type":"object"},"Null":{"description":"null","enum":[null],"nullable":true,"title":"Null","type":"string"},"AgentVersion_JudgeTemplate":{"properties":{"criterion":{"description":"Rubric text inserted into the system prompt","example":"Decide whether the agent completed every request that was still active at the end of the run.","type":"string"},"description":{"description":"What this template checks","example":"Checks that the agent completed every request it was given.","type":"string"},"key":{"description":"Stable identifier for this template","example":"completeness","type":"string"},"name":{"description":"Display name of the template","example":"Completeness","type":"string"}},"required":["criterion","description","key","name"],"title":"AgentVersion_JudgeTemplate","type":"object"},"AgentVersionForRegister":{"properties":{"description":{"oneOf":[{"deprecated":true,"description":"Deprecated. Accepted for backward compatibility; ignored. Use agents/update to set the agent description.","type":"string"},{"$ref":"#/components/schemas/Null"}]},"external_identifier":{"type":"string"},"name":{"oneOf":[{"deprecated":true,"description":"Deprecated. Accepted for backward compatibility; ignored. Use agents/update to set the agent name.","type":"string"},{"$ref":"#/components/schemas/Null"}]},"runtime_environment":{"description":"Runtime environment metadata (SDK version, harness version, etc.)","oneOf":[{"$ref":"#/components/schemas/AgentVersion_RuntimeEnvironment"},{"$ref":"#/components/schemas/Null"}]}},"title":"AgentVersionForRegister","type":"object"},"AgentVersion_DetailsForCreate":{"properties":{"agent_id":{"$ref":"#/components/schemas/Agent_Id"},"agent_schema_version_id":{"description":"A valid agent schema version ID, required when execution_mode is remote (optional; omit when execution_mode is hosted to find or create the canonical AgentRuntime span schema)","oneOf":[{"$ref":"#/components/schemas/AgentSchemaVersion_Id"},{"$ref":"#/components/schemas/Null"}]},"description":{"oneOf":[{"deprecated":true,"description":"Deprecated. Accepted for backward compatibility; ignored. Use agents/update to set the agent description.","type":"string"},{"$ref":"#/components/schemas/Null"}]},"execution_mode":{"description":"Whether Prefactor executes this version (hosted) or an external agent reports telemetry (remote) (optional; defaults to remote if omitted)","oneOf":[{"enum":["hosted","remote"],"example":"hosted","type":"string"},{"$ref":"#/components/schemas/Null"}]},"external_identifier":{"type":"string"},"hosted_judge_criterion":{"description":"Criterion rendered into the system prompt when a hosted run starts. When set, hosted_system_prompt is a Liquid template whose only variable is criterion (optional; omit for a literal system prompt)","oneOf":[{"example":"Decide whether the agent completed every request.","type":"string"},{"$ref":"#/components/schemas/Null"}]},"hosted_llm_provider_model_id":{"description":"LLM provider model used when execution_mode is hosted (optional; omit with the other hosted fields for a remote version)","oneOf":[{"$ref":"#/components/schemas/LlmProviderModel_Id"},{"$ref":"#/components/schemas/Null"}]},"hosted_mode":{"description":"Hosted run mode: one model turn, or a conversation (optional; omit with the other hosted fields for a remote version)","oneOf":[{"enum":["single_turn","conversation"],"example":"conversation","type":"string"},{"$ref":"#/components/schemas/Null"}]},"hosted_system_prompt":{"description":"System prompt used when execution_mode is hosted. When hosted_judge_criterion is set, this is a Liquid template and criterion is its only variable (optional; omit with the other hosted fields for a remote version)","oneOf":[{"example":"You are a helpful assistant.","type":"string"},{"$ref":"#/components/schemas/Null"}]},"id":{"description":"Optional ID for the agent version. Used only when creating a new row; ignored if a matching version already exists. If not provided, a new ID will be generated. The ID must be a valid PFID with a partition matching the account. Its embedded timestamp must not be more than 7 days in the past.","oneOf":[{"$ref":"#/components/schemas/AgentVersion_Id"},{"$ref":"#/components/schemas/Null"}]},"name":{"oneOf":[{"deprecated":true,"description":"Deprecated. Accepted for backward compatibility; ignored. Use agents/update to set the agent name.","type":"string"},{"$ref":"#/components/schemas/Null"}]},"runtime_environment":{"description":"Runtime environment metadata (Prefactor SDK packages, agent SDK packages, language runtime, OS, etc.)","oneOf":[{"$ref":"#/components/schemas/AgentVersion_RuntimeEnvironment"},{"$ref":"#/components/schemas/Null"}]}},"title":"AgentVersion_DetailsForCreate","type":"object"},"AgentInstance_RiskScore_PerType":{"properties":{"count":{"description":"Number of span invocations for this schema type","example":3,"minimum":0,"type":"integer"},"risk_level":{"description":"Risk level bucket for this schema type's per-invocation score","enum":["low","medium","high","critical"],"example":"low","type":"string"},"schema_name":{"description":"Span type schema name","example":"process_payment","type":"string"},"total_contribution":{"description":"type_score multiplied by count","example":90.0,"type":"number"},"type_score":{"description":"Risk score for a single invocation of this schema type","example":30.0,"type":"number"}},"required":["count","risk_level","schema_name","total_contribution","type_score"],"title":"AgentInstance_RiskScore_PerType","type":"object"},"Outputs":{"additionalProperties":{"additionalProperties":true,"description":"Output from a query or action. Contains either a success response (with 'status': 'success' and operation-specific data) or an error response (with 'status': 'error', 'code', 'message', and optionally 'errors').","properties":{},"title":"Output","type":"object"},"description":"Map where keys are the idempotency_key values from the request, and values are the corresponding query/action outputs or error responses. Each item is executed in its own transaction and processing stops immediately on the first error: outputs include successful items up to the error plus an error entry for the failing idempotency_key, and items after the failing item are not processed and are omitted from this map.","title":"Outputs","type":"object"},"AgentSpan_SpanSchemaCounts":{"properties":{"by_name":{"additionalProperties":{"minimum":0,"type":"integer"},"description":"Invocation count keyed by span schema name","type":"object"}},"required":["by_name"],"title":"AgentSpan_SpanSchemaCounts","type":"object"},"DataRisk":{"properties":{"action_profile":{"$ref":"#/components/schemas/ActionProfile"},"params_data_categories":{"$ref":"#/components/schemas/DataCategories"},"result_data_categories":{"$ref":"#/components/schemas/DataCategories"}},"required":["action_profile","params_data_categories","result_data_categories"],"title":"DataRisk","type":"object"},"KnowledgebaseDocumentRevision_Id":{"description":"A valid knowledgebase document revision ID","example":"013xrzp12g3nqk8ns6jadrqmpgrjkeny","title":"KnowledgebaseDocumentRevision_Id","type":"string"},"AgentSchemaVersion_DetailsForCreate":{"properties":{"agent_id":{"$ref":"#/components/schemas/Agent_Id"},"alert_schemas":{"oneOf":[{"description":"Array of alert schemas with name, schema and optional title, description, template and data_risk.","items":{"$ref":"#/components/schemas/SchemaDetails_ForCreate"},"type":"array"},{"$ref":"#/components/schemas/Null"}]},"external_identifier":{"type":"string"},"id":{"description":"Optional ID for the agent schema version. Used only when creating a new row; ignored if a matching schema version already exists. If not provided, a new ID will be generated. The ID must be a valid PFID with a partition matching the account. Its embedded timestamp must not be more than 7 days in the past.","oneOf":[{"$ref":"#/components/schemas/AgentSchemaVersion_Id"},{"$ref":"#/components/schemas/Null"}]},"instance_metadata_schema":{"description":"Single JSON schema validating each agent instance's metadata registered against this schema version. Omit or null for no metadata schema.","oneOf":[{"$ref":"#/components/schemas/SingleSchemaDetails_ForCreate"},{"$ref":"#/components/schemas/Null"}]},"instance_params_payload_schema":{"description":"Single JSON schema validating each agent instance's params_payload registered against this schema version. Omit or null for no params payload schema.","oneOf":[{"$ref":"#/components/schemas/SingleSchemaDetails_ForCreate"},{"$ref":"#/components/schemas/Null"}]},"instance_result_payload_schema":{"description":"Single JSON schema validating each agent instance's result_payload recorded on finish against this schema version. Omit or null for no result payload schema.","oneOf":[{"$ref":"#/components/schemas/SingleSchemaDetails_ForCreate"},{"$ref":"#/components/schemas/Null"}]},"quality_schemas":{"oneOf":[{"description":"Array of quality schemas with name, schema and optional title, description, template and data_risk. Names starting with $ are reserved.","items":{"$ref":"#/components/schemas/SchemaDetails_ForCreate"},"type":"array"},{"$ref":"#/components/schemas/Null"}]},"span_result_schemas":{"deprecated":true,"description":"Deprecated. Use span_type_schemas instead. Optional map of span type names to their result payload JSON schemas. Keys may be a subset of span_schemas; missing keys default to a schema requiring empty object. Only used when span_schemas is provided.","oneOf":[{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object"},{"$ref":"#/components/schemas/Null"}]},"span_schemas":{"deprecated":true,"description":"Deprecated. Use span_type_schemas instead. Map of span type names to their JSON schemas.","oneOf":[{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object"},{"$ref":"#/components/schemas/Null"}]},"span_type_schemas":{"oneOf":[{"description":"Array of span types with name, params_schema and optional result_schema.","items":{"$ref":"#/components/schemas/SpanTypeSchemaDetails_ForCreate"},"type":"array"},{"$ref":"#/components/schemas/Null"}]}},"title":"AgentSchemaVersion_DetailsForCreate","type":"object"},"AccountIntegration_Id":{"description":"A valid account integration ID","example":"013xrzp12g3nqk8ns6jadrqmpgrjkeny","title":"AccountIntegration_Id","type":"string"},"KnowledgebaseDocument_ForUpdate":{"description":"Parameters for updating a knowledgebase document","properties":{"content":{"description":"Document content. Empty content is allowed. Must be valid UTF-8 with no NUL characters, at most 1048576 bytes (omit to keep current)","example":"# Setup","type":"string"},"content_type":{"description":"MIME type of the document (omit to keep current)","enum":["text/markdown","text/plain","application/json","application/yaml","text/csv"],"example":"text/markdown","type":"string"}},"title":"KnowledgebaseDocument_ForUpdate","type":"object"},"AgentVersion_Details":{"properties":{"account_id":{"$ref":"#/components/schemas/Account_Id"},"agent_id":{"$ref":"#/components/schemas/Agent_Id"},"agent_schema_version_id":{"$ref":"#/components/schemas/AgentSchemaVersion_Id"},"current_agent_deployment_refs":{"description":"Agent deployments that pin this version as their current version (empty if none).","items":{"$ref":"#/components/schemas/AgentDeployment_Id"},"type":"array"},"execution_mode":{"description":"Whether Prefactor executes this version (hosted) or an external agent reports telemetry (remote)","enum":["hosted","remote"],"example":"hosted","type":"string"},"external_identifier":{"description":"External identifier for the agent version","example":"v1.0.0","type":"string"},"external_identifier_repeats":{"description":"Count of rows sharing this external identifier (helps distinguish duplicates).","minimum":0,"type":"integer"},"hosted_judge_criterion":{"description":"Criterion rendered into the system prompt when a hosted run starts. When set, hosted_system_prompt is a Liquid template whose only variable is criterion","example":"Decide whether the agent completed every request.","type":"string"},"hosted_llm_provider_model_id":{"description":"LLM provider model used when execution_mode is hosted","oneOf":[{"$ref":"#/components/schemas/LlmProviderModel_Id"},{"$ref":"#/components/schemas/Null"}]},"hosted_mode":{"description":"Hosted run mode: one model turn, or a conversation","enum":["single_turn","conversation"],"example":"conversation","type":"string"},"hosted_system_prompt":{"description":"System prompt used when execution_mode is hosted. When hosted_judge_criterion is set, this is a Liquid template and criterion is its only variable","example":"You are a helpful assistant.","type":"string"},"id":{"$ref":"#/components/schemas/AgentVersion_Id"},"inserted_at":{"description":"When the agent version was created","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},"runtime_environment":{"description":"Runtime environment metadata (Prefactor SDK packages, agent SDK packages, language runtime, OS, etc.)","oneOf":[{"$ref":"#/components/schemas/AgentVersion_RuntimeEnvironment"},{"$ref":"#/components/schemas/Null"}]},"type":{"description":"Type of resource (always 'agent_version')","enum":["agent_version"],"example":"agent_version","type":"string"},"updated_at":{"description":"When the agent version was last updated","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"}},"required":["account_id","agent_id","agent_schema_version_id","current_agent_deployment_refs","execution_mode","external_identifier","external_identifier_repeats","id","inserted_at","runtime_environment","type","updated_at"],"title":"AgentVersion_Details","type":"object"},"AgentRuntimeEngine_Id":{"description":"A valid agent runtime engine ID","example":"013xrzp12g3nqk8ns6jadrqmpgrjkeny","title":"AgentRuntimeEngine_Id","type":"string"}},"securitySchemes":{"authorization":{"scheme":"bearer","type":"http"}}},"info":{"title":"Prefactor","version":"1.0"},"openapi":"3.0.0","paths":{"/api/v1/agent_spans/{agent_span_id}":{"get":{"callbacks":{},"deprecated":false,"operationId":"Query.AgentSpan.GetDetails","parameters":[{"in":"path","name":"agent_span_id","required":true,"schema":{"$ref":"#/components/schemas/AgentSpan_Id"}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}},{"in":"query","name":"redacted","required":false,"schema":{"default":false,"description":"When true, strip sensitive values from payload and result_payload, and render the summary with redaction labels. Defaults to false.","type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/AgentSpan_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Fetch agent span","tags":["AgentSpan"]}},"/api/v1/account/{account_id}/implode":{"post":{"callbacks":{},"deprecated":false,"operationId":"Action.Account.Implode","parameters":[{"in":"path","name":"account_id","required":true,"schema":{"$ref":"#/components/schemas/Account_Id"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/Account_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Implode (delete) the account you are authenticated as","tags":["Account"]}},"/api/v1/playground/create_first_account_agent":{"post":{"callbacks":{},"deprecated":false,"operationId":"Action.Playground.CreateFirstAccountAgent","parameters":[{"in":"body","name":"environment_id","required":false,"schema":{"description":"Environment for sample instances. Required when seed_instances_and_spans is true.","oneOf":[{"$ref":"#/components/schemas/Environment_Id"},{"$ref":"#/components/schemas/Null"}]}},{"in":"body","name":"seed_instances_and_spans","required":false,"schema":{"default":false,"description":"When true, register and record all five sample scenarios in environment_id. Defaults to false.","type":"boolean"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"agent":{"$ref":"#/components/schemas/Agent_Details"},"agent_instance_ids":{"items":{"$ref":"#/components/schemas/AgentInstance_Id"},"type":"array"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["agent","agent_instance_ids","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Create the first-account sample Support Chatbot agent","tags":["Playground"]}},"/api/v1/playground/register_northstar_support_agent_instance":{"post":{"callbacks":{},"deprecated":false,"operationId":"Action.Playground.RegisterNorthstarSupportAgentInstance","parameters":[{"in":"body","name":"agent_id","required":true,"schema":{"$ref":"#/components/schemas/Agent_Id"}},{"in":"body","name":"environment_id","required":true,"schema":{"$ref":"#/components/schemas/Environment_Id"}},{"in":"body","name":"id","required":false,"schema":{"description":"Optional instance id. Its embedded timestamp must not be more than 7 days in the past.","oneOf":[{"$ref":"#/components/schemas/AgentInstance_Id"},{"$ref":"#/components/schemas/Null"}]}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"agent_schema_version":{"$ref":"#/components/schemas/AgentSchemaVersion_Details"},"agent_version":{"$ref":"#/components/schemas/AgentVersion_Details"},"details":{"$ref":"#/components/schemas/AgentInstance_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["agent_schema_version","agent_version","details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Register a Northstar support sensitive playground agent instance with demo span schemas","tags":["Playground"]}},"/api/v1/knowledgebase_document/{knowledgebase_document_id}/unarchive":{"post":{"callbacks":{},"deprecated":false,"operationId":"Action.KnowledgebaseDocument.Unarchive","parameters":[{"in":"path","name":"knowledgebase_document_id","required":true,"schema":{"$ref":"#/components/schemas/KnowledgebaseDocument_Id"}},{"description":"ID of the latest revision the caller has seen. The write is rejected when this is not the document's latest revision","in":"body","name":"base_revision_id","required":true,"schema":{"$ref":"#/components/schemas/KnowledgebaseDocumentRevision_Id"}},{"in":"body","name":"path","required":false,"schema":{"description":"Path to give the document (omit to keep current)","oneOf":[{"example":"guides/setup.md","type":"string"},{"$ref":"#/components/schemas/Null"}]}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/KnowledgebaseDocument_Details"},"status":{"description":"Response status when the operation succeeds","enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Unarchive a knowledgebase document","tags":["KnowledgebaseDocument"]}},"/api/v1/team/{team_id}":{"delete":{"callbacks":{},"deprecated":false,"operationId":"Action.Team.Delete","parameters":[{"in":"path","name":"team_id","required":true,"schema":{"$ref":"#/components/schemas/Team_Id"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/Team_Details"},"status":{"description":"Response status when the operation succeeds","enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Delete a team","tags":["Team"]},"get":{"callbacks":{},"deprecated":false,"operationId":"Query.Team.GetDetails","parameters":[{"in":"path","name":"team_id","required":true,"schema":{"$ref":"#/components/schemas/Team_Id"}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/Team_Details"},"status":{"description":"Response status when the query succeeds","enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Get team details","tags":["Team"]},"put":{"callbacks":{},"deprecated":false,"operationId":"Action.Team.Update","parameters":[{"in":"path","name":"team_id","required":true,"schema":{"$ref":"#/components/schemas/Team_Id"}},{"in":"body","name":"details","required":true,"schema":{"$ref":"#/components/schemas/Team_ForUpdate"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/Team_Details"},"status":{"description":"Response status when the operation succeeds","enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Update a team","tags":["Team"]}},"/api/v1/person":{"get":{"callbacks":{},"deprecated":false,"operationId":"Query.Person.List","parameters":[{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}},{"in":"query","name":"team_id","required":false,"schema":{"description":"When a team id, return only people on that team. When `null`, return only people with no team. When omitted, return all people (after permission filtering).","oneOf":[{"$ref":"#/components/schemas/Team_Id"},{"$ref":"#/components/schemas/Null"}]}},{"description":"Sort order; a field name, optionally prefixed with `-` for descending (e.g. `-id`). Supported fields: `id`, `name`, `email`.","in":"query","name":"sorting","required":false,"schema":{"description":"Sort order; a field name, optionally prefixed with `-` for descending (e.g. `-id`). Supported fields: `id`, `name`, `email`.","type":"string"}},{"description":"Zero-based offset of the first item to return.","in":"query","name":"pagination[offset]","required":false,"schema":{"minimum":0,"type":"integer"}},{"description":"Number of items to return per page (1-100).","in":"query","name":"pagination[page_size]","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"pagination":{"oneOf":[{"$ref":"#/components/schemas/PaginationOutput"},{"$ref":"#/components/schemas/Null"}]},"sorting":{"oneOf":[{"$ref":"#/components/schemas/Sorting"},{"$ref":"#/components/schemas/Null"}]},"status":{"enum":["success"],"example":"success","type":"string"},"summaries":{"items":{"$ref":"#/components/schemas/Person_Summary"},"type":"array"}},"required":["pagination","sorting","status","summaries"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"List people","tags":["Person"]},"post":{"callbacks":{},"deprecated":false,"operationId":"Action.Person.Create","parameters":[{"in":"body","name":"details","required":true,"schema":{"$ref":"#/components/schemas/Person_ForCreate"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/Person_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Create a new person","tags":["Person"]}},"/api/v1/playground/register_customer_support_agent_instance":{"post":{"callbacks":{},"deprecated":false,"operationId":"Action.Playground.RegisterCustomerSupportAgentInstance","parameters":[{"in":"body","name":"agent_id","required":true,"schema":{"$ref":"#/components/schemas/Agent_Id"}},{"in":"body","name":"environment_id","required":true,"schema":{"$ref":"#/components/schemas/Environment_Id"}},{"in":"body","name":"id","required":false,"schema":{"description":"Optional instance id. Its embedded timestamp must not be more than 7 days in the past.","oneOf":[{"$ref":"#/components/schemas/AgentInstance_Id"},{"$ref":"#/components/schemas/Null"}]}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"agent_schema_version":{"$ref":"#/components/schemas/AgentSchemaVersion_Details"},"agent_version":{"$ref":"#/components/schemas/AgentVersion_Details"},"details":{"$ref":"#/components/schemas/AgentInstance_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["agent_schema_version","agent_version","details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Register a customer support demo agent instance with support-copilot span schemas","tags":["Playground"]}},"/api/v1/agent_spans":{"get":{"callbacks":{},"deprecated":false,"operationId":"Query.AgentSpan.List","parameters":[{"in":"query","name":"agent_instance_id","schema":{"$ref":"#/components/schemas/AgentInstance_Id"}},{"in":"query","name":"agent_id","schema":{"$ref":"#/components/schemas/Agent_Id"}},{"in":"query","name":"environment_id","required":false,"schema":{"description":"When set with agent_id, only spans from agent instances in this environment are listed.","oneOf":[{"$ref":"#/components/schemas/Environment_Id"},{"$ref":"#/components/schemas/Null"}]}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}},{"in":"query","name":"start_time"},{"in":"query","name":"end_time"},{"in":"query","name":"purpose","required":false,"schema":{"description":"When set, only spans with this purpose are listed: 'activity' (normal agent activity), 'quality' (system-written quality payload updates), or 'alert' (system-written alert lifecycle events). Omit or null to list spans of every purpose.","oneOf":[{"enum":["activity","quality","alert"],"example":"activity","type":"string"},{"$ref":"#/components/schemas/Null"}]}},{"in":"query","name":"alert_id","required":false,"schema":{"description":"When set, only spans for this alert are listed. Typically used with purpose=alert.","oneOf":[{"$ref":"#/components/schemas/Alert_Id"},{"$ref":"#/components/schemas/Null"}]}},{"description":"Sort order; a field name, optionally prefixed with `-` for descending (e.g. `-id`). Supported fields: `id`, `started_at`, `finished_at`, `status`.","in":"query","name":"sorting","required":false,"schema":{"description":"Sort order; a field name, optionally prefixed with `-` for descending (e.g. `-id`). Supported fields: `id`, `started_at`, `finished_at`, `status`.","type":"string"}},{"description":"Zero-based offset of the first item to return.","in":"query","name":"pagination[offset]","required":false,"schema":{"minimum":0,"type":"integer"}},{"description":"Number of items to return per page (1-100).","in":"query","name":"pagination[page_size]","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}},{"in":"query","name":"include_summaries","required":false,"schema":{"default":false,"description":"Include human-readable summaries from schema templates (default: false for performance)","type":"boolean"}},{"in":"query","name":"include_risk_level","required":false,"schema":{"default":false,"description":"When true, score each activity-purpose span against the agent's risk profile and populate `risk_level` and `risk_score` on the summary.","type":"boolean"}},{"in":"query","name":"redacted","required":false,"schema":{"default":false,"description":"When true, strip sensitive values from payload and result_payload, and render the summary with redaction labels. Defaults to false.","type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"pagination":{"oneOf":[{"$ref":"#/components/schemas/PaginationOutput"},{"$ref":"#/components/schemas/Null"}]},"sorting":{"oneOf":[{"$ref":"#/components/schemas/Sorting"},{"$ref":"#/components/schemas/Null"}]},"status":{"enum":["success"],"example":"success","type":"string"},"summaries":{"items":{"$ref":"#/components/schemas/AgentSpan_Summary"},"type":"array"}},"required":["pagination","sorting","status","summaries"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"List agent spans","tags":["AgentSpan"]},"post":{"callbacks":{},"deprecated":false,"operationId":"Action.AgentSpan.Create","parameters":[{"in":"body","name":"details","required":true,"schema":{"$ref":"#/components/schemas/AgentSpan_DetailsForCreate"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"control":{"$ref":"#/components/schemas/AgentSpan_Control"},"details":{"$ref":"#/components/schemas/AgentSpan_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Create a new agent span","tags":["AgentSpan"]}},"/api/v1/knowledgebase_document_revision":{"get":{"callbacks":{},"deprecated":false,"operationId":"Query.KnowledgebaseDocumentRevision.List","parameters":[{"description":"Document whose revisions are listed, newest first","in":"query","name":"knowledgebase_document_id","required":true,"schema":{"$ref":"#/components/schemas/KnowledgebaseDocument_Id"}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}},{"description":"Zero-based offset of the first item to return.","in":"query","name":"pagination[offset]","required":false,"schema":{"minimum":0,"type":"integer"}},{"description":"Number of items to return per page (1-100).","in":"query","name":"pagination[page_size]","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"pagination":{"description":"Pagination metadata when the request included pagination parameters (null when the full list is returned)","oneOf":[{"$ref":"#/components/schemas/PaginationOutput"},{"$ref":"#/components/schemas/Null"}]},"sorting":{"$ref":"#/components/schemas/Sorting"},"status":{"description":"Response status when the query succeeds","enum":["success"],"example":"success","type":"string"},"summaries":{"description":"Revisions of the document, newest first","items":{"$ref":"#/components/schemas/KnowledgebaseDocumentRevision_Summary"},"type":"array"}},"required":["pagination","sorting","status","summaries"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"List knowledgebase document revisions","tags":["KnowledgebaseDocumentRevision"]}},"/api/v1/pfid/generate":{"post":{"callbacks":{},"deprecated":false,"operationId":"Action.Pfid.Generate","parameters":[{"in":"body","name":"account_id","required":false,"schema":{"$ref":"#/components/schemas/Account_Id"}},{"in":"body","name":"count","required":true,"schema":{"description":"Number of PFIDs to generate","minimum":1,"type":"integer"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"account_id":{"$ref":"#/components/schemas/Account_Id"},"pfids":{"description":"Generated PFIDs with matching partition","items":{"example":"013xrzp12g3nqk8ns6jadrqmpgrjkeny","type":"string"},"type":"array"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["account_id","pfids","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Generate new PFIDs with a partition matching the account","tags":["PFID"]}},"/api/v1/agent_version/hosted_judge":{"post":{"callbacks":{},"deprecated":false,"description":"Returns the matching hosted judge version if one already exists for this judge with the same external identifier, system prompt template, criterion, and model. Otherwise creates a new version. The version is hosted and single-turn, uses the canonical judge schema, and records Prefactor's runtime environment. hosted_system_prompt stores the template and hosted_judge_criterion stores the rubric. The runtime renders them when a run starts. The returned version is deployed to the lowest environment.","operationId":"Action.AgentVersion.CreateHostedJudge","parameters":[{"in":"body","name":"details","required":true,"schema":{"$ref":"#/components/schemas/AgentVersion_DetailsForCreateHostedJudge"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/AgentVersion_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Find or create a hosted judge version","tags":["AgentVersion"]}},"/api/v1/account_integration":{"get":{"callbacks":{},"deprecated":false,"operationId":"Query.AccountIntegration.List","parameters":[{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"status":{"enum":["success"],"example":"success","type":"string"},"summaries":{"items":{"$ref":"#/components/schemas/AccountIntegration_Summary"},"type":"array"}},"required":["status","summaries"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"List account integrations","tags":["AccountIntegration"]},"post":{"callbacks":{},"deprecated":false,"operationId":"Action.AccountIntegration.Create","parameters":[{"in":"body","name":"details","required":true,"schema":{"$ref":"#/components/schemas/AccountIntegration_DetailsForCreate"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/AccountIntegration_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Create an account integration","tags":["AccountIntegration"]}},"/api/v1/agent_instance_association/from":{"get":{"callbacks":{},"deprecated":false,"operationId":"Query.AgentInstanceAssociation.ListFrom","parameters":[{"description":"Instances whose outgoing associations to list (the judge runs for a judge association)","in":"query","name":"agent_instance_ids","required":true,"schema":{"items":{"$ref":"#/components/schemas/AgentInstance_Id"},"type":"array"}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}},{"description":"Sort order; a field name, optionally prefixed with `-` for descending (e.g. `-id`). Supported fields: `id`.","in":"query","name":"sorting","required":false,"schema":{"description":"Sort order; a field name, optionally prefixed with `-` for descending (e.g. `-id`). Supported fields: `id`.","type":"string"}},{"description":"Zero-based offset of the first item to return.","in":"query","name":"pagination[offset]","required":false,"schema":{"minimum":0,"type":"integer"}},{"description":"Number of items to return per page (1-100).","in":"query","name":"pagination[page_size]","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"pagination":{"description":"Pagination metadata when the request included pagination parameters (null when the full list is returned)","oneOf":[{"$ref":"#/components/schemas/PaginationOutput"},{"$ref":"#/components/schemas/Null"}]},"sorting":{"oneOf":[{"$ref":"#/components/schemas/Sorting"},{"$ref":"#/components/schemas/Null"}]},"status":{"description":"Response status when the query succeeds","enum":["success"],"example":"success","type":"string"},"summaries":{"description":"Associations where this instance is from_agent_instance","items":{"$ref":"#/components/schemas/AgentInstanceAssociation_Summary"},"type":"array"}},"required":["pagination","sorting","status","summaries"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"List associations from agent instances","tags":["AgentInstanceAssociation"]}},"/api/v1/admin_user_invite/{admin_user_invite_id}/revoke":{"post":{"callbacks":{},"deprecated":false,"operationId":"Action.AdminUserInvite.Revoke","parameters":[{"in":"path","name":"admin_user_invite_id","required":true,"schema":{"$ref":"#/components/schemas/AdminUserInvite_Id"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/AdminUserInvite_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Revoke an admin user invite","tags":["AdminUserInvite"]}},"/api/v1/agent_instance/{agent_instance_id}/terminate":{"post":{"callbacks":{},"deprecated":false,"operationId":"Action.AgentInstance.Terminate","parameters":[{"in":"path","name":"agent_instance_id","required":true,"schema":{"$ref":"#/components/schemas/AgentInstance_Id"}},{"in":"body","name":"reason","required":true,"schema":{"description":"Required reason for termination (e.g. user requested stop, resource limits).","example":"User requested termination","type":"string"}},{"in":"body","name":"timestamp","required":false,"schema":{"oneOf":[{"description":"Termination timestamp (ISO 8601 format). If not provided, current time is used. Must not be more than 7 days in the past. Hosted instances cannot take a timestamp.","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},{"$ref":"#/components/schemas/Null"}]}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/AgentInstance_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Terminate an agent instance","tags":["AgentInstance"]}},"/api/v1/agent_instance/{agent_instance_id}/start":{"post":{"callbacks":{},"deprecated":false,"operationId":"Action.AgentInstance.Start","parameters":[{"in":"path","name":"agent_instance_id","required":true,"schema":{"$ref":"#/components/schemas/AgentInstance_Id"}},{"in":"body","name":"timestamp","required":false,"schema":{"oneOf":[{"description":"Start timestamp (ISO 8601 format). If not provided, current time is used. Must not be more than 7 days in the past. Hosted instances cannot take a timestamp.","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},{"$ref":"#/components/schemas/Null"}]}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/AgentInstance_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Start an agent instance","tags":["AgentInstance"]}},"/api/v1/admin_user_invite":{"get":{"callbacks":{},"deprecated":false,"operationId":"Query.AdminUserInvite.List","parameters":[{"description":"Account ID (defaults to token's account)","in":"query","name":"account_id","schema":{"$ref":"#/components/schemas/Account_Id"}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}},{"description":"Sort order; a field name, optionally prefixed with `-` for descending (e.g. `-id`). Supported fields: `id`, `email`, `status`.","in":"query","name":"sorting","required":false,"schema":{"description":"Sort order; a field name, optionally prefixed with `-` for descending (e.g. `-id`). Supported fields: `id`, `email`, `status`.","type":"string"}},{"description":"Zero-based offset of the first item to return.","in":"query","name":"pagination[offset]","required":false,"schema":{"minimum":0,"type":"integer"}},{"description":"Number of items to return per page (1-100).","in":"query","name":"pagination[page_size]","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"pagination":{"oneOf":[{"$ref":"#/components/schemas/PaginationOutput"},{"$ref":"#/components/schemas/Null"}]},"sorting":{"oneOf":[{"$ref":"#/components/schemas/Sorting"},{"$ref":"#/components/schemas/Null"}]},"status":{"enum":["success"],"example":"success","type":"string"},"summaries":{"items":{"$ref":"#/components/schemas/AdminUserInvite_Summary"},"type":"array"}},"required":["pagination","sorting","status","summaries"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"List admin user invites for an account","tags":["AdminUserInvite"]},"post":{"callbacks":{},"deprecated":false,"operationId":"Action.AdminUserInvite.Create","parameters":[{"in":"body","name":"details","required":true,"schema":{"$ref":"#/components/schemas/AdminUserInvite_DetailsForCreate"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/AdminUserInvite_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Create a new admin user invite","tags":["AdminUserInvite"]}},"/api/v1/agent_instance_association/to":{"get":{"callbacks":{},"deprecated":false,"operationId":"Query.AgentInstanceAssociation.ListTo","parameters":[{"description":"Instance whose incoming associations to list (the judged instance for a judge association)","in":"query","name":"agent_instance_id","required":true,"schema":{"$ref":"#/components/schemas/AgentInstance_Id"}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}},{"description":"Sort order; a field name, optionally prefixed with `-` for descending (e.g. `-id`). Supported fields: `id`.","in":"query","name":"sorting","required":false,"schema":{"description":"Sort order; a field name, optionally prefixed with `-` for descending (e.g. `-id`). Supported fields: `id`.","type":"string"}},{"description":"Zero-based offset of the first item to return.","in":"query","name":"pagination[offset]","required":false,"schema":{"minimum":0,"type":"integer"}},{"description":"Number of items to return per page (1-100).","in":"query","name":"pagination[page_size]","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"pagination":{"description":"Pagination metadata when the request included pagination parameters (null when the full list is returned)","oneOf":[{"$ref":"#/components/schemas/PaginationOutput"},{"$ref":"#/components/schemas/Null"}]},"sorting":{"oneOf":[{"$ref":"#/components/schemas/Sorting"},{"$ref":"#/components/schemas/Null"}]},"status":{"description":"Response status when the query succeeds","enum":["success"],"example":"success","type":"string"},"summaries":{"description":"Associations where this instance is to_agent_instance","items":{"$ref":"#/components/schemas/AgentInstanceAssociation_Summary"},"type":"array"}},"required":["pagination","sorting","status","summaries"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"List associations to an agent instance","tags":["AgentInstanceAssociation"]}},"/api/v1/agent_version/judge_templates":{"get":{"callbacks":{},"deprecated":false,"operationId":"Query.AgentVersion.ListJudgeTemplates","parameters":[{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"default_system_prompt_template":{"description":"Liquid template wrapped around a judge criterion. The only variable is criterion.","example":"You are a judge.\n\n{{ criterion }}","type":"string"},"status":{"enum":["success"],"example":"success","type":"string"},"templates":{"items":{"$ref":"#/components/schemas/AgentVersion_JudgeTemplate"},"type":"array"}},"required":["default_system_prompt_template","status","templates"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"List built-in judge templates","tags":["AgentVersion"]}},"/api/v1/agent_spans/{agent_span_id}/finish":{"post":{"callbacks":{},"deprecated":false,"operationId":"Action.AgentSpan.Finish","parameters":[{"in":"path","name":"agent_span_id","required":true,"schema":{"$ref":"#/components/schemas/AgentSpan_Id"}},{"in":"body","name":"status","required":false,"schema":{"description":"Terminal status: 'complete' (default), 'failed', or 'cancelled'.","enum":["complete","failed","cancelled"],"example":"complete","type":"string"}},{"in":"body","name":"timestamp","required":false,"schema":{"oneOf":[{"description":"Finish timestamp (ISO 8601 format). If not provided, current time is used. Must not be more than 7 days in the past.","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},{"$ref":"#/components/schemas/Null"}]}},{"in":"body","name":"result_payload","required":false,"schema":{"oneOf":[{"additionalProperties":true,"description":"Optional result payload (arbitrary JSON), only set when finishing the span.","type":"object"},{"$ref":"#/components/schemas/Null"}]}},{"in":"body","name":"sensitive_encoding","required":false,"schema":{"default":false,"description":"When true, result_payload is parsed as sensitive-encoded JSON; values marked with $sensitive are extracted and stored securely, separate from the rest of the result_payload. Defaults to false.","type":"boolean"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"control":{"$ref":"#/components/schemas/AgentSpan_Control"},"details":{"$ref":"#/components/schemas/AgentSpan_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Finish an agent span","tags":["AgentSpan"]}},"/api/v1/knowledgebase_document/{knowledgebase_document_id}":{"delete":{"callbacks":{},"deprecated":false,"operationId":"Action.KnowledgebaseDocument.Delete","parameters":[{"in":"path","name":"knowledgebase_document_id","required":true,"schema":{"$ref":"#/components/schemas/KnowledgebaseDocument_Id"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/KnowledgebaseDocument_Details"},"status":{"description":"Response status when the operation succeeds","enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Delete a knowledgebase document","tags":["KnowledgebaseDocument"]},"get":{"callbacks":{},"deprecated":false,"operationId":"Query.KnowledgebaseDocument.GetDetails","parameters":[{"in":"path","name":"knowledgebase_document_id","required":true,"schema":{"$ref":"#/components/schemas/KnowledgebaseDocument_Id"}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/KnowledgebaseDocument_Details"},"status":{"description":"Response status when the query succeeds","enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Get knowledgebase document details","tags":["KnowledgebaseDocument"]},"put":{"callbacks":{},"deprecated":false,"operationId":"Action.KnowledgebaseDocument.Update","parameters":[{"in":"path","name":"knowledgebase_document_id","required":true,"schema":{"$ref":"#/components/schemas/KnowledgebaseDocument_Id"}},{"description":"ID of the latest revision the caller has seen. The write is rejected when this is not the document's latest revision","in":"body","name":"base_revision_id","required":true,"schema":{"$ref":"#/components/schemas/KnowledgebaseDocumentRevision_Id"}},{"in":"body","name":"details","required":true,"schema":{"$ref":"#/components/schemas/KnowledgebaseDocument_ForUpdate"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/KnowledgebaseDocument_Details"},"status":{"description":"Response status when the operation succeeds","enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Update a knowledgebase document","tags":["KnowledgebaseDocument"]}},"/api/v1/agent_instance/{agent_instance_id}/record_quality":{"post":{"callbacks":{},"deprecated":false,"operationId":"Action.AgentInstance.RecordQuality","parameters":[{"in":"path","name":"agent_instance_id","required":true,"schema":{"$ref":"#/components/schemas/AgentInstance_Id"}},{"in":"body","name":"name","required":true,"schema":{"description":"Quality schema name (key in the agent schema version quality_schemas). Names starting with $ are reserved.","example":"summary_quality","type":"string"}},{"in":"body","name":"payload","required":true,"schema":{"description":"Quality payload for this name. Must be a JSON object, or null to remove the recorded payload for this name.","oneOf":[{"additionalProperties":true,"type":"object"},{"$ref":"#/components/schemas/Null"}]}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/AgentInstance_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Record a quality payload on an agent instance","tags":["AgentInstance"]}},"/api/v1/agent_deployment":{"get":{"callbacks":{},"deprecated":false,"operationId":"Query.AgentDeployment.List","parameters":[{"in":"query","name":"agent_id","schema":{"$ref":"#/components/schemas/Agent_Id"}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}},{"description":"Sort order; a field name, optionally prefixed with `-` for descending (e.g. `-id`). Supported fields: `id`.","in":"query","name":"sorting","required":false,"schema":{"description":"Sort order; a field name, optionally prefixed with `-` for descending (e.g. `-id`). Supported fields: `id`.","type":"string"}},{"description":"Zero-based offset of the first item to return.","in":"query","name":"pagination[offset]","required":false,"schema":{"minimum":0,"type":"integer"}},{"description":"Number of items to return per page (1-100).","in":"query","name":"pagination[page_size]","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"pagination":{"oneOf":[{"$ref":"#/components/schemas/PaginationOutput"},{"$ref":"#/components/schemas/Null"}]},"sorting":{"oneOf":[{"$ref":"#/components/schemas/Sorting"},{"$ref":"#/components/schemas/Null"}]},"status":{"enum":["success"],"example":"success","type":"string"},"summaries":{"items":{"$ref":"#/components/schemas/AgentDeployment_Summary"},"type":"array"}},"required":["pagination","sorting","status","summaries"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"List agent deployments","tags":["AgentDeployment"]},"post":{"callbacks":{},"deprecated":false,"operationId":"Action.AgentDeployment.Create","parameters":[{"in":"body","name":"details","required":true,"schema":{"$ref":"#/components/schemas/AgentDeployment_DetailsForCreate"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/AgentDeployment_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Create an agent deployment","tags":["AgentDeployment"]}},"/api/v1/alerts/count":{"get":{"callbacks":{},"deprecated":false,"operationId":"Query.Alert.Count","parameters":[{"in":"query","name":"status","required":false,"schema":{"description":"When set, only alerts with this status are counted.","oneOf":[{"enum":["raised","cleared"],"example":"raised","type":"string"},{"$ref":"#/components/schemas/Null"}]}},{"in":"query","name":"severity","required":false,"schema":{"description":"When set, only alerts with this severity are counted.","oneOf":[{"enum":["critical","error","warning","info"],"example":"warning","type":"string"},{"$ref":"#/components/schemas/Null"}]}},{"in":"query","name":"active_during[start_at]","required":false,"schema":{"description":"When set with finish_at, only alerts active during the range are counted.","oneOf":[{"example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},{"$ref":"#/components/schemas/Null"}]}},{"in":"query","name":"active_during[finish_at]","required":false,"schema":{"description":"When set with start_at, only alerts active during the range are counted.","oneOf":[{"example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},{"$ref":"#/components/schemas/Null"}]}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"count":{"description":"The number of matching alerts","minimum":0,"type":"integer"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["count","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Count alerts","tags":["Alert"]}},"/api/v1/agent_instance/{agent_instance_id}/finish":{"post":{"callbacks":{},"deprecated":false,"operationId":"Action.AgentInstance.Finish","parameters":[{"in":"path","name":"agent_instance_id","required":true,"schema":{"$ref":"#/components/schemas/AgentInstance_Id"}},{"in":"body","name":"status","required":false,"schema":{"description":"Terminal status: 'complete' (default), 'failed', or 'cancelled'. When 'cancelled', the instance must be pending or preparing and both timestamps are set to the (optional) timestamp. Hosted instances cannot take a timestamp. A hosted instance can be cancelled while pending or preparing, or completed while its engine is waiting for a user message. Hosted instances cannot be finished with status failed.","enum":["complete","failed","cancelled"],"example":"complete","type":"string"}},{"in":"body","name":"timestamp","required":false,"schema":{"oneOf":[{"description":"Finish timestamp (ISO 8601 format). If not provided, current time is used. Must not be more than 7 days in the past. Hosted instances cannot take a timestamp.","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},{"$ref":"#/components/schemas/Null"}]}},{"in":"body","name":"result_payload","required":false,"schema":{"description":"Result payload for this agent instance. When status is complete and the schema version has an instance_result_payload_schema, the payload is validated against that schema, including when it is missing (as null). It may be omitted when that schema allows null. Optional when status is failed and that schema is present. When that schema is present, a payload that is sent is validated against it. Only recorded when status is complete or failed; ignored for cancelled. Values marked with $sensitive are extracted and stored securely, separate from the rest of the payload.","oneOf":[{"additionalProperties":true,"type":"object"},{"$ref":"#/components/schemas/Null"}]}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/AgentInstance_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Finish an agent instance","tags":["AgentInstance"]}},"/api/v1/playground/register_openclaw_agent_instance":{"post":{"callbacks":{},"deprecated":false,"operationId":"Action.Playground.RegisterOpenclawAgentInstance","parameters":[{"in":"body","name":"agent_id","required":true,"schema":{"$ref":"#/components/schemas/Agent_Id"}},{"in":"body","name":"environment_id","required":true,"schema":{"$ref":"#/components/schemas/Environment_Id"}},{"in":"body","name":"id","required":false,"schema":{"description":"Optional instance id. Its embedded timestamp must not be more than 7 days in the past.","oneOf":[{"$ref":"#/components/schemas/AgentInstance_Id"},{"$ref":"#/components/schemas/Null"}]}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"agent_schema_version":{"$ref":"#/components/schemas/AgentSchemaVersion_Details"},"agent_version":{"$ref":"#/components/schemas/AgentVersion_Details"},"details":{"$ref":"#/components/schemas/AgentInstance_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["agent_schema_version","agent_version","details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Register an OpenClaw demo agent instance with openclaw span schemas","tags":["Playground"]}},"/api/v1/agent_instance":{"get":{"callbacks":{},"deprecated":false,"operationId":"Query.AgentInstance.List","parameters":[{"in":"query","name":"agent_id","schema":{"$ref":"#/components/schemas/Agent_Id"}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}},{"in":"query","name":"agent_version_id","schema":{"$ref":"#/components/schemas/AgentVersion_Id"}},{"in":"query","name":"active_during[start_at]","required":false,"schema":{"description":"When set with finish_at, only instances whose active range overlaps [start_at, finish_at).","oneOf":[{"example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},{"$ref":"#/components/schemas/Null"}]}},{"in":"query","name":"active_during[finish_at]","required":false,"schema":{"description":"When set with start_at, only instances whose active range overlaps [start_at, finish_at).","oneOf":[{"example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},{"$ref":"#/components/schemas/Null"}]}},{"description":"Sort order; a field name, optionally prefixed with `-` for descending (e.g. `-id`). Supported fields: `id`, `status`, `last_activity_span_at`.","in":"query","name":"sorting","required":false,"schema":{"description":"Sort order; a field name, optionally prefixed with `-` for descending (e.g. `-id`). Supported fields: `id`, `status`, `last_activity_span_at`.","type":"string"}},{"description":"Zero-based offset of the first item to return.","in":"query","name":"pagination[offset]","required":false,"schema":{"minimum":0,"type":"integer"}},{"description":"Number of items to return per page (1-100).","in":"query","name":"pagination[page_size]","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}},{"description":"Return the page that contains this id (page-aligned from offset 0). Do not combine with pagination[offset].","in":"query","name":"pagination[page_with_id]","required":false,"schema":{"$ref":"#/components/schemas/AgentInstance_Id"}},{"in":"query","name":"include_risk_score","required":false,"schema":{"default":false,"description":"Include risk_score in each summary (null when the agent has no risk profile or scoring inputs are unavailable)","type":"boolean"}},{"in":"query","name":"include_alert_count","required":false,"schema":{"default":false,"description":"Include raised_alert_count in the response (counts only alerts the caller may show)","type":"boolean"}},{"in":"query","name":"statuses","required":false,"schema":{"description":"When set, return only instances with one of these statuses. When omitted, return every status.","items":{"enum":["preparing","pending","active","complete","failed","cancelled","terminated"],"example":"active","type":"string"},"type":"array"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"pagination":{"oneOf":[{"$ref":"#/components/schemas/PaginationOutput"},{"$ref":"#/components/schemas/Null"}]},"sorting":{"oneOf":[{"$ref":"#/components/schemas/Sorting"},{"$ref":"#/components/schemas/Null"}]},"status":{"enum":["success"],"example":"success","type":"string"},"summaries":{"items":{"$ref":"#/components/schemas/AgentInstance_Summary"},"type":"array"}},"required":["pagination","sorting","status","summaries"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"List agent instances","tags":["AgentInstance"]},"post":{"callbacks":{},"deprecated":false,"operationId":"Action.AgentInstance.Create","parameters":[{"in":"body","name":"agent_version_id","required":true,"schema":{"$ref":"#/components/schemas/AgentVersion_Id"}},{"in":"body","name":"environment_id","required":true,"schema":{"$ref":"#/components/schemas/Environment_Id"}},{"in":"body","name":"id","required":false,"schema":{"description":"Optional ID for the agent instance. If not provided, a new ID will be generated. The ID must be a valid PFID with a partition matching the account. Its embedded timestamp must not be more than 7 days in the past.","oneOf":[{"$ref":"#/components/schemas/AgentInstance_Id"},{"$ref":"#/components/schemas/Null"}]}},{"in":"body","name":"external_identifier","required":false,"schema":{"description":"External identifier for this agent instance in an external system, unique per agent (optional; omit or null if none)","oneOf":[{"example":"run-abc123","type":"string"},{"$ref":"#/components/schemas/Null"}]}},{"in":"body","name":"purpose","required":false,"schema":{"description":"Instance purpose. Defaults to live.","enum":["live","smoke_test","eval"],"example":"live","type":"string"}},{"in":"body","name":"status","required":false,"schema":{"description":"Status at create. Defaults to pending. Use preparing when the input payload is not ready yet. A preparing instance cannot take params_payload; set it later with the prepare action.","enum":["pending","preparing"],"example":"pending","type":"string"}},{"in":"body","name":"update_current_version","required":false,"schema":{"default":true,"description":"Whether to set this version as the AgentDeployment's current version. Defaults to true.","type":"boolean"}},{"in":"body","name":"params_payload","required":false,"schema":{"description":"Input payload for this agent instance, validated against the agent schema version's instance_params_payload_schema when present. Set when a pending instance is created, or later with the prepare action while the instance is preparing. Omit it when status is preparing. A missing payload on a pending create is validated as null, so it may be omitted when that schema allows null. Values marked with $sensitive are extracted and stored securely, separate from the rest of the payload.","oneOf":[{"additionalProperties":true,"type":"object"},{"$ref":"#/components/schemas/Null"}]}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/AgentInstance_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Create an agent instance from an existing version","tags":["AgentInstance"]}},"/api/v1/agent/{agent_id}":{"delete":{"callbacks":{},"deprecated":false,"operationId":"Action.Agent.Delete","parameters":[{"in":"path","name":"agent_id","required":true,"schema":{"$ref":"#/components/schemas/Agent_Id"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/Agent_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Delete an agent","tags":["Agent"]},"get":{"callbacks":{},"deprecated":false,"operationId":"Query.Agent.GetDetailsById","parameters":[{"in":"path","name":"agent_id","required":true,"schema":{"$ref":"#/components/schemas/Agent_Id"}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}},{"in":"query","name":"environment_id","required":false,"schema":{"description":"When set, risk rollup uses the deployment current version for this environment. When `include_counts` is true, instance counts are scoped to this environment, and observed risk is scoped to activity spans in this environment.","oneOf":[{"$ref":"#/components/schemas/Environment_Id"},{"$ref":"#/components/schemas/Null"}]}},{"in":"query","name":"include_counts","required":false,"schema":{"default":false,"description":"Include instance counts in the response","type":"boolean"}},{"in":"query","name":"include_risk_rollup","required":false,"schema":{"default":false,"description":"Include risk rollup (theoretical and observed risk) in the response","type":"boolean"}},{"in":"query","name":"instances_active_during[start_at]","required":false,"schema":{"description":"Filters instance_counts to instances whose active range overlaps the half-open [start_at, finish_at) range and filters observed risk to activity spans started in the same range. Theoretical risk remains based on the current schema.","oneOf":[{"example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},{"$ref":"#/components/schemas/Null"}]}},{"in":"query","name":"instances_active_during[finish_at]","required":false,"schema":{"description":"Filters instance_counts to instances whose active range overlaps the half-open [start_at, finish_at) range and filters observed risk to activity spans started in the same range. Theoretical risk remains based on the current schema.","oneOf":[{"example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},{"$ref":"#/components/schemas/Null"}]}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/Agent_Details"},"risk_rollup":{"$ref":"#/components/schemas/Agent_RiskRollup"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"title":"Agent_GetDetailsOutput","type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Fetch agent","tags":["Agent"]},"put":{"callbacks":{},"deprecated":false,"operationId":"Action.Agent.Update","parameters":[{"in":"path","name":"agent_id","required":true,"schema":{"$ref":"#/components/schemas/Agent_Id"}},{"in":"body","name":"details","required":true,"schema":{"$ref":"#/components/schemas/Agent_DetailsForUpdate"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/Agent_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Update an agent","tags":["Agent"]}},"/api/v1/agent_instance_association/{agent_instance_association_id}":{"get":{"callbacks":{},"deprecated":false,"operationId":"Query.AgentInstanceAssociation.GetDetails","parameters":[{"in":"path","name":"agent_instance_association_id","required":true,"schema":{"$ref":"#/components/schemas/AgentInstanceAssociation_Id"}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/AgentInstanceAssociation_Details"},"status":{"description":"Response status when the query succeeds","enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Fetch agent instance association","tags":["AgentInstanceAssociation"]}},"/api/v1/agent_instance/{agent_instance_id}":{"get":{"callbacks":{},"deprecated":false,"operationId":"Query.AgentInstance.GetDetailsById","parameters":[{"in":"path","name":"agent_instance_id","required":true,"schema":{"$ref":"#/components/schemas/AgentInstance_Id"}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}},{"in":"query","name":"include_counts","required":false,"schema":{"default":false,"description":"Include span_counts and span_schema_counts in the response","type":"boolean"}},{"in":"query","name":"include_costs","required":false,"schema":{"default":false,"description":"Include cost_breakdown in the response (null when costs do not apply or there is no token usage)","type":"boolean"}},{"in":"query","name":"include_risk_score","required":false,"schema":{"default":false,"description":"Include risk_score in the response (null when the agent has no risk profile or scoring inputs are unavailable)","type":"boolean"}},{"in":"query","name":"include_alert_count","required":false,"schema":{"default":false,"description":"Include raised_alert_count in the response (counts only alerts the caller may show)","type":"boolean"}},{"in":"query","name":"time_range[start_at]","required":false,"schema":{"oneOf":[{"example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},{"$ref":"#/components/schemas/Null"}]}},{"in":"query","name":"time_range[finish_at]","required":false,"schema":{"oneOf":[{"example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},{"$ref":"#/components/schemas/Null"}]}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/AgentInstance_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Fetch agent instance","tags":["AgentInstance"]}},"/api/v1/alerts":{"get":{"callbacks":{},"deprecated":false,"operationId":"Query.Alert.List","parameters":[{"in":"query","name":"agent_instance_id","required":false,"schema":{"description":"When set, only alerts for this agent instance are listed.","oneOf":[{"$ref":"#/components/schemas/AgentInstance_Id"},{"$ref":"#/components/schemas/Null"}]}},{"in":"query","name":"agent_id","required":false,"schema":{"description":"When set, only alerts for this agent are listed.","oneOf":[{"$ref":"#/components/schemas/Agent_Id"},{"$ref":"#/components/schemas/Null"}]}},{"in":"query","name":"environment_id","required":false,"schema":{"description":"When set, only alerts in this environment are listed.","oneOf":[{"$ref":"#/components/schemas/Environment_Id"},{"$ref":"#/components/schemas/Null"}]}},{"in":"query","name":"status","required":false,"schema":{"description":"When set, only alerts with this status are listed.","oneOf":[{"enum":["raised","cleared"],"example":"raised","type":"string"},{"$ref":"#/components/schemas/Null"}]}},{"in":"query","name":"severity","required":false,"schema":{"description":"When set, only alerts with this severity are listed.","oneOf":[{"enum":["critical","error","warning","info"],"example":"warning","type":"string"},{"$ref":"#/components/schemas/Null"}]}},{"in":"query","name":"name","required":false,"schema":{"description":"When set, only alerts with this name (alert schema key) are listed.","oneOf":[{"example":"high_error_rate","type":"string"},{"$ref":"#/components/schemas/Null"}]}},{"in":"query","name":"active_during[start_at]","required":false,"schema":{"description":"When set with finish_at, only alerts whose raised range overlaps [start_at, finish_at).","oneOf":[{"example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},{"$ref":"#/components/schemas/Null"}]}},{"in":"query","name":"active_during[finish_at]","required":false,"schema":{"description":"When set with start_at, only alerts whose raised range overlaps [start_at, finish_at).","oneOf":[{"example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},{"$ref":"#/components/schemas/Null"}]}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}},{"description":"Sort order; a field name, optionally prefixed with `-` for descending (e.g. `-id`). Supported fields: `id`, `raised_at`, `cleared_at`, `name`, `severity`. Descending `severity` puts critical first because severity is stored as a magnitude. When omitted, the default order is raised first, then severity descending, then cleared_at descending, then name ascending.","in":"query","name":"sorting","required":false,"schema":{"description":"Sort order; a field name, optionally prefixed with `-` for descending (e.g. `-id`). Supported fields: `id`, `raised_at`, `cleared_at`, `name`, `severity`. Descending `severity` puts critical first because severity is stored as a magnitude. When omitted, the default order is raised first, then severity descending, then cleared_at descending, then name ascending.","type":"string"}},{"description":"Zero-based offset of the first item to return.","in":"query","name":"pagination[offset]","required":false,"schema":{"minimum":0,"type":"integer"}},{"description":"Number of items to return per page (1-100).","in":"query","name":"pagination[page_size]","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"pagination":{"oneOf":[{"$ref":"#/components/schemas/PaginationOutput"},{"$ref":"#/components/schemas/Null"}]},"sorting":{"oneOf":[{"$ref":"#/components/schemas/Sorting"},{"$ref":"#/components/schemas/Null"}]},"status":{"enum":["success"],"example":"success","type":"string"},"summaries":{"items":{"$ref":"#/components/schemas/Alert_Summary"},"type":"array"}},"required":["pagination","sorting","status","summaries"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"List alerts","tags":["Alert"]}},"/api/v1/agent_version":{"get":{"callbacks":{},"deprecated":false,"operationId":"Query.AgentVersion.List","parameters":[{"in":"query","name":"agent_id","required":true,"schema":{"$ref":"#/components/schemas/Agent_Id"}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}},{"description":"Sort order; a field name, optionally prefixed with `-` for descending (e.g. `-id`). Supported fields: `id`, `external_identifier`.","in":"query","name":"sorting","required":false,"schema":{"description":"Sort order; a field name, optionally prefixed with `-` for descending (e.g. `-id`). Supported fields: `id`, `external_identifier`.","type":"string"}},{"description":"Zero-based offset of the first item to return.","in":"query","name":"pagination[offset]","required":false,"schema":{"minimum":0,"type":"integer"}},{"description":"Number of items to return per page (1-100).","in":"query","name":"pagination[page_size]","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"pagination":{"oneOf":[{"$ref":"#/components/schemas/PaginationOutput"},{"$ref":"#/components/schemas/Null"}]},"sorting":{"oneOf":[{"$ref":"#/components/schemas/Sorting"},{"$ref":"#/components/schemas/Null"}]},"status":{"enum":["success"],"example":"success","type":"string"},"summaries":{"items":{"$ref":"#/components/schemas/AgentVersion_Summary"},"type":"array"}},"required":["pagination","sorting","status","summaries"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"List agent versions","tags":["AgentVersion"]},"post":{"callbacks":{},"deprecated":false,"description":"Returns the matching agent version if one already exists for this agent with the same external identifier, schema version, runtime environment, execution mode, and hosted fields. Otherwise creates a new version. When hosted_judge_criterion is set, hosted_system_prompt must be a Liquid template whose only variable is criterion.","operationId":"Action.AgentVersion.Create","parameters":[{"in":"body","name":"details","required":true,"schema":{"$ref":"#/components/schemas/AgentVersion_DetailsForCreate"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/AgentVersion_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Find or create an agent version","tags":["AgentVersion"]}},"/api/v1/agent_instance/{agent_instance_id}/judge":{"post":{"callbacks":{},"deprecated":false,"operationId":"Action.AgentInstance.Judge","parameters":[{"in":"path","name":"agent_instance_id","required":true,"schema":{"$ref":"#/components/schemas/AgentInstance_Id"}},{"description":"Judge that should score this agent instance","in":"body","name":"judge_agent_id","required":true,"schema":{"$ref":"#/components/schemas/Agent_Id"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/AgentInstance_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Ask a judge to score an agent instance. Creates a preparing judge run and returns it. The run is prepared and started in the background. A hosted judge runs in the highest environment.","tags":["AgentInstance"]}},"/api/v1/knowledgebase_document":{"get":{"callbacks":{},"deprecated":false,"operationId":"Query.KnowledgebaseDocument.List","parameters":[{"description":"Knowledgebase whose documents are listed","in":"query","name":"knowledgebase_id","required":true,"schema":{"$ref":"#/components/schemas/Knowledgebase_Id"}},{"in":"query","name":"path_prefix","required":false,"schema":{"description":"When set, only documents whose path starts with this prefix, ignoring case","oneOf":[{"example":"guides/","type":"string"},{"$ref":"#/components/schemas/Null"}]}},{"in":"query","name":"status","required":false,"schema":{"description":"When set, only documents with this status are listed. When omitted, only active documents are listed.","oneOf":[{"enum":["active","archived"],"example":"active","type":"string"},{"$ref":"#/components/schemas/Null"}]}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}},{"description":"Sort order; a field name, optionally prefixed with `-` for descending (e.g. `-id`). Supported fields: `id`, `path`.","in":"query","name":"sorting","required":false,"schema":{"description":"Sort order; a field name, optionally prefixed with `-` for descending (e.g. `-id`). Supported fields: `id`, `path`.","type":"string"}},{"description":"Zero-based offset of the first item to return.","in":"query","name":"pagination[offset]","required":false,"schema":{"minimum":0,"type":"integer"}},{"description":"Number of items to return per page (1-100).","in":"query","name":"pagination[page_size]","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"pagination":{"description":"Pagination metadata when the request included pagination parameters (null when the full list is returned)","oneOf":[{"$ref":"#/components/schemas/PaginationOutput"},{"$ref":"#/components/schemas/Null"}]},"sorting":{"oneOf":[{"$ref":"#/components/schemas/Sorting"},{"$ref":"#/components/schemas/Null"}]},"status":{"description":"Response status when the query succeeds","enum":["success"],"example":"success","type":"string"},"summaries":{"description":"Documents in the knowledgebase visible to the caller","items":{"$ref":"#/components/schemas/KnowledgebaseDocument_Summary"},"type":"array"}},"required":["pagination","sorting","status","summaries"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"List knowledgebase documents","tags":["KnowledgebaseDocument"]},"post":{"callbacks":{},"deprecated":false,"operationId":"Action.KnowledgebaseDocument.Create","parameters":[{"in":"body","name":"details","required":true,"schema":{"$ref":"#/components/schemas/KnowledgebaseDocument_ForCreate"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/KnowledgebaseDocument_Details"},"status":{"description":"Response status when the operation succeeds","enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Create a knowledgebase document","tags":["KnowledgebaseDocument"]}},"/api/v1/agent_schema_version/{agent_schema_version_id}":{"get":{"callbacks":{},"deprecated":false,"operationId":"Query.AgentSchemaVersion.GetDetails","parameters":[{"in":"path","name":"agent_schema_version_id","required":true,"schema":{"$ref":"#/components/schemas/AgentSchemaVersion_Id"}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/AgentSchemaVersion_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Fetch agent schema version","tags":["AgentSchemaVersion"]}},"/api/v1/playground/record_loan_application_review_spans":{"post":{"callbacks":{},"deprecated":false,"operationId":"Action.Playground.RecordLoanApplicationReviewAgentSpans","parameters":[{"in":"body","name":"agent_instance_id","required":true,"schema":{"$ref":"#/components/schemas/AgentInstance_Id"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"ids":{"items":{"$ref":"#/components/schemas/AgentSpan_Id"},"type":"array"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["ids","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Record loan application review playground spans on an instance","tags":["Playground"]}},"/api/v1/alerts/clear":{"post":{"callbacks":{},"deprecated":false,"operationId":"Action.Alert.Clear","parameters":[{"in":"body","name":"agent_instance_id","required":true,"schema":{"$ref":"#/components/schemas/AgentInstance_Id"}},{"in":"body","name":"name","required":true,"schema":{"description":"Alert name (key in the agent schema version alert_schemas)","example":"high_error_rate","type":"string"}},{"in":"body","name":"payload","required":false,"schema":{"additionalProperties":true,"description":"Optional replacement payload. Omit to leave the stored payload unchanged.","type":"object"}},{"in":"body","name":"severity","required":false,"schema":{"description":"Optional replacement severity. Omit to leave the stored severity unchanged.","enum":["critical","error","warning","info"],"example":"info","type":"string"}},{"in":"body","name":"cleared_at","required":false,"schema":{"description":"Optional clear timestamp (ISO 8601). Sets cleared_at on the alert row and the alert-purpose span times. Omit to use the current time. When provided, must not be more than 7 days in the past.","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"}},{"in":"body","name":"payload_sensitive_encoding","required":false,"schema":{"default":false,"description":"When true, payload is parsed as sensitive-encoded JSON; values marked with $sensitive are extracted and stored securely. Defaults to false.","type":"boolean"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/Alert_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Clear a raised alert on an agent instance","tags":["Alert"]}},"/api/v1/api_token/{api_token_id}/suspend":{"post":{"callbacks":{},"deprecated":false,"operationId":"Action.ApiToken.Suspend","parameters":[{"in":"path","name":"api_token_id","required":true,"schema":{"$ref":"#/components/schemas/ApiToken_Id"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/ApiToken_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Suspend an API token","tags":["ApiToken"]}},"/api/v1/llm_provider/{llm_provider_id}":{"delete":{"callbacks":{},"deprecated":false,"operationId":"Action.LlmProvider.Delete","parameters":[{"in":"path","name":"llm_provider_id","required":true,"schema":{"$ref":"#/components/schemas/LlmProvider_Id"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/LlmProvider_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Delete an LLM provider","tags":["LlmProvider"]},"get":{"callbacks":{},"deprecated":false,"operationId":"Query.LlmProvider.GetDetails","parameters":[{"in":"path","name":"llm_provider_id","required":true,"schema":{"$ref":"#/components/schemas/LlmProvider_Id"}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/LlmProvider_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Fetch LLM provider","tags":["LlmProvider"]},"put":{"callbacks":{},"deprecated":false,"operationId":"Action.LlmProvider.Update","parameters":[{"in":"path","name":"llm_provider_id","required":true,"schema":{"$ref":"#/components/schemas/LlmProvider_Id"}},{"in":"body","name":"details","required":true,"schema":{"$ref":"#/components/schemas/LlmProvider_DetailsForUpdate"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/LlmProvider_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Update an LLM provider","tags":["LlmProvider"]}},"/api/v1/playground/record_openclaw_spans":{"post":{"callbacks":{},"deprecated":false,"operationId":"Action.Playground.RecordOpenclawAgentSpans","parameters":[{"in":"body","name":"agent_instance_id","required":true,"schema":{"$ref":"#/components/schemas/AgentInstance_Id"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"ids":{"items":{"$ref":"#/components/schemas/AgentSpan_Id"},"type":"array"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["ids","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Record a canned OpenClaw conversation on an instance","tags":["Playground"]}},"/api/v1/admin_user_invite/{admin_user_invite_id}/resend":{"post":{"callbacks":{},"deprecated":false,"operationId":"Action.AdminUserInvite.Resend","parameters":[{"in":"path","name":"admin_user_invite_id","required":true,"schema":{"$ref":"#/components/schemas/AdminUserInvite_Id"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/AdminUserInvite_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Resend an admin user invite email","tags":["AdminUserInvite"]}},"/api/v1/team":{"get":{"callbacks":{},"deprecated":false,"operationId":"Query.Team.List","parameters":[{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}},{"description":"Sort order; a field name, optionally prefixed with `-` for descending (e.g. `-id`). Supported fields: `id`, `name`.","in":"query","name":"sorting","required":false,"schema":{"description":"Sort order; a field name, optionally prefixed with `-` for descending (e.g. `-id`). Supported fields: `id`, `name`.","type":"string"}},{"description":"Zero-based offset of the first item to return.","in":"query","name":"pagination[offset]","required":false,"schema":{"minimum":0,"type":"integer"}},{"description":"Number of items to return per page (1-100).","in":"query","name":"pagination[page_size]","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"pagination":{"description":"Pagination metadata when the request included pagination parameters (null when the full list is returned)","oneOf":[{"$ref":"#/components/schemas/PaginationOutput"},{"$ref":"#/components/schemas/Null"}]},"sorting":{"oneOf":[{"$ref":"#/components/schemas/Sorting"},{"$ref":"#/components/schemas/Null"}]},"status":{"description":"Response status when the query succeeds","enum":["success"],"example":"success","type":"string"},"summaries":{"description":"Teams visible to the caller for this account","items":{"$ref":"#/components/schemas/Team_Summary"},"type":"array"}},"required":["pagination","sorting","status","summaries"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"List teams","tags":["Team"]},"post":{"callbacks":{},"deprecated":false,"operationId":"Action.Team.Create","parameters":[{"in":"body","name":"details","required":true,"schema":{"$ref":"#/components/schemas/Team_ForCreate"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/Team_Details"},"status":{"description":"Response status when the operation succeeds","enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Create a new team","tags":["Team"]}},"/api/v1/alerts/raise":{"post":{"callbacks":{},"deprecated":false,"operationId":"Action.Alert.Raise","parameters":[{"in":"body","name":"agent_instance_id","required":true,"schema":{"$ref":"#/components/schemas/AgentInstance_Id"}},{"in":"body","name":"name","required":true,"schema":{"description":"Alert name (key in the agent schema version alert_schemas)","example":"high_error_rate","type":"string"}},{"in":"body","name":"severity","required":true,"schema":{"description":"Severity of the alert","enum":["critical","error","warning","info"],"example":"warning","type":"string"}},{"in":"body","name":"payload","required":true,"schema":{"additionalProperties":true,"description":"Alert payload data (arbitrary JSON object)","type":"object"}},{"in":"body","name":"raised_at","required":false,"schema":{"description":"Optional raise timestamp (ISO 8601). Sets raised_at on insert and the alert-purpose span times. Omit to use the current time. Re-raises leave the stored raised_at unchanged but still use this value for the span when given. When provided, must not be more than 7 days in the past.","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"}},{"in":"body","name":"payload_sensitive_encoding","required":false,"schema":{"default":false,"description":"When true, payload is parsed as sensitive-encoded JSON; values marked with $sensitive are extracted and stored securely. Defaults to false.","type":"boolean"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/Alert_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Raise an alert on an agent instance","tags":["Alert"]}},"/api/v1/agent_schema_version":{"get":{"callbacks":{},"deprecated":false,"operationId":"Query.AgentSchemaVersion.List","parameters":[{"in":"query","name":"agent_id","schema":{"$ref":"#/components/schemas/Agent_Id"}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}},{"description":"Sort order; a field name, optionally prefixed with `-` for descending (e.g. `-id`). Supported fields: `id`, `external_identifier`.","in":"query","name":"sorting","required":false,"schema":{"description":"Sort order; a field name, optionally prefixed with `-` for descending (e.g. `-id`). Supported fields: `id`, `external_identifier`.","type":"string"}},{"description":"Zero-based offset of the first item to return.","in":"query","name":"pagination[offset]","required":false,"schema":{"minimum":0,"type":"integer"}},{"description":"Number of items to return per page (1-100).","in":"query","name":"pagination[page_size]","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"pagination":{"oneOf":[{"$ref":"#/components/schemas/PaginationOutput"},{"$ref":"#/components/schemas/Null"}]},"sorting":{"oneOf":[{"$ref":"#/components/schemas/Sorting"},{"$ref":"#/components/schemas/Null"}]},"status":{"enum":["success"],"example":"success","type":"string"},"summaries":{"items":{"$ref":"#/components/schemas/AgentSchemaVersion_Summary"},"type":"array"}},"required":["pagination","sorting","status","summaries"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"List agent schema versions","tags":["AgentSchemaVersion"]},"post":{"callbacks":{},"deprecated":false,"description":"Returns the matching agent schema version if one already exists for this agent with the same external identifier and schema content. Otherwise creates a new version.","operationId":"Action.AgentSchemaVersion.Create","parameters":[{"in":"body","name":"details","required":true,"schema":{"$ref":"#/components/schemas/AgentSchemaVersion_DetailsForCreate"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/AgentSchemaVersion_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Find or create an agent schema version","tags":["AgentSchemaVersion"]}},"/api/v1/knowledgebase_document/{knowledgebase_document_id}/rename":{"post":{"callbacks":{},"deprecated":false,"operationId":"Action.KnowledgebaseDocument.Rename","parameters":[{"in":"path","name":"knowledgebase_document_id","required":true,"schema":{"$ref":"#/components/schemas/KnowledgebaseDocument_Id"}},{"description":"ID of the latest revision the caller has seen. The write is rejected when this is not the document's latest revision","in":"body","name":"base_revision_id","required":true,"schema":{"$ref":"#/components/schemas/KnowledgebaseDocumentRevision_Id"}},{"in":"body","name":"path","required":true,"schema":{"description":"New document path, relative, with segments separated by /. At most 1024 characters, with at most 255 characters per segment. Unique among documents in the knowledgebase, ignoring case","example":"guides/install.md","type":"string"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/KnowledgebaseDocument_Details"},"status":{"description":"Response status when the operation succeeds","enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Rename a knowledgebase document","tags":["KnowledgebaseDocument"]}},"/api/v1/risk_profile":{"get":{"callbacks":{},"deprecated":false,"operationId":"Query.RiskProfile.List","parameters":[{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}},{"description":"Sort order; a field name, optionally prefixed with `-` for descending (e.g. `-id`). Supported fields: `id`, `name`.","in":"query","name":"sorting","required":false,"schema":{"description":"Sort order; a field name, optionally prefixed with `-` for descending (e.g. `-id`). Supported fields: `id`, `name`.","type":"string"}},{"description":"Zero-based offset of the first item to return.","in":"query","name":"pagination[offset]","required":false,"schema":{"minimum":0,"type":"integer"}},{"description":"Number of items to return per page (1-100).","in":"query","name":"pagination[page_size]","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"pagination":{"oneOf":[{"$ref":"#/components/schemas/PaginationOutput"},{"$ref":"#/components/schemas/Null"}]},"sorting":{"oneOf":[{"$ref":"#/components/schemas/Sorting"},{"$ref":"#/components/schemas/Null"}]},"status":{"enum":["success"],"example":"success","type":"string"},"summaries":{"items":{"$ref":"#/components/schemas/RiskProfile_Summary"},"type":"array"}},"required":["pagination","sorting","status","summaries"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"List risk profiles","tags":["RiskProfile"]},"post":{"callbacks":{},"deprecated":false,"operationId":"Action.RiskProfile.Create","parameters":[{"in":"body","name":"details","required":true,"schema":{"$ref":"#/components/schemas/RiskProfile_ForCreate"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/RiskProfile_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Create a new risk profile","tags":["RiskProfile"]}},"/api/v1/risk_profile/template":{"get":{"callbacks":{},"deprecated":false,"operationId":"Query.RiskProfile.GetTemplateRuleset","parameters":[{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}},{"in":"query","name":"template_name","required":true,"schema":{"description":"Template name (e.g. Permissive, Standard, Financial, Healthcare, Maximum)","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"ruleset":{"$ref":"#/components/schemas/RiskProfile_Ruleset"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["ruleset","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Get risk profile template ruleset","tags":["RiskProfile"]}},"/api/v1/playground/create_customer_support_agent":{"post":{"callbacks":{},"deprecated":false,"operationId":"Action.Playground.CreateCustomerSupportAgent","parameters":[{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"agent":{"$ref":"#/components/schemas/Agent_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["agent","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Create a customer support demo agent","tags":["Playground"]}},"/api/v1/knowledgebase_document/{knowledgebase_document_id}/archive":{"post":{"callbacks":{},"deprecated":false,"operationId":"Action.KnowledgebaseDocument.Archive","parameters":[{"in":"path","name":"knowledgebase_document_id","required":true,"schema":{"$ref":"#/components/schemas/KnowledgebaseDocument_Id"}},{"description":"ID of the latest revision the caller has seen. The write is rejected when this is not the document's latest revision","in":"body","name":"base_revision_id","required":true,"schema":{"$ref":"#/components/schemas/KnowledgebaseDocumentRevision_Id"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/KnowledgebaseDocument_Details"},"status":{"description":"Response status when the operation succeeds","enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Archive a knowledgebase document","tags":["KnowledgebaseDocument"]}},"/api/v1/ping":{"get":{"callbacks":{},"deprecated":false,"operationId":"Query.Ping.Get","parameters":[{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"properties":{"account_id":{"description":"Account ID","example":"013xrzp12g3nqk8ns6jadrqmpgrjkeny","type":"string"},"admin_user_id":{"description":"Admin user ID","example":"013xrzp12g3nqk8ns6jadrqmpgrjkeny","type":"string"},"agent_deployment_id":{"description":"Agent deployment ID","example":"013xrzp12g3nqk8ns6jadrqmpgrjkeny","type":"string"},"agent_id":{"description":"Agent ID","example":"013xrzp12g3nqk8ns6jadrqmpgrjkeny","type":"string"},"api_token_id":{"description":"API token ID","example":"013xrzp12g3nqk8ns6jadrqmpgrjkeny","type":"string"},"environment_id":{"description":"Environment ID","example":"013xrzp12g3nqk8ns6jadrqmpgrjkeny","type":"string"},"superadmin_user_id":{"description":"Superadmin user ID","example":"013xrzp12g3nqk8ns6jadrqmpgrjkeny","type":"string"},"token_type":{"description":"Auth token type","type":"string"}},"required":["token_type"],"type":"object"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Return minimal details for the current token","tags":["Ping"]}},"/api/v1/agent_deployment/{agent_deployment_id}":{"delete":{"callbacks":{},"deprecated":false,"operationId":"Action.AgentDeployment.Delete","parameters":[{"in":"path","name":"agent_deployment_id","required":true,"schema":{"$ref":"#/components/schemas/AgentDeployment_Id"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/AgentDeployment_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Delete an agent deployment","tags":["AgentDeployment"]},"get":{"callbacks":{},"deprecated":false,"operationId":"Query.AgentDeployment.GetDetails","parameters":[{"in":"path","name":"agent_deployment_id","required":true,"schema":{"$ref":"#/components/schemas/AgentDeployment_Id"}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/AgentDeployment_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Fetch agent deployment","tags":["AgentDeployment"]},"put":{"callbacks":{},"deprecated":false,"operationId":"Action.AgentDeployment.Update","parameters":[{"in":"path","name":"agent_deployment_id","required":true,"schema":{"$ref":"#/components/schemas/AgentDeployment_Id"}},{"in":"body","name":"details","required":true,"schema":{"$ref":"#/components/schemas/AgentDeployment_DetailsForUpdate"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/AgentDeployment_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Update an agent deployment","tags":["AgentDeployment"]}},"/api/v1/agent_instance/register":{"post":{"callbacks":{},"deprecated":false,"operationId":"Action.AgentInstance.Register","parameters":[{"in":"body","name":"agent_id","required":false,"schema":{"description":"Agent this instance registers against. Omitting agent_id requires an agent-deployment-scoped API token; the server then uses the token's agent.","oneOf":[{"$ref":"#/components/schemas/Agent_Id"},{"$ref":"#/components/schemas/Null"}]}},{"in":"body","name":"environment_id","required":false,"schema":{"description":"Environment this instance registers against. Send this in all new code. Omitting environment_id requires an agent-deployment-scoped API token; the server then uses the token's environment. When no token is available, omitting it is for backward compatibility only: the server then uses the agent's only deployment, and the request fails if there are zero deployments or more than one.","oneOf":[{"$ref":"#/components/schemas/Environment_Id"},{"$ref":"#/components/schemas/Null"}]}},{"in":"body","name":"id","required":false,"schema":{"description":"Optional ID for the agent instance. If not provided, a new ID will be generated. The ID must be a valid PFID with a partition matching the account. Its embedded timestamp must not be more than 7 days in the past.","oneOf":[{"$ref":"#/components/schemas/AgentInstance_Id"},{"$ref":"#/components/schemas/Null"}]}},{"in":"body","name":"external_identifier","required":false,"schema":{"oneOf":[{"description":"Optional external identifier for this agent instance in an external system (unique per agent).","example":"run-abc123","type":"string"},{"$ref":"#/components/schemas/Null"}]}},{"in":"body","name":"purpose","required":false,"schema":{"default":"live","description":"Why this instance ran: 'live' for an actual agent run, 'smoke_test' for a pipeline check, or 'eval' for an evaluation run. Defaults to 'live'.","enum":["live","smoke_test","eval"],"example":"live","type":"string"}},{"in":"body","name":"agent_version","required":true,"schema":{"properties":{"description":{"oneOf":[{"deprecated":true,"description":"Deprecated. Accepted for backward compatibility; ignored. Use agents/update to set the agent description.","type":"string"},{"$ref":"#/components/schemas/Null"}]},"external_identifier":{"type":"string"},"name":{"oneOf":[{"deprecated":true,"description":"Deprecated. Accepted for backward compatibility; ignored. Use agents/update to set the agent name.","type":"string"},{"$ref":"#/components/schemas/Null"}]},"runtime_environment":{"description":"Runtime environment metadata (SDK version, harness version, etc.)","oneOf":[{"$ref":"#/components/schemas/AgentVersion_RuntimeEnvironment"},{"$ref":"#/components/schemas/Null"}]}},"title":"AgentVersionForRegister","type":"object"}},{"in":"body","name":"agent_schema_version","required":true,"schema":{"properties":{"alert_schemas":{"oneOf":[{"description":"Array of alert schemas with name, schema and optional title, description, template and data_risk.","items":{"$ref":"#/components/schemas/SchemaDetails_ForCreate"},"type":"array"},{"$ref":"#/components/schemas/Null"}]},"external_identifier":{"type":"string"},"instance_metadata_schema":{"description":"Single JSON schema validating each agent instance's metadata registered against this schema version. Omit or null for no metadata schema.","oneOf":[{"$ref":"#/components/schemas/SingleSchemaDetails_ForCreate"},{"$ref":"#/components/schemas/Null"}]},"instance_params_payload_schema":{"description":"Single JSON schema validating each agent instance's params_payload registered against this schema version. Omit or null for no params payload schema.","oneOf":[{"$ref":"#/components/schemas/SingleSchemaDetails_ForCreate"},{"$ref":"#/components/schemas/Null"}]},"instance_result_payload_schema":{"description":"Single JSON schema validating each agent instance's result_payload recorded on finish against this schema version. Omit or null for no result payload schema.","oneOf":[{"$ref":"#/components/schemas/SingleSchemaDetails_ForCreate"},{"$ref":"#/components/schemas/Null"}]},"quality_schemas":{"oneOf":[{"description":"Array of quality schemas with name, schema and optional title, description, template and data_risk. Names starting with $ are reserved.","items":{"$ref":"#/components/schemas/SchemaDetails_ForCreate"},"type":"array"},{"$ref":"#/components/schemas/Null"}]},"span_result_schemas":{"deprecated":true,"description":"Deprecated. Use span_type_schemas instead. Optional map of span type names to their result payload JSON schemas. Only used when span_schemas is provided; keys may be a subset of span_schemas; missing keys default to a schema requiring empty object.","oneOf":[{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object"},{"$ref":"#/components/schemas/Null"}]},"span_schemas":{"deprecated":true,"description":"Deprecated. Use span_type_schemas instead. Map of span type names to their JSON schemas.","oneOf":[{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object"},{"$ref":"#/components/schemas/Null"}]},"span_type_schemas":{"oneOf":[{"description":"Array of span types with name, params_schema and optional result_schema.","items":{"$ref":"#/components/schemas/SpanTypeSchemaDetails_ForCreate"},"type":"array"},{"$ref":"#/components/schemas/Null"}]}},"title":"AgentSchemaVersionForRegister","type":"object"}},{"in":"body","name":"update_current_version","required":false,"schema":{"default":true,"description":"Whether to set this version as the AgentDeployment's current version. Defaults to true.","type":"boolean"}},{"in":"body","name":"params_payload","required":false,"schema":{"description":"Input payload for this agent instance, validated against the agent schema version's instance_params_payload_schema when present. Set when the instance is created. A missing payload is validated as null, so it may be omitted when that schema allows null. Values marked with $sensitive are extracted and stored securely, separate from the rest of the payload.","oneOf":[{"additionalProperties":true,"type":"object"},{"$ref":"#/components/schemas/Null"}]}},{"in":"body","name":"metadata","required":false,"schema":{"description":"Metadata for this agent instance, validated against the agent schema version's instance_metadata_schema when present. Set at register only. The payload may be omitted when that schema accepts an empty object. Values marked with $sensitive are extracted and stored securely, separate from the rest of the payload.","oneOf":[{"additionalProperties":true,"type":"object"},{"$ref":"#/components/schemas/Null"}]}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"agent_schema_version":{"$ref":"#/components/schemas/AgentSchemaVersion_Details"},"agent_version":{"$ref":"#/components/schemas/AgentVersion_Details"},"details":{"$ref":"#/components/schemas/AgentInstance_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["agent_schema_version","agent_version","details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Register a new agent instance with agent version","tags":["AgentInstance"]}},"/api/v1/agent/{agent_id}/retire":{"post":{"callbacks":{},"deprecated":false,"operationId":"Action.Agent.Retire","parameters":[{"in":"path","name":"agent_id","required":true,"schema":{"$ref":"#/components/schemas/Agent_Id"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/Agent_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Retire an agent","tags":["Agent"]}},"/api/v1/agent_version/{agent_version_id}":{"get":{"callbacks":{},"deprecated":false,"operationId":"Query.AgentVersion.GetDetails","parameters":[{"in":"path","name":"agent_version_id","required":true,"schema":{"$ref":"#/components/schemas/AgentVersion_Id"}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/AgentVersion_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Fetch agent version","tags":["AgentVersion"]}},"/api/v1/knowledgebase/{knowledgebase_id}/unarchive":{"post":{"callbacks":{},"deprecated":false,"operationId":"Action.Knowledgebase.Unarchive","parameters":[{"in":"path","name":"knowledgebase_id","required":true,"schema":{"$ref":"#/components/schemas/Knowledgebase_Id"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/Knowledgebase_Details"},"status":{"description":"Response status when the operation succeeds","enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Unarchive a knowledgebase","tags":["Knowledgebase"]}},"/api/v1/environment/show":{"get":{"callbacks":{},"deprecated":false,"operationId":"Query.Environment.GetDetailsByLookup","parameters":[{"description":"Environment id. Provide exactly one of environment_id or external_identifier.","in":"query","name":"environment_id","required":false,"schema":{"$ref":"#/components/schemas/Environment_Id"}},{"in":"query","name":"external_identifier","required":false,"schema":{"description":"External identifier for this environment (exact match). Provide exactly one of environment_id or external_identifier.","type":"string"}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/Environment_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Fetch environment by lookup","tags":["Environment"]}},"/api/v1/knowledgebase/{knowledgebase_id}":{"delete":{"callbacks":{},"deprecated":false,"operationId":"Action.Knowledgebase.Delete","parameters":[{"in":"path","name":"knowledgebase_id","required":true,"schema":{"$ref":"#/components/schemas/Knowledgebase_Id"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/Knowledgebase_Details"},"status":{"description":"Response status when the operation succeeds","enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Delete a knowledgebase","tags":["Knowledgebase"]},"get":{"callbacks":{},"deprecated":false,"operationId":"Query.Knowledgebase.GetDetails","parameters":[{"in":"path","name":"knowledgebase_id","required":true,"schema":{"$ref":"#/components/schemas/Knowledgebase_Id"}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/Knowledgebase_Details"},"status":{"description":"Response status when the query succeeds","enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Get knowledgebase details","tags":["Knowledgebase"]},"put":{"callbacks":{},"deprecated":false,"operationId":"Action.Knowledgebase.Update","parameters":[{"in":"path","name":"knowledgebase_id","required":true,"schema":{"$ref":"#/components/schemas/Knowledgebase_Id"}},{"in":"body","name":"details","required":true,"schema":{"$ref":"#/components/schemas/Knowledgebase_ForUpdate"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/Knowledgebase_Details"},"status":{"description":"Response status when the operation succeeds","enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Update a knowledgebase","tags":["Knowledgebase"]}},"/api/v1/bulk":{"post":{"callbacks":{},"deprecated":false,"description":"Execute multiple API queries and actions in a single HTTP request. This endpoint allows you to batch multiple operations together, reducing the number of round trips to the API.\n\n**Key Features:**\n- Each item in the request is processed independently in its own database transaction\n- Processing stops early if any item returns an error\n- All successfully processed items up to the error are returned\n- Any unprocessed items (after the first error) are excluded from the result\n- All items must include a unique `idempotency_key` (8–128 characters)\n- Results are returned as a map keyed by `idempotency_key`\n- Each item can be a different type of query or action (e.g., list agents, create agent, show agent)\n\n**Supported Types:**\n- `agents/list` - List agents for the account (no extra parameters beyond `idempotency_key`)\n- `agents/show` - Get agent details (requires `agent_id`)\n- `agents/create` - Create a new agent (requires `details` with `name`, optional `description`)\n- `agents/update` - Update an agent (requires `agent_id` and `details`)\n- `environments/list` - List environments for an account (requires `account_id`)\n- `environments/show` - Get environment details (requires `environment_id`)\n- `environments/create` - Create a new environment (requires `details` with `account_id`, `name`)\n- `environments/update` - Update an environment (requires `environment_id` and `details`)\n- `llm_providers/list` - List LLM providers for an account (requires `account_id`)\n- `llm_providers/show` - Get LLM provider details (requires `llm_provider_id`)\n- `llm_providers/create` - Create a new LLM provider (requires `details` with `account_id`, `name`, `provider`, `api_key`; `custom_openai` also requires `api_base_url`)\n- `llm_providers/update` - Update an LLM provider (requires `llm_provider_id` and `details`)\n- `llm_providers/delete` - Delete an LLM provider (requires `llm_provider_id`)\n- `llm_provider_models/list` - List LLM provider models for a provider (requires `llm_provider_id`)\n- `llm_provider_models/show` - Get LLM provider model details (requires `llm_provider_model_id`)\n- `llm_provider_models/create` - Create a new LLM provider model (requires `details` with `llm_provider_id`, `api_name`; models for `custom_openai` also require `name`)\n- `llm_provider_models/update` - Update an LLM provider model (requires `llm_provider_model_id` and `details`)\n- `llm_provider_models/delete` - Delete an LLM provider model (requires `llm_provider_model_id`)\n- And other query/action types as documented in their respective endpoints\n\n**Example Request:**\n```json\n{\n  \"items\": [\n    {\n      \"_type\": \"agents/list\",\n      \"idempotency_key\": \"list-agents-2024-01-15-001\"\n    },\n    {\n      \"_type\": \"agents/create\",\n      \"idempotency_key\": \"create-agent-2024-01-15-002\",\n      \"details\": {\n        \"name\": \"Customer Support Bot\",\n        \"description\": \"Handles customer support inquiries\"\n      }\n    },\n    {\n      \"_type\": \"agents/show\",\n      \"idempotency_key\": \"show-agent-2024-01-15-003\",\n      \"agent_id\": \"agent_xyz789\"\n    }\n  ]\n}\n```\n\n**Example Response:**\n```json\n{\n  \"status\": \"success\",\n  \"outputs\": {\n    \"list-agents-2024-01-15-001\": {\n      \"status\": \"success\",\n      \"summaries\": [...]\n    },\n    \"create-agent-2024-01-15-002\": {\n      \"status\": \"success\",\n      \"details\": {\n        \"type\": \"agent\",\n        \"id\": \"agent_new123\",\n        \"name\": \"Customer Support Bot\",\n        \"description\": \"Handles customer support inquiries\",\n        \"inserted_at\": \"2024-01-15T10:30:00Z\",\n        \"updated_at\": \"2024-01-15T10:30:00Z\"\n      }\n    },\n    \"show-agent-2024-01-15-003\": {\n      \"status\": \"success\",\n      \"details\": {...}\n    }\n  }\n}\n```\n","operationId":"Bulk.Execute","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"description":"Request body for bulk query/action operations. Allows executing multiple API operations in a single request. Each item runs in its own transaction, processing stops at the first error, and any items after the failing item are omitted from the response.","example":{"items":[{"_type":"agents/list","idempotency_key":"list-agents-2024-01-15-001"},{"_type":"agents/create","details":{"description":"Handles customer support inquiries","name":"Customer Support Bot"},"idempotency_key":"create-agent-2024-01-15-002"},{"_type":"agents/show","agent_id":"agent_xyz789ghi012","idempotency_key":"show-agent-2024-01-15-003"}]},"properties":{"items":{"description":"List of items to process in bulk. Each item is processed sequentially in its own database transaction. Processing stops immediately on the first error: the failing item is included in the response as an error entry, and any items after it are not processed and are omitted from the response.","items":{"additionalProperties":true,"description":"A single item in a bulk request. Each item must include `_type` and `idempotency_key`, plus any additional parameters required by the specific query/action type (e.g., `details` for agents/create, `agent_id` for agents/show).","example":{"_type":"agents/create","details":{"description":"Handles customer support inquiries","name":"Customer Support Bot"},"idempotency_key":"create-agent-2024-01-15-001"},"properties":{"_type":{"description":"The type of query/action to execute (e.g., 'agents/list', 'agents/create')","example":"agents/list","title":"Type","type":"string"},"idempotency_key":{"description":"Required unique idempotency key for this item. Must be 8–128 characters and unique within the request. Used to identify the result in the response map.","example":"create-agent-2024-01-15-001","maxLength":128,"minLength":8,"title":"IdempotencyKey","type":"string"}},"required":["_type","idempotency_key"],"title":"BulkItem","type":"object"},"minItems":1,"title":"Items","type":"array"}},"required":["items"],"title":"BulkRequest","type":"object"}}},"description":"Bulk request containing items to process","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"description":"Response from bulk query/action operations. Contains a map of results keyed by the idempotency_key from each request item. Processing stops on the first error, so the map includes successful items up to the error plus an error entry for the failing item; items after the failing item are omitted because they were not processed.","example":{"outputs":{"create-agent-2024-01-15-002":{"code":"bad_request","message":"Invalid agent details","status":"error"},"list-agents-2024-01-15-001":{"status":"success","summaries":[{"environment_id":"env_abc123def456","id":"agent_xyz789ghi012","name":"Existing Agent","type":"agent"}]}},"status":"success"},"properties":{"outputs":{"additionalProperties":{"additionalProperties":true,"description":"Output from a query or action. Contains either a success response (with 'status': 'success' and operation-specific data) or an error response (with 'status': 'error', 'code', 'message', and optionally 'errors').","properties":{},"title":"Output","type":"object"},"description":"Map where keys are the idempotency_key values from the request, and values are the corresponding query/action outputs or error responses. Each item is executed in its own transaction and processing stops immediately on the first error: outputs include successful items up to the error plus an error entry for the failing idempotency_key, and items after the failing item are not processed and are omitted from this map.","title":"Outputs","type":"object"},"status":{"description":"Response status, always 'success' when the request is processed","enum":["success"],"example":"success","title":"Status","type":"string"}},"required":["outputs","status"],"title":"BulkResponse","type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Execute multiple queries/actions in a single request","tags":["Bulk"]}},"/api/v1/api_token/{api_token_id}":{"delete":{"callbacks":{},"deprecated":false,"operationId":"Action.ApiToken.Delete","parameters":[{"in":"path","name":"api_token_id","required":true,"schema":{"$ref":"#/components/schemas/ApiToken_Id"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/ApiToken_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Delete an API token","tags":["ApiToken"]},"get":{"callbacks":{},"deprecated":false,"operationId":"Query.ApiToken.GetDetails","parameters":[{"in":"path","name":"api_token_id","required":true,"schema":{"$ref":"#/components/schemas/ApiToken_Id"}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/ApiToken_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Fetch API token","tags":["ApiToken"]},"put":{"callbacks":{},"deprecated":false,"operationId":"Action.ApiToken.Update","parameters":[{"in":"path","name":"api_token_id","required":true,"schema":{"$ref":"#/components/schemas/ApiToken_Id"}},{"in":"body","name":"details","required":true,"schema":{"$ref":"#/components/schemas/ApiToken_DetailsForUpdate"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/ApiToken_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Update an API token","tags":["ApiToken"]}},"/api/v1/agent_deployment/{agent_deployment_id}/promote":{"post":{"callbacks":{},"deprecated":false,"operationId":"Action.AgentDeployment.Promote","parameters":[{"in":"path","name":"agent_deployment_id","required":true,"schema":{"$ref":"#/components/schemas/AgentDeployment_Id"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/AgentDeployment_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Promote an agent deployment","tags":["AgentDeployment"]}},"/api/v1/agent_instance/{agent_instance_id}/agent_context":{"get":{"callbacks":{},"deprecated":false,"operationId":"Query.AgentInstance.GetAgentContext","parameters":[{"in":"path","name":"agent_instance_id","required":true,"schema":{"$ref":"#/components/schemas/AgentInstance_Id"}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}},{"in":"query","name":"include_risk_level","required":false,"schema":{"default":false,"description":"Score spans against the agent risk profile (default: false)","type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"agent_context":{"$ref":"#/components/schemas/AgentInstance_AgentContext"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["agent_context","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Export agent instance context JSON","tags":["AgentInstance"]}},"/api/v1/account":{"get":{"callbacks":{},"deprecated":false,"operationId":"Query.Account.List","parameters":[{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}},{"description":"Sort order; a field name, optionally prefixed with `-` for descending (e.g. `-id`). Supported fields: `id`, `name`.","in":"query","name":"sorting","required":false,"schema":{"description":"Sort order; a field name, optionally prefixed with `-` for descending (e.g. `-id`). Supported fields: `id`, `name`.","type":"string"}},{"description":"Zero-based offset of the first item to return.","in":"query","name":"pagination[offset]","required":false,"schema":{"minimum":0,"type":"integer"}},{"description":"Number of items to return per page (1-100).","in":"query","name":"pagination[page_size]","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"pagination":{"oneOf":[{"$ref":"#/components/schemas/PaginationOutput"},{"$ref":"#/components/schemas/Null"}]},"sorting":{"oneOf":[{"$ref":"#/components/schemas/Sorting"},{"$ref":"#/components/schemas/Null"}]},"status":{"enum":["success"],"example":"success","type":"string"},"summaries":{"items":{"$ref":"#/components/schemas/Account_Summary"},"type":"array"}},"required":["pagination","sorting","status","summaries"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"List accounts (internal)","tags":["Account"]}},"/api/v1/playground/create_openclaw_agent":{"post":{"callbacks":{},"deprecated":false,"operationId":"Action.Playground.CreateOpenclawAgent","parameters":[{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"agent":{"$ref":"#/components/schemas/Agent_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["agent","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Create an OpenClaw demo agent","tags":["Playground"]}},"/api/v1/llm_provider_model/{llm_provider_model_id}":{"delete":{"callbacks":{},"deprecated":false,"operationId":"Action.LlmProviderModel.Delete","parameters":[{"in":"path","name":"llm_provider_model_id","required":true,"schema":{"$ref":"#/components/schemas/LlmProviderModel_Id"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/LlmProviderModel_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Delete an LLM provider model","tags":["LlmProviderModel"]},"get":{"callbacks":{},"deprecated":false,"operationId":"Query.LlmProviderModel.GetDetails","parameters":[{"in":"path","name":"llm_provider_model_id","required":true,"schema":{"$ref":"#/components/schemas/LlmProviderModel_Id"}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/LlmProviderModel_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Fetch LLM provider model","tags":["LlmProviderModel"]},"put":{"callbacks":{},"deprecated":false,"operationId":"Action.LlmProviderModel.Update","parameters":[{"in":"path","name":"llm_provider_model_id","required":true,"schema":{"$ref":"#/components/schemas/LlmProviderModel_Id"}},{"in":"body","name":"details","required":true,"schema":{"$ref":"#/components/schemas/LlmProviderModel_DetailsForUpdate"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/LlmProviderModel_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Update an LLM provider model","tags":["LlmProviderModel"]}},"/api/v1/playground/register_loan_application_review_agent_instance":{"post":{"callbacks":{},"deprecated":false,"operationId":"Action.Playground.RegisterLoanApplicationReviewAgentInstance","parameters":[{"in":"body","name":"agent_id","required":true,"schema":{"$ref":"#/components/schemas/Agent_Id"}},{"in":"body","name":"environment_id","required":true,"schema":{"$ref":"#/components/schemas/Environment_Id"}},{"in":"body","name":"id","required":false,"schema":{"description":"Optional instance id. Its embedded timestamp must not be more than 7 days in the past.","oneOf":[{"$ref":"#/components/schemas/AgentInstance_Id"},{"$ref":"#/components/schemas/Null"}]}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"agent_schema_version":{"$ref":"#/components/schemas/AgentSchemaVersion_Details"},"agent_version":{"$ref":"#/components/schemas/AgentVersion_Details"},"details":{"$ref":"#/components/schemas/AgentInstance_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["agent_schema_version","agent_version","details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Register a loan application review playground agent instance with demo span schemas","tags":["Playground"]}},"/api/v1/playground/register_quality_review_agent_instance":{"post":{"callbacks":{},"deprecated":false,"operationId":"Action.Playground.RegisterQualityReviewAgentInstance","parameters":[{"in":"body","name":"agent_id","required":true,"schema":{"$ref":"#/components/schemas/Agent_Id"}},{"in":"body","name":"environment_id","required":true,"schema":{"$ref":"#/components/schemas/Environment_Id"}},{"in":"body","name":"id","required":false,"schema":{"description":"Optional instance id. Its embedded timestamp must not be more than 7 days in the past.","oneOf":[{"$ref":"#/components/schemas/AgentInstance_Id"},{"$ref":"#/components/schemas/Null"}]}},{"in":"body","name":"purpose","required":false,"schema":{"default":"live","description":"Why this instance ran: 'live' for an actual agent run, 'smoke_test' for a pipeline check, or 'eval' for an evaluation run. Defaults to 'live'.","enum":["live","smoke_test","eval"],"example":"live","type":"string"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"agent_schema_version":{"$ref":"#/components/schemas/AgentSchemaVersion_Details"},"agent_version":{"$ref":"#/components/schemas/AgentVersion_Details"},"details":{"$ref":"#/components/schemas/AgentInstance_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["agent_schema_version","agent_version","details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Register an article summary quality playground agent instance with demo span and quality schemas","tags":["Playground"]}},"/api/v1/knowledgebase":{"get":{"callbacks":{},"deprecated":false,"operationId":"Query.Knowledgebase.List","parameters":[{"description":"Account ID (defaults to token's account)","in":"query","name":"account_id","schema":{"$ref":"#/components/schemas/Account_Id"}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}},{"in":"query","name":"status","required":false,"schema":{"description":"When set, only knowledgebases with this status are listed. When omitted, only active knowledgebases are listed.","oneOf":[{"enum":["active","archived"],"example":"active","type":"string"},{"$ref":"#/components/schemas/Null"}]}},{"description":"Sort order; a field name, optionally prefixed with `-` for descending (e.g. `-id`). Supported fields: `id`, `name`.","in":"query","name":"sorting","required":false,"schema":{"description":"Sort order; a field name, optionally prefixed with `-` for descending (e.g. `-id`). Supported fields: `id`, `name`.","type":"string"}},{"description":"Zero-based offset of the first item to return.","in":"query","name":"pagination[offset]","required":false,"schema":{"minimum":0,"type":"integer"}},{"description":"Number of items to return per page (1-100).","in":"query","name":"pagination[page_size]","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"pagination":{"description":"Pagination metadata when the request included pagination parameters (null when the full list is returned)","oneOf":[{"$ref":"#/components/schemas/PaginationOutput"},{"$ref":"#/components/schemas/Null"}]},"sorting":{"oneOf":[{"$ref":"#/components/schemas/Sorting"},{"$ref":"#/components/schemas/Null"}]},"status":{"description":"Response status when the query succeeds","enum":["success"],"example":"success","type":"string"},"summaries":{"description":"Knowledgebases visible to the caller for this account","items":{"$ref":"#/components/schemas/Knowledgebase_Summary"},"type":"array"}},"required":["pagination","sorting","status","summaries"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"List knowledgebases","tags":["Knowledgebase"]},"post":{"callbacks":{},"deprecated":false,"operationId":"Action.Knowledgebase.Create","parameters":[{"in":"body","name":"details","required":true,"schema":{"$ref":"#/components/schemas/Knowledgebase_ForCreate"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/Knowledgebase_Details"},"status":{"description":"Response status when the operation succeeds","enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Create a new knowledgebase","tags":["Knowledgebase"]}},"/api/v1/playground/record_customer_support_spans":{"post":{"callbacks":{},"deprecated":false,"operationId":"Action.Playground.RecordCustomerSupportAgentSpans","parameters":[{"in":"body","name":"agent_instance_id","required":true,"schema":{"$ref":"#/components/schemas/AgentInstance_Id"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"ids":{"items":{"$ref":"#/components/schemas/AgentSpan_Id"},"type":"array"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["ids","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Record a canned multi-span support conversation on an instance","tags":["Playground"]}},"/api/v1/agent_association":{"post":{"callbacks":{},"deprecated":false,"operationId":"Action.AgentAssociation.Create","parameters":[{"in":"body","name":"details","required":true,"schema":{"$ref":"#/components/schemas/AgentAssociation_DetailsForCreate"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/AgentAssociation_Details"},"status":{"description":"Response status when the operation succeeds","enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Create an agent association","tags":["AgentAssociation"]}},"/api/v1/knowledgebase_revision":{"get":{"callbacks":{},"deprecated":false,"operationId":"Query.KnowledgebaseRevision.List","parameters":[{"description":"Knowledgebase whose revisions are listed, newest first","in":"query","name":"knowledgebase_id","required":true,"schema":{"$ref":"#/components/schemas/Knowledgebase_Id"}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}},{"description":"Zero-based offset of the first item to return.","in":"query","name":"pagination[offset]","required":false,"schema":{"minimum":0,"type":"integer"}},{"description":"Number of items to return per page (1-100).","in":"query","name":"pagination[page_size]","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"pagination":{"description":"Pagination metadata when the request included pagination parameters (null when the full list is returned)","oneOf":[{"$ref":"#/components/schemas/PaginationOutput"},{"$ref":"#/components/schemas/Null"}]},"sorting":{"$ref":"#/components/schemas/Sorting"},"status":{"description":"Response status when the query succeeds","enum":["success"],"example":"success","type":"string"},"summaries":{"description":"Revisions of the knowledgebase, newest first","items":{"$ref":"#/components/schemas/KnowledgebaseRevision_Summary"},"type":"array"}},"required":["pagination","sorting","status","summaries"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"List knowledgebase revisions","tags":["KnowledgebaseRevision"]}},"/api/v1/agent/show":{"get":{"callbacks":{},"deprecated":false,"operationId":"Query.Agent.GetDetailsByLookup","parameters":[{"description":"Agent id. Provide exactly one of agent_id or external_identifier.","in":"query","name":"agent_id","required":false,"schema":{"$ref":"#/components/schemas/Agent_Id"}},{"in":"query","name":"external_identifier","required":false,"schema":{"description":"External identifier for this agent (exact match). Provide exactly one of agent_id or external_identifier.","type":"string"}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}},{"in":"query","name":"environment_id","required":false,"schema":{"description":"When set, risk rollup uses the deployment current version for this environment. When `include_counts` is true, instance counts are scoped to this environment, and observed risk is scoped to activity spans in this environment.","oneOf":[{"$ref":"#/components/schemas/Environment_Id"},{"$ref":"#/components/schemas/Null"}]}},{"in":"query","name":"include_counts","required":false,"schema":{"default":false,"description":"Include instance counts in the response","type":"boolean"}},{"in":"query","name":"include_risk_rollup","required":false,"schema":{"default":false,"description":"Include risk rollup (theoretical and observed risk) in the response","type":"boolean"}},{"in":"query","name":"instances_active_during[start_at]","required":false,"schema":{"description":"Filters instance_counts to instances whose active range overlaps the half-open [start_at, finish_at) range and filters observed risk to activity spans started in the same range. Theoretical risk remains based on the current schema.","oneOf":[{"example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},{"$ref":"#/components/schemas/Null"}]}},{"in":"query","name":"instances_active_during[finish_at]","required":false,"schema":{"description":"Filters instance_counts to instances whose active range overlaps the half-open [start_at, finish_at) range and filters observed risk to activity spans started in the same range. Theoretical risk remains based on the current schema.","oneOf":[{"example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},{"$ref":"#/components/schemas/Null"}]}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/Agent_Details"},"risk_rollup":{"$ref":"#/components/schemas/Agent_RiskRollup"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"title":"Agent_GetDetailsOutput","type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Fetch agent by lookup","tags":["Agent"]}},"/api/v1/admin_user/{admin_user_id}/update_role":{"post":{"callbacks":{},"deprecated":false,"operationId":"Action.AdminUser.UpdateRole","parameters":[{"in":"path","name":"admin_user_id","required":true,"schema":{"$ref":"#/components/schemas/AdminUser_Id"}},{"in":"body","name":"details","required":true,"schema":{"$ref":"#/components/schemas/AdminUser_DetailsForUpdateRole"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/AdminUser_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Change an admin user's role","tags":["AdminUser"]}},"/api/v1/api_token":{"get":{"callbacks":{},"deprecated":false,"operationId":"Query.ApiToken.List","parameters":[{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}},{"description":"Account ID (defaults to token's account)","in":"query","name":"account_id","required":false,"schema":{"$ref":"#/components/schemas/Account_Id"}},{"description":"Sort order; a field name, optionally prefixed with `-` for descending (e.g. `-id`). Supported fields: `id`, `status`.","in":"query","name":"sorting","required":false,"schema":{"description":"Sort order; a field name, optionally prefixed with `-` for descending (e.g. `-id`). Supported fields: `id`, `status`.","type":"string"}},{"description":"Zero-based offset of the first item to return.","in":"query","name":"pagination[offset]","required":false,"schema":{"minimum":0,"type":"integer"}},{"description":"Number of items to return per page (1-100).","in":"query","name":"pagination[page_size]","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"pagination":{"oneOf":[{"$ref":"#/components/schemas/PaginationOutput"},{"$ref":"#/components/schemas/Null"}]},"sorting":{"oneOf":[{"$ref":"#/components/schemas/Sorting"},{"$ref":"#/components/schemas/Null"}]},"status":{"enum":["success"],"example":"success","type":"string"},"summaries":{"items":{"$ref":"#/components/schemas/ApiToken_Summary"},"type":"array"}},"required":["pagination","sorting","status","summaries"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"List API tokens","tags":["ApiToken"]},"post":{"callbacks":{},"deprecated":false,"operationId":"Action.ApiToken.Create","parameters":[{"in":"body","name":"details","required":true,"schema":{"$ref":"#/components/schemas/ApiToken_DetailsForCreate"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/ApiToken_Details"},"status":{"enum":["success"],"example":"success","type":"string"},"token":{"description":"The JWT token string (only available on creation)","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...","type":"string"}},"required":["details","status","token"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Create a new API token","tags":["ApiToken"]}},"/api/v1/environment/{environment_id}":{"delete":{"callbacks":{},"deprecated":false,"operationId":"Action.Environment.Delete","parameters":[{"in":"path","name":"environment_id","required":true,"schema":{"$ref":"#/components/schemas/Environment_Id"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/Environment_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Delete an environment","tags":["Environment"]},"get":{"callbacks":{},"deprecated":false,"operationId":"Query.Environment.GetDetailsById","parameters":[{"in":"path","name":"environment_id","required":true,"schema":{"$ref":"#/components/schemas/Environment_Id"}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/Environment_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Fetch environment","tags":["Environment"]},"put":{"callbacks":{},"deprecated":false,"operationId":"Action.Environment.Update","parameters":[{"in":"path","name":"environment_id","required":true,"schema":{"$ref":"#/components/schemas/Environment_Id"}},{"in":"body","name":"details","required":true,"schema":{"$ref":"#/components/schemas/Environment_DetailsForUpdate"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/Environment_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Update an environment","tags":["Environment"]}},"/api/v1/agent/{agent_id}/reinstate":{"post":{"callbacks":{},"deprecated":false,"operationId":"Action.Agent.Reinstate","parameters":[{"in":"path","name":"agent_id","required":true,"schema":{"$ref":"#/components/schemas/Agent_Id"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/Agent_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Reinstate a retired agent","tags":["Agent"]}},"/api/v1/knowledgebase_revision/{knowledgebase_revision_id}":{"get":{"callbacks":{},"deprecated":false,"operationId":"Query.KnowledgebaseRevision.GetDetails","parameters":[{"in":"path","name":"knowledgebase_revision_id","required":true,"schema":{"$ref":"#/components/schemas/KnowledgebaseRevision_Id"}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/KnowledgebaseRevision_Details"},"status":{"description":"Response status when the query succeeds","enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Get knowledgebase revision details","tags":["KnowledgebaseRevision"]}},"/api/v1/agent_deployment/promotions":{"get":{"callbacks":{},"deprecated":false,"operationId":"Query.AgentDeployment.ListPromotions","parameters":[{"in":"query","name":"agent_id","schema":{"$ref":"#/components/schemas/Agent_Id"}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"promotions":{"description":"Deployments of this agent that can be promoted","items":{"$ref":"#/components/schemas/AgentDeployment_Promotion"},"type":"array"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["promotions","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"List agent deployment promotions","tags":["AgentDeployment"]}},"/api/v1/api_token/{api_token_id}/activate":{"post":{"callbacks":{},"deprecated":false,"operationId":"Action.ApiToken.Activate","parameters":[{"in":"path","name":"api_token_id","required":true,"schema":{"$ref":"#/components/schemas/ApiToken_Id"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/ApiToken_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Activate a suspended API token","tags":["ApiToken"]}},"/api/v1/playground/create_loan_application_review_agent":{"post":{"callbacks":{},"deprecated":false,"operationId":"Action.Playground.CreateLoanApplicationReviewAgent","parameters":[{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"agent":{"$ref":"#/components/schemas/Agent_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["agent","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Create a loan application review playground agent","tags":["Playground"]}},"/api/v1/admin_user/{admin_user_id}":{"get":{"callbacks":{},"deprecated":false,"operationId":"Query.AdminUser.GetDetails","parameters":[{"in":"path","name":"admin_user_id","required":true,"schema":{"$ref":"#/components/schemas/AdminUser_Id"}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/AdminUser_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Fetch admin user details","tags":["AdminUser"]},"put":{"callbacks":{},"deprecated":false,"operationId":"Action.AdminUser.Update","parameters":[{"in":"path","name":"admin_user_id","required":true,"schema":{"$ref":"#/components/schemas/AdminUser_Id"}},{"in":"body","name":"details","required":true,"schema":{"$ref":"#/components/schemas/AdminUser_DetailsForUpdate"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/AdminUser_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Update an admin user (own profile only)","tags":["AdminUser"]}},"/api/v1/agent_instance/show":{"get":{"callbacks":{},"deprecated":false,"operationId":"Query.AgentInstance.GetDetailsByLookup","parameters":[{"description":"Agent instance id. Provide exactly one of agent_instance_id or external_identifier.","in":"query","name":"agent_instance_id","required":false,"schema":{"$ref":"#/components/schemas/AgentInstance_Id"}},{"in":"query","name":"external_identifier","required":false,"schema":{"description":"External identifier for this agent instance (exact match). Provide exactly one of agent_instance_id or external_identifier.","type":"string"}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}},{"in":"query","name":"include_counts","required":false,"schema":{"default":false,"description":"Include span_counts and span_schema_counts in the response","type":"boolean"}},{"in":"query","name":"include_costs","required":false,"schema":{"default":false,"description":"Include cost_breakdown in the response (null when costs do not apply or there is no token usage)","type":"boolean"}},{"in":"query","name":"include_risk_score","required":false,"schema":{"default":false,"description":"Include risk_score in the response (null when the agent has no risk profile or scoring inputs are unavailable)","type":"boolean"}},{"in":"query","name":"include_alert_count","required":false,"schema":{"default":false,"description":"Include raised_alert_count in the response (counts only alerts the caller may show)","type":"boolean"}},{"in":"query","name":"time_range[start_at]","required":false,"schema":{"oneOf":[{"example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},{"$ref":"#/components/schemas/Null"}]}},{"in":"query","name":"time_range[finish_at]","required":false,"schema":{"oneOf":[{"example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},{"$ref":"#/components/schemas/Null"}]}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/AgentInstance_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Fetch agent instance by lookup","tags":["AgentInstance"]}},"/api/v1/alerts/{alert_id}":{"get":{"callbacks":{},"deprecated":false,"operationId":"Query.Alert.GetDetails","parameters":[{"in":"path","name":"alert_id","required":true,"schema":{"$ref":"#/components/schemas/Alert_Id"}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/Alert_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Fetch alert","tags":["Alert"]}},"/api/v1/playground/record_quality_review_spans":{"post":{"callbacks":{},"deprecated":false,"operationId":"Action.Playground.RecordQualityReviewSpans","parameters":[{"in":"body","name":"agent_instance_id","required":true,"schema":{"$ref":"#/components/schemas/AgentInstance_Id"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"ids":{"items":{"$ref":"#/components/schemas/AgentSpan_Id"},"type":"array"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["ids","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Record article summary quality playground spans and set the instance quality payloads","tags":["Playground"]}},"/api/v1/agent_instance/{agent_instance_id}/prepare":{"post":{"callbacks":{},"deprecated":false,"operationId":"Action.AgentInstance.Prepare","parameters":[{"in":"path","name":"agent_instance_id","required":true,"schema":{"$ref":"#/components/schemas/AgentInstance_Id"}},{"in":"body","name":"params_payload","required":true,"schema":{"additionalProperties":true,"description":"Input payload for this agent instance, validated against the agent schema version's instance_params_payload_schema. The instance must be preparing. After this action it is pending. Values marked with $sensitive are extracted and stored securely, separate from the rest of the payload.","type":"object"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/AgentInstance_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Set the input of a preparing agent instance and move it to pending","tags":["AgentInstance"]}},"/api/v1/admin_user_invite/{admin_user_invite_id}":{"get":{"callbacks":{},"deprecated":false,"operationId":"Query.AdminUserInvite.GetDetails","parameters":[{"in":"path","name":"admin_user_invite_id","required":true,"schema":{"$ref":"#/components/schemas/AdminUserInvite_Id"}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/AdminUserInvite_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Fetch admin user invite details","tags":["AdminUserInvite"]}},"/api/v1/person/{person_id}":{"delete":{"callbacks":{},"deprecated":false,"operationId":"Action.Person.Delete","parameters":[{"in":"path","name":"person_id","required":true,"schema":{"$ref":"#/components/schemas/Person_Id"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/Person_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Delete a person","tags":["Person"]},"get":{"callbacks":{},"deprecated":false,"operationId":"Query.Person.GetDetails","parameters":[{"in":"path","name":"person_id","required":true,"schema":{"$ref":"#/components/schemas/Person_Id"}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/Person_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Get person details","tags":["Person"]},"put":{"callbacks":{},"deprecated":false,"operationId":"Action.Person.Update","parameters":[{"in":"path","name":"person_id","required":true,"schema":{"$ref":"#/components/schemas/Person_Id"}},{"in":"body","name":"details","required":true,"schema":{"$ref":"#/components/schemas/Person_ForUpdate"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/Person_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Update a person","tags":["Person"]}},"/api/v1/agent_instance/{agent_instance_id}/discard_sensitive":{"post":{"callbacks":{},"deprecated":false,"operationId":"Action.AgentInstance.DiscardSensitive","parameters":[{"in":"path","name":"agent_instance_id","required":true,"schema":{"$ref":"#/components/schemas/AgentInstance_Id"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/AgentInstance_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Discard sensitive data for an agent instance","tags":["AgentInstance"]}},"/api/v1/api_token/{api_token_id}/revoke":{"post":{"callbacks":{},"deprecated":false,"operationId":"Action.ApiToken.Revoke","parameters":[{"in":"path","name":"api_token_id","required":true,"schema":{"$ref":"#/components/schemas/ApiToken_Id"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/ApiToken_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Revoke an API token","tags":["ApiToken"]}},"/api/v1/knowledgebase_document_revision/{knowledgebase_document_revision_id}":{"get":{"callbacks":{},"deprecated":false,"operationId":"Query.KnowledgebaseDocumentRevision.GetDetails","parameters":[{"in":"path","name":"knowledgebase_document_revision_id","required":true,"schema":{"$ref":"#/components/schemas/KnowledgebaseDocumentRevision_Id"}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/KnowledgebaseDocumentRevision_Details"},"status":{"description":"Response status when the query succeeds","enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Get knowledgebase document revision details","tags":["KnowledgebaseDocumentRevision"]}},"/api/v1/agent_spans/{agent_span_id}/discard_sensitive":{"post":{"callbacks":{},"deprecated":false,"operationId":"Action.AgentSpan.DiscardSensitive","parameters":[{"in":"path","name":"agent_span_id","required":true,"schema":{"$ref":"#/components/schemas/AgentSpan_Id"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/AgentSpan_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Discard sensitive sidecar for an agent span","tags":["AgentSpan"]}},"/api/v1/llm_provider_model":{"get":{"callbacks":{},"deprecated":false,"operationId":"Query.LlmProviderModel.List","parameters":[{"in":"query","name":"llm_provider_id","schema":{"$ref":"#/components/schemas/LlmProvider_Id"}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}},{"description":"Sort order; a field name, optionally prefixed with `-` for descending (e.g. `-id`). Supported fields: `id`, `name`.","in":"query","name":"sorting","required":false,"schema":{"description":"Sort order; a field name, optionally prefixed with `-` for descending (e.g. `-id`). Supported fields: `id`, `name`.","type":"string"}},{"description":"Zero-based offset of the first item to return.","in":"query","name":"pagination[offset]","required":false,"schema":{"minimum":0,"type":"integer"}},{"description":"Number of items to return per page (1-100).","in":"query","name":"pagination[page_size]","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"pagination":{"oneOf":[{"$ref":"#/components/schemas/PaginationOutput"},{"$ref":"#/components/schemas/Null"}]},"sorting":{"oneOf":[{"$ref":"#/components/schemas/Sorting"},{"$ref":"#/components/schemas/Null"}]},"status":{"enum":["success"],"example":"success","type":"string"},"summaries":{"items":{"$ref":"#/components/schemas/LlmProviderModel_Summary"},"type":"array"}},"required":["pagination","sorting","status","summaries"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"List LLM provider models for a provider","tags":["LlmProviderModel"]},"post":{"callbacks":{},"deprecated":false,"operationId":"Action.LlmProviderModel.Create","parameters":[{"in":"body","name":"details","required":true,"schema":{"$ref":"#/components/schemas/LlmProviderModel_DetailsForCreate"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/LlmProviderModel_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Create a new LLM provider model","tags":["LlmProviderModel"]}},"/api/v1/knowledgebase/{knowledgebase_id}/archive":{"post":{"callbacks":{},"deprecated":false,"operationId":"Action.Knowledgebase.Archive","parameters":[{"in":"path","name":"knowledgebase_id","required":true,"schema":{"$ref":"#/components/schemas/Knowledgebase_Id"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/Knowledgebase_Details"},"status":{"description":"Response status when the operation succeeds","enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Archive a knowledgebase","tags":["Knowledgebase"]}},"/api/v1/agent_instance/{agent_instance_id}/send_message":{"post":{"callbacks":{},"deprecated":false,"operationId":"Action.AgentInstance.SendMessage","parameters":[{"in":"path","name":"agent_instance_id","required":true,"schema":{"$ref":"#/components/schemas/AgentInstance_Id"}},{"in":"body","name":"message","required":true,"schema":{"description":"User message. Hosted instances only.","example":"Hello","type":"string"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/AgentInstance_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Send a user message to a hosted agent instance","tags":["AgentInstance"]}},"/api/v1/admin_user":{"get":{"callbacks":{},"deprecated":false,"operationId":"Query.AdminUser.List","parameters":[{"description":"Account ID (defaults to token's account)","in":"query","name":"account_id","schema":{"$ref":"#/components/schemas/Account_Id"}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}},{"description":"Sort order; a field name, optionally prefixed with `-` for descending (e.g. `-id`). Supported fields: `id`, `name`, `email`.","in":"query","name":"sorting","required":false,"schema":{"description":"Sort order; a field name, optionally prefixed with `-` for descending (e.g. `-id`). Supported fields: `id`, `name`, `email`.","type":"string"}},{"description":"Zero-based offset of the first item to return.","in":"query","name":"pagination[offset]","required":false,"schema":{"minimum":0,"type":"integer"}},{"description":"Number of items to return per page (1-100).","in":"query","name":"pagination[page_size]","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"pagination":{"oneOf":[{"$ref":"#/components/schemas/PaginationOutput"},{"$ref":"#/components/schemas/Null"}]},"sorting":{"oneOf":[{"$ref":"#/components/schemas/Sorting"},{"$ref":"#/components/schemas/Null"}]},"status":{"enum":["success"],"example":"success","type":"string"},"summaries":{"items":{"$ref":"#/components/schemas/AdminUser_Summary"},"type":"array"}},"required":["pagination","sorting","status","summaries"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"List admin users for an account","tags":["AdminUser"]}},"/api/v1/account_integration/{account_integration_id}/test":{"post":{"callbacks":{},"deprecated":false,"operationId":"Action.AccountIntegration.Test","parameters":[{"in":"path","name":"account_integration_id","required":true,"schema":{"$ref":"#/components/schemas/AccountIntegration_Id"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"delivered":{"description":"Whether Slack accepted the test notification","example":true,"type":"boolean"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["delivered","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Send a test notification","tags":["AccountIntegration"]}},"/api/v1/agent":{"get":{"callbacks":{},"deprecated":false,"operationId":"Query.Agent.List","parameters":[{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}},{"in":"query","name":"risk_profile_id","required":false,"schema":{"description":"When a profile id, return only agents using that risk profile. When `null`, return only agents with no risk profile. When omitted, return all agents (after permission filtering).","oneOf":[{"$ref":"#/components/schemas/RiskProfile_Id"},{"$ref":"#/components/schemas/Null"}]}},{"in":"query","name":"team_id","required":false,"schema":{"description":"When a team id, return only agents on that team. When `null`, return only agents with no team. When omitted, return all agents (after permission filtering).","oneOf":[{"$ref":"#/components/schemas/Team_Id"},{"$ref":"#/components/schemas/Null"}]}},{"in":"query","name":"owner_person_id","required":false,"schema":{"description":"When a person id, return only agents owned by that person. When `null`, return only agents with no owner. When omitted, return all agents (after permission filtering).","oneOf":[{"$ref":"#/components/schemas/Person_Id"},{"$ref":"#/components/schemas/Null"}]}},{"in":"query","name":"role","required":false,"schema":{"description":"When set, return only agents with this role. When omitted, return all agents (after permission filtering).","enum":["standard","judge"],"example":"standard","type":"string"}},{"description":"When set, return only these agents. Ids the caller cannot see are left out.","in":"query","name":"agent_ids","required":false,"schema":{"items":{"$ref":"#/components/schemas/Agent_Id"},"type":"array"}},{"in":"query","name":"instances_active_during[start_at]","required":false,"schema":{"description":"When set with finish_at, instance_counts only include instances whose active range overlaps [start_at, finish_at). Does not filter which agents are listed.","oneOf":[{"example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},{"$ref":"#/components/schemas/Null"}]}},{"in":"query","name":"instances_active_during[finish_at]","required":false,"schema":{"description":"When set with start_at, instance_counts only include instances whose active range overlaps [start_at, finish_at). Does not filter which agents are listed.","oneOf":[{"example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},{"$ref":"#/components/schemas/Null"}]}},{"description":"Sort order; a field name, optionally prefixed with `-` for descending (e.g. `-id`). Supported fields: `id`, `name`, `status`, `last_activity_span_at`.","in":"query","name":"sorting","required":false,"schema":{"description":"Sort order; a field name, optionally prefixed with `-` for descending (e.g. `-id`). Supported fields: `id`, `name`, `status`, `last_activity_span_at`.","type":"string"}},{"description":"Zero-based offset of the first item to return.","in":"query","name":"pagination[offset]","required":false,"schema":{"minimum":0,"type":"integer"}},{"description":"Number of items to return per page (1-100).","in":"query","name":"pagination[page_size]","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"pagination":{"oneOf":[{"$ref":"#/components/schemas/PaginationOutput"},{"$ref":"#/components/schemas/Null"}]},"sorting":{"oneOf":[{"$ref":"#/components/schemas/Sorting"},{"$ref":"#/components/schemas/Null"}]},"status":{"enum":["success"],"example":"success","type":"string"},"summaries":{"items":{"$ref":"#/components/schemas/Agent_Summary"},"type":"array"}},"required":["pagination","sorting","status","summaries"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"List agents","tags":["Agent"]},"post":{"callbacks":{},"deprecated":false,"operationId":"Action.Agent.Create","parameters":[{"in":"body","name":"details","required":true,"schema":{"$ref":"#/components/schemas/Agent_DetailsForCreate"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/Agent_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Create a new agent","tags":["Agent"]}},"/api/v1/account/{account_id}":{"get":{"callbacks":{},"deprecated":false,"operationId":"Query.Account.GetDetails","parameters":[{"in":"path","name":"account_id","required":true,"schema":{"$ref":"#/components/schemas/Account_Id"}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/Account_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Fetch account","tags":["Account"]},"put":{"callbacks":{},"deprecated":false,"operationId":"Action.Account.Update","parameters":[{"in":"path","name":"account_id","required":true,"schema":{"$ref":"#/components/schemas/Account_Id"}},{"in":"body","name":"details","required":true,"schema":{"$ref":"#/components/schemas/Account_DetailsForUpdate"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/Account_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Update an account","tags":["Account"]}},"/api/v1/agent_association/{agent_association_id}":{"delete":{"callbacks":{},"deprecated":false,"operationId":"Action.AgentAssociation.Delete","parameters":[{"in":"path","name":"agent_association_id","required":true,"schema":{"$ref":"#/components/schemas/AgentAssociation_Id"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/AgentAssociation_Details"},"status":{"description":"Response status when the operation succeeds","enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Delete an agent association","tags":["AgentAssociation"]},"get":{"callbacks":{},"deprecated":false,"operationId":"Query.AgentAssociation.GetDetails","parameters":[{"in":"path","name":"agent_association_id","required":true,"schema":{"$ref":"#/components/schemas/AgentAssociation_Id"}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/AgentAssociation_Details"},"status":{"description":"Response status when the query succeeds","enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Fetch agent association","tags":["AgentAssociation"]},"put":{"callbacks":{},"deprecated":false,"operationId":"Action.AgentAssociation.Update","parameters":[{"in":"path","name":"agent_association_id","required":true,"schema":{"$ref":"#/components/schemas/AgentAssociation_Id"}},{"in":"body","name":"details","required":true,"schema":{"$ref":"#/components/schemas/AgentAssociation_DetailsForUpdate"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/AgentAssociation_Details"},"status":{"description":"Response status when the operation succeeds","enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Update an agent association","tags":["AgentAssociation"]}},"/api/v1/playground/record_first_account_spans":{"post":{"callbacks":{},"deprecated":false,"operationId":"Action.Playground.RecordFirstAccountSpans","parameters":[{"in":"body","name":"agent_instance_id","required":true,"schema":{"$ref":"#/components/schemas/AgentInstance_Id"}},{"in":"body","name":"scenario","required":true,"schema":{"description":"Which sample run to record: good, mixed, bad, timeout, or active. Must match register.","enum":["good","mixed","bad","timeout","active"],"example":"good","type":"string"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"ids":{"items":{"$ref":"#/components/schemas/AgentSpan_Id"},"type":"array"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["ids","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Record first-account sample spans for a playground scenario","tags":["Playground"]}},"/api/v1/knowledgebase_revision/{knowledgebase_revision_id}/documents":{"get":{"callbacks":{},"deprecated":false,"operationId":"Query.KnowledgebaseRevision.ListDocuments","parameters":[{"in":"path","name":"knowledgebase_revision_id","required":true,"schema":{"$ref":"#/components/schemas/KnowledgebaseRevision_Id"}},{"in":"query","name":"path_prefix","required":false,"schema":{"description":"When set, only documents whose path starts with this prefix, ignoring case","oneOf":[{"example":"guides/","type":"string"},{"$ref":"#/components/schemas/Null"}]}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}},{"description":"Zero-based offset of the first item to return.","in":"query","name":"pagination[offset]","required":false,"schema":{"minimum":0,"type":"integer"}},{"description":"Number of items to return per page (1-100).","in":"query","name":"pagination[page_size]","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"pagination":{"description":"Pagination metadata when the request included pagination parameters (null when the full list is returned)","oneOf":[{"$ref":"#/components/schemas/PaginationOutput"},{"$ref":"#/components/schemas/Null"}]},"sorting":{"$ref":"#/components/schemas/Sorting"},"status":{"description":"Response status when the query succeeds","enum":["success"],"example":"success","type":"string"},"summaries":{"description":"Documents in the revision, ordered by path","items":{"$ref":"#/components/schemas/KnowledgebaseRevision_Document"},"type":"array"}},"required":["pagination","sorting","status","summaries"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"List documents in a knowledgebase revision","tags":["KnowledgebaseRevision"]}},"/api/v1/environment":{"get":{"callbacks":{},"deprecated":false,"operationId":"Query.Environment.List","parameters":[{"in":"query","name":"account_id","schema":{"$ref":"#/components/schemas/Account_Id"}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}},{"description":"Sort order; a field name, optionally prefixed with `-` for descending (e.g. `-id`). Supported fields: `id`, `name`.","in":"query","name":"sorting","required":false,"schema":{"description":"Sort order; a field name, optionally prefixed with `-` for descending (e.g. `-id`). Supported fields: `id`, `name`.","type":"string"}},{"description":"Zero-based offset of the first item to return.","in":"query","name":"pagination[offset]","required":false,"schema":{"minimum":0,"type":"integer"}},{"description":"Number of items to return per page (1-100).","in":"query","name":"pagination[page_size]","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"pagination":{"oneOf":[{"$ref":"#/components/schemas/PaginationOutput"},{"$ref":"#/components/schemas/Null"}]},"sorting":{"oneOf":[{"$ref":"#/components/schemas/Sorting"},{"$ref":"#/components/schemas/Null"}]},"status":{"enum":["success"],"example":"success","type":"string"},"summaries":{"items":{"$ref":"#/components/schemas/Environment_Summary"},"type":"array"}},"required":["pagination","sorting","status","summaries"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"List environments for an account","tags":["Environment"]},"post":{"callbacks":{},"deprecated":false,"operationId":"Action.Environment.Create","parameters":[{"in":"body","name":"details","required":true,"schema":{"$ref":"#/components/schemas/Environment_DetailsForCreate"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/Environment_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Create a new environment","tags":["Environment"]}},"/api/v1/account_integration/{account_integration_id}":{"delete":{"callbacks":{},"deprecated":false,"operationId":"Action.AccountIntegration.Delete","parameters":[{"in":"path","name":"account_integration_id","required":true,"schema":{"$ref":"#/components/schemas/AccountIntegration_Id"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/AccountIntegration_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Delete an account integration","tags":["AccountIntegration"]},"get":{"callbacks":{},"deprecated":false,"operationId":"Query.AccountIntegration.GetDetails","parameters":[{"in":"path","name":"account_integration_id","required":true,"schema":{"$ref":"#/components/schemas/AccountIntegration_Id"}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/AccountIntegration_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Get account integration details","tags":["AccountIntegration"]},"put":{"callbacks":{},"deprecated":false,"operationId":"Action.AccountIntegration.Update","parameters":[{"in":"path","name":"account_integration_id","required":true,"schema":{"$ref":"#/components/schemas/AccountIntegration_Id"}},{"in":"body","name":"details","required":true,"schema":{"$ref":"#/components/schemas/AccountIntegration_DetailsForUpdate"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/AccountIntegration_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Update an account integration","tags":["AccountIntegration"]}},"/api/v1/playground/create_northstar_support_agent":{"post":{"callbacks":{},"deprecated":false,"operationId":"Action.Playground.CreateNorthstarSupportAgent","parameters":[{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"agent":{"$ref":"#/components/schemas/Agent_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["agent","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Create a Northstar support sensitive playground agent","tags":["Playground"]}},"/api/v1/playground/create_quality_review_agent":{"post":{"callbacks":{},"deprecated":false,"operationId":"Action.Playground.CreateQualityReviewAgent","parameters":[{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"agent":{"$ref":"#/components/schemas/Agent_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["agent","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Create an article summary quality playground agent","tags":["Playground"]}},"/api/v1/agent_association/to":{"get":{"callbacks":{},"deprecated":false,"operationId":"Query.AgentAssociation.ListTo","parameters":[{"description":"Agent whose incoming associations to list (the judged agent for a judge association)","in":"query","name":"agent_id","required":true,"schema":{"$ref":"#/components/schemas/Agent_Id"}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}},{"description":"Sort order; a field name, optionally prefixed with `-` for descending (e.g. `-id`). Supported fields: `id`.","in":"query","name":"sorting","required":false,"schema":{"description":"Sort order; a field name, optionally prefixed with `-` for descending (e.g. `-id`). Supported fields: `id`.","type":"string"}},{"description":"Zero-based offset of the first item to return.","in":"query","name":"pagination[offset]","required":false,"schema":{"minimum":0,"type":"integer"}},{"description":"Number of items to return per page (1-100).","in":"query","name":"pagination[page_size]","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"pagination":{"description":"Pagination metadata when the request included pagination parameters (null when the full list is returned)","oneOf":[{"$ref":"#/components/schemas/PaginationOutput"},{"$ref":"#/components/schemas/Null"}]},"sorting":{"oneOf":[{"$ref":"#/components/schemas/Sorting"},{"$ref":"#/components/schemas/Null"}]},"status":{"description":"Response status when the query succeeds","enum":["success"],"example":"success","type":"string"},"summaries":{"description":"Associations where this agent is to_agent","items":{"$ref":"#/components/schemas/AgentAssociation_Summary"},"type":"array"}},"required":["pagination","sorting","status","summaries"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"List associations to an agent","tags":["AgentAssociation"]}},"/api/v1/llm_provider":{"get":{"callbacks":{},"deprecated":false,"operationId":"Query.LlmProvider.List","parameters":[{"description":"Account ID (defaults to token's account)","in":"query","name":"account_id","schema":{"$ref":"#/components/schemas/Account_Id"}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}},{"description":"Sort order; a field name, optionally prefixed with `-` for descending (e.g. `-id`). Supported fields: `id`, `name`.","in":"query","name":"sorting","required":false,"schema":{"description":"Sort order; a field name, optionally prefixed with `-` for descending (e.g. `-id`). Supported fields: `id`, `name`.","type":"string"}},{"description":"Zero-based offset of the first item to return.","in":"query","name":"pagination[offset]","required":false,"schema":{"minimum":0,"type":"integer"}},{"description":"Number of items to return per page (1-100).","in":"query","name":"pagination[page_size]","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"pagination":{"oneOf":[{"$ref":"#/components/schemas/PaginationOutput"},{"$ref":"#/components/schemas/Null"}]},"sorting":{"oneOf":[{"$ref":"#/components/schemas/Sorting"},{"$ref":"#/components/schemas/Null"}]},"status":{"enum":["success"],"example":"success","type":"string"},"summaries":{"items":{"$ref":"#/components/schemas/LlmProvider_Summary"},"type":"array"}},"required":["pagination","sorting","status","summaries"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"List LLM providers for an account","tags":["LlmProvider"]},"post":{"callbacks":{},"deprecated":false,"operationId":"Action.LlmProvider.Create","parameters":[{"in":"body","name":"details","required":true,"schema":{"$ref":"#/components/schemas/LlmProvider_DetailsForCreate"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/LlmProvider_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Create a new LLM provider","tags":["LlmProvider"]}},"/api/v1/playground/register_first_account_agent_instance":{"post":{"callbacks":{},"deprecated":false,"operationId":"Action.Playground.RegisterFirstAccountAgentInstance","parameters":[{"in":"body","name":"agent_id","required":true,"schema":{"$ref":"#/components/schemas/Agent_Id"}},{"in":"body","name":"environment_id","required":true,"schema":{"$ref":"#/components/schemas/Environment_Id"}},{"in":"body","name":"id","required":false,"schema":{"description":"Optional instance id. Its embedded timestamp must not be more than 7 days in the past.","oneOf":[{"$ref":"#/components/schemas/AgentInstance_Id"},{"$ref":"#/components/schemas/Null"}]}},{"in":"body","name":"scenario","required":true,"schema":{"description":"Which sample run to register: good, mixed, bad, timeout, or active.","enum":["good","mixed","bad","timeout","active"],"example":"good","type":"string"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"agent_schema_version":{"$ref":"#/components/schemas/AgentSchemaVersion_Details"},"agent_version":{"$ref":"#/components/schemas/AgentVersion_Details"},"details":{"$ref":"#/components/schemas/AgentInstance_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["agent_schema_version","agent_version","details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Register a first-account sample agent instance for a playground scenario","tags":["Playground"]}},"/api/v1/risk_profile/{risk_profile_id}":{"delete":{"callbacks":{},"deprecated":false,"operationId":"Action.RiskProfile.Delete","parameters":[{"in":"path","name":"risk_profile_id","required":true,"schema":{"$ref":"#/components/schemas/RiskProfile_Id"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/RiskProfile_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Delete a risk profile","tags":["RiskProfile"]},"get":{"callbacks":{},"deprecated":false,"operationId":"Query.RiskProfile.GetDetails","parameters":[{"in":"path","name":"risk_profile_id","required":true,"schema":{"$ref":"#/components/schemas/RiskProfile_Id"}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/RiskProfile_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Get risk profile details","tags":["RiskProfile"]},"put":{"callbacks":{},"deprecated":false,"operationId":"Action.RiskProfile.Update","parameters":[{"in":"path","name":"risk_profile_id","required":true,"schema":{"$ref":"#/components/schemas/RiskProfile_Id"}},{"in":"body","name":"details","required":true,"schema":{"$ref":"#/components/schemas/RiskProfile_ForUpdate"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/RiskProfile_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["details","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Update a risk profile","tags":["RiskProfile"]}},"/api/v1/agent_association/from":{"get":{"callbacks":{},"deprecated":false,"operationId":"Query.AgentAssociation.ListFrom","parameters":[{"description":"Agent whose outgoing associations to list (the judge for a judge association)","in":"query","name":"agent_id","required":true,"schema":{"$ref":"#/components/schemas/Agent_Id"}},{"in":"query","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}},{"description":"Sort order; a field name, optionally prefixed with `-` for descending (e.g. `-id`). Supported fields: `id`.","in":"query","name":"sorting","required":false,"schema":{"description":"Sort order; a field name, optionally prefixed with `-` for descending (e.g. `-id`). Supported fields: `id`.","type":"string"}},{"description":"Zero-based offset of the first item to return.","in":"query","name":"pagination[offset]","required":false,"schema":{"minimum":0,"type":"integer"}},{"description":"Number of items to return per page (1-100).","in":"query","name":"pagination[page_size]","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"pagination":{"description":"Pagination metadata when the request included pagination parameters (null when the full list is returned)","oneOf":[{"$ref":"#/components/schemas/PaginationOutput"},{"$ref":"#/components/schemas/Null"}]},"sorting":{"oneOf":[{"$ref":"#/components/schemas/Sorting"},{"$ref":"#/components/schemas/Null"}]},"status":{"description":"Response status when the query succeeds","enum":["success"],"example":"success","type":"string"},"summaries":{"description":"Associations where this agent is from_agent","items":{"$ref":"#/components/schemas/AgentAssociation_Summary"},"type":"array"}},"required":["pagination","sorting","status","summaries"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"List associations from an agent","tags":["AgentAssociation"]}},"/api/v1/playground/record_northstar_support_spans":{"post":{"callbacks":{},"deprecated":false,"operationId":"Action.Playground.RecordNorthstarSupportSpans","parameters":[{"in":"body","name":"agent_instance_id","required":true,"schema":{"$ref":"#/components/schemas/AgentInstance_Id"}},{"in":"body","name":"idempotency_key","required":false,"schema":{"$ref":"#/components/schemas/IdempotencyKeyOrNull"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"ids":{"items":{"$ref":"#/components/schemas/AgentSpan_Id"},"type":"array"},"status":{"enum":["success"],"example":"success","type":"string"}},"required":["ids","status"],"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Record Northstar support sensitive playground spans, quality payloads, and alerts on an instance","tags":["Playground"]}}},"security":[{"authorization":[]}],"servers":[{"url":"https://app.prefactorai.com","variables":{}}],"tags":[]}