{"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"},"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"},"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"}]}},"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","read_data","update_data","destroy_data","financial_transactions","external_communication"],"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"},"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","read_data","update_data","destroy_data","financial_transactions","external_communication"],"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"}},"title":"Person_Summary","type":"object"},"Agent_GetDetailsOutput":{"properties":{"details":{"$ref":"#/components/schemas/Agent_Details"},"risk_rollup":{"oneOf":[{"$ref":"#/components/schemas/Agent_RiskRollup"},{"$ref":"#/components/schemas/Null"}]},"status":{"enum":["success"],"example":"success","type":"string"}},"title":"Agent_GetDetailsOutput","type":"object"},"IdempotencyKeyOrNull":{"oneOf":[{"description":"Optional idempotency key for ensuring request idempotency","type":"string"},{"$ref":"#/components/schemas/Null"}],"title":"IdempotencyKeyOrNull"},"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":["terminate","reason"],"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"}},"title":"AgentSpan_Details","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"}},"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"},"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"},"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"}]}},"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"}},"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"},"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"}},"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":["medium","high","critical"],"title":"RiskProfile_Ruleset_Thresholds","type":"object"},"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"}},"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"}},"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"}},"title":"Agent_RiskSummary","type":"object"},{"$ref":"#/components/schemas/Null"}]}},"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"}},"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"}},"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":["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","classification"],"title":"DataCategories","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"},"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"}},"title":"AdminUserInvite_Summary","type":"object"},"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"}},"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"},"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"}]},"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"}},"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"},"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"}]},"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"}},"title":"SpanTypeSchemaDetails","type":"object"},"ApiToken_Id":{"description":"A valid API token ID","example":"013xrzp12g3nqk8ns6jadrqmpgrjkeny","title":"ApiToken_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"}},"title":"Team_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"}]},"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"}},"title":"AdminUser_Summary","type":"object"},"Agent_DetailsForCreate":{"properties":{"description":{"description":"Optional agent description","example":"Handles tier-1 support requests","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"}]},"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"}},"title":"Agent_AvailableActions","type":"object"},"description":{"oneOf":[{"description":"Agent description","example":"Agent description","type":"string"},{"$ref":"#/components/schemas/Null"}]},"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"},"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"}},"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"}]},"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"}},"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":["category_weights","action_multipliers","thresholds"],"title":"RiskProfile_Ruleset","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"}},"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"}},"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"}},"title":"AgentSpan_Summary","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"},"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"}},"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"}},"title":"SchemaDetails","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"}},"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"}},"title":"Agent_AvailableActions","type":"object"},"description":{"oneOf":[{"description":"Agent description","example":"Agent description","type":"string"},{"$ref":"#/components/schemas/Null"}]},"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"},"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"}},"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"}]},"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"}},"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"},"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"}},"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"}]}},"title":"AgentInstance_CostBreakdown_Group","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"}},"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"}]},"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"}},"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"}},"title":"RiskProfile_Details","type":"object"},"AgentVersion_Id":{"description":"A valid agent version ID","example":"013xrzp12g3nqk8ns6jadrqmpgrjkeny","title":"AgentVersion_Id","type":"string"},"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":["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"],"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"},"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"}},"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"}]}},"title":"Account_Details","type":"object"},"Person_Id":{"description":"A valid person ID","example":"013xrzp12g3nqk8ns6jadrqmpgrjkeny","title":"Person_Id","type":"string"},"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"}},"title":"Account_Summary","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"}},"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"}},"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"}},"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_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"},"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"},"quality_payloads":{"additionalProperties":{"additionalProperties":true,"type":"object"},"description":"Map of quality schema name to evaluation payload for this instance","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"}]},"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: 'pending' (not started yet), 'active' (started but not finished), 'complete' (finished successfully), 'failed' (ended with failure), 'cancelled' (never started, cancelled), or 'terminated' (externally terminated)","enum":["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"}},"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"}},"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"},"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: 'pending' (not started yet), 'active' (started but not finished), 'complete' (finished successfully), 'failed' (ended with failure), 'cancelled' (never started, cancelled), or 'terminated' (externally terminated)","enum":["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"}},"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","oneOf":[{"properties":{"code":{"enum":["bad_request","bad_authtoken","not_authenticated","not_permitted","not_implemented","unknown","not_found","unexpected_ref_type","unexpected","invalid_action","alert_unknown","alert_already_cleared","invalid_value","required_value","idempotency_key_already_used"],"example":"bad_request","type":"string"},"message":{"type":"string"},"status":{"enum":["error"],"example":"error","type":"string"}},"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"}},"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":["status","code","message","retry_after_ms"],"type":"object"}],"title":"ApiError"},"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"},"quality_schemas":{"oneOf":[{"description":"Array of quality schemas with name, schema and optional title, description, template and data_risk.","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"},"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"}]},"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"}},"title":"AdminUser_Details","type":"object"},"Agent_Id":{"description":"A valid agent ID","example":"013xrzp12g3nqk8ns6jadrqmpgrjkeny","title":"Agent_Id","type":"string"},"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"},"quality_schemas":{"additionalProperties":{"$ref":"#/components/schemas/SchemaDetails"},"description":"Map of quality schema names to their schemas and optional title, description, template and data_risk","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"}},"title":"AgentSchemaVersion_Details","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"}},"title":"Team_Summary","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"}},"title":"Agent_RiskSummary","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_activity_span_at"],"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"}},"title":"AdminUserInvite_DetailsForCreate","type":"object"},"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"}},"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"}},"title":"AgentSpan_SpanCounts","type":"object"},"Null":{"description":"null","enum":[null],"nullable":true,"title":"Null","type":"string"},"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":{"$ref":"#/components/schemas/AgentSchemaVersion_Id"},"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"},"id":{"description":"Optional ID for the agent version. 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"}},"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"}},"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"},"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. 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"}]},"quality_schemas":{"oneOf":[{"description":"Array of quality schemas with name, schema and optional title, description, template and data_risk.","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"},"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"},"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"},"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"}},"title":"AgentVersion_Details","type":"object"}},"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"}},"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"}},"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"}},"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"}},"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/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"}},"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"}},"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"}},"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"}},"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"}},"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"}},"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"}},"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"}},"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/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"}},"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/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"}},"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.","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"}},"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.","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"}},"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"}},"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"}},"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_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"}},"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Finish an agent span","tags":["AgentSpan"]}},"/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)","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"}},"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"}},"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"}},"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":"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"}},"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', instance must be pending and both timestamps are set to the (optional) timestamp.","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":"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"}},"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"}},"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"}}],"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"}},"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"List agent instances","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"}},"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.","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"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/Agent_Details"},"risk_rollup":{"oneOf":[{"$ref":"#/components/schemas/Agent_RiskRollup"},{"$ref":"#/components/schemas/Null"}]},"status":{"enum":["success"],"example":"success","type":"string"}},"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"}},"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/{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"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/AgentInstance_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"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"}},"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"}},"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,"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"}},"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Create a new agent version","tags":["AgentVersion"]}},"/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"}},"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"}},"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"}},"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"}},"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Suspend an API token","tags":["ApiToken"]}},"/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"}},"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/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"}},"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"}},"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"}},"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"}},"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,"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"}},"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Create a new agent schema version","tags":["AgentSchemaVersion"]}},"/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"}},"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"}},"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"}},"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"}},"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/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"}},"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"}},"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"}},"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"}},"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"},"quality_schemas":{"oneOf":[{"description":"Array of quality schemas with name, schema and optional title, description, template and data_risk.","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":"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"}},"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"}},"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"}},"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Fetch agent version","tags":["AgentVersion"]}},"/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"}},"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Fetch environment by lookup","tags":["Environment"]}},"/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- 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"}},"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"}},"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"}},"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Fetch API token","tags":["ApiToken"]}},"/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"}},"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"}},"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"}},"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/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"}},"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"}},"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/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"}},"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/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.","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"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/Agent_Details"},"risk_rollup":{"oneOf":[{"$ref":"#/components/schemas/Agent_RiskRollup"},{"$ref":"#/components/schemas/Null"}]},"status":{"enum":["success"],"example":"success","type":"string"}},"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/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"}},"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"}},"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"}},"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"}},"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"}},"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"}},"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Reinstate a retired agent","tags":["Agent"]}},"/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"}},"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"}},"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"}},"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"}},"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"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"details":{"$ref":"#/components/schemas/AgentInstance_Details"},"status":{"enum":["success"],"example":"success","type":"string"}},"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"}},"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"}},"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/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"}},"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"}},"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"}},"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"}},"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Update a person","tags":["Person"]}},"/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"}},"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Revoke an API token","tags":["ApiToken"]}},"/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"}},"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/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"}},"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/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":"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"}},"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"}},"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"}},"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"}},"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Update an account","tags":["Account"]}},"/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"}},"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/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"}},"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"}},"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Create a new environment","tags":["Environment"]}},"/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"}},"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"}},"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/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"}},"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"}},"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"}},"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"}},"type":"object"}}},"description":"Success"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Error"}},"summary":"Update a risk profile","tags":["RiskProfile"]}},"/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"}},"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":[]}