What Happens During Execution
1. Entry
After Payment, you are redirected to/execution?sessionId=...&platform=...&signature=...(or without
signature when paying with Dodo).
- The Execution page loads
- After a short “Preparing…” delay (~2 seconds)
- Calls
POST /api/executewith:sessionIdtransactionSignature(if Solana)platform
2. Execute API
The/api/execute handler:
- Loads workflow context
- From database (or in-memory) using
sessionId - If missing, may rebuild from
Workflowtable or fail with a clear error
- From database (or in-memory) using
- Validates
- Ensures
selectedPlatformexists - Ensures
refinedRequirementsexist - If Solana payment, may verify transaction on-chain
- Ensures
- Resolves agents
- From
platformOptions.agents_required - Or defaults (ProductManager, FrontendDev, BackendDev)
- For Android / iOS, DevOpsEngineer usually included
- ReviewAgent always runs after main agents
- From
- Runs the X402 workflow
- Calls
executeX402Workflow - Inputs: platform, requirements,
sessionId, agent list
- Calls
- Saves the result
- Writes
executionResultto workflow:agents_executeddeliverablesreview_passedreview_issues
- Returns the result
- Writes
3. X402 Workflow (server-side)
InsideexecuteX402Workflow:
- Platform config
- Selects template (Website, Web Application, Android, iOS)
- Gets expected folder structure and file list
- Platform deliverables
generatePlatformDeliverablescreates real file content:- PRD
- PLAN
- Specs
- Prompts
- Infra
- Files assigned to agents and generated via AI
- A2A setup
- Initializes A2A (Agent-to-Agent) for the session
- Sends “Execution started”
- Shares requirements with all agents
- Agent run
- Agents run in parallel:
- ProductManager
- FrontendDev
- BackendDev
- DevOpsEngineer
- ToolManager (as applicable)
- Each agent:
- Receives requirements
- Produces outputs
- Shares
execution_resultvia A2A
- ReviewAgent does not run here
- Agents run in parallel:
- Aggregation
- Platform deliverables are merged
- Deduplication may regenerate identical files
- Folder structure
- Adds
project_structuredeliverable - Example:
FOLDER_STRUCTURE.md
- Adds
- Review
- ReviewAgent checks:
- Required files exist
- Each file has path and non-empty content
- Returns:
review_passed(true/false)review_issues(list)
- ReviewAgent checks:
- Response
- Returns:
agents_executeddeliverablesintegration_pointsreview_passedreview_issuesexecution_time_seconds
- Returns:
4. Projects Generate (ZIP)
When Execute API returns success andreview_passed = true:
- Execution page calls
POST /api/projects/generate - Inputs:
sessionIdexecutionResult
- Builds project file tree
- Writes files to disk or in-memory
- Creates a ZIP
- Stores ZIP in
ZipFile(and/orWorkflow.zipFile)
5. Execution Page After Completion
- Review
- “Review Passed” or “Review Failed”
- Shows
review_issuesif failed
- Structure
- Renders Project Structure preview
- ZIP
- Progress bar during:
- “Generating ZIP file…”
- “Preparing your document…”
- Shows “Download Project ZIP” when ready
- Progress bar during:
- GitHub
- If OAuth configured:
- Connect to GitHub
- Upload to GitHub
- Create repo and push files
- If OAuth configured:
Agent Coordination
Roles in Execution
| Agent | Role |
|---|---|
| X402Agent | Orchestrator; shares requirements via A2A; coordinates run |
| ProductManager | PRD, user stories, acceptance criteria, feature specs |
| FrontendDev | Frontend components, pages, styles, specs |
| BackendDev | API, data models, DB schema, auth |
| DevOpsEngineer | Docker, CI/CD, deployment, infra |
| ToolManager | Integrations, .env.example, configs, folder structure |
| ReviewAgent | Post-run review; sets review_passed and review_issues |
A2A (Agent-to-Agent)
- Initialize
- A2A initialized at start of X402 run
- Notifications
- “Execution started”
- “Starting <Agent>”
- “<Agent> completed”
- Data sharing
- Requirements shared to all agents
- Agents share
execution_resultwhen done
- Parallel run
- Agents run via
Promise.all - No fixed sequence
- Agents run via
Integration Points
Inferred from agents run:- Frontend–Backend
- Backend–AI
- ProductManager–Frontend
- DevOps–Backend
Who Produces What
- Platform-specific content
- Produced by
generatePlatformDeliverables
- Produced by
- Parallel agent run
- Provides status and high-level outputs
- Final deliverables
- Platform deliverables
FOLDER_STRUCTURE.mdREVIEW_REPORT.md
Progress Tracking
On the Execution Page
| Phase | What you see |
|---|---|
| Preparing | “Preparing… Setting up your project” |
| Executing | “Executing Workflow” + messages |
| Execution complete | “Execution complete!” |
| Review | “Review Passed” or “Review Failed” |
| Generating ZIP | Progress bar (0–100%) |
| Ready | “ZIP file ready!” + download button |
Progress Messages (in order)
- “Validating payment…”
- “CEO Agent: Analyzing request and routing to X402Agent…”
- “X402Agent: Orchestrating simultaneous multi-agent execution…”
- “Executing agents simultaneously: ProductManager, FrontendDev, BackendDev…”
- “ReviewAgent: Reviewing deliverables for quality and uniqueness…”
/api/executeis a single HTTP request- Messages are client-side placeholders
- Server work runs in one pass
- ZIP progress reflects
/api/projects/generate
If Review Fails
- “Review Failed” shown
review_issuesdisplayed- ZIP generation not started
- Download button hidden
Expected Timelines
By Platform (typical)
| Platform | Typical execution time |
|---|---|
| Website | ~45 s |
| Web Application | ~75 s |
| Android | ~100 s |
| iOS | ~100 s |
Additional Time
| Step | Typical duration |
|---|---|
| Preparing (client) | ~2 s |
| Execute API | ~45–100+ s |
| Projects Generate (ZIP) | ~5–30+ s |
| Client UX placeholders | A few seconds |
End-to-End (Payment → Download)
- Website: ~1–2.5 min
- Web Application: ~1.5–3 min
- Android / iOS: ~2–3.5 min
What Affects Duration
- Platform
- Deduplication
- ReviewAgent overhead
- AI model and RPC latency
- ZIP size and file count