Agent Sessions is in private preview. The feature is enabled per workspace by the Orq.ai team and the API is not part of the public SDKs yet.
Create a session
Click on the Sessions page to open New agent session.
Click Create session. The status line walks through Creating computer, Computer ready, Cloning repository, and Repository cloned; with a warm computer pool the session is usually ready within seconds.
Chat with the agent
The session page is a conversation. Type a task in the composer and press ⌘ ↵ (or click send). Each message starts a run; only one run can be active per session, and Stop cancels it. While the run is active the transcript streams:- Text and thought from the agent as they stream.
- Tool cards with kind, status, locations, arguments, and (when present) the inline diff or terminal output. Permission prompts appear on the tool card.
- Plan updates as a checklist in the transcript.
Review changes
The Changes tab shows the computer’s working tree against the commit that was cloned: a file list with additions and deletions per file (added, modified, deleted, renamed, and untracked files) and a unified diff. Refresh it after a run; it is also refreshed automatically when a run finishes. A paused session has no diff to show; resume it from the tab to load one.Open a pull request
Click Open pull request on the session page and provide a title, an optional Markdown description, and optionally a base branch (empty uses the repository default branch). Orq.ai then:- Commits the working tree on the computer using the title as the commit message, skipping files that look like secrets (for example
.env, key files, anything under asecretsdirectory, or contents matching common token formats) and files larger than 5 MiB. - Pushes the commit to the branch
orq/session-<session_id>on the repository’s origin, using the session’s GitHub token. - Creates the pull request through the workspace’s GitHub connection and links it on the session.
Pause, resume, and delete
Use the menu on the session page:- Pause removes the computer and keeps the workspace volume and the agent’s conversation. Sessions also pause automatically after the idle timeout.
- Resume brings the computer back. Sending a message to a paused session resumes it automatically, so this is rarely needed.
- Delete removes the computer and its volume and revokes the session’s API key. This cannot be undone; open a pull request first if the changes matter.
Sessions list
The Sessions page lists every session with its status, agent, repository and branch, last activity, and pull request link, and can be filtered by status, agent, and factory.API
The REST API lives under/v2/agent-sessions and authenticates with a project API key (Authorization: Bearer). Endpoints are private during the preview: they are not in the public OpenAPI specification or SDKs and may change.
Create a session
session with its id, status (AGENT_SESSION_STATUS_CREATING at first), factory_id, and repository. Optional fields: factory_id (defaults to the workspace’s default factory), computer_template, git_token, clone_depth, idempotency_key (a repeat with the same key returns the existing session), and project_id (only for workspace-wide callers; a project API key pins the project).
Send a message (start a run)
run (id, status, continued). If the session is paused it is resumed first, so the call can take a few seconds. Optional fields: agent and model (override for this run), new_conversation (start a fresh conversation), and idempotency_key. Only one run can be active per session.
Read events
Run events (agent output) and session events (lifecycle) are paged by sequence number. Run events:seq (a string-encoded integer), type, ts, and data; run events also carry raw, the agent’s native JSON line. Page with after_seq set to the last seq received until has_more is false. Run event types include run.started, acp.session_update (the ACP session/update payload in data), tool.approval_requested, message.complete, run.completed, and run.failed; session event types are listed in the overview.
Live streaming is available over Connect or gRPC only:
StreamAgentSessionRunEvents and StreamAgentSessionEvents on orq.platform.v1.AgentSessionsService (both take after_seq to resume). REST clients poll the list endpoints above.