{"openapi":"3.1.0","info":{"title":"Agents API","version":"1.0.0"},"servers":[{"url":"https://agp.eu.hcompany.ai","description":"Europe","x-fern-server-name":"Eu"},{"url":"https://agp.hcompany.ai","description":"United States","x-fern-server-name":"Us"}],"paths":{"/api/v2/sessions":{"post":{"tags":["Sessions"],"summary":"Create Session","description":"Create an agentic session.","operationId":"create_session_api_v2_sessions_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"capture_end_state","in":"query","required":false,"schema":{"type":"boolean","description":"Have the session's browser record its end state (its calls and localStorage, kept 30 days) when it closes, so `POST /sessions/{id}/probe` can judge it. Refused for an organization whose runs record no browser end state.","default":false,"title":"Capture End State"},"description":"Have the session's browser record its end state (its calls and localStorage, kept 30 days) when it closes, so `POST /sessions/{id}/probe` can judge it. Refused for an organization whose runs record no browser end state."},{"name":"workflow_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,200}$"},{"type":"null"}],"description":"Stamped as the session's `workflow_type` metadata, which groups the sessions `POST /workflows/{workflow_type}/probe/draft` drafts a probe from.","title":"Workflow Type"},"description":"Stamped as the session's `workflow_type` metadata, which groups the sessions `POST /workflows/{workflow_type}/probe/draft` drafts a probe from."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Session"}}}},"403":{"description":"``detail[0].type`` is ``environment_not_public`` when the agent uses an environment not open to the caller's organization."},"429":{"description":"No session slot is free. ``detail[0].type`` says which limit: ``plan_limit`` (the concurrent-session limit), ``capacity`` (the platform is full) or ``queue_full`` (the organization's queue is full). ``detail[0].scope`` says whose slots ran out: ``user``, ``org`` or ``platform``.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuotaErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"tags":["Sessions"],"summary":"List Sessions","description":"List sessions visible to ``user``.","operationId":"list_sessions_api_v2_sessions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"owner","in":"query","required":false,"schema":{"enum":["me","me-in-organization","organization","me-or-organization"],"type":"string","default":"me-in-organization","title":"Owner"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/TrajectoryStatus"}},{"type":"null"}],"title":"Status"}},{"name":"agent","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Agent"}},{"name":"group_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group Id"}},{"name":"parent_session_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Session Id"}},{"name":"schedule_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Only sessions created by this schedule.","title":"Schedule Id"},"description":"Only sessions created by this schedule."},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Case-insensitive match on the session's first message or answer.","title":"Search"},"description":"Case-insensitive match on the session's first message or answer."},{"name":"created_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created Before"}},{"name":"created_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created After"}},{"name":"finished_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished Before"}},{"name":"finished_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished After"}},{"name":"flagged","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"true: only flagged sessions. false: only sessions that are not flagged.","title":"Flagged"},"description":"true: only flagged sessions. false: only sessions that are not flagged."},{"name":"flagged_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Only sessions flagged after this time.","title":"Flagged After"},"description":"Only sessions flagged after this time."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number (1-based)","default":1,"title":"Page"},"description":"Page number (1-based)"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Number of items per page","default":10,"title":"Size"},"description":"Number of items per page"},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"enum":["created_at","-created_at"],"type":"string"}},{"type":"null"}],"description":"Sort by field","default":["-created_at"],"title":"Sort"},"description":"Sort by field"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_SessionSummary_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/sessions/quota":{"get":{"tags":["Sessions"],"summary":"Get Session Quota","description":"Concurrent-session quota for the authenticated user.","operationId":"get_session_quota_api_v2_sessions_quota_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuotaStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v2/sessions/visibility":{"get":{"tags":["Sessions"],"summary":"Get Session Visibility","description":"Whether the caller's session lists include other members' sessions, and whether they administer the org.","operationId":"get_session_visibility_api_v2_sessions_visibility_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionVisibility"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v2/sessions/{id}/project":{"get":{"tags":["Sessions"],"summary":"Get Session Project","description":"The project a session ran in, for a caller who would see it there but is working in another project.","operationId":"get_session_project_api_v2_sessions__id__project_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionProject"}}}},"404":{"description":"Session not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/sessions/{id}/flag":{"put":{"tags":["Sessions"],"summary":"Flag Session","description":"Flag the session for attention, or replace the note on its flag; the first flag's time is kept.","operationId":"flag_session_api_v2_sessions__id__flag_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetSessionFlag"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionFlag"}}}},"404":{"description":"Session not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Sessions"],"summary":"Unflag Session","description":"Clear the session's flag. Clearing a session that is not flagged succeeds.","operationId":"unflag_session_api_v2_sessions__id__flag_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"responses":{"204":{"description":"Successful Response"},"404":{"description":"Session not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/sessions/{id}":{"get":{"tags":["Sessions"],"summary":"Get Session","description":"Get a session.","operationId":"get_session_api_v2_sessions__id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Session"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Sessions"],"summary":"Cancel Session","description":"Cancel the session.","operationId":"cancel_session_api_v2_sessions__id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/sessions/{id}/status":{"get":{"tags":["Sessions"],"summary":"Get Session Status","description":"Get a session's live status.","operationId":"get_session_status_api_v2_sessions__id__status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/sessions/{id}/messages":{"post":{"tags":["Sessions"],"summary":"Send Session Messages","description":"Send a user message (single or batch).","operationId":"send_session_messages_api_v2_sessions__id__messages_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UserMessageEvent"},{"$ref":"#/components/schemas/UserMessageBatch"}],"discriminator":{"propertyName":"type","mapping":{"user_message":"#/components/schemas/UserMessageEvent","batch":"#/components/schemas/UserMessageBatch"}},"title":"Input"}}}},"responses":{"202":{"description":"Successful Response"},"429":{"description":"No session slot is free. ``detail[0].type`` says which limit: ``plan_limit`` (the concurrent-session limit), ``capacity`` (the platform is full) or ``queue_full`` (the organization's queue is full). ``detail[0].scope`` says whose slots ran out: ``user``, ``org`` or ``platform``.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuotaErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/sessions/{id}/tool_results":{"post":{"tags":["Sessions"],"summary":"Send Session Tool Results","description":"Send results for custom tool calls (single or batch).","operationId":"send_session_tool_results_api_v2_sessions__id__tool_results_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ToolResultEvent"},{"$ref":"#/components/schemas/ErrorEvent"},{"$ref":"#/components/schemas/ToolResultBatch"}],"title":"Input"}}}},"responses":{"202":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/sessions/{id}/tool_approvals":{"post":{"tags":["Sessions"],"summary":"Send Session Tool Approvals","description":"Approve or deny tool calls listed in ``pending_approvals`` (single or batch).","operationId":"send_session_tool_approvals_api_v2_sessions__id__tool_approvals_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ToolApprovalResponseEvent"},{"$ref":"#/components/schemas/ToolApprovalBatch"}],"discriminator":{"propertyName":"type","mapping":{"tool_approval_response":"#/components/schemas/ToolApprovalResponseEvent","batch":"#/components/schemas/ToolApprovalBatch"}},"title":"Input"}}}},"responses":{"202":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/sessions/{id}/pause":{"post":{"tags":["Sessions"],"summary":"Pause Session","description":"Pause the session.","operationId":"pause_session_api_v2_sessions__id__pause_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"responses":{"202":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/sessions/{id}/resume":{"post":{"tags":["Sessions"],"summary":"Resume Session","description":"Resume the session.","operationId":"resume_session_api_v2_sessions__id__resume_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"responses":{"202":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/sessions/{id}/force_answer":{"post":{"tags":["Sessions"],"summary":"Force Session Answer","description":"Ask the agent to emit a final answer on its next step.","operationId":"force_session_answer_api_v2_sessions__id__force_answer_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"responses":{"202":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/sessions/{id}/changes":{"get":{"tags":["Sessions"],"summary":"Get Session Changes","description":"Long-poll for new events since ``from_index``; 204 if none arrive within ``wait_for_seconds``.","operationId":"get_session_changes_api_v2_sessions__id__changes_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}},{"name":"from_index","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"From Index"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"title":"Limit"}},{"name":"include_events","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Include Events"}},{"name":"wait_for_seconds","in":"query","required":false,"schema":{"type":"integer","maximum":25,"minimum":0,"default":0,"title":"Wait For Seconds"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionChanges"}}}},"204":{"description":"No changes since the specified index"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/sessions/{id}/events":{"get":{"tags":["Sessions"],"summary":"List Session Events","description":"Paginated event history. Use ``/changes`` for live tailing.","operationId":"list_session_events_api_v2_sessions__id__events_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Size"}},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"enum":["timestamp","-timestamp"],"type":"string"}},{"type":"null"}],"title":"Sort"}},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_SessionEvent_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/sessions/{id}/probe":{"post":{"tags":["Sessions"],"summary":"Judge Session Probe","description":"Judge a finished session's browser end state with a completion probe.\n\nThe session must have been created with `capture_end_state`. Answers 409 with `Retry-After` while the session\nruns or its browser is still closing, which takes up to two minutes after the session ends.","operationId":"judge_session_probe_api_v2_sessions__id__probe_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionProbeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionProbeVerdict"}}}},"409":{"description":"The session or its browser is still running"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/sessions/{id}/feedback":{"post":{"tags":["Sessions"],"summary":"Submit Session Feedback","description":"Record semantic-success feedback on the whole session.","operationId":"submit_session_feedback_api_v2_sessions__id__feedback_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Feedback"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/sessions/{id}/events/{event_index}/feedback":{"put":{"tags":["Sessions"],"summary":"Submit Event Feedback","description":"Record feedback on a single event in the session's history.","operationId":"submit_event_feedback_api_v2_sessions__id__events__event_index__feedback_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}},{"name":"event_index","in":"path","required":true,"schema":{"type":"integer","title":"Event Index"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Feedback"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/sessions/{id}/share":{"post":{"tags":["Sessions"],"summary":"Share Session","description":"Make the session publicly readable; returns the share URL path.","operationId":"share_session_api_v2_sessions__id__share_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareLink"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Sessions"],"summary":"Unshare Session","description":"Revoke public access to the session.","operationId":"unshare_session_api_v2_sessions__id__share_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/sessions/{id}/resources/{bucket}/{key}":{"get":{"tags":["Sessions"],"summary":"Get Session Resource","description":"Redirect to a presigned S3 URL for a session-owned resource.","operationId":"get_session_resource_api_v2_sessions__id__resources__bucket___key__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}},{"name":"bucket","in":"path","required":true,"schema":{"type":"string","description":"Storage bucket, as it appears in the resource URL an event carries.","title":"Bucket"},"description":"Storage bucket, as it appears in the resource URL an event carries."},{"name":"key","in":"path","required":true,"schema":{"type":"string","description":"Object key inside the bucket, slashes allowed.","title":"Key"},"description":"Object key inside the bucket, slashes allowed."}],"responses":{"302":{"description":"Redirect to a presigned URL for a session-owned resource."},"200":{"description":"Resource bytes. The API redirects to a presigned S3 URL; SDK clients follow the redirect and receive the raw object (e.g. screenshot image bytes).","content":{"application/octet-stream":{}}},"404":{"description":"Session or resource not found."},"4XX":{"description":"Client error."}}}},"/api/v2/files/{file_id}":{"get":{"tags":["Session Files"],"summary":"Download File","description":"Download a file shared in a session, by the ``file_id`` its ``AttachmentEvent`` carries.","operationId":"download_file_api_v2_files__file_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","description":"Opaque `file_id` from the session's `AttachmentEvent`. Not a UUID.","title":"File Id"},"description":"Opaque `file_id` from the session's `AttachmentEvent`. Not a UUID."}],"responses":{"302":{"description":"Redirect to a presigned URL for the file."},"200":{"description":"File bytes. SDK clients follow the redirect and receive the raw file.","content":{"application/octet-stream":{}}},"404":{"description":"File not found."},"4XX":{"description":"Client error."}}}},"/api/v2/skills":{"post":{"tags":["Skills"],"summary":"Create Skill","description":"Create a skill at revision 1. The ``h/`` namespace is reserved for built-in skills.","operationId":"create_skill_api_v2_skills_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"message","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"description":"Optional note stored on the revision this write creates, such as why the change was made.","title":"Message"},"description":"Optional note stored on the revision this write creates, such as why the change was made."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Skill"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Skill"}}},"headers":{"ETag":{"description":"The revision number of the returned spec, e.g. ``\"3\"``.","schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"tags":["Skills"],"summary":"List Skills","description":"List visible skills. Pages exceeding 8 MiB of encoded helper files return 413; retry with ``size=1``.","operationId":"list_skills_api_v2_skills_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Case-insensitive substring match on skill name.","title":"Name"},"description":"Case-insensitive substring match on skill name."},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Case-insensitive match on skill name or description.","title":"Search"},"description":"Case-insensitive match on skill name or description."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number (1-based)","default":1,"title":"Page"},"description":"Page number (1-based)"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"description":"Number of items per page","default":10,"title":"Size"},"description":"Number of items per page"},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"enum":["created_at","-created_at","name","-name"],"type":"string"}},{"type":"null"}],"description":"Sort by field","default":["-created_at"],"title":"Sort"},"description":"Sort by field"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_Skill_"}}}},"413":{"description":"Page exceeds 8 MiB of encoded helper files; retry with size=1."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/skills/{name}/revisions":{"get":{"tags":["Skills"],"summary":"List Skill Revisions","description":"List a skill's revisions without their content, newest first. Read one with ``?revision=N``.\n\nUnauthenticated callers can list reserved ``h/`` skills only.","operationId":"list_skill_revisions_api_v2_skills__name__revisions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","description":"The skill's `name`, slashes allowed. Not a UUID.","title":"Name"},"description":"The skill's `name`, slashes allowed. Not a UUID."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number (1-based)","default":1,"title":"Page"},"description":"Page number (1-based)"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"description":"Number of items per page","default":10,"title":"Size"},"description":"Number of items per page"},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"enum":["number","-number"],"type":"string"}},{"type":"null"}],"description":"Sort by field","default":["-number"],"title":"Sort"},"description":"Sort by field"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_SkillRevisionRecord_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/skills/{name}/revisions/{number}/restore":{"post":{"tags":["Skills"],"summary":"Restore Skill Revision","description":"Make revision ``number``'s content current again, as a new revision with the message ``Restored from vN``.\n\nValidated and authorised like ``PUT``. The new revision's ``restored_from`` is ``number``.\nRestoring content that is already current changes nothing and returns the current revision.","operationId":"restore_skill_revision_api_v2_skills__name__revisions__number__restore_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","description":"The skill's `name`, slashes allowed. Not a UUID.","title":"Name"},"description":"The skill's `name`, slashes allowed. Not a UUID."},{"name":"number","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"The revision whose content becomes current again.","title":"Number"},"description":"The revision whose content becomes current again."},{"name":"If-Match","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The ``ETag`` of the revision this write is based on, e.g. ``\"3\"``. If the resource has moved past it the write is refused with 412. Omit it, or send ``*``, to write unconditionally.","title":"If-Match"},"description":"The ``ETag`` of the revision this write is based on, e.g. ``\"3\"``. If the resource has moved past it the write is refused with 412. Omit it, or send ``*``, to write unconditionally."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Skill"}}},"headers":{"ETag":{"description":"The revision number of the returned spec, e.g. ``\"3\"``.","schema":{"type":"string"}}}},"412":{"description":"``If-Match`` names a revision that is no longer current; ``ETag`` has the current one.","headers":{"ETag":{"description":"The current revision number, e.g. ``\"4\"``.","schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/skills/{name}":{"get":{"tags":["Skills"],"summary":"Get Skill","description":"Fetch by name at its latest revision, or at ``revision``; 404 if not visible or no such revision.\n\n``:path`` so slash-containing names round-trip.","operationId":"get_skill_api_v2_skills__name__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","description":"The skill's `name`, slashes allowed. Not a UUID.","title":"Name"},"description":"The skill's `name`, slashes allowed. Not a UUID."},{"name":"revision","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"description":"Read this revision instead of the latest. References to a skill elsewhere, such as an agent's ``skills``, pin a revision as ``name:N`` instead.","title":"Revision"},"description":"Read this revision instead of the latest. References to a skill elsewhere, such as an agent's ``skills``, pin a revision as ``name:N`` instead."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Skill"}}},"headers":{"ETag":{"description":"The revision number of the returned spec, e.g. ``\"3\"``.","schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"put":{"tags":["Skills"],"summary":"Update Skill","description":"Replace a skill's content as a new revision. ``name`` must match the URL; renames are not supported.\n\nSending the content that is already current changes nothing and returns the current revision.","operationId":"update_skill_api_v2_skills__name__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","description":"The skill's `name`, slashes allowed. Not a UUID.","title":"Name"},"description":"The skill's `name`, slashes allowed. Not a UUID."},{"name":"message","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"description":"Optional note stored on the revision this write creates, such as why the change was made.","title":"Message"},"description":"Optional note stored on the revision this write creates, such as why the change was made."},{"name":"If-Match","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The ``ETag`` of the revision this write is based on, e.g. ``\"3\"``. If the resource has moved past it the write is refused with 412. Omit it, or send ``*``, to write unconditionally.","title":"If-Match"},"description":"The ``ETag`` of the revision this write is based on, e.g. ``\"3\"``. If the resource has moved past it the write is refused with 412. Omit it, or send ``*``, to write unconditionally."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Skill"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Skill"}}},"headers":{"ETag":{"description":"The revision number of the returned spec, e.g. ``\"3\"``.","schema":{"type":"string"}}}},"412":{"description":"``If-Match`` names a revision that is no longer current; ``ETag`` has the current one.","headers":{"ETag":{"description":"The current revision number, e.g. ``\"4\"``.","schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Skills"],"summary":"Patch Skill","description":"Partially update a skill as a new revision; only provided fields change.","operationId":"patch_skill_api_v2_skills__name__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","description":"The skill's `name`, slashes allowed. Not a UUID.","title":"Name"},"description":"The skill's `name`, slashes allowed. Not a UUID."},{"name":"message","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"description":"Optional note stored on the revision this write creates, such as why the change was made.","title":"Message"},"description":"Optional note stored on the revision this write creates, such as why the change was made."},{"name":"If-Match","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The ``ETag`` of the revision this write is based on, e.g. ``\"3\"``. If the resource has moved past it the write is refused with 412. Omit it, or send ``*``, to write unconditionally.","title":"If-Match"},"description":"The ``ETag`` of the revision this write is based on, e.g. ``\"3\"``. If the resource has moved past it the write is refused with 412. Omit it, or send ``*``, to write unconditionally."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchSkill"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Skill"}}},"headers":{"ETag":{"description":"The revision number of the returned spec, e.g. ``\"3\"``.","schema":{"type":"string"}}}},"412":{"description":"``If-Match`` names a revision that is no longer current; ``ETag`` has the current one.","headers":{"ETag":{"description":"The current revision number, e.g. ``\"4\"``.","schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Skills"],"summary":"Delete Skill","description":"Delete by name, with its revisions. Reserved rows: H employee only.","operationId":"delete_skill_api_v2_skills__name__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","description":"The skill's `name`, slashes allowed. Not a UUID.","title":"Name"},"description":"The skill's `name`, slashes allowed. Not a UUID."},{"name":"If-Match","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The ``ETag`` of the revision this write is based on, e.g. ``\"3\"``. If the resource has moved past it the write is refused with 412. Omit it, or send ``*``, to write unconditionally.","title":"If-Match"},"description":"The ``ETag`` of the revision this write is based on, e.g. ``\"3\"``. If the resource has moved past it the write is refused with 412. Omit it, or send ``*``, to write unconditionally."}],"responses":{"204":{"description":"Successful Response"},"412":{"description":"``If-Match`` names a revision that is no longer current; ``ETag`` has the current one.","headers":{"ETag":{"description":"The current revision number, e.g. ``\"4\"``.","schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/environments":{"post":{"tags":["Environments"],"summary":"Create Environment","description":"Create an environment at revision 1. Ids cannot contain ``:``, which pins a revision in references.","operationId":"create_environment_api_v2_environments_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"message","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"description":"Optional note stored on the revision this write creates, such as why the change was made.","title":"Message"},"description":"Optional note stored on the revision this write creates, such as why the change was made."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Browser"},{"$ref":"#/components/schemas/Desktop"},{"$ref":"#/components/schemas/Android"},{"$ref":"#/components/schemas/Workstation"}],"discriminator":{"propertyName":"kind","mapping":{"web":"#/components/schemas/Browser","desktop":"#/components/schemas/Desktop","android":"#/components/schemas/Android","workstation":"#/components/schemas/Workstation"}},"title":"Create"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Environment"}}},"headers":{"ETag":{"description":"The revision number of the returned spec, e.g. ``\"3\"``.","schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"tags":["Environments"],"summary":"List Environments","description":"List reserved + caller's org environments. Unauthenticated callers see reserved ``h/`` environments only.","operationId":"list_environments_api_v2_environments_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Case-insensitive substring match on environment id.","title":"Id"},"description":"Case-insensitive substring match on environment id."},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentKind"},{"type":"null"}],"description":"Filter by environment kind.","title":"Kind"},"description":"Filter by environment kind."},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Case-insensitive match on environment id or description.","title":"Search"},"description":"Case-insensitive match on environment id or description."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number (1-based)","default":1,"title":"Page"},"description":"Page number (1-based)"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"description":"Number of items per page","default":10,"title":"Size"},"description":"Number of items per page"},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"enum":["created_at","-created_at","id","-id"],"type":"string"}},{"type":"null"}],"description":"Sort by field","default":["-created_at"],"title":"Sort"},"description":"Sort by field"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/environments/{id}/revisions":{"get":{"tags":["Environments"],"summary":"List Environment Revisions","description":"List an environment's revisions without their specs, newest first. Read one with ``?revision=N``.\n\nUnauthenticated callers can list reserved ``h/`` environments only.","operationId":"list_environment_revisions_api_v2_environments__id__revisions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The environment's `id` from its spec, slashes allowed. Not a UUID.","title":"Id"},"description":"The environment's `id` from its spec, slashes allowed. Not a UUID."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number (1-based)","default":1,"title":"Page"},"description":"Page number (1-based)"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"description":"Number of items per page","default":10,"title":"Size"},"description":"Number of items per page"},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"enum":["number","-number"],"type":"string"}},{"type":"null"}],"description":"Sort by field","default":["-number"],"title":"Sort"},"description":"Sort by field"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_EnvironmentRevisionRecord_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/environments/{id}/revisions/{number}/restore":{"post":{"tags":["Environments"],"summary":"Restore Environment Revision","description":"Make revision ``number``'s spec current again, as a new revision with the message ``Restored from vN``.\n\nValidated and authorised like ``PUT``. The new revision's ``restored_from`` is ``number``.\nRestoring a spec that is already current changes nothing and returns the current revision.","operationId":"restore_environment_revision_api_v2_environments__id__revisions__number__restore_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The environment's `id` from its spec, slashes allowed. Not a UUID.","title":"Id"},"description":"The environment's `id` from its spec, slashes allowed. Not a UUID."},{"name":"number","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"The revision whose spec becomes current again.","title":"Number"},"description":"The revision whose spec becomes current again."},{"name":"If-Match","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The ``ETag`` of the revision this write is based on, e.g. ``\"3\"``. If the resource has moved past it the write is refused with 412. Omit it, or send ``*``, to write unconditionally.","title":"If-Match"},"description":"The ``ETag`` of the revision this write is based on, e.g. ``\"3\"``. If the resource has moved past it the write is refused with 412. Omit it, or send ``*``, to write unconditionally."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Environment"}}},"headers":{"ETag":{"description":"The revision number of the returned spec, e.g. ``\"3\"``.","schema":{"type":"string"}}}},"412":{"description":"``If-Match`` names a revision that is no longer current; ``ETag`` has the current one.","headers":{"ETag":{"description":"The current revision number, e.g. ``\"4\"``.","schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/environments/{id}":{"get":{"tags":["Environments"],"summary":"Get Environment","description":"Fetch by id at its latest revision, or at ``revision``; 404 if not visible or no such revision.\n\n``:path`` so slash-containing ids round-trip.","operationId":"get_environment_api_v2_environments__id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The environment's `id` from its spec, slashes allowed. Not a UUID.","title":"Id"},"description":"The environment's `id` from its spec, slashes allowed. Not a UUID."},{"name":"revision","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"description":"Read this revision instead of the latest. References to an environment elsewhere, such as an agent's ``environment``, pin a revision as ``id:N`` instead.","title":"Revision"},"description":"Read this revision instead of the latest. References to an environment elsewhere, such as an agent's ``environment``, pin a revision as ``id:N`` instead."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Environment"}}},"headers":{"ETag":{"description":"The revision number of the returned spec, e.g. ``\"3\"``.","schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"put":{"tags":["Environments"],"summary":"Update Environment","description":"Replace the environment spec as a new revision. ``id`` must match the URL.\n\nSending the spec that is already current changes nothing and returns the current revision.","operationId":"update_environment_api_v2_environments__id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The environment's `id` from its spec, slashes allowed. Not a UUID.","title":"Id"},"description":"The environment's `id` from its spec, slashes allowed. Not a UUID."},{"name":"message","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"description":"Optional note stored on the revision this write creates, such as why the change was made.","title":"Message"},"description":"Optional note stored on the revision this write creates, such as why the change was made."},{"name":"If-Match","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The ``ETag`` of the revision this write is based on, e.g. ``\"3\"``. If the resource has moved past it the write is refused with 412. Omit it, or send ``*``, to write unconditionally.","title":"If-Match"},"description":"The ``ETag`` of the revision this write is based on, e.g. ``\"3\"``. If the resource has moved past it the write is refused with 412. Omit it, or send ``*``, to write unconditionally."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Browser"},{"$ref":"#/components/schemas/Desktop"},{"$ref":"#/components/schemas/Android"},{"$ref":"#/components/schemas/Workstation"}],"discriminator":{"propertyName":"kind","mapping":{"web":"#/components/schemas/Browser","desktop":"#/components/schemas/Desktop","android":"#/components/schemas/Android","workstation":"#/components/schemas/Workstation"}},"title":"Update"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Environment"}}},"headers":{"ETag":{"description":"The revision number of the returned spec, e.g. ``\"3\"``.","schema":{"type":"string"}}}},"412":{"description":"``If-Match`` names a revision that is no longer current; ``ETag`` has the current one.","headers":{"ETag":{"description":"The current revision number, e.g. ``\"4\"``.","schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Environments"],"summary":"Patch Environment","description":"Partially update an environment spec as a new revision; only provided fields change.","operationId":"patch_environment_api_v2_environments__id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The environment's `id` from its spec, slashes allowed. Not a UUID.","title":"Id"},"description":"The environment's `id` from its spec, slashes allowed. Not a UUID."},{"name":"message","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"description":"Optional note stored on the revision this write creates, such as why the change was made.","title":"Message"},"description":"Optional note stored on the revision this write creates, such as why the change was made."},{"name":"If-Match","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The ``ETag`` of the revision this write is based on, e.g. ``\"3\"``. If the resource has moved past it the write is refused with 412. Omit it, or send ``*``, to write unconditionally.","title":"If-Match"},"description":"The ``ETag`` of the revision this write is based on, e.g. ``\"3\"``. If the resource has moved past it the write is refused with 412. Omit it, or send ``*``, to write unconditionally."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchEnvironment"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Environment"}}},"headers":{"ETag":{"description":"The revision number of the returned spec, e.g. ``\"3\"``.","schema":{"type":"string"}}}},"412":{"description":"``If-Match`` names a revision that is no longer current; ``ETag`` has the current one.","headers":{"ETag":{"description":"The current revision number, e.g. ``\"4\"``.","schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Environments"],"summary":"Delete Environment","description":"Delete by id, with its revisions. Reserved rows: H employee only.","operationId":"delete_environment_api_v2_environments__id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The environment's `id` from its spec, slashes allowed. Not a UUID.","title":"Id"},"description":"The environment's `id` from its spec, slashes allowed. Not a UUID."},{"name":"If-Match","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The ``ETag`` of the revision this write is based on, e.g. ``\"3\"``. If the resource has moved past it the write is refused with 412. Omit it, or send ``*``, to write unconditionally.","title":"If-Match"},"description":"The ``ETag`` of the revision this write is based on, e.g. ``\"3\"``. If the resource has moved past it the write is refused with 412. Omit it, or send ``*``, to write unconditionally."}],"responses":{"204":{"description":"Successful Response"},"412":{"description":"``If-Match`` names a revision that is no longer current; ``ETag`` has the current one.","headers":{"ETag":{"description":"The current revision number, e.g. ``\"4\"``.","schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/agents":{"post":{"tags":["Agents"],"summary":"Create Agent","description":"Create an agent at revision 1.","operationId":"create_agent_api_v2_agents_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"message","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"description":"Optional note stored on the revision this write creates, such as why the change was made.","title":"Message"},"description":"Optional note stored on the revision this write creates, such as why the change was made."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}],"description":"Repeating the create with the same key, spec and message within 24h returns the agent the first one made, at revision 1, instead of a 409. The same key with a different request is a 422. A replay while the first create is still running is a 409 with Retry-After. A replay after that agent was deleted is a 404.","title":"Idempotency-Key"},"description":"Repeating the create with the same key, spec and message within 24h returns the agent the first one made, at revision 1, instead of a 409. The same key with a different request is a 422. A replay while the first create is still running is a 409 with Retry-After. A replay after that agent was deleted is a 404."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent"}}},"headers":{"ETag":{"description":"The revision number of the returned spec, e.g. ``\"3\"``.","schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"tags":["Agents"],"summary":"List Agents","description":"List reserved + caller's org agents. Unauthenticated callers see reserved ``h/`` agents only.","operationId":"list_agents_api_v2_agents_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Case-insensitive substring match on agent name.","title":"Agent Name"},"description":"Case-insensitive substring match on agent name."},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Case-insensitive match on agent name or description.","title":"Search"},"description":"Case-insensitive match on agent name or description."},{"name":"reserved","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"``true``: reserved ``h/`` agents only. ``false``: org agents only.","title":"Reserved"},"description":"``true``: reserved ``h/`` agents only. ``false``: org agents only."},{"name":"include","in":"query","required":false,"schema":{"anyOf":[{"const":"revision","type":"string"},{"type":"null"}],"description":"``revision``: each item is an ``AgentWithRevision``, the spec plus the agent's current ``revision`` number. Omitted, items are plain ``Agent`` specs.","title":"Include"},"description":"``revision``: each item is an ``AgentWithRevision``, the spec plus the agent's current ``revision`` number. Omitted, items are plain ``Agent`` specs."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number (1-based)","default":1,"title":"Page"},"description":"Page number (1-based)"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"description":"Number of items per page","default":10,"title":"Size"},"description":"Number of items per page"},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"enum":["created_at","-created_at","agent_name","-agent_name"],"type":"string"}},{"type":"null"}],"description":"Sort by field","default":["-created_at"],"title":"Sort"},"description":"Sort by field"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_Agent_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-include-item-schemas":{"revision":{"$ref":"#/components/schemas/AgentWithRevision"}}}},"/api/v2/agents/{agent_name}/revisions":{"get":{"tags":["Agents"],"summary":"List Agent Revisions","description":"List an agent's revisions without their specs, newest first. Read one with ``?revision=N``.\n\nUnauthenticated callers can list reserved ``h/`` agents only.","operationId":"list_agent_revisions_api_v2_agents__agent_name__revisions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_name","in":"path","required":true,"schema":{"type":"string","description":"The agent's `name` from its spec, slashes allowed. Not a UUID.","title":"Agent Name"},"description":"The agent's `name` from its spec, slashes allowed. Not a UUID."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number (1-based)","default":1,"title":"Page"},"description":"Page number (1-based)"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"description":"Number of items per page","default":10,"title":"Size"},"description":"Number of items per page"},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"enum":["number","-number"],"type":"string"}},{"type":"null"}],"description":"Sort by field","default":["-number"],"title":"Sort"},"description":"Sort by field"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_AgentRevisionRecord_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/agents/{agent_name}/revisions/{number}/restore":{"post":{"tags":["Agents"],"summary":"Restore Agent Revision","description":"Make revision ``number``'s spec current again, as a new revision with the message ``Restored from vN``.\n\nValidated and authorised like ``PUT``. The new revision's ``restored_from`` is ``number``.\nRestoring a spec that is already current changes nothing and returns the current revision.","operationId":"restore_agent_revision_api_v2_agents__agent_name__revisions__number__restore_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_name","in":"path","required":true,"schema":{"type":"string","description":"The agent's `name` from its spec, slashes allowed. Not a UUID.","title":"Agent Name"},"description":"The agent's `name` from its spec, slashes allowed. Not a UUID."},{"name":"number","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"The revision whose spec becomes current again.","title":"Number"},"description":"The revision whose spec becomes current again."},{"name":"If-Match","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The ``ETag`` of the revision this write is based on, e.g. ``\"3\"``. If the resource has moved past it the write is refused with 412. Omit it, or send ``*``, to write unconditionally.","title":"If-Match"},"description":"The ``ETag`` of the revision this write is based on, e.g. ``\"3\"``. If the resource has moved past it the write is refused with 412. Omit it, or send ``*``, to write unconditionally."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent"}}},"headers":{"ETag":{"description":"The revision number of the returned spec, e.g. ``\"3\"``.","schema":{"type":"string"}}}},"412":{"description":"``If-Match`` names a revision that is no longer current; ``ETag`` has the current one.","headers":{"ETag":{"description":"The current revision number, e.g. ``\"4\"``.","schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/agents/{agent_name}":{"get":{"tags":["Agents"],"summary":"Get Agent","description":"Fetch by name at its latest revision, or at ``revision``; 404 if not visible or no such revision.\n\nThe stored spec carries its revision as ``ETag``. A resolved spec does not, since it also\nreflects the current environments, skills, and subagents it names. ``resolve=true``\nmaterialises spec leaves.","operationId":"get_agent_api_v2_agents__agent_name__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_name","in":"path","required":true,"schema":{"type":"string","description":"The agent's `name` from its spec, slashes allowed. Not a UUID.","title":"Agent Name"},"description":"The agent's `name` from its spec, slashes allowed. Not a UUID."},{"name":"revision","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"description":"Read this revision instead of the latest. References to an agent elsewhere, such as a session's ``agent``, pin a revision as ``name:N`` instead.","title":"Revision"},"description":"Read this revision instead of the latest. References to an agent elsewhere, such as a session's ``agent``, pin a revision as ``name:N`` instead."},{"name":"resolve","in":"query","required":false,"schema":{"type":"boolean","description":"Materialise string environment/skill/subagent leaves into full specs.","default":false,"title":"Resolve"},"description":"Materialise string environment/skill/subagent leaves into full specs."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent"}}},"headers":{"ETag":{"description":"The revision number of the returned spec, e.g. ``\"3\"``. Absent with ``resolve=true``, whose body also reflects the current environments, skills, and subagents it names.","schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"put":{"tags":["Agents"],"summary":"Update Agent","description":"Replace ``spec`` as a new revision. ``spec.name`` must match the URL identifier; renames are not supported.\n\nSending the spec that is already current changes nothing and returns the current revision.","operationId":"update_agent_api_v2_agents__agent_name__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_name","in":"path","required":true,"schema":{"type":"string","description":"The agent's `name` from its spec, slashes allowed. Not a UUID.","title":"Agent Name"},"description":"The agent's `name` from its spec, slashes allowed. Not a UUID."},{"name":"message","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"description":"Optional note stored on the revision this write creates, such as why the change was made.","title":"Message"},"description":"Optional note stored on the revision this write creates, such as why the change was made."},{"name":"If-Match","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The ``ETag`` of the revision this write is based on, e.g. ``\"3\"``. If the resource has moved past it the write is refused with 412. Omit it, or send ``*``, to write unconditionally.","title":"If-Match"},"description":"The ``ETag`` of the revision this write is based on, e.g. ``\"3\"``. If the resource has moved past it the write is refused with 412. Omit it, or send ``*``, to write unconditionally."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent"}}},"headers":{"ETag":{"description":"The revision number of the returned spec, e.g. ``\"3\"``.","schema":{"type":"string"}}}},"412":{"description":"``If-Match`` names a revision that is no longer current; ``ETag`` has the current one.","headers":{"ETag":{"description":"The current revision number, e.g. ``\"4\"``.","schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Agents"],"summary":"Patch Agent","description":"Partially update an agent spec as a new revision; only provided fields change.","operationId":"patch_agent_api_v2_agents__agent_name__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_name","in":"path","required":true,"schema":{"type":"string","description":"The agent's `name` from its spec, slashes allowed. Not a UUID.","title":"Agent Name"},"description":"The agent's `name` from its spec, slashes allowed. Not a UUID."},{"name":"message","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"description":"Optional note stored on the revision this write creates, such as why the change was made.","title":"Message"},"description":"Optional note stored on the revision this write creates, such as why the change was made."},{"name":"If-Match","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The ``ETag`` of the revision this write is based on, e.g. ``\"3\"``. If the resource has moved past it the write is refused with 412. Omit it, or send ``*``, to write unconditionally.","title":"If-Match"},"description":"The ``ETag`` of the revision this write is based on, e.g. ``\"3\"``. If the resource has moved past it the write is refused with 412. Omit it, or send ``*``, to write unconditionally."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchAgent"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent"}}},"headers":{"ETag":{"description":"The revision number of the returned spec, e.g. ``\"3\"``.","schema":{"type":"string"}}}},"412":{"description":"``If-Match`` names a revision that is no longer current; ``ETag`` has the current one.","headers":{"ETag":{"description":"The current revision number, e.g. ``\"4\"``.","schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Agents"],"summary":"Delete Agent","description":"Delete by name, with its revisions. Reserved rows: H employee only.","operationId":"delete_agent_api_v2_agents__agent_name__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_name","in":"path","required":true,"schema":{"type":"string","description":"The agent's `name` from its spec, slashes allowed. Not a UUID.","title":"Agent Name"},"description":"The agent's `name` from its spec, slashes allowed. Not a UUID."},{"name":"If-Match","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The ``ETag`` of the revision this write is based on, e.g. ``\"3\"``. If the resource has moved past it the write is refused with 412. Omit it, or send ``*``, to write unconditionally.","title":"If-Match"},"description":"The ``ETag`` of the revision this write is based on, e.g. ``\"3\"``. If the resource has moved past it the write is refused with 412. Omit it, or send ``*``, to write unconditionally."}],"responses":{"204":{"description":"Successful Response"},"412":{"description":"``If-Match`` names a revision that is no longer current; ``ETag`` has the current one.","headers":{"ETag":{"description":"The current revision number, e.g. ``\"4\"``.","schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/webhooks":{"post":{"tags":["Webhooks"],"summary":"Create Webhook","description":"Register a webhook. The signing secret is only returned here; store it securely.","operationId":"create_webhook_api_v2_webhooks_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhook"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookWithSecret"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"tags":["Webhooks"],"summary":"List Webhooks","description":"List the organization's webhooks.","operationId":"list_webhooks_api_v2_webhooks_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number (1-based)","default":1,"title":"Page"},"description":"Page number (1-based)"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"description":"Number of items per page","default":10,"title":"Size"},"description":"Number of items per page"},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"enum":["created_at","-created_at"],"type":"string"}},{"type":"null"}],"description":"Sort by field","default":["-created_at"],"title":"Sort"},"description":"Sort by field"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_WebhookRecord_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/webhooks/events":{"get":{"tags":["Webhooks"],"summary":"List Webhook Events","description":"List concrete webhook event types clients can subscribe to.","operationId":"list_webhook_events_api_v2_webhooks_events_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WebhookEventTypeDefinition"},"type":"array","title":"Response List Webhook Events Api V2 Webhooks Events Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v2/webhooks/{webhook_id}":{"get":{"tags":["Webhooks"],"summary":"Get Webhook","description":"Fetch a webhook by id.","operationId":"get_webhook_api_v2_webhooks__webhook_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Webhook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookRecord"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Webhooks"],"summary":"Update Webhook","description":"Update a webhook; only provided fields change.","operationId":"update_webhook_api_v2_webhooks__webhook_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Webhook Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhook"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookRecord"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Webhooks"],"summary":"Delete Webhook","description":"Delete a webhook.","operationId":"delete_webhook_api_v2_webhooks__webhook_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Webhook Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/webhooks/{webhook_id}/rotate":{"post":{"tags":["Webhooks"],"summary":"Rotate Webhook Secret","description":"Replace the signing secret. Only returned here; make your receiver accept both secrets before rotating.","operationId":"rotate_webhook_secret_api_v2_webhooks__webhook_id__rotate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Webhook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookWithSecret"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/webhooks/{webhook_id}/ping":{"post":{"tags":["Webhooks"],"summary":"Ping Webhook","description":"Send a signed ping event to the webhook and report the receiver's HTTP response.","operationId":"ping_webhook_api_v2_webhooks__webhook_id__ping_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Webhook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookPingResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/schedules":{"post":{"tags":["Schedules"],"summary":"Create Schedule","description":"Create a schedule that starts a session on each fire.","operationId":"create_schedule_api_v2_schedules_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSchedule"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleRecord"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"tags":["Schedules"],"summary":"List Schedules","description":"List the organization's schedules.","operationId":"list_schedules_api_v2_schedules_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number (1-based)","default":1,"title":"Page"},"description":"Page number (1-based)"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"description":"Number of items per page","default":10,"title":"Size"},"description":"Number of items per page"},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"enum":["created_at","-created_at"],"type":"string"}},{"type":"null"}],"description":"Sort by field","default":["-created_at"],"title":"Sort"},"description":"Sort by field"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_ScheduleRecord_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/schedules/{schedule_id}":{"get":{"tags":["Schedules"],"summary":"Get Schedule","description":"Fetch a schedule by id.","operationId":"get_schedule_api_v2_schedules__schedule_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"schedule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Schedule Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleRecord"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Schedules"],"summary":"Update Schedule","description":"Update a schedule; only provided fields change. Timing changes recompute the next fire.","operationId":"update_schedule_api_v2_schedules__schedule_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"schedule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Schedule Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSchedule"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleRecord"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Schedules"],"summary":"Delete Schedule","description":"Delete a schedule. Future fires stop; sessions already created keep running.","operationId":"delete_schedule_api_v2_schedules__schedule_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"schedule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Schedule Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/schedules/{schedule_id}/pause":{"post":{"tags":["Schedules"],"summary":"Pause Schedule","description":"Pause a schedule with an optional note.","operationId":"pause_schedule_api_v2_schedules__schedule_id__pause_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"schedule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Schedule Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PauseSchedule"},{"type":"null"}],"title":"Pause"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleRecord"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/schedules/{schedule_id}/resume":{"post":{"tags":["Schedules"],"summary":"Resume Schedule","description":"Resume a paused schedule; the next fire is recomputed from now.","operationId":"resume_schedule_api_v2_schedules__schedule_id__resume_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"schedule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Schedule Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleRecord"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/schedules/{schedule_id}/trigger":{"post":{"tags":["Schedules"],"summary":"Trigger Schedule","description":"Fire the schedule once now (works while paused).\n\nOn an active schedule, a run that creates a session takes the place of the next scheduled run:\nthe next run moves one occurrence later and the run counts toward repeats. A skipped or failed\nrun, or a run of a paused schedule, leaves the schedule's timing and repeats unchanged.","operationId":"trigger_schedule_api_v2_schedules__schedule_id__trigger_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"schedule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Schedule Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleRunRecord"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/schedules/{schedule_id}/runs":{"get":{"tags":["Schedules"],"summary":"List Schedule Runs","description":"List the schedule's recent run outcomes, newest fire first.","operationId":"list_schedule_runs_api_v2_schedules__schedule_id__runs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"schedule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Schedule Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number (1-based)","default":1,"title":"Page"},"description":"Page number (1-based)"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"description":"Number of items per page","default":10,"title":"Size"},"description":"Number of items per page"},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"enum":["scheduled_for","-scheduled_for"],"type":"string"}},{"type":"null"}],"description":"Sort by field","default":["-scheduled_for"],"title":"Sort"},"description":"Sort by field"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_ScheduleRunRecord_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/schedules/{schedule_id}/probe/draft":{"post":{"tags":["Schedules"],"summary":"Draft Schedule Probe","description":"Draft a completion probe from the schedule's runs marked as passing or failing; nothing is stored.","operationId":"draft_schedule_probe_api_v2_schedules__schedule_id__probe_draft_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"schedule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Schedule Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProbeDraft"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/workflows/{workflow_type}/probe/draft":{"post":{"tags":["Workflows"],"summary":"Draft Workflow Probe","description":"Draft a completion probe from the workflow type's runs marked as passing or failing; nothing is stored.","operationId":"draft_workflow_probe_api_v2_workflows__workflow_type__probe_draft_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workflow_type","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,200}$","description":"The Temporal workflow type, as the `workflow_type` metadata of the sessions its runs create.","title":"Workflow Type"},"description":"The Temporal workflow type, as the `workflow_type` metadata of the sessions its runs create."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProbeDraft"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/browser-profiles":{"get":{"tags":["Browser Profiles"],"summary":"List Browser Profiles","description":"List the caller's browser profiles.","operationId":"list_browser_profiles_api_v2_browser_profiles_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":10,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowserProfileList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/browser-profiles/initiate-upload":{"post":{"tags":["Browser Profiles"],"summary":"Initiate Browser Profile Upload","description":"Get a presigned S3 POST for uploading a profile zip directly to S3.\n\nThe returned ``upload_url`` and ``upload_fields`` are passed through verbatim;\nthe client uploads to S3 and then calls ``complete-upload``.","operationId":"initiate_browser_profile_upload_api_v2_browser_profiles_initiate_upload_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitiateUploadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v2/browser-profiles/{profile_id}/complete-upload":{"post":{"tags":["Browser Profiles"],"summary":"Complete Browser Profile Upload","description":"Finalize a profile after the zip is uploaded to S3.\n\n``browser_name`` is an unconstrained ``str`` here; env-manager validates it\nagainst its own ``BROWSER_NAMES`` literal and returns 422 on a bad value.","operationId":"complete_browser_profile_upload_api_v2_browser_profiles__profile_id__complete_upload_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Profile Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowserProfileCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowserProfileRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/browser-profiles/default":{"get":{"tags":["Browser Profiles"],"summary":"Get Default Browser Profile","description":"Fetch the caller's default profile for a browser flavor (404 when unset).","operationId":"get_default_browser_profile_api_v2_browser_profiles_default_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"browser_name","in":"query","required":true,"schema":{"type":"string","description":"Browser flavor, e.g. 'chromium'","title":"Browser Name"},"description":"Browser flavor, e.g. 'chromium'"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowserProfileRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/browser-profiles/{profile_id}/default":{"put":{"tags":["Browser Profiles"],"summary":"Set Default Browser Profile","description":"Mark a profile as the caller's default for its browser flavor.\n\nSessions created with ``use_default_browser_profile: true`` attach this\nprofile. Replaces the caller's previous default for the same browser_name.","operationId":"set_default_browser_profile_api_v2_browser_profiles__profile_id__default_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Profile Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowserProfileRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Browser Profiles"],"summary":"Unset Default Browser Profile","description":"Clear the default flag on a profile.","operationId":"unset_default_browser_profile_api_v2_browser_profiles__profile_id__default_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Profile Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowserProfileRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/browser-profiles/{profile_id}":{"get":{"tags":["Browser Profiles"],"summary":"Get Browser Profile","description":"Fetch a browser profile by id.","operationId":"get_browser_profile_api_v2_browser_profiles__profile_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Profile Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowserProfileRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Browser Profiles"],"summary":"Delete Browser Profile","description":"Delete a browser profile (record + S3 object).","operationId":"delete_browser_profile_api_v2_browser_profiles__profile_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Profile Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/vaults":{"post":{"tags":["Vaults"],"summary":"Create Vault","description":"Create a vault config. A third-party provider's token is validated by env-manager before storage.","operationId":"create_vault_api_v2_vaults_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VaultCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VaultConfigRead"}}}},"400":{"description":"The provider rejected the token or config.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailErrorResponse"}}}},"409":{"description":"The org already has a vault with this name.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"tags":["Vaults"],"summary":"List Vaults","description":"List the caller's org vault configs.","operationId":"list_vaults_api_v2_vaults_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VaultConfigList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/vaults/{vault_id}":{"get":{"tags":["Vaults"],"summary":"Get Vault","description":"Fetch a vault config by id.","operationId":"get_vault_api_v2_vaults__vault_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"vault_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Vault Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VaultConfigRead"}}}},"404":{"description":"No vault with this id in the caller's org.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Vaults"],"summary":"Update Vault","description":"Partial update of a vault config (name and/or provider_config).","operationId":"update_vault_api_v2_vaults__vault_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"vault_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Vault Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VaultUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VaultConfigRead"}}}},"400":{"description":"- `provider_config` names a different provider.\n- The provider rejected the token or config.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailErrorResponse"}}}},"404":{"description":"No vault with this id in the caller's org.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailErrorResponse"}}}},"409":{"description":"The org already has a vault with this name.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Vaults"],"summary":"Delete Vault","description":"Delete a vault config. An internal vault's items are deleted with it.","operationId":"delete_vault_api_v2_vaults__vault_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"vault_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Vault Id"}}],"responses":{"204":{"description":"Successful Response"},"404":{"description":"No vault with this id in the caller's org.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailErrorResponse"}}}},"409":{"description":"An item was added during the delete; retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/vaults/{vault_id}/token":{"put":{"tags":["Vaults"],"summary":"Rotate Vault Token","description":"Rotate the stored provider token. env-manager health-checks it before writing.","operationId":"rotate_vault_token_api_v2_vaults__vault_id__token_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"vault_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Vault Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VaultTokenRotateRequest"}}}},"responses":{"204":{"description":"Successful Response"},"400":{"description":"- The vault has no token (an internal vault).\n- The provider rejected the token or config.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailErrorResponse"}}}},"404":{"description":"No vault with this id in the caller's org.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/vaults/{vault_id}/health":{"get":{"tags":["Vaults"],"summary":"Vault Health","description":"Probe the vault's provider. Always 200 when reachable; branch on ``ok``.","operationId":"vault_health_api_v2_vaults__vault_id__health_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"vault_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Vault Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VaultHealth"}}}},"404":{"description":"No vault with this id in the caller's org.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/vaults/{vault_id}/items":{"post":{"tags":["Vaults"],"summary":"Create Vault Item","description":"Add an item to an internal vault. The response lists which fields are set, never their values.","operationId":"create_vault_item_api_v2_vaults__vault_id__items_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"vault_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Vault Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VaultItemCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VaultItemRead"}}}},"400":{"description":"- The vault is not an internal vault.\n- `totp` is neither a base32 seed nor a valid `otpauth://totp/` URI.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailErrorResponse"}}}},"403":{"description":"The org is at its `max_items_per_org` cap.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailErrorResponse"}}}},"404":{"description":"No vault with this id in the caller's org.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"tags":["Vaults"],"summary":"List Vault Items","description":"List an internal vault's items, newest first.","operationId":"list_vault_items_api_v2_vaults__vault_id__items_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"vault_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Vault Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VaultItemList"}}}},"400":{"description":"The vault is not an internal vault.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailErrorResponse"}}}},"404":{"description":"No vault with this id in the caller's org.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/vaults/{vault_id}/items/{item_id}":{"get":{"tags":["Vaults"],"summary":"Get Vault Item","description":"Fetch an internal vault item's metadata.","operationId":"get_vault_item_api_v2_vaults__vault_id__items__item_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"vault_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Vault Id"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VaultItemRead"}}}},"400":{"description":"The vault is not an internal vault.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailErrorResponse"}}}},"404":{"description":"No such vault in the caller's org, or no such item in it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Vaults"],"summary":"Update Vault Item","description":"Partial update of an internal vault item.","operationId":"update_vault_item_api_v2_vaults__vault_id__items__item_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"vault_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Vault Id"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Item Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VaultItemUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VaultItemRead"}}}},"400":{"description":"- The vault is not an internal vault.\n- `totp` is neither a base32 seed nor a valid `otpauth://totp/` URI.\n- The update would remove every value.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailErrorResponse"}}}},"404":{"description":"No such vault in the caller's org, or no such item in it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailErrorResponse"}}}},"502":{"description":"The item's stored values could not be read.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Vaults"],"summary":"Delete Vault Item","description":"Delete an internal vault item and its stored values.","operationId":"delete_vault_item_api_v2_vaults__vault_id__items__item_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"vault_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Vault Id"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Item Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"description":"The vault is not an internal vault.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailErrorResponse"}}}},"404":{"description":"No such vault in the caller's org, or no such item in it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/vaults/{vault_id}/items/{item_id}/reveal":{"post":{"tags":["Vaults"],"summary":"Reveal Vault Item","description":"Return an internal vault item's values, with the current TOTP code in place of its seed. Audit-logged.","operationId":"reveal_vault_item_api_v2_vaults__vault_id__items__item_id__reveal_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"vault_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Vault Id"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VaultItemValues"}}}},"400":{"description":"The vault is not an internal vault.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailErrorResponse"}}}},"404":{"description":"No such vault in the caller's org, or no such item in it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailErrorResponse"}}}},"502":{"description":"The item's stored values could not be read.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/sessions/{session_id}/files/list_files":{"post":{"tags":["Session Files"],"summary":"List Files","description":"List files on the session's pod (allowlisted roots only), newest first, paged via the cursor.","operationId":"list_files_api_v2_sessions__session_id__files_list_files_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListFilesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListFilesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/sessions/{session_id}/files/read_file":{"post":{"tags":["Session Files"],"summary":"Read File","description":"Read a file from the session's pod, returned base64-encoded (size-capped).","operationId":"read_file_api_v2_sessions__session_id__files_read_file_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadFileRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadFileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/sessions/{session_id}/files/write_file":{"post":{"tags":["Session Files"],"summary":"Write File","description":"Write base64-encoded content to a file on the session's pod (size-capped).","operationId":"write_file_api_v2_sessions__session_id__files_write_file_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WriteFileRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WriteFileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/quota/tokens":{"get":{"tags":["quota"],"summary":"Get Token Quota","description":"Return the current org's token-quota snapshot for the FE meter.","operationId":"get_token_quota_api_v2_quota_tokens_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenQuotaStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]}}},"components":{"schemas":{"ActiveStateChangeData":{"properties":{"state":{"type":"string","enum":["running","idle","awaiting_tool_results"],"title":"State"},"pending_tool_calls":{"anyOf":[{"items":{"$ref":"#/components/schemas/ToolRequest"},"type":"array"},{"type":"null"}],"title":"Pending Tool Calls"},"pending_approvals":{"anyOf":[{"items":{"$ref":"#/components/schemas/ToolApprovalRequest"},"type":"array"},{"type":"null"}],"title":"Pending Approvals"}},"additionalProperties":true,"type":"object","required":["state"],"title":"ActiveStateChangeData"},"ActiveStateChangeEvent":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"type":"string","const":"ActiveStateChangeEvent","title":"Type"},"data":{"$ref":"#/components/schemas/ActiveStateChangeData"}},"additionalProperties":true,"type":"object","required":["timestamp","type","data"],"title":"ActiveStateChangeEvent","description":"The agent switched between running, idle and awaiting the client, for custom tool results or approvals."},"Agent":{"properties":{"name":{"type":"string","maxLength":127,"minLength":1,"title":"Name","description":"Unique name for this agent in your catalog. Format: lowercase ASCII letters, digits and hyphens; must start and end with alphanumeric; max 63 chars per segment; optional single 'org/' namespace prefix (e.g. 'h/web-environment')."},"description":{"type":"string","minLength":1,"title":"Description","description":"What the agent does. Parent agents read this to decide when to delegate to it."},"environments":{"items":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/Environment"}]},"type":"array","title":"Environments","description":"Environments the agent runs in. Each entry is a registered environment's id or an inline definition. At most one per kind. Required unless the agent delegates to subagents or uses client-executed custom tools."},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"Model that serves the agent. Defaults to the platform model if omitted."},"reasoning_effort":{"anyOf":[{"type":"string","enum":["disabled","low","medium","xhigh"]},{"type":"null"}],"title":"Reasoning Effort","description":"How much the model thinks before each step: more is slower and more careful. Null uses the model's default. Models without effort levels only honor 'disabled'."},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions","description":"Instructions appended to the agent's system prompt to steer behavior."},"subagents":{"anyOf":[{"items":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/Agent"}]},"type":"array"},{"type":"null"}],"title":"Subagents","description":"Agents this one can delegate to. Each entry is a registered agent's name or an inline definition."},"skills":{"anyOf":[{"items":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/Skill"}]},"type":"array"},{"type":"null"}],"title":"Skills","description":"Skills the agent can draw on. Each entry is a registered skill's name or an inline definition."},"answer_format":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Answer Format","description":"JSON Schema the agent's final answer must conform to. Null returns a free-form text answer."},"tools":{"anyOf":[{"items":{"$ref":"#/components/schemas/ToolDefinition"},"type":"array"},{"type":"null"}],"title":"Tools","description":"Custom tools executed by the API client. The agent emits a tool call, pauses, and resumes once the client sends back the matching tool result."},"memory":{"anyOf":[{"$ref":"#/components/schemas/MemoryConfig"},{"type":"null"}],"description":"Persistent memory the agent can save to and recall from across sessions. Off when null."}},"type":"object","required":["name","description","environments"],"title":"Agent","description":"Declarative agent definition."},"AgentCompletionData":{"properties":{"reason":{"type":"string","enum":["finished","stopped","timed_out"],"title":"Reason"}},"additionalProperties":true,"type":"object","required":["reason"],"title":"AgentCompletionData"},"AgentCompletionEvent":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"type":"string","const":"AgentCompletionEvent","title":"Type"},"data":{"$ref":"#/components/schemas/AgentCompletionData"}},"additionalProperties":true,"type":"object","required":["timestamp","type","data"],"title":"AgentCompletionEvent","description":"The agent run completed."},"AgentErrorData":{"properties":{"error":{"type":"string","title":"Error"},"trace":{"type":"string","title":"Trace","default":""},"info":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Info"}},"additionalProperties":true,"type":"object","required":["error"],"title":"AgentErrorData"},"AgentErrorEvent":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"type":"string","const":"AgentErrorEvent","title":"Type"},"data":{"$ref":"#/components/schemas/AgentErrorData"}},"additionalProperties":true,"type":"object","required":["timestamp","type","data"],"title":"AgentErrorEvent","description":"The agent run failed."},"AgentEvent":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"type":"string","const":"AgentEvent","title":"Type"},"data":{"oneOf":[{"$ref":"#/components/schemas/PolicyEvent"},{"$ref":"#/components/schemas/ToolResultEvent"},{"$ref":"#/components/schemas/AnswerEvent"},{"$ref":"#/components/schemas/ErrorEvent"},{"$ref":"#/components/schemas/MessageEvent"},{"$ref":"#/components/schemas/ObservationEvent"},{"$ref":"#/components/schemas/FlowEvent"}],"title":"Data","discriminator":{"propertyName":"kind","mapping":{"answer_event":"#/components/schemas/AnswerEvent","error_event":"#/components/schemas/ErrorEvent","flow_event":"#/components/schemas/FlowEvent","message_event":"#/components/schemas/MessageEvent","observation_event":"#/components/schemas/ObservationEvent","policy_event":"#/components/schemas/PolicyEvent","tool_result":"#/components/schemas/ToolResultEvent"}}}},"additionalProperties":true,"type":"object","required":["timestamp","type","data"],"title":"AgentEvent","description":"Event emitted by the agent loop itself; ``data`` is discriminated by ``kind``."},"AgentRevisionRecord":{"properties":{"number":{"type":"integer","minimum":1.0,"title":"Number","description":"Revision number, from 1. Read its spec with ``GET /v2/agents/{agent_name}?revision={number}``."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By","description":"User who made the change. Null when unknown, and on reserved ``h/`` agents for non-H callers."},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"Note sent with the change, if any."},"restored_from":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Restored From","description":"The earlier revision whose spec this one restored, through ``POST .../revisions/{N}/restore``."}},"additionalProperties":false,"type":"object","required":["number","created_at"],"title":"AgentRevisionRecord","description":"One stored revision of an agent, without its spec."},"AgentRunStatusChangeData":{"properties":{"status":{"type":"string","enum":["running","paused"],"title":"Status"}},"additionalProperties":true,"type":"object","required":["status"],"title":"AgentRunStatusChangeData"},"AgentRunStatusChangeEvent":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"type":"string","const":"AgentRunStatusChangeEvent","title":"Type"},"data":{"$ref":"#/components/schemas/AgentRunStatusChangeData"}},"additionalProperties":true,"type":"object","required":["timestamp","type","data"],"title":"AgentRunStatusChangeEvent","description":"The run status changed."},"AgentStartedData":{"properties":{},"additionalProperties":true,"type":"object","title":"AgentStartedData","description":"Empty payload."},"AgentStartedEvent":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"type":"string","const":"AgentStartedEvent","title":"Type"},"data":{"$ref":"#/components/schemas/AgentStartedData"}},"additionalProperties":true,"type":"object","required":["timestamp","type","data"],"title":"AgentStartedEvent","description":"The agent process started."},"Android":{"properties":{"id":{"type":"string","minLength":1,"title":"Id","description":"Catalog identifier for this environment."},"kind":{"type":"string","const":"android","title":"Kind","default":"android"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id","description":"Connect to an existing Android session by id instead of starting a new one."},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image","description":"Emulator image to boot instead of the default one, e.g. an image with an app preinstalled. Ignored when session_id attaches to an existing session."},"lazy":{"type":"boolean","title":"Lazy","description":"Provision on the agent's first use instead of at startup. Skips the initial observation.","default":false}},"type":"object","required":["id"],"title":"Android","description":"An Android device the agent controls via touch, keyboard, and screenshots."},"AnswerEvent":{"properties":{"kind":{"type":"string","const":"answer_event","title":"Kind","default":"answer_event"},"answer":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}],"title":"Answer","description":"Final answer, plain text or structured JSON; any embedded image is inlined as base64, not a URL."},"outcome":{"anyOf":[{"$ref":"#/components/schemas/AnswerOutcome"},{"type":"null"}],"description":"Agent's self-assessment of the task outcome; null when the agent did not report one."}},"type":"object","required":["answer"],"title":"AnswerEvent","description":"Agent's final answer for the current task."},"AnswerOutcome":{"type":"string","enum":["success","partial","infeasible","blocked"],"title":"AnswerOutcome","description":"Agent's self-assessment of how the task concluded, reported with the final answer."},"ApprovalRequirement":{"properties":{"source":{"type":"string","title":"Source","description":"Who requires the approval: 'guardrail' for the policy checker, 'tool' for a tool declared as requiring approval, 'environment' for the environment running the call (e.g. a sandbox command allowlist), 'resume' for a call found waiting when its session was resumed. Other sources may appear."},"reason":{"type":"string","title":"Reason","description":"Why the call waits, for the approver."},"policy_clause_refs":{"items":{"type":"string"},"type":"array","title":"Policy Clause Refs","description":"Policy clauses the source cited, when it judges against a policy."}},"type":"object","required":["source","reason"],"title":"ApprovalRequirement","description":"One reason a tool call waits for a human decision; a call held by several sources carries one per source."},"AttachmentData":{"properties":{"origin":{"type":"string","enum":["agent","user"],"title":"Origin"},"name":{"type":"string","title":"Name"},"path":{"type":"string","title":"Path"},"media_type":{"type":"string","title":"Media Type"},"size_bytes":{"type":"integer","title":"Size Bytes"},"url":{"type":"string","title":"Url"},"file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Id"}},"additionalProperties":true,"type":"object","required":["origin","name","path","media_type","size_bytes","url"],"title":"AttachmentData"},"AttachmentEvent":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"type":"string","const":"AttachmentEvent","title":"Type"},"data":{"$ref":"#/components/schemas/AttachmentData"}},"additionalProperties":true,"type":"object","required":["timestamp","type","data"],"title":"AttachmentEvent","description":"A file passed between the user and the agent's environment; ``data.url`` downloads it, as does\n``GET /v2/files/{data.file_id}`` when the platform stored it."},"Browser":{"properties":{"id":{"type":"string","minLength":1,"title":"Id","description":"Catalog identifier for this environment."},"kind":{"type":"string","const":"web","title":"Kind","default":"web"},"start_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Url","description":"Initial URL to open. An absolute http or https URL.","default":"https://www.bing.com"},"headless":{"type":"boolean","title":"Headless","description":"Run the browser without a visible window.","default":false},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id","description":"Connect to an existing browser session by id instead of starting a new one."},"mode":{"oneOf":[{"$ref":"#/components/schemas/BrowserVisualMode"},{"$ref":"#/components/schemas/BrowserTextMode"}],"title":"Mode","description":"How the agent perceives and drives the browser.","discriminator":{"propertyName":"type","mapping":{"text":"#/components/schemas/BrowserTextMode","visual":"#/components/schemas/BrowserVisualMode"}}},"lazy":{"type":"boolean","title":"Lazy","description":"Provision on the agent's first use instead of at startup. Skips the initial observation.","default":false},"settle_s":{"type":"number","maximum":10.0,"minimum":0.0,"title":"Settle S","description":"Seconds to wait after each page action.","default":1.0},"vault_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Vault Id","description":"Id of a vault config to bind to this browser, letting the agent sign in to sites with secrets resolved from the vault. The vault must belong to the caller's organization. Omit to run without secret access."},"browser_profile_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Browser Profile Id","description":"Id of a browser profile to load into this browser, restoring saved cookies and storage state from a prior session. The profile must belong to the caller's organization. Omit to run with a fresh profile."},"use_default_browser_profile":{"type":"boolean","title":"Use Default Browser Profile","description":"When true, load the caller's default browser profile for this browser flavor (marked via the browser-profiles API) instead of naming one explicitly. Mutually exclusive with browser_profile_id. When no default exists, an empty profile is auto-created and marked default; default-profile sessions save their final state back on stop when no other session is already persisting the profile.","default":false},"persist_browser_profile":{"type":"boolean","title":"Persist Browser Profile","description":"When true, the browser profile is updated with this session's final browser state (cookies, storage) when the session ends. Requires browser_profile_id or use_default_browser_profile. Only one active session at a time may persist a given profile; concurrent read-only use is always allowed.","default":false},"network":{"anyOf":[{"$ref":"#/components/schemas/BrowserNetwork"},{"type":"null"}],"description":"Optional network configuration for the remote browser session. Applied only when a new runner session is provisioned (not when session_id is set)."}},"type":"object","required":["id"],"title":"Browser","description":"A web browser the agent navigates and acts on."},"BrowserNetwork":{"properties":{"proxy_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proxy Url","description":"Optional bring-your-own HTTP/HTTPS/SOCKS proxy URL for browser egress (e.g. http://user:pass@proxy.example.com:8080). Applied when provisioning a new remote browser session. Only supported for chromium-based browser runners (headful and headless). Ignored when session_id attaches to an existing session. Mutually exclusive with managed_proxy."},"managed_proxy":{"anyOf":[{"$ref":"#/components/schemas/ManagedProxySelection"},{"type":"null"}],"description":"Optional H-managed proxy (e.g. Oxylabs), provisioned for the session. Applied when provisioning a new remote browser session. Only supported for chromium-based browser runners (headful and headless). Ignored when session_id attaches to an existing session. Mutually exclusive with proxy_url."}},"type":"object","title":"BrowserNetwork","description":"Network egress settings for a remote browser session."},"BrowserProfileCreate":{"properties":{"name":{"type":"string","title":"Name"},"browser_name":{"type":"string","title":"Browser Name"},"browser_version":{"type":"string","title":"Browser Version"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"labels":{"additionalProperties":{"type":"string"},"type":"object","title":"Labels"}},"type":"object","required":["name","browser_name","browser_version"],"title":"BrowserProfileCreate","description":"Request model for completing a browser profile upload."},"BrowserProfileList":{"properties":{"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"profiles":{"items":{"$ref":"#/components/schemas/BrowserProfileRead"},"type":"array","title":"Profiles"}},"type":"object","required":["total","limit","offset","profiles"],"title":"BrowserProfileList","description":"Response model for listing browser profiles."},"BrowserProfileRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"org_id":{"type":"string","format":"uuid","title":"Org Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"browser_name":{"type":"string","title":"Browser Name"},"browser_version":{"type":"string","title":"Browser Version"},"s3_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"S3 Path"},"file_size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"File Size Bytes"},"checksum":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checksum"},"usage_count":{"type":"integer","title":"Usage Count","default":0},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"labels":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Labels"},"is_default":{"type":"boolean","title":"Is Default","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","user_id","org_id","name","browser_name","browser_version","created_at","updated_at"],"title":"BrowserProfileRead","description":"Response model for a browser profile."},"BrowserTextMode":{"properties":{"type":{"type":"string","const":"text","title":"Type","default":"text"},"chunk_size":{"type":"integer","exclusiveMinimum":0.0,"title":"Chunk Size","description":"Characters of page text shown per page.","default":20000}},"type":"object","title":"BrowserTextMode","description":"Read-only markdown with URL navigation, no screenshots."},"BrowserVisualMode":{"properties":{"type":{"type":"string","const":"visual","title":"Type","default":"visual"},"width":{"type":"integer","exclusiveMinimum":0.0,"title":"Width","description":"Viewport width in pixels.","default":1200},"height":{"type":"integer","exclusiveMinimum":0.0,"title":"Height","description":"Viewport height in pixels.","default":1200},"markdown":{"type":"boolean","title":"Markdown","description":"Also include the viewport's text as markdown alongside each screenshot.","default":false}},"type":"object","title":"BrowserVisualMode","description":"Act on screenshots by viewport coordinates."},"CatalogRevisionRef":{"properties":{"catalog_id":{"type":"string","format":"uuid","title":"Catalog Id","description":"Catalog id of the skill or environment; never reused, unlike its name."},"name":{"type":"string","title":"Name","description":"The skill's name or the environment's ``id`` at that revision."},"revision":{"type":"integer","minimum":1.0,"title":"Revision","description":"Revision the session ran."}},"additionalProperties":false,"type":"object","required":["catalog_id","name","revision"],"title":"CatalogRevisionRef","description":"A catalog skill or environment at the revision a session ran."},"ConnectedServer":{"properties":{"name":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","title":"Name","description":"Server name as `mcporter call <name>.<tool>` reads it."},"description":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Description","description":"Optional short hint for custom or opaque names; omitted when unused."}},"type":"object","required":["name"],"title":"ConnectedServer","description":"One MCP server the user's shell reaches with ``mcporter``; keys stay where it is served."},"CreateSchedule":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Description"},"timing":{"$ref":"#/components/schemas/CronTiming"},"session_request":{"$ref":"#/components/schemas/SessionRequest","description":"Template used to create each scheduled session; re-resolved on every fire."},"repeats":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Repeats","description":"How many sessions to create before the schedule becomes inactive. Omit to run until paused or deleted."},"probe":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/JsonValue"},"type":"object"},{"type":"null"}],"title":"Probe","description":"Completion probe each run's browser end state is checked against once its session finished; the verdict is written as a `probe` score on the session and as the run's `probe_outcome`. Null leaves runs to judge rules."},"capture_end_state":{"type":"boolean","title":"Capture End State","description":"Record each run's browser end state when its session closes, as a probe does, so that a probe can be drafted from the runs before the schedule has one.","default":false}},"type":"object","required":["name","timing","session_request"],"title":"CreateSchedule","description":"Register a schedule that creates a session on each fire."},"CreateWebhook":{"properties":{"url":{"type":"string","maxLength":2048,"minLength":1,"title":"Url"},"enabled_events":{"items":{"type":"string"},"type":"array","title":"Enabled Events","description":"Event types delivered to this webhook. '*' subscribes to the session.status_updated firehose; granular session.* types are delivered only when listed explicitly.","default":["*"]},"description":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Description"}},"type":"object","required":["url"],"title":"CreateWebhook","description":"Register a webhook for the caller's organization."},"CronTiming":{"properties":{"type":{"type":"string","const":"cron","title":"Type","default":"cron"},"expression":{"type":"string","title":"Expression","description":"Five-field cron expression, e.g. '0 9 * * 1-5'."},"timezone":{"type":"string","title":"Timezone","description":"IANA timezone the expression is evaluated in, e.g. 'Europe/Paris'."}},"type":"object","required":["expression","timezone"],"title":"CronTiming","description":"Cron cadence evaluated in an IANA timezone."},"DependencyRevisions":{"properties":{"skills":{"items":{"$ref":"#/components/schemas/CatalogRevisionRef"},"type":"array","title":"Skills"},"environments":{"items":{"$ref":"#/components/schemas/CatalogRevisionRef"},"type":"array","title":"Environments"}},"additionalProperties":false,"type":"object","title":"DependencyRevisions","description":"The catalog skill and environment revisions a session resolved, including its subagents'."},"Desktop":{"properties":{"id":{"type":"string","minLength":1,"title":"Id","description":"Catalog identifier for this environment."},"kind":{"type":"string","const":"desktop","title":"Kind","default":"desktop"},"mode":{"oneOf":[{"$ref":"#/components/schemas/DesktopVisualMode"},{"$ref":"#/components/schemas/DesktopShellMode"}],"title":"Mode","description":"How the agent perceives and drives the machine.","discriminator":{"propertyName":"type","mapping":{"shell":"#/components/schemas/DesktopShellMode","visual":"#/components/schemas/DesktopVisualMode"}}},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id","description":"Connect to an existing desktop session by id."},"lazy":{"type":"boolean","title":"Lazy","description":"Reach the desktop on the agent's first use instead of at startup. Skips the initial observation.","default":false},"screenshot_max_width":{"anyOf":[{"type":"integer","maximum":1920.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Screenshot Max Width","description":"Maximum screenshot width in pixels. Null uses 1920; images are never upscaled."}},"type":"object","required":["id"],"title":"Desktop","description":"Your own computer."},"DesktopShellMode":{"properties":{"type":{"type":"string","const":"shell","title":"Type","default":"shell"},"command_approval":{"type":"string","enum":["not_required","required"],"title":"Command Approval","description":"`required` holds each command until the user approves it, unless it starts with one of `allowed_commands`. A machine with an allowlist of its own asks by that one.","default":"not_required"},"allowed_commands":{"items":{"type":"string"},"type":"array","title":"Allowed Commands","description":"Commands that run without approval, each with any arguments after it, such as `git status`."},"sandbox":{"type":"string","enum":["if_available","required"],"title":"Sandbox","description":"`if_available` confines commands on a machine that has the sandbox, and runs them as the user on one that does not. `required` runs no command on a machine that cannot confine them.","default":"if_available"},"allowed_domains":{"items":{"type":"string","pattern":"^(\\*\\.)?([A-Za-z0-9-]+\\.)+[A-Za-z0-9-]+$"},"type":"array","title":"Allowed Domains","description":"Hosts the confined commands may reach besides the Python and npm registries, such as `github.com` or `*.example.com`. A machine with sandbox settings of its own reaches what those say."},"writable_folders":{"items":{"type":"string","pattern":"^(~?/|[A-Za-z]:[/\\\\])[^/\\\\]"},"type":"array","title":"Writable Folders","description":"Folders the confined commands may write besides the session's own, absolute or under `~/`, such as `~/Projects/app`. A machine with sandbox settings of its own writes where those say."}},"type":"object","title":"DesktopShellMode","description":"Drive the machine from a shell: commands, files, and the screen and browser through CLIs."},"DesktopVisualMode":{"properties":{"type":{"type":"string","const":"visual","title":"Type","default":"visual"},"settle_s":{"type":"number","maximum":10.0,"minimum":0.0,"title":"Settle S","description":"Seconds to wait after each mouse or keyboard action.","default":0.5}},"type":"object","title":"DesktopVisualMode","description":"Drive the screen with mouse and keyboard actions and a screenshot after each step."},"DetailErrorResponse":{"properties":{"detail":{"type":"string","title":"Detail"}},"type":"object","required":["detail"],"title":"DetailErrorResponse","description":"Error body with its message in `detail`."},"Environment":{"oneOf":[{"$ref":"#/components/schemas/Browser"},{"$ref":"#/components/schemas/Desktop"},{"$ref":"#/components/schemas/Android"},{"$ref":"#/components/schemas/Workstation"}],"discriminator":{"propertyName":"kind","mapping":{"android":"#/components/schemas/Android","desktop":"#/components/schemas/Desktop","web":"#/components/schemas/Browser","workstation":"#/components/schemas/Workstation"}}},"EnvironmentKind":{"type":"string","enum":["web","desktop","android","workstation"],"title":"EnvironmentKind","description":"Environment family."},"EnvironmentPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Environment"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"}},"type":"object","required":["items","total","page"],"title":"EnvironmentPage","description":"Named page subclass so OpenAPI emits a clean ``EnvironmentPage`` schema name."},"EnvironmentRevisionRecord":{"properties":{"number":{"type":"integer","minimum":1.0,"title":"Number","description":"Revision number, from 1. Read its spec with ``GET /v2/environments/{id}?revision={number}``."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By","description":"User who made the change. Null when unknown, and on reserved ``h/`` environments for non-H callers."},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"Note sent with the change, if any."},"restored_from":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Restored From","description":"The earlier revision whose spec this one restored, through ``POST .../revisions/{N}/restore``."}},"additionalProperties":false,"type":"object","required":["number","created_at"],"title":"EnvironmentRevisionRecord","description":"One stored revision of an environment, without its spec."},"ErrorEvent":{"properties":{"kind":{"type":"string","const":"error_event","title":"Kind","default":"error_event"},"error":{"type":"string","title":"Error"},"origin":{"type":"string","title":"Origin","description":"Component that raised the error."},"tool_req":{"anyOf":[{"$ref":"#/components/schemas/ToolRequest"},{"type":"null"}],"description":"Tool request being executed, if any."}},"type":"object","required":["error","origin"],"title":"ErrorEvent","description":"Recoverable error raised while running the agent loop."},"Feedback":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["success"],"title":"Feedback","description":"Feedback on the semantic success of the trajectory."},"FileContent":{"properties":{"type":{"type":"string","enum":["base64","url"],"title":"Type","description":"'base64' when sending the file, 'url' once the platform has stored it.","default":"base64"},"source":{"type":"string","title":"Source","description":"Base64 payload when type is 'base64', download URL when type is 'url'."},"name":{"type":"string","title":"Name","description":"File name, without its directory."},"media_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Media Type","description":"MIME type, e.g. 'application/pdf'; guessed if omitted."},"size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size Bytes","description":"Size of the file in bytes, set by the platform."}},"type":"object","required":["source","name"],"title":"FileContent","description":"A file attached to a user message: sent as base64, stored and read back as a platform URL."},"FileEntry":{"properties":{"name":{"type":"string","title":"Name"},"path":{"type":"string","title":"Path"},"size_bytes":{"type":"integer","title":"Size Bytes"},"modified_at":{"type":"string","format":"date-time","title":"Modified At"},"is_dir":{"type":"boolean","title":"Is Dir"}},"type":"object","required":["name","path","size_bytes","modified_at","is_dir"],"title":"FileEntry","description":"One entry in a directory listing."},"FileTransferData":{"properties":{"direction":{"type":"string","enum":["download","upload"],"title":"Direction"},"path":{"type":"string","title":"Path"},"size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size Bytes"}},"additionalProperties":true,"type":"object","required":["direction","path"],"title":"FileTransferData"},"FileTransferEvent":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"type":"string","const":"FileTransferEvent","title":"Type"},"data":{"$ref":"#/components/schemas/FileTransferData"}},"additionalProperties":true,"type":"object","required":["timestamp","type","data"],"title":"FileTransferEvent","description":"The agent moved a file in or out of its environment."},"FlowEvent":{"properties":{"kind":{"type":"string","const":"flow_event","title":"Kind","default":"flow_event"},"flow":{"type":"string","title":"Flow","description":"Control signal, e.g. \"pause\", \"resume\", \"force_answer\"."},"origin":{"type":"string","title":"Origin","description":"Who triggered the transition."}},"type":"object","required":["flow","origin"],"title":"FlowEvent","description":"Run-loop control transition (pause, resume, stop, ...)."},"ImageContent":{"properties":{"source":{"type":"string","title":"Source","description":"Image location: a fetchable URL or a base64 payload, per ``type``."},"type":{"type":"string","enum":["url","base64"],"title":"Type"},"media_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Media Type","description":"MIME type, e.g. \"image/png\"."}},"type":"object","required":["source","type"],"title":"ImageContent","description":"Image payload: ``url`` for platform-served screenshots, ``base64`` for inline images."},"InitiateUploadResponse":{"properties":{"profile_id":{"type":"string","format":"uuid","title":"Profile Id"},"upload_url":{"type":"string","title":"Upload Url"},"upload_fields":{"additionalProperties":{"type":"string"},"type":"object","title":"Upload Fields"},"upload_expires_in":{"type":"integer","title":"Upload Expires In"}},"type":"object","required":["profile_id","upload_url","upload_fields","upload_expires_in"],"title":"InitiateUploadResponse","description":"Response model for initiating a browser profile upload."},"InternalConfig":{"properties":{"provider":{"type":"string","const":"internal","title":"Provider","default":"internal"}},"type":"object","title":"InternalConfig","description":"H-hosted vault: its items are stored by the session manager, and it takes no token."},"JsonValue":{},"ListFilesRequest":{"properties":{"path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path","description":"Directory to list; by default the environment's own, such as `~/Downloads` on a browser."},"max_entries":{"type":"integer","minimum":1.0,"title":"Max Entries","default":500},"modified_before":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified Before"},"name_after":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name After"}},"type":"object","title":"ListFilesRequest","description":"Directory to list on the session's pod."},"ListFilesResponse":{"properties":{"path":{"type":"string","title":"Path"},"files":{"items":{"$ref":"#/components/schemas/FileEntry"},"type":"array","title":"Files"},"truncated":{"type":"boolean","title":"Truncated"}},"type":"object","required":["path","files","truncated"],"title":"ListFilesResponse","description":"Directory listing, newest first; ``truncated`` when capped at ``max_entries``."},"LiveViewUrlData":{"properties":{"live_view_url":{"type":"string","title":"Live View Url"}},"additionalProperties":true,"type":"object","required":["live_view_url"],"title":"LiveViewUrlData"},"LiveViewUrlEvent":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"type":"string","const":"LiveViewUrlEvent","title":"Type"},"data":{"$ref":"#/components/schemas/LiveViewUrlData"}},"additionalProperties":true,"type":"object","required":["timestamp","type","data"],"title":"LiveViewUrlEvent","description":"A live view URL became available."},"ManagedProxySelection":{"properties":{"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country","description":"Two-letter ISO 3166-1 country to source IPs from (e.g. 'US'). Validated server-side."},"sticky":{"type":"boolean","title":"Sticky","description":"Keep the same IP across the session where the pool allows it.","default":true},"pool":{"$ref":"#/components/schemas/ProxyPool","description":"Which upstream IP pool to draw from.","default":"residential"}},"type":"object","title":"ManagedProxySelection","description":"Request for an H-managed proxy, provisioned per session.\n\nDescribes intent only — pool, country, stickiness — never credentials; H resolves\nand injects those when provisioning the session, including which provider backs\nthe requested pool."},"MemoryConfig":{"properties":{"namespace":{"type":"string","maxLength":127,"minLength":1,"title":"Namespace","description":"Memory namespace the agent reads and writes."}},"type":"object","required":["namespace"],"title":"MemoryConfig","description":"Persistent memory for an agent: agents that share a namespace share their memories."},"MessageEvent":{"properties":{"kind":{"type":"string","const":"message_event","title":"Kind","default":"message_event"},"caller_id":{"type":"string","title":"Caller Id"},"content":{"items":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/ImageContent"}]},"type":"array","title":"Content"}},"type":"object","required":["caller_id"],"title":"MessageEvent","description":"Message exchanged with the agent (user, system or subagent)."},"Metrics":{"properties":{"steps":{"type":"integer","title":"Steps","description":"Steps taken so far.","default":0},"cost_per_model":{"items":{"$ref":"#/components/schemas/ModelCost"},"type":"array","title":"Cost Per Model","description":"Per-model token usage and cost."},"input_cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Input Cost","description":"Total input cost in USD; null if any model is unpriced."},"output_cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Output Cost","description":"Total output cost in USD; null if any model is unpriced."},"reasoning_cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Reasoning Cost","description":"Total reasoning cost in USD; null if any model is unpriced."},"total_cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Cost","description":"Total cost in USD; null if any model is unpriced."}},"additionalProperties":true,"type":"object","title":"Metrics","description":"Rolled-up usage and cost for a session."},"MetricsUpdateData":{"properties":{"metrics":{"$ref":"#/components/schemas/Metrics"}},"additionalProperties":true,"type":"object","required":["metrics"],"title":"MetricsUpdateData"},"MetricsUpdateEvent":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"type":"string","const":"MetricsUpdateEvent","title":"Type"},"data":{"$ref":"#/components/schemas/MetricsUpdateData"}},"additionalProperties":true,"type":"object","required":["timestamp","type","data"],"title":"MetricsUpdateEvent","description":"Rolled-up usage and cost metrics for the session."},"ModelCost":{"properties":{"name":{"type":"string","title":"Name","description":"Model id."},"input_tokens":{"type":"integer","title":"Input Tokens","description":"Input tokens consumed."},"cached_tokens":{"type":"integer","title":"Cached Tokens","description":"Input tokens served from the prompt cache, billed at a discount.","default":0},"output_tokens":{"type":"integer","title":"Output Tokens","description":"Output tokens produced."},"reasoning_tokens":{"type":"integer","title":"Reasoning Tokens","description":"Reasoning tokens produced."},"input_cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Input Cost","description":"Input cost in USD; null if the model is unpriced."},"output_cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Output Cost","description":"Output cost in USD; null if the model is unpriced."},"reasoning_cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Reasoning Cost","description":"Reasoning cost in USD; null if the model is unpriced."},"total_cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Cost","description":"Total cost in USD; null if the model is unpriced."}},"additionalProperties":true,"type":"object","required":["name","input_tokens","output_tokens","reasoning_tokens"],"title":"ModelCost","description":"Token usage and cost for a single model."},"ModelUsage":{"properties":{"name":{"type":"string","title":"Name","description":"Model id."},"input_tokens":{"type":"integer","title":"Input Tokens","description":"Input tokens consumed."},"cached_tokens":{"type":"integer","title":"Cached Tokens","description":"Input tokens served from the prompt cache, billed at a discount.","default":0},"output_tokens":{"type":"integer","title":"Output Tokens","description":"Output tokens produced."},"reasoning_tokens":{"type":"integer","title":"Reasoning Tokens","description":"Reasoning tokens produced."}},"type":"object","required":["name","input_tokens","output_tokens","reasoning_tokens"],"title":"ModelUsage","description":"Per-model token usage."},"ObservationEvent":{"properties":{"kind":{"type":"string","const":"observation_event","title":"Kind","default":"observation_event"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type","description":"Environment that produced the observation, e.g. \"web\"."},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"image":{"anyOf":[{"$ref":"#/components/schemas/ImageContent"},{"type":"null"}]},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","description":"Environment-specific snapshot, shaped by ``type``."}},"type":"object","title":"ObservationEvent","description":"What the agent perceived this step: optional text, screenshot and environment metadata."},"OnePasswordConfig":{"properties":{"provider":{"type":"string","const":"onepassword","title":"Provider","default":"onepassword"},"op_vault_id":{"type":"string","title":"Op Vault Id"}},"type":"object","required":["op_vault_id"],"title":"OnePasswordConfig","description":"1Password vault provider config."},"Page_AgentRevisionRecord_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AgentRevisionRecord"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"}},"type":"object","required":["items","total","page"],"title":"Page[AgentRevisionRecord]"},"Page_Agent_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Agent"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"}},"type":"object","required":["items","total","page"],"title":"Page[Agent]"},"Page_EnvironmentRevisionRecord_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/EnvironmentRevisionRecord"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"}},"type":"object","required":["items","total","page"],"title":"Page[EnvironmentRevisionRecord]"},"Page_ScheduleRecord_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ScheduleRecord"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"}},"type":"object","required":["items","total","page"],"title":"Page[ScheduleRecord]"},"Page_ScheduleRunRecord_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ScheduleRunRecord"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"}},"type":"object","required":["items","total","page"],"title":"Page[ScheduleRunRecord]"},"Page_SessionEvent_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SessionEvent"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"}},"type":"object","required":["items","total","page"],"title":"Page[SessionEvent]"},"Page_SessionSummary_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SessionSummary"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"}},"type":"object","required":["items","total","page"],"title":"Page[SessionSummary]"},"Page_SkillRevisionRecord_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SkillRevisionRecord"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"}},"type":"object","required":["items","total","page"],"title":"Page[SkillRevisionRecord]"},"Page_Skill_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Skill"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"}},"type":"object","required":["items","total","page"],"title":"Page[Skill]"},"Page_WebhookRecord_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/WebhookRecord"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"}},"type":"object","required":["items","total","page"],"title":"Page[WebhookRecord]"},"PatchAgent":{"properties":{"description":{"type":"string","minLength":1,"title":"Description","description":"What the agent does. Parent agents read this to decide when to delegate to it."},"environments":{"items":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/Environment"}]},"type":"array","title":"Environments","description":"Environments the agent runs in. Each entry is a registered environment's id or an inline definition. At most one per kind. Required unless the agent delegates to subagents or uses client-executed custom tools."},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"Model that serves the agent. Defaults to the platform model if omitted."},"reasoning_effort":{"anyOf":[{"type":"string","enum":["disabled","low","medium","xhigh"]},{"type":"null"}],"title":"Reasoning Effort","description":"How much the model thinks before each step: more is slower and more careful. Null uses the model's default. Models without effort levels only honor 'disabled'."},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions","description":"Instructions appended to the agent's system prompt to steer behavior."},"subagents":{"anyOf":[{"items":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/Agent"}]},"type":"array"},{"type":"null"}],"title":"Subagents","description":"Agents this one can delegate to. Each entry is a registered agent's name or an inline definition."},"skills":{"anyOf":[{"items":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/Skill"}]},"type":"array"},{"type":"null"}],"title":"Skills","description":"Skills the agent can draw on. Each entry is a registered skill's name or an inline definition."},"answer_format":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Answer Format","description":"JSON Schema the agent's final answer must conform to. Null returns a free-form text answer."},"tools":{"anyOf":[{"items":{"$ref":"#/components/schemas/ToolDefinition"},"type":"array"},{"type":"null"}],"title":"Tools","description":"Custom tools executed by the API client. The agent emits a tool call, pauses, and resumes once the client sends back the matching tool result."},"memory":{"anyOf":[{"$ref":"#/components/schemas/MemoryConfig"},{"type":"null"}],"description":"Persistent memory the agent can save to and recall from across sessions. Off when null."}},"type":"object","title":"PatchAgent","description":"Partial agent update."},"PatchEnvironment":{"properties":{"start_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Url","description":"Initial URL to open. An absolute http or https URL."},"headless":{"type":"boolean","title":"Headless","description":"Run the browser without a visible window."},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"mode":{"oneOf":[{"$ref":"#/components/schemas/PatchEnvironmentModeVisual"},{"$ref":"#/components/schemas/BrowserTextMode"},{"$ref":"#/components/schemas/DesktopShellMode"}],"title":"Mode","discriminator":{"propertyName":"type","mapping":{"shell":"#/components/schemas/DesktopShellMode","text":"#/components/schemas/BrowserTextMode","visual":"#/components/schemas/PatchEnvironmentModeVisual"}}},"lazy":{"type":"boolean","title":"Lazy"},"settle_s":{"type":"number","maximum":10.0,"minimum":0.0,"title":"Settle S","description":"Seconds to wait after each page action."},"vault_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Vault Id","description":"Id of a vault config to bind to this browser, letting the agent sign in to sites with secrets resolved from the vault. The vault must belong to the caller's organization. Omit to run without secret access."},"browser_profile_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Browser Profile Id","description":"Id of a browser profile to load into this browser, restoring saved cookies and storage state from a prior session. The profile must belong to the caller's organization. Omit to run with a fresh profile."},"use_default_browser_profile":{"type":"boolean","title":"Use Default Browser Profile","description":"When true, load the caller's default browser profile for this browser flavor (marked via the browser-profiles API) instead of naming one explicitly. Mutually exclusive with browser_profile_id. When no default exists, an empty profile is auto-created and marked default; default-profile sessions save their final state back on stop when no other session is already persisting the profile."},"persist_browser_profile":{"type":"boolean","title":"Persist Browser Profile","description":"When true, the browser profile is updated with this session's final browser state (cookies, storage) when the session ends. Requires browser_profile_id or use_default_browser_profile. Only one active session at a time may persist a given profile; concurrent read-only use is always allowed."},"network":{"anyOf":[{"$ref":"#/components/schemas/BrowserNetwork"},{"type":"null"}],"description":"Optional network configuration for the remote browser session. Applied only when a new runner session is provisioned (not when session_id is set)."},"screenshot_max_width":{"anyOf":[{"type":"integer","maximum":1920.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Screenshot Max Width","description":"Maximum screenshot width in pixels. Null uses 1920; images are never upscaled."},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image","description":"Emulator image to boot instead of the default one, e.g. an image with an app preinstalled. Ignored when session_id attaches to an existing session."},"storage":{"anyOf":[{"$ref":"#/components/schemas/WorkstationStorage"},{"type":"null"}],"description":"Which disk a cloud workstation runs on. Omit to let the stage decide: the caller's default volume where the workstation is persistent by default, a fresh machine elsewhere. Ignored when session_id attaches to an existing session."}},"type":"object","title":"PatchEnvironment","description":"Partial environment update."},"PatchEnvironmentModeVisual":{"properties":{"type":{"type":"string","const":"visual","title":"Type","default":"visual"},"width":{"type":"integer","exclusiveMinimum":0.0,"title":"Width","description":"Viewport width in pixels."},"height":{"type":"integer","exclusiveMinimum":0.0,"title":"Height","description":"Viewport height in pixels."},"markdown":{"type":"boolean","title":"Markdown","description":"Also include the viewport's text as markdown alongside each screenshot."},"settle_s":{"type":"number","maximum":10.0,"minimum":0.0,"title":"Settle S","description":"Seconds to wait after each mouse or keyboard action."}},"type":"object","title":"PatchEnvironmentModeVisual","description":"The `visual` fields of every kind that has them. The patch replaces the stored value whole: a field left out takes its default, and one the environment's kind does not have is rejected."},"PatchSkill":{"properties":{"description":{"type":"string","minLength":1,"title":"Description","description":"When to use this skill. The agent reads this to decide whether to load it."},"body":{"type":"string","minLength":1,"title":"Body","description":"Markdown instructions the agent loads when it uses the skill."},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"Optional URL the content was sourced from."},"url_pattern":{"anyOf":[{"type":"string","maxLength":1024,"minLength":1},{"type":"null"}],"title":"Url Pattern","description":"Optional regex hinting at URLs where this skill applies."},"compatibility":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Compatibility"},"files":{"additionalProperties":{"type":"string","contentEncoding":"base64","contentMediaType":"application/octet-stream"},"type":"object","maxProperties":511,"title":"Files"},"executable_files":{"items":{"type":"string"},"type":"array","title":"Executable Files"}},"type":"object","title":"PatchSkill","description":"Partial skill update."},"PauseSchedule":{"properties":{"note":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Note"}},"type":"object","title":"PauseSchedule","description":"Pause a schedule with an optional note explaining why."},"PolicyEvent":{"properties":{"kind":{"type":"string","const":"policy_event","title":"Kind","default":"policy_event"},"reasoning_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoning Content"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"tool_reqs":{"items":{"$ref":"#/components/schemas/ToolRequest"},"type":"array","title":"Tool Reqs"},"validation_errors":{"items":{"type":"string"},"type":"array","title":"Validation Errors","description":"Validation errors raised while parsing the model output."}},"type":"object","title":"PolicyEvent","description":"One policy (LLM) step: the model output plus the tool requests extracted from it."},"ProbeDraft":{"properties":{"probe":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/JsonValue"},"type":"object"},{"type":"null"}],"title":"Probe","description":"Probe that passes the end state of every passing run and of no failing or reference run. Null when none could be drafted."},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason","description":"Why no probe could be drafted; null with a probe."},"passing_runs":{"type":"integer","title":"Passing Runs","description":"End states the draft was computed from, of the schedule's sessions a person marked as passing: by an `outcome` score of `success`, else a thumbs up."},"failing_runs":{"type":"integer","title":"Failing Runs","description":"End states the draft was computed from, of the schedule's sessions a person marked as failing: by any other `outcome` score, else a thumbs down."},"reference_runs":{"type":"integer","title":"Reference Runs","description":"End states the draft was computed from, of sessions of the organization's other schedules a person marked as passing; the probe must fail them."},"unrecorded_runs":{"type":"integer","title":"Unrecorded Runs","description":"Labelled sessions left out because their browser recorded no end state, or one the probe could have no verdict on. Many of them next to few runs counted means capture was off when they ran."}},"type":"object","required":["probe","reason","passing_runs","failing_runs","reference_runs","unrecorded_runs"],"title":"ProbeDraft","description":"A completion probe drafted from a schedule's labelled runs, to review and set as the schedule's `probe`."},"ProxyPool":{"type":"string","enum":["residential","datacenter","isp","mobile"],"title":"ProxyPool","description":"The kind of upstream IPs a managed proxy draws from."},"QuotaError":{"properties":{"type":{"type":"string","enum":["plan_limit","capacity","queue_full"],"title":"Type"},"message":{"type":"string","title":"Message"},"scope":{"type":"string","enum":["user","org","platform"],"title":"Scope"}},"type":"object","required":["type","message","scope"],"title":"QuotaError","description":"One ``detail`` item of a quota 429: which limit was hit and whose slots ran out."},"QuotaErrorResponse":{"properties":{"message":{"type":"string","title":"Message"},"detail":{"items":{"$ref":"#/components/schemas/QuotaError"},"type":"array","title":"Detail"}},"type":"object","required":["message","detail"],"title":"QuotaErrorResponse","description":"Body of a quota 429."},"QuotaStatus":{"properties":{"scope":{"type":"string","enum":["user","org"],"title":"Scope"},"limit":{"type":"integer","title":"Limit"},"active":{"type":"integer","title":"Active"},"available":{"type":"integer","title":"Available"}},"type":"object","required":["scope","limit","active","available"],"title":"QuotaStatus","description":"Quota status."},"ReadFileRequest":{"properties":{"path":{"type":"string","title":"Path"}},"type":"object","required":["path"],"title":"ReadFileRequest","description":"File to read from the session's pod."},"ReadFileResponse":{"properties":{"path":{"type":"string","title":"Path"},"content_base64":{"type":"string","title":"Content Base64"},"size_bytes":{"type":"integer","title":"Size Bytes"},"modified_at":{"type":"string","format":"date-time","title":"Modified At"}},"type":"object","required":["path","content_base64","size_bytes","modified_at"],"title":"ReadFileResponse","description":"A file's base64 contents and metadata."},"RequestStartData":{"properties":{},"additionalProperties":true,"type":"object","title":"RequestStartData","description":"Empty payload."},"RequestStartDispatchedData":{"properties":{"status":{"type":"string","title":"Status"}},"additionalProperties":true,"type":"object","required":["status"],"title":"RequestStartDispatchedData"},"RequestStartDispatchedEvent":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"type":"string","const":"RequestStartDispatchedEvent","title":"Type"},"data":{"$ref":"#/components/schemas/RequestStartDispatchedData"}},"additionalProperties":true,"type":"object","required":["timestamp","type","data"],"title":"RequestStartDispatchedEvent","description":"The start request was dispatched to a runner."},"RequestStartEvent":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"type":"string","const":"RequestStartEvent","title":"Type"},"data":{"$ref":"#/components/schemas/RequestStartData"}},"additionalProperties":true,"type":"object","required":["timestamp","type","data"],"title":"RequestStartEvent","description":"The platform requested the agent to start."},"Runner":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"Agent-envs id of the runner session: the id its connect URLs (noVNC included) address. It changes when the agent moves to a new runner."},"kind":{"$ref":"#/components/schemas/EnvironmentKind","description":"Kind of the environment it hosts. With a browser and a workstation, the browser's."}},"type":"object","required":["id","kind"],"title":"Runner","description":"The agent-envs session hosting a session's environment."},"RunnerSessionData":{"properties":{"runner_session_id":{"type":"string","title":"Runner Session Id"},"kind":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentKind"},{"type":"null"}]}},"additionalProperties":true,"type":"object","required":["runner_session_id"],"title":"RunnerSessionData"},"RunnerSessionEvent":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"type":"string","const":"RunnerSessionEvent","title":"Type"},"data":{"$ref":"#/components/schemas/RunnerSessionData"}},"additionalProperties":true,"type":"object","required":["timestamp","type","data"],"title":"RunnerSessionEvent","description":"A session-manager session hosting one of this session's environments became addressable by id."},"ScheduleRecord":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"timing":{"$ref":"#/components/schemas/CronTiming"},"session_request":{"$ref":"#/components/schemas/SessionRequest"},"paused":{"type":"boolean","title":"Paused"},"pause_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pause Note"},"repeats":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeats","description":"How many sessions to create before the schedule becomes inactive. Null means it runs until paused or deleted."},"sessions_created":{"type":"integer","title":"Sessions Created","description":"Fires that created a session: automatic fires, and manual triggers of an active schedule, which replace its next occurrence. Skipped fires, errors, and manual triggers of a paused schedule are not counted. When this reaches repeats, the schedule is paused."},"probe":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/JsonValue"},"type":"object"},{"type":"null"}],"title":"Probe","description":"Completion probe each run's browser end state is checked against."},"capture_end_state":{"type":"boolean","title":"Capture End State","description":"Whether each run's browser end state is recorded even while the schedule has no probe."},"next_run_times":{"items":{"type":"string","format":"date-time"},"type":"array","title":"Next Run Times","description":"The next few fire times, empty while paused."},"last_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Run At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","description","timing","session_request","paused","pause_note","repeats","sessions_created","probe","capture_end_state","next_run_times","last_run_at","created_at","updated_at"],"title":"ScheduleRecord","description":"Schedule as returned by reads."},"ScheduleRunRecord":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"schedule_id":{"type":"string","format":"uuid","title":"Schedule Id"},"status":{"type":"string","enum":["created","skipped_overlap","skipped_quota","error"],"title":"Status"},"scheduled_for":{"type":"string","format":"date-time","title":"Scheduled For"},"session_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Session Id"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"triggered_manually":{"type":"boolean","title":"Triggered Manually"},"probe_outcome":{"anyOf":[{"type":"string","enum":["pass","fail","unjudged"]},{"type":"null"}],"title":"Probe Outcome","description":"What the schedule's probe said of the session's browser end state; `unjudged` when it could not tell. Null until the session finished and its end state was checked (`unjudged` if that takes over 24 hours), or when the run is over a day older than the schedule's probe."},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","schedule_id","status","scheduled_for","session_id","error","triggered_manually","probe_outcome","created_at"],"title":"ScheduleRunRecord","description":"Outcome of one schedule fire."},"Session":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"request":{"$ref":"#/components/schemas/SessionRequest","description":"The request the session runs. Secrets read back as ``***``, with keys and list lengths kept: a browser ``proxy_url``."},"status":{"$ref":"#/components/schemas/SessionStatus"},"agent_revision":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Agent Revision","description":"Revision of the catalog agent the session runs; ``request.agent`` is that revision, resolved, with ``request.overrides`` applied. Null for inline agent specs and sessions created before agent revisions."},"dependency_revisions":{"anyOf":[{"$ref":"#/components/schemas/DependencyRevisions"},{"type":"null"}],"description":"Revisions of the catalog skills and environments in ``request.agent``, through every subagent. Inline ones are not listed. Null for sessions created before skill and environment revisions."},"agent_view_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent View Url","description":"URL of the session's Agent View page on the H Platform (live view and replay)."},"latest_answer":{"title":"Latest Answer","description":"The agent's most recent final answer: free-form text, or structured data when the agent runs with a custom answer format. Null until the agent first answers. Mirrors the answer streamed from the changes endpoint, surfaced here for non-interactive runs."},"runner":{"anyOf":[{"$ref":"#/components/schemas/Runner"},{"type":"null"}],"description":"The agent-envs session hosting the agent's environment, as the environment last reported it. Null until the environment starts (a lazy one at the agent's first call to it). Shown to the session's owner and organization only."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"}},"additionalProperties":false,"type":"object","required":["id","request","status","created_at"],"title":"Session","description":"Full session envelope: original request + live status."},"SessionChanges":{"properties":{"status":{"$ref":"#/components/schemas/TrajectoryStatus"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"error_code":{"anyOf":[{"$ref":"#/components/schemas/SessionErrorCode"},{"type":"null"}]},"new_events":{"items":{"$ref":"#/components/schemas/SessionEvent"},"type":"array","title":"New Events","default":[]},"first_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"First Index"},"answer":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Answer"},"outcome":{"anyOf":[{"$ref":"#/components/schemas/AnswerOutcome"},{"type":"null"}]},"metrics":{"$ref":"#/components/schemas/Metrics"},"pending_tool_calls":{"items":{"$ref":"#/components/schemas/ToolRequest"},"type":"array","title":"Pending Tool Calls","default":[]},"pending_approvals":{"items":{"$ref":"#/components/schemas/ToolApprovalRequest"},"type":"array","title":"Pending Approvals","default":[]}},"type":"object","required":["status"],"title":"SessionChanges","description":"Typed view of ``TrajectoryChanges`` for Agent API session endpoints."},"SessionErrorCode":{"type":"string","enum":["environment_error","no_answer","answer_validation","timeout","insufficient_credit","internal"],"title":"SessionErrorCode","description":"Machine-readable category of a terminal session failure."},"SessionEvent":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/AgentStartedEvent"},{"$ref":"#/components/schemas/AgentCompletionEvent"},{"$ref":"#/components/schemas/AgentErrorEvent"},{"$ref":"#/components/schemas/AgentRunStatusChangeEvent"},{"$ref":"#/components/schemas/ActiveStateChangeEvent"},{"$ref":"#/components/schemas/ToolApprovalRequestedEvent"},{"$ref":"#/components/schemas/ToolApprovalDecidedEvent"},{"$ref":"#/components/schemas/LiveViewUrlEvent"},{"$ref":"#/components/schemas/RequestStartEvent"},{"$ref":"#/components/schemas/RequestStartDispatchedEvent"},{"$ref":"#/components/schemas/MetricsUpdateEvent"},{"$ref":"#/components/schemas/FileTransferEvent"},{"$ref":"#/components/schemas/AttachmentEvent"},{"$ref":"#/components/schemas/RunnerSessionEvent"},{"$ref":"#/components/schemas/AgentEvent"}],"discriminator":{"propertyName":"type","mapping":{"ActiveStateChangeEvent":"#/components/schemas/ActiveStateChangeEvent","AgentCompletionEvent":"#/components/schemas/AgentCompletionEvent","AgentErrorEvent":"#/components/schemas/AgentErrorEvent","AgentEvent":"#/components/schemas/AgentEvent","AgentRunStatusChangeEvent":"#/components/schemas/AgentRunStatusChangeEvent","AgentStartedEvent":"#/components/schemas/AgentStartedEvent","AttachmentEvent":"#/components/schemas/AttachmentEvent","FileTransferEvent":"#/components/schemas/FileTransferEvent","LiveViewUrlEvent":"#/components/schemas/LiveViewUrlEvent","MetricsUpdateEvent":"#/components/schemas/MetricsUpdateEvent","RequestStartDispatchedEvent":"#/components/schemas/RequestStartDispatchedEvent","RequestStartEvent":"#/components/schemas/RequestStartEvent","RunnerSessionEvent":"#/components/schemas/RunnerSessionEvent","ToolApprovalDecidedEvent":"#/components/schemas/ToolApprovalDecidedEvent","ToolApprovalRequestedEvent":"#/components/schemas/ToolApprovalRequestedEvent"}}},{"$ref":"#/components/schemas/TrajectoryEvent"}]},"SessionFlag":{"properties":{"flagged_at":{"type":"string","format":"date-time","title":"Flagged At","description":"When the session was flagged. Editing the note keeps it."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Why the session needs attention."},"flagged_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Flagged By","description":"The user who flagged the session."}},"additionalProperties":false,"type":"object","required":["flagged_at"],"title":"SessionFlag","description":"A shared \"needs attention\" marker on a session; anyone who can see the session can raise or clear it."},"SessionProbeRequest":{"properties":{"probe":{"additionalProperties":{"$ref":"#/components/schemas/JsonValue"},"type":"object","title":"Probe","description":"A hai-probes CompletionProbe: a call the page must make and what its localStorage must hold. The session must have been created with `capture_end_state`."}},"additionalProperties":false,"type":"object","required":["probe"],"title":"SessionProbeRequest","description":"A completion probe to judge a finished session's browser end state with."},"SessionProbeVerdict":{"properties":{"outcome":{"type":"string","enum":["pass","fail","unjudged"],"title":"Outcome","description":"`unjudged` when the probe cannot tell: no browser, no recorded end state, an end state it cannot read, or a session the agent did not end itself (cancelled, out of credit, or failed by our infrastructure)."},"failed":{"items":{"type":"string"},"type":"array","title":"Failed","description":"The probe's conditions the end state did not meet."}},"type":"object","required":["outcome"],"title":"SessionProbeVerdict","description":"What a completion probe says of a finished session's browser end state."},"SessionProject":{"properties":{"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"The session's project; the organization's default project for older sessions."}},"additionalProperties":false,"type":"object","required":["project_id"],"title":"SessionProject","description":"The project a session ran in, so a caller in another of the org's projects can switch to it."},"SessionRequest":{"properties":{"agent":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/Agent"}],"title":"Agent","description":"Agent to run: a registered agent's name, or an inline Agent definition."},"messages":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/UserMessageEvent"},{"items":{"$ref":"#/components/schemas/UserMessageEvent"},"type":"array"},{"type":"null"}],"title":"Messages","description":"Initial task for the agent. A plain string, a single message, or a list of messages."},"max_steps":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Steps","description":"Maximum reasoning steps the agent may take. Unbounded if null."},"max_time_s":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Max Time S","description":"Maximum wall-clock seconds the agent may work toward each answer; at the limit it answers with what it has. Time idle between answers does not count. Unbounded if null."},"idle_timeout_s":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Idle Timeout S","description":"Seconds to keep the session open for follow-up messages after each answer. Null ends the session as soon as the agent answers."},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone","description":"IANA timezone the agent uses for dates and times, e.g. 'Europe/Paris'. UTC if null."},"connections":{"anyOf":[{"items":{"$ref":"#/components/schemas/ConnectedServer"},"type":"array","maxItems":100},{"type":"null"}],"title":"Connections","description":"MCP servers the user connected, which the agent's shell reaches with `mcporter`; their keys stay where they are served. Each entry is a name plus an optional description (a bare name string is accepted). Listed in the system prompt of the agent, and of each subagent, with a desktop in shell mode; ignored by the others."},"delete_after_min":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Delete After Min","description":"Minutes after the session finishes before it is automatically deleted. When omitted, Portal's retention preference applies. An explicit value adds an earlier expiry; null adds no expiry beyond Portal's policy.","default":43200},"delete_screenshot_after_min":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Delete Screenshot After Min","description":"Minutes after the session finishes before its screenshots are deleted. When omitted or null, screenshots follow the session's retention policy. An explicit value can delete screenshots earlier.","default":43200},"queue":{"type":"boolean","title":"Queue","description":"When the organization is at its concurrent-session limit, accept this session into a queue (status 'queued') instead of rejecting it with 429. Queued sessions start automatically, oldest first, as running sessions finish. Set to false to get an immediate 429 when no slot is available.","default":true},"group_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group Id","description":"Optional id to group and list related sessions together."},"parent_session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Session Id","description":"Id of the parent session, when this is a child run."},"overrides":{"additionalProperties":true,"type":"object","title":"Overrides","description":"Per-run overrides applied to the resolved request, keyed by a dotted path. List members are selected with an explicit [field=value] clause, e.g. {\"agent.environments[kind=web].start_url\": \"https://bing.com\"}. Each value must match the type of the field its path targets."}},"type":"object","required":["agent"],"title":"SessionRequest","description":"``POST /api/v2/sessions`` body."},"SessionStatus":{"properties":{"status":{"$ref":"#/components/schemas/TrajectoryStatus","description":"Current lifecycle state of the session."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Error message if the session failed; null otherwise."},"error_code":{"anyOf":[{"$ref":"#/components/schemas/SessionErrorCode"},{"type":"null"}],"description":"Machine-readable failure category if the session failed or timed out; null otherwise."},"outcome":{"anyOf":[{"$ref":"#/components/schemas/AnswerOutcome"},{"type":"null"}],"description":"Agent's self-assessed task outcome, set with the final answer; null until then."},"steps":{"type":"integer","title":"Steps","description":"Number of steps the agent has taken.","default":0},"usage_per_model":{"items":{"$ref":"#/components/schemas/ModelUsage"},"type":"array","title":"Usage Per Model","description":"Per-model token usage. Empty until the agent calls a model."},"subagent_session_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Subagent Session Ids","description":"Session ids of any subagents this session spawned."},"pending_tool_calls":{"items":{"$ref":"#/components/schemas/ToolRequest"},"type":"array","title":"Pending Tool Calls","description":"Custom tool calls the agent is blocked on; echo each ``id`` back in the ToolResultEvent. Empty unless the agent is awaiting tool results (a pause keeps them)."},"pending_approvals":{"items":{"$ref":"#/components/schemas/ToolApprovalRequest"},"type":"array","title":"Pending Approvals","description":"Calls held for a human decision; answer each with a ToolApprovalResponseEvent naming its ``id``. Empty unless the agent is awaiting tool results (a pause keeps them)."}},"type":"object","required":["status"],"title":"SessionStatus","description":"``GET /api/v2/sessions/{id}/status`` response."},"SessionSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"owner_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Owner Id","description":"The user who created the session; API keys create sessions as their owner. Null from hosts that do not record owners, such as a local runtime."},"agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent"},"agent_revision":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Agent Revision","description":"Revision of the catalog agent the session runs; null for inline specs and older sessions."},"status":{"$ref":"#/components/schemas/TrajectoryStatus"},"agent_view_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent View Url","description":"URL of the session's Agent View page on the H Platform (live view and replay)."},"first_message":{"anyOf":[{"$ref":"#/components/schemas/UserMessageEvent"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","title":"Created At"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"},"last_activity_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Activity At","description":"When the session's latest event was ingested (agent steps, status changes, user messages). Null for sessions that predate this field."},"anonymized_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Anonymized At","description":"When the session's PII text and screenshots were irreversibly anonymized. Null if not anonymized."},"flag":{"anyOf":[{"$ref":"#/components/schemas/SessionFlag"},{"type":"null"}],"description":"Set while the session is flagged for attention."}},"additionalProperties":false,"type":"object","required":["id","status","created_at"],"title":"SessionSummary","description":"Flat projection for session listings, including child rosters via ``?parent_session_id=``."},"SessionVisibility":{"properties":{"organization_runs":{"type":"boolean","title":"Organization Runs","description":"Whether session lists can include other members' sessions. False when the organization lets members see only their own: an ``owner=organization`` list then returns the caller's sessions."},"is_org_admin":{"type":"boolean","title":"Is Org Admin","description":"Whether the caller administers the organization: an owner, or a platform administrator."}},"additionalProperties":false,"type":"object","required":["organization_runs","is_org_admin"],"title":"SessionVisibility","description":"How much of the organization's sessions the caller sees."},"SetSessionFlag":{"properties":{"note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Note","description":"Why the session needs attention."}},"additionalProperties":false,"type":"object","title":"SetSessionFlag","description":"Flag a session, or replace the note on its flag."},"ShareLink":{"properties":{"share_url":{"type":"string","title":"Share Url"}},"additionalProperties":false,"type":"object","required":["share_url"],"title":"ShareLink","description":"Public share URL for a session."},"Skill":{"properties":{"name":{"type":"string","minLength":1,"title":"Name","description":"Unique name for this skill in your catalog. Format: lowercase ASCII letters, digits and hyphens; must start and end with alphanumeric; max 63 chars per segment; optional single 'org/' namespace prefix (e.g. 'h/web-environment')."},"description":{"type":"string","minLength":1,"title":"Description","description":"When to use this skill. The agent reads this to decide whether to load it."},"body":{"type":"string","minLength":1,"title":"Body","description":"Markdown instructions the agent loads when it uses the skill."},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"Optional URL the content was sourced from."},"url_pattern":{"anyOf":[{"type":"string","maxLength":1024,"minLength":1},{"type":"null"}],"title":"Url Pattern","description":"Optional regex hinting at URLs where this skill applies."},"compatibility":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Compatibility"},"files":{"additionalProperties":{"type":"string","contentEncoding":"base64","contentMediaType":"application/octet-stream"},"type":"object","maxProperties":511,"title":"Files"},"executable_files":{"items":{"type":"string"},"type":"array","title":"Executable Files","default":[]}},"type":"object","required":["name","description","body"],"title":"Skill","description":"Named instructions with optional scripts, references, and assets."},"SkillRevisionRecord":{"properties":{"number":{"type":"integer","minimum":1.0,"title":"Number","description":"Revision number, from 1. Read its content with ``GET /v2/skills/{name}?revision={number}``."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By","description":"User who made the change. Null when unknown, and on reserved ``h/`` skills for non-H callers."},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"Note sent with the change, if any."},"restored_from":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Restored From","description":"The earlier revision whose content this one restored, through ``POST .../revisions/{N}/restore``."}},"additionalProperties":false,"type":"object","required":["number","created_at"],"title":"SkillRevisionRecord","description":"One stored revision of a skill, without its content."},"TokenQuotaStatus":{"properties":{"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"used":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Used"},"remaining":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Remaining"},"window_start":{"type":"string","format":"date-time","title":"Window Start"},"window_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Window End"}},"type":"object","required":["limit","used","remaining","window_start","window_end"],"title":"TokenQuotaStatus","description":"Current per-org token usage snapshot."},"ToolApprovalBatch":{"properties":{"type":{"type":"string","const":"batch","title":"Type","default":"batch"},"responses":{"items":{"$ref":"#/components/schemas/ToolApprovalResponseEvent"},"type":"array","minItems":1,"title":"Responses"}},"additionalProperties":false,"type":"object","required":["responses"],"title":"ToolApprovalBatch","description":"Batch of decisions on held tool calls."},"ToolApprovalDecidedData":{"properties":{"decision":{"$ref":"#/components/schemas/ToolApprovalDecision"}},"additionalProperties":true,"type":"object","required":["decision"],"title":"ToolApprovalDecidedData"},"ToolApprovalDecidedEvent":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"type":"string","const":"ToolApprovalDecidedEvent","title":"Type"},"data":{"$ref":"#/components/schemas/ToolApprovalDecidedData"}},"additionalProperties":true,"type":"object","required":["timestamp","type","data"],"title":"ToolApprovalDecidedEvent","description":"A held tool call was approved or denied; the result or error settling it follows as an ``AgentEvent``."},"ToolApprovalDecision":{"properties":{"tool_req":{"$ref":"#/components/schemas/ToolRequest"},"decision":{"type":"string","enum":["approved","denied"],"title":"Decision"},"decided_by":{"type":"string","title":"Decided By","description":"Who decided: 'client' for a response posted through the API, 'unattended' for an agent set to settle held calls on its own, 'run_end' when the run ended with the call still waiting, 'superseded' when the user sent a new message instead of deciding."},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"The decider's words, which the model reads on a denial."}},"type":"object","required":["tool_req","decision","decided_by"],"title":"ToolApprovalDecision","description":"How a held tool call was decided, reported by ``ToolApprovalDecidedEvent``."},"ToolApprovalRequest":{"properties":{"tool_req":{"$ref":"#/components/schemas/ToolRequest"},"requirements":{"items":{"$ref":"#/components/schemas/ApprovalRequirement"},"type":"array","minItems":1,"title":"Requirements","description":"Why the call waits, one entry per source that requires the approval."}},"type":"object","required":["tool_req","requirements"],"title":"ToolApprovalRequest","description":"A tool call held for a human decision, listed in ``ActiveStateChangeEvent.pending_approvals``.\n\nAnswer it with a ``ToolApprovalResponseEvent`` naming ``tool_req.id``: an approved call runs exactly once, an\napproved custom tool call then moves to ``pending_tool_calls`` for the client to run."},"ToolApprovalRequestedData":{"properties":{"request":{"$ref":"#/components/schemas/ToolApprovalRequest"}},"additionalProperties":true,"type":"object","required":["request"],"title":"ToolApprovalRequestedData"},"ToolApprovalRequestedEvent":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"type":"string","const":"ToolApprovalRequestedEvent","title":"Type"},"data":{"$ref":"#/components/schemas/ToolApprovalRequestedData"}},"additionalProperties":true,"type":"object","required":["timestamp","type","data"],"title":"ToolApprovalRequestedEvent","description":"The agent holds a tool call until a human decides on it; answer with a ``ToolApprovalResponseEvent``."},"ToolApprovalResponseEvent":{"properties":{"type":{"type":"string","const":"tool_approval_response","title":"Type","default":"tool_approval_response"},"call_id":{"type":"string","minLength":1,"title":"Call Id","description":"The held call's ``tool_req.id``."},"action":{"type":"string","enum":["approve","deny"],"title":"Action","description":"'approve' runs the call and the rest of its step, 'deny' refuses it and skips the rest."},"message":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Message","description":"Why the call is denied, as the model reads it; send files or images as a user_message."}},"type":"object","required":["call_id","action"],"title":"ToolApprovalResponseEvent","description":"The client's response to a call listed in ``ActiveStateChangeEvent.pending_approvals``; the agent reports\nthe outcome as a ``ToolApprovalDecidedEvent``."},"ToolDefinition":{"properties":{"name":{"type":"string","maxLength":64,"minLength":1,"title":"Name","description":"Tool name advertised to the model. Format: letters, digits and underscores; must start with a letter or underscore; max 64 chars."},"description":{"type":"string","minLength":1,"title":"Description","description":"What the tool does, when to use it, and what it returns. Shown to the model verbatim."},"input_schema":{"additionalProperties":true,"type":"object","title":"Input Schema","description":"JSON Schema (object type) describing the tool call arguments."}},"type":"object","required":["name","description"],"title":"ToolDefinition","description":"Contract for a tool executed by the API client, not by the agent runtime.\n\nThe agent emits a tool call matching ``input_schema``, pauses, and resumes\nonce the client sends back the corresponding tool result."},"ToolRequest":{"properties":{"tool_name":{"type":"string","title":"Tool Name"},"args":{"additionalProperties":true,"type":"object","title":"Args"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"Identifier correlating the request with its result."}},"type":"object","required":["tool_name"],"title":"ToolRequest","description":"Tool invocation proposed by the policy."},"ToolResultBatch":{"properties":{"type":{"type":"string","const":"batch","title":"Type","default":"batch"},"results":{"items":{"oneOf":[{"$ref":"#/components/schemas/ToolResultEvent"},{"$ref":"#/components/schemas/ErrorEvent"}],"discriminator":{"propertyName":"kind","mapping":{"error_event":"#/components/schemas/ErrorEvent","tool_result":"#/components/schemas/ToolResultEvent"}}},"type":"array","minItems":1,"title":"Results"}},"additionalProperties":false,"type":"object","required":["results"],"title":"ToolResultBatch","description":"Batch of custom tool results."},"ToolResultEvent":{"properties":{"kind":{"type":"string","const":"tool_result","title":"Kind","default":"tool_result"},"tool_req":{"$ref":"#/components/schemas/ToolRequest"},"result":{"$ref":"#/components/schemas/JsonValue","description":"Tool output as opaque JSON; any embedded image is inlined as base64, not a URL."},"truncated":{"type":"boolean","title":"Truncated","description":"Inline tool text was omitted; does not imply it was saved.","default":false},"output_artifact_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Artifact Path","description":"Path to retained tool text in the originating sandbox, not a downloadable URL."}},"type":"object","required":["tool_req"],"title":"ToolResultEvent","description":"Result of executing one tool request."},"TrajectoryEvent":{"properties":{"type":{"type":"string","title":"Type"},"data":{"title":"Data"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"}},"type":"object","required":["type","data","timestamp"],"title":"TrajectoryEvent","description":"Event from a trajectory.\n\nUnified from agp_client and agent_platform.\nUses the richer agent_platform version with screenshot serialization.\n\nEvents represent individual actions, observations, or state changes during\ntrajectory execution. They form a chronological log of everything that happened.\n\nCommon event types:\n- AgentStartedEvent: Agent begins execution\n- AgentCompletionEvent: Agent finishes successfully\n- AgentErrorEvent: Agent encounters an error\n- AgentEvent: Generic wrapper for agent-emitted events (policy_event, tool_result, observation_event)\n- LiveViewUrlEvent: Live view URL becomes available\n- ChatMessageEvent: Agent sends a chat message\n\nAttributes:\n    type: The type/name of the event (e.g., \"AgentStartedEvent\", \"AgentEvent\")\n    data: Event-specific data payload (structure varies by event type)\n    timestamp: When the event occurred"},"TrajectoryStatus":{"type":"string","enum":["queued","pending","running","paused","idle","awaiting_tool_results","completed","failed","timed_out","interrupted"],"title":"TrajectoryStatus","description":"State of a session/trajectory.\n\nLifecycle::\n\n    QUEUED → PENDING → RUNNING → {COMPLETED, FAILED, TIMED_OUT, INTERRUPTED}\n       |        |        ↑  ↑ ↑\n       |        |        |  | └───→ IDLE (interactive: agent waiting for next task)\n       |        |        |  └─────→ AWAITING_TOOL_RESULTS (waiting for custom tool results)\n       |        |        ↓\n       |        └─────→ PAUSED\n       └────→ INTERRUPTED (cancelled before launch)\n\nQUEUED sessions were accepted above the org's concurrency quota and wait,\nunprovisioned, until a running session finishes."},"UpdateSchedule":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Description"},"timing":{"$ref":"#/components/schemas/CronTiming"},"session_request":{"$ref":"#/components/schemas/SessionRequest","description":"Template used to create each scheduled session; re-resolved on every fire."},"repeats":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Repeats","description":"How many sessions to create before the schedule becomes inactive. Omit to run until paused or deleted."},"probe":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/JsonValue"},"type":"object"},{"type":"null"}],"title":"Probe","description":"Completion probe each run's browser end state is checked against once its session finished; the verdict is written as a `probe` score on the session and as the run's `probe_outcome`. Null leaves runs to judge rules."},"capture_end_state":{"type":"boolean","title":"Capture End State","description":"Record each run's browser end state when its session closes, as a probe does, so that a probe can be drafted from the runs before the schedule has one."}},"type":"object","title":"UpdateSchedule","description":"Partial update; omit a field to leave it unchanged."},"UpdateWebhook":{"properties":{"url":{"type":"string","maxLength":2048,"minLength":1,"title":"Url"},"enabled_events":{"items":{"type":"string"},"type":"array","title":"Enabled Events","description":"Event types delivered to this webhook. '*' subscribes to the session.status_updated firehose; granular session.* types are delivered only when listed explicitly."},"description":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Description"},"disabled":{"type":"boolean","title":"Disabled"}},"type":"object","title":"UpdateWebhook","description":"Partial update; omit a field to leave it unchanged."},"UserMessageBatch":{"properties":{"type":{"type":"string","const":"batch","title":"Type","default":"batch"},"messages":{"items":{"$ref":"#/components/schemas/UserMessageEvent"},"type":"array","minItems":1,"title":"Messages"}},"additionalProperties":false,"type":"object","required":["messages"],"title":"UserMessageBatch","description":"Batch of user messages."},"UserMessageEvent":{"properties":{"type":{"type":"string","const":"user_message","title":"Type","default":"user_message"},"message":{"type":"string","title":"Message","description":"Message text sent to the agent."},"images":{"items":{"type":"string"},"type":"array","title":"Images","description":"Optional images attached to the message, as base64 data URIs."},"files":{"items":{"$ref":"#/components/schemas/FileContent"},"type":"array","title":"Files","description":"Optional files attached to the message: up to 10, 7 MB in total. They are saved under files/ in the workspace of a workstation or code sandbox, and ~/Downloads on a cloud browser."},"skills":{"items":{"$ref":"#/components/schemas/Skill"},"type":"array","title":"Skills","description":"Skills for this message only, as inline definitions. Skills with files are not supported here yet: add those to the agent's skills."},"caller_id":{"type":"string","title":"Caller Id","default":"user"}},"type":"object","required":["message"],"title":"UserMessageEvent","description":"The user is sending a message to an active agent."},"VaultConfigList":{"properties":{"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"vaults":{"items":{"$ref":"#/components/schemas/VaultConfigRead"},"type":"array","title":"Vaults"}},"type":"object","required":["total","limit","offset","vaults"],"title":"VaultConfigList","description":"A page of vault configs."},"VaultConfigRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"org_id":{"type":"string","format":"uuid","title":"Org Id"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"name":{"type":"string","title":"Name"},"provider_config":{"oneOf":[{"$ref":"#/components/schemas/OnePasswordConfig"},{"$ref":"#/components/schemas/InternalConfig"}],"title":"Provider Config","discriminator":{"propertyName":"provider","mapping":{"internal":"#/components/schemas/InternalConfig","onepassword":"#/components/schemas/OnePasswordConfig"}}},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","org_id","name","provider_config","created_at","updated_at"],"title":"VaultConfigRead","description":"A vault config. Never includes the stored token."},"VaultCreateRequest":{"properties":{"name":{"type":"string","title":"Name"},"provider_config":{"oneOf":[{"$ref":"#/components/schemas/OnePasswordConfig"},{"$ref":"#/components/schemas/InternalConfig"}],"title":"Provider Config","discriminator":{"propertyName":"provider","mapping":{"internal":"#/components/schemas/InternalConfig","onepassword":"#/components/schemas/OnePasswordConfig"}}},"token":{"anyOf":[{"type":"string","format":"password","writeOnly":true},{"type":"null"}],"title":"Token","description":"Provider token. Required for third-party providers; internal vaults take none."}},"type":"object","required":["name","provider_config"],"title":"VaultCreateRequest","description":"Request body for creating a vault config."},"VaultHealth":{"properties":{"ok":{"type":"boolean","title":"Ok"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["ok"],"title":"VaultHealth","description":"Result of a provider health check. The API always returns 200; branch on ``ok``."},"VaultItemCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"urls":{"items":{"type":"string","maxLength":2048,"minLength":1},"type":"array","maxItems":20,"minItems":1,"title":"Urls","description":"http(s) URLs of the sites this item signs in to; secrets resolve by host."},"values":{"additionalProperties":{"type":"string","maxLength":4096,"minLength":1,"format":"password","writeOnly":true},"propertyNames":{"enum":["username","password","email","totp","api_key"]},"type":"object","minProperties":1,"title":"Values","description":"Secret values by field. `totp` takes the seed or an `otpauth://totp/` URI and is never returned."}},"type":"object","required":["name","urls","values"],"title":"VaultItemCreate","description":"Request body for adding an item to an internal vault."},"VaultItemList":{"properties":{"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"items":{"items":{"$ref":"#/components/schemas/VaultItemRead"},"type":"array","title":"Items"}},"type":"object","required":["total","limit","offset","items"],"title":"VaultItemList","description":"Response model for listing an internal vault's items."},"VaultItemRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"vault_id":{"type":"string","format":"uuid","title":"Vault Id"},"name":{"type":"string","title":"Name"},"urls":{"items":{"type":"string"},"type":"array","title":"Urls"},"fields":{"items":{"type":"string","enum":["username","password","email","totp","api_key"]},"type":"array","title":"Fields"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","vault_id","name","urls","fields","created_at","updated_at"],"title":"VaultItemRead","description":"An internal vault item's metadata: which fields are set, never their values."},"VaultItemUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"urls":{"anyOf":[{"items":{"type":"string","maxLength":2048,"minLength":1},"type":"array","maxItems":20,"minItems":1},{"type":"null"}],"title":"Urls","description":"Replaces the item's URLs."},"values":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string","maxLength":4096,"minLength":1,"format":"password","writeOnly":true},{"type":"null"}]},"propertyNames":{"enum":["username","password","email","totp","api_key"]},"type":"object","minProperties":1},{"type":"null"}],"title":"Values","description":"Values to set: omitted keys are unchanged and a key set to null is removed. An update that would leave the item with no value is rejected."}},"type":"object","title":"VaultItemUpdate","description":"Partial item update: omitted fields, and a null `name` or `urls`, are unchanged."},"VaultItemValues":{"properties":{"values":{"additionalProperties":{"type":"string"},"propertyNames":{"enum":["username","password","email","api_key"]},"type":"object","title":"Values"},"totp_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Totp Code"},"totp_expires_in":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Totp Expires In","description":"Whole seconds the code stays valid, counted when it was generated; at least 3, as a nearly spent code is waited out. Count down from when you sent the request: that ends early by the request's travel time, and is unaffected by your clock's skew."}},"type":"object","required":["values"],"title":"VaultItemValues","description":"An internal vault item's values. A TOTP seed is never revealed: ``totp_code`` is its current code."},"VaultTokenRotateRequest":{"properties":{"token":{"type":"string","format":"password","title":"Token","writeOnly":true}},"type":"object","required":["token"],"title":"VaultTokenRotateRequest","description":"Request body for rotating a vault's stored provider token."},"VaultUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"provider_config":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/OnePasswordConfig"},{"$ref":"#/components/schemas/InternalConfig"}],"discriminator":{"propertyName":"provider","mapping":{"internal":"#/components/schemas/InternalConfig","onepassword":"#/components/schemas/OnePasswordConfig"}}},{"type":"null"}],"title":"Provider Config"}},"type":"object","title":"VaultUpdateRequest","description":"Partial update; only provided fields are forwarded. Token rotation is separate."},"WebhookEventTypeDefinition":{"properties":{"type":{"type":"string","title":"Type"},"description":{"type":"string","title":"Description"}},"type":"object","required":["type","description"],"title":"WebhookEventTypeDefinition","description":"A webhook event type clients can subscribe to."},"WebhookPingResult":{"properties":{"response_status":{"type":"integer","title":"Response Status","description":"HTTP status code returned by the receiving endpoint."}},"type":"object","required":["response_status"],"title":"WebhookPingResult","description":"Outcome of a test delivery to a webhook endpoint."},"WebhookRecord":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"url":{"type":"string","title":"Url"},"enabled_events":{"items":{"type":"string"},"type":"array","title":"Enabled Events"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"disabled":{"type":"boolean","title":"Disabled"},"last_delivery_status":{"anyOf":[{"type":"string","enum":["succeeded","failed"]},{"type":"null"}],"title":"Last Delivery Status","description":"Result of the most recent delivery attempt; null before the first attempt."},"last_delivery_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Delivery Error","description":"What went wrong on the most recent delivery attempt; null when it succeeded."},"last_delivery_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Delivery At","description":"When the most recent delivery attempt happened; null before the first attempt."},"last_success_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Success At","description":"When a delivery last succeeded; null if none has."},"consecutive_failures":{"type":"integer","title":"Consecutive Failures","description":"Failed delivery attempts since the last success. The endpoint is automatically disabled when this grows too large; resets to zero on success or re-enable.","default":0},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","url","enabled_events","description","disabled","created_at","updated_at"],"title":"WebhookRecord","description":"Webhook as returned by reads; the signing secret is never included."},"WebhookWithSecret":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"url":{"type":"string","title":"Url"},"enabled_events":{"items":{"type":"string"},"type":"array","title":"Enabled Events"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"disabled":{"type":"boolean","title":"Disabled"},"last_delivery_status":{"anyOf":[{"type":"string","enum":["succeeded","failed"]},{"type":"null"}],"title":"Last Delivery Status","description":"Result of the most recent delivery attempt; null before the first attempt."},"last_delivery_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Delivery Error","description":"What went wrong on the most recent delivery attempt; null when it succeeded."},"last_delivery_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Delivery At","description":"When the most recent delivery attempt happened; null before the first attempt."},"last_success_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Success At","description":"When a delivery last succeeded; null if none has."},"consecutive_failures":{"type":"integer","title":"Consecutive Failures","description":"Failed delivery attempts since the last success. The endpoint is automatically disabled when this grows too large; resets to zero on success or re-enable.","default":0},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"secret":{"type":"string","title":"Secret"}},"type":"object","required":["id","url","enabled_events","description","disabled","created_at","updated_at","secret"],"title":"WebhookWithSecret","description":"Create response: the only time the signing secret is returned."},"Workstation":{"properties":{"id":{"type":"string","minLength":1,"title":"Id","description":"Catalog identifier for this environment."},"kind":{"type":"string","const":"workstation","title":"Kind","default":"workstation"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id","description":"Connect to an existing workstation session by id instead of starting a new one."},"storage":{"anyOf":[{"$ref":"#/components/schemas/WorkstationStorage"},{"type":"null"}],"description":"Which disk a cloud workstation runs on. Omit to let the stage decide: the caller's default volume where the workstation is persistent by default, a fresh machine elsewhere. Ignored when session_id attaches to an existing session."},"lazy":{"type":"boolean","title":"Lazy","description":"Provision on the agent's first use instead of at startup. Skips the initial observation.","default":false},"screenshot_max_width":{"anyOf":[{"type":"integer","maximum":1920.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Screenshot Max Width","description":"Maximum screenshot width in pixels. Null uses 1920; images are never upscaled."}},"type":"object","required":["id"],"title":"Workstation","description":"A cloud computer with a browser, apps and a shell."},"WorkstationStorage":{"properties":{"volume_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Volume Id","description":"A volume of the caller's, by id. Its workspace, home directory and installed packages come back on every session that runs on it."},"use_default_volume":{"type":"boolean","title":"Use Default Volume","description":"The caller's default volume, created on first use within the organisation's caps.","default":false},"ephemeral":{"type":"boolean","title":"Ephemeral","description":"A fresh machine whose files do not outlive the session, whatever the stage's default.","default":true}},"type":"object","title":"WorkstationStorage","description":"Which disk a cloud workstation runs on. Exactly one of the three, ephemeral unless a volume is set."},"WriteFileRequest":{"properties":{"path":{"type":"string","title":"Path"},"content_base64":{"type":"string","title":"Content Base64"}},"type":"object","required":["path","content_base64"],"title":"WriteFileRequest","description":"File to write on the session's pod, base64-encoded."},"WriteFileResponse":{"properties":{"path":{"type":"string","title":"Path"},"size_bytes":{"type":"integer","title":"Size Bytes"}},"type":"object","required":["path","size_bytes"],"title":"WriteFileResponse","description":"The written file's resolved path and byte count."},"AgentWithRevision":{"title":"AgentWithRevision","description":"An agent spec with its current revision number, as listed by ``GET /v2/agents?include=revision``.\n\nOnly listed, never accepted as a body: ``revision`` is not part of the spec.","allOf":[{"$ref":"#/components/schemas/Agent"}],"type":"object","properties":{"revision":{"description":"Current revision number of the agent, as its ``ETag`` carries it.","minimum":1,"title":"Revision","type":"integer"}},"required":["revision"]},"ErrorResponse":{"description":"Standard API error body.","properties":{"message":{"title":"Message","type":"string"},"detail":{"items":{},"title":"Detail","type":"array"}},"required":["message","detail"],"title":"ErrorResponse","type":"object"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}