Design reusable workflows. Execute against real projects. Keep people in control of the decisions that matter.
Workflow Studio is a visual platform for building and running Codex-powered AI workflows. It turns an outcome into focused steps with explicit inputs, reusable skills, approval gates and verifiable outputs, then makes their execution visible in a live graph.
A team can define a process once, review its logic, assign it to different projects and inspect what happened at every step. Project work runs through a paired local companion, using the user's Codex sign-in and approved workspace.
Capabilities · Architecture · Get started · First workflow · Documentation
AI-assisted work often spans several handoffs: gather context, produce a draft, review evidence, request a decision and make revisions. Workflow Studio makes those handoffs explicit.
- For delivery teams: reuse a reviewed process across projects, with the right context and skills at each step.
- For reviewers: inspect inputs, findings and artifacts before choosing the next route.
- For engineers: work with typed contracts, pinned versions, bounded execution and recoverable state.
- For platform teams: keep a central record of activity while local workspace access stays with each user's companion.
Describe the outcome → Review the generated graph → Approve the workflow
→ Assign a project and permissions → Compile a run
→ Execute → Supply inputs / make decisions → Review results and evidence
Saving a draft, approving a reusable definition, approving a project assignment and deciding an in-run gate are separate actions. Each has its own purpose and validation.
- Home brings together runs you can continue and requests that need your attention. Reviews gives authorized reviewers access to workflow, project setup and in-run decisions.
- Workflows opens each graph in Canvas. Choose Step list for a text view. Workflow settings contains the shared model and execution defaults. Select a step to view its instructions, skills and overrides.
- Set up project shows the folder and permissions before approval. Read and write in this folder requires explicit confirmation.
- Runs shows the current status, results and a live graph. The graph highlights active steps and the routes taken while the run progresses.
| Capability | What it gives your team |
|---|---|
| Natural-language workflow creation | Describe the objective, stages, decisions and outputs. Review the generated plan, answer open questions and refine it before saving. |
| Visual graph editing | Edit steps, connections, conditions, contracts and decision outcomes. Validate reachability, required data flow and bounded cycles before approval. |
| Reusable specialist skills | Prefer suitable published skills before proposing new drafts. Review scope, versions, instructions and permissions; explicitly publish capabilities for reuse across workflows. |
| Project-specific assignments | Apply the same workflow to different projects with separate inputs, skill selections and approved workspace permissions. |
| Compiled execution contracts | Freeze workflow and skill versions, focused instructions, model settings, inputs, outputs and artifact requirements for a run. |
| Inputs throughout a workflow | Pause when required information is missing and continue after the user supplies it, including at intermediate steps. |
| Human decision gates | Offer explicit choices such as continue, revise selected work or stop. Record the decision, feedback and actor. |
| Conditional routes and bounded revisions | Follow named outcomes, cap revision loops and keep retry budgets visible. Human review controls discretionary rework. |
| Parallel branches and joins | Run independent read-only steps concurrently, then collect all results or use a quorum. Configure concurrency and fail-fast or collect-all behavior. |
| Live execution tracking | See active nodes, selected routes, attempts, outputs, artifacts and event history. Inspect delivery and verification stages when diagnosing a wait. |
| Execution settings at review gates | Adjust supported model, reasoning, verbosity and harness settings before execution or at an undecided gate. Earlier results retain their original settings. |
| Recoverable result delivery | Save companion results before upload, replay pending delivery after reconnecting and apply accepted results transactionally. Retry or recheck eligible failed steps while retaining earlier completed work. |
| Team governance | Configure builder, reviewer and administrator roles, delegated review and separate-reviewer policies. Organizations can share approved workflow definitions. |
| Operational visibility | Export run history, download redacted support bundles, manage retention, check readiness and metrics, and rehearse backup/restore and rollout checks. |
The creation form includes editable examples for end-to-end software delivery, product planning, requirements review, UI screen generation, pull request review, release readiness, incident investigation, security review, data migration validation and architecture decisions.
For software delivery, choose Create end-to-end product in Studio. Provide the requirements and the scope for the current delivery, plus optional constitution principles and guardrails. The guided entry generates a reviewable workflow that requests constitution.md, guardrails.md, specs/product.md, plan/phases.md, and plan/tasks.md before implementation. Choose the project and review execution permissions when using the workflow. Documents and code are written during execution. Persistent product dashboards and automatic cross-run phase tracking are planned in Phase 10.
| Workflow | Example outcome |
|---|---|
| End-to-end software delivery | A working local project built from approved requirements, with source code, tests, verification evidence and a reviewed handoff. Large scopes are delivered in approved phases. |
| Product planning and UI delivery | Requirements, design guidance, reviewed screen artifacts and an implementation handoff. |
| Release readiness | Evidence checks, risk findings and an explicit release-owner decision. |
| Incident investigation | A structured account of evidence, hypotheses and recommended next steps. |
| Architecture decision review | Compared options, documented tradeoffs and a reviewed recommendation. |
Examples are starting points. Workflows can also support document, research and operational work when the required tools and permissions are available. External actions require an explicitly supported and authorized integration.
A visible contract around every step. The execution harness captures identity and context, runtime permissions, observability, output verification, approved adaptations and governance. Steps receive focused context and version-pinned skills; completion checks validate declared outputs and artifacts.
A durable record of progress. PostgreSQL owns the committed run state. Revision checks, expiring execution leases and attempt identities reject stale updates. The companion saves provider results locally before delivery; identical completion uploads acknowledge the accepted result without applying it twice.
Continuation owned by the server. Once a run is authorized, the background coordinator can continue it after the browser closes. Required inputs, human decisions, blocked actions and failures remain explicit stopping points. The application server and companion must stay running.
Permissions attached to the project. Each assignment names an approved project root and tool policy. Read-only tasks narrow their actual sandbox. Within a run, project-writing tasks execute exclusively to avoid overlapping branch edits. Separate writable runs should not target the same root simultaneously.
flowchart LR
Browser["Workflow Studio UI"] --> Server["Next.js control plane<br/>APIs, governance and coordinator"]
Server <--> DB[("PostgreSQL<br/>Application state and Mastra checkpoints")]
Server <--> Mastra["Mastra<br/>Scheduling and suspend/resume"]
Companion["User's local companion"] -->|"Outbound authenticated requests"| Server
Companion --> Codex["Codex App Server"]
Codex --> Project["Approved local project"]
Companion --> Spool["Durable local result spool"]
| Layer | Responsibility |
|---|---|
| Workflow Studio domain and PostgreSQL | Authoritative definitions, assignments, runs, routes, approvals, accepted results and audit events. |
| Mastra | Scheduling, suspension/resumption and checkpoints reconciled against committed run revisions. |
| Local companion and Codex | Scoped task execution, local artifact verification, durable result delivery and local action approval requests. |
| Browser | Workflow design, live inspection, input submission and human decisions. |
The default database uses two schemas: workflow_studio for application records and workflow_studio_mastra for framework storage. They share the configured PostgreSQL database. Application result commits and framework checkpoints are reconciled through durable continuation records.
The companion keeps filesystem access and Codex sign-in on the user's workstation. The control plane stores workflow/run content and receives task results, events and requested artifact previews. See the architecture guide and security boundaries for detail.
| Area | Implementation |
|---|---|
| Application and companion UI | Next.js App Router and React; TypeScript in the main app and JavaScript in the companion UI. |
| Workflow orchestration | Mastra with PostgreSQL checkpoint storage. |
| Planning and task execution | Project-pinned Codex App Server; direct local development also supports a CLI fallback. |
| Persistence | PostgreSQL, relational ownership/index columns and validated JSON payloads. |
| Contracts | JSON Schema, Zod and domain validators. |
| Verification | Vitest, isolated PGlite tests and opt-in real PostgreSQL/provider qualification. |
| Distribution | Standalone Next.js deployment, Dockerfile and a Windows source companion package with portable Node.js. |
Exact dependency versions are pinned in package.json, package-lock.json and the companion package.
- Node.js 24.15.x and npm.
- PostgreSQL with a database/login permitted to create the application's schemas and tables.
- A Codex sign-in with access to a model supported by the connected runtime.
- An approved local workspace for the companion.
The following PowerShell commands run the app and companion from a source checkout. For an existing installation, keep your current database configuration and workspace.
From the repository root:
npm ci
npm --prefix companion ci
if (!(Test-Path .env.local) -and !(Test-Path .env)) {
Copy-Item .env.example .env.local
}Configure the database connection in .env.local or your existing environment. Create the database and login first; the application initializes its versioned schemas when database access starts. See PostgreSQL and managed-database setup.
npm run db:check$env:CODEX_RUNTIME_MODE="paired"
$env:WORKFLOW_STUDIO_RUNTIME_ENGINE="mastra"
npm run devOpen Workflow Studio and create or sign in to your account. Leave WORKFLOW_STUDIO_COORDINATOR unset for background continuation.
In a second PowerShell window, from the same repository root:
npm run companion:devOpen the local address printed by the launcher. Choose your dedicated Workflow Studio folder, sign in with Codex, then pair using a code generated in Profile → Local runtime on the main app. Create/select projects inside the chosen folder's projects directory. Use companion 0.2.0 or later for durable focused execution.
For a packaged Windows companion, extract the approved ZIP and run this from its top-level folder:
& ".\app\tools\node\node.exe" ".\start.cjs"The packaged companion performs first-launch setup automatically. Companion setup and distribution covers pairing, signing, updates and removal.
Direct local development without the companion
From the repository root:
npm run runtime:login
$env:CODEX_RUNTIME_MODE="local"
npm run devThis executes through the local development adapter. Use paired mode to exercise the companion's durable delivery and user/device boundary.
Use this as a creation prompt:
Create a project-readiness review workflow. Ask the user for the project brief and available evidence. Fork into two independent read-only steps: requirements coverage and delivery-risk review. Give each step distinct structured outputs, then join all findings. Present the result to a human gate with Continue, Request revision and Stop choices. Bound revisions to one iteration and return revised findings to the gate. Finish with a structured readiness summary. Use a concurrency budget of two; do not write files or perform external actions.
- Review the generated graph, open questions and skill proposals; refine the plan where needed.
- Review/publish required skills and approve the reusable graph. Reused capabilities are labeled in the review cards.
- Choose Use workflow, select a project, configure permissions and a supported model, and approve the assignment.
- Compile a new run, start it and supply the requested project brief.
- Watch the independent review steps in the live graph, inspect their outputs and make the human decision.
With the server and companion running, close the run tab and reopen it to inspect persisted progress. Parallel execution and recovery explains joins, concurrency, retries and saved-result reconciliation. Skill reuse explains how to publish a capability for other workflows without changing earlier versions.
npm run typecheck
npm run lint
npm test -- --maxWorkers=2
npm run buildRegression coverage includes planning/parser repair, skill reuse and scope, lifecycle approvals, typed handoffs, bounded loops, parallel joins, ownership, stale-result fencing, companion reconnects, result-spool recovery and backup validation.
| Command | Purpose |
|---|---|
npm run db:verify |
Check initialized tables, indexes, migrations and audit protections. |
npm run qualify:runtime |
Test durable receipts, rollback, reconnects and Mastra dispatch against a generated disposable PostgreSQL database. Requires CREATEDB. |
npm run companion:build |
Build the companion UI. |
npm run companion:package -- --qualification |
Produce a separately signed qualification ZIP without replacing public production downloads. |
npm run load:smoke |
Exercise configured deployed endpoints under a bounded request load. |
npm run qualify:multi-instance |
Check shared sessions, pairing and runtime coordination across configured instances. |
npm run qualify:rollout |
Check a deployed release's identity, readiness, security headers and companion signature. |
Qualification scripts have different environment and account requirements. Follow the company launch runbook before running them against a shared environment. The optional real-provider test is separate from default regression tests; local qualification evidence is recorded in the runtime implementation report.
The repository includes a standalone Next.js build and Dockerfile. Background continuation requires an always-running Node server with PostgreSQL access. Each user runs a paired companion for local project work. Enable the documented role/separate-reviewer policies for governed deployments; demo defaults do not require independent reviewers.
General managed connectors, simultaneous branch writers in one project and unattended external side effects are outside the current implementation. Company promotion requires a deployed companion canary, production-topology load checks, backup/restore rehearsal, security review and release-owner signing. See deployment, operations and the threat model.
src/app/ Pages, API routes and live event endpoints
src/components/ Workflow design, skill editing and run inspection UI
src/domain/ Graph contracts, lifecycle policy, execution and skill matching
src/adapters/ Codex and Mastra integration boundaries
src/storage/ PostgreSQL repositories, result application and ownership locks
src/server/ Background coordination, event streams, rate limits and redaction
companion/ Local setup UI, launcher and worker supervision
scripts/ Runtime worker, result spool, schema, packaging and qualification
tests/ Domain, API, UI, integration and failure-recovery coverage
docs/ Setup, architecture boundaries, operations and security guidance
plan/ Product requirements, phased delivery and implementation evidence
| Need | Read |
|---|---|
| Product scope and requirements | Requirements |
| Architecture and implementation | Architecture guide |
| Skill matching, scope and versions | Skill reuse |
| Recover a step after a companion disconnect | Interrupted companion recovery |
| Durable execution and parallel graphs | Runtime guide |
| Database configuration and backups | PostgreSQL setup |
| Companion pairing and distribution | Companion setup |
| Company demonstration and promotion | Launch runbook |
| Runtime ownership and qualification evidence | Implementation report |
| Delivery phases and remaining scope | Development plan |
Copyright © 2026 Sri Ram Sai Pavan Relangi. Proprietary; all rights reserved. Repository access is provided for review purposes only. See LICENSE for the terms.
