F
Flowman docsWorkflow SDK
Back to app
All docs

Getting started

Flowman uses the Coding Agent as the primary workflow. New workflows are coding-agent-derived templates that preconfigure fields such as repository, runtime environment, model, and prompt defaults.

Primary workflow. The only workflow route exposed in the product is /api/workflows/coding-agent. It opens a run, starts a coding session, and reports Kanban status through Convex.

1Register a repository and runtime

Open Coding, register the repository you want the agent to work in, and make sure a coding-agent runtime environment is online. Runs need both values so the local runtime can pick up queued planning and implementation work.

2Use the Coding Agent route

The route stays stable even when a run starts from a coding-agent-derived workflow template. The request body may pass a child workflowSlug; the route preserves that slug for the run record while executing the same coding-agent workflow implementation.

typescript
// src/app/api/workflows/coding-agent/route.ts
import { blockConflictingDirectCodingStart } from "@/lib/coding-agent-start-guard";
import { createWorkflowRoute } from "@/lib/flowman-route";
import { codingAgent } from "@/workflows/coding-agent";

export const POST = createWorkflowRoute(codingAgent, {
  workflowSlug: "coding-agent",
  beforeOpenRun: blockConflictingDirectCodingStart,
});

3Create derived workflow templates

Open Workflows and click New Workflow. The form creates a Coding Agent-derived template: choose which fields remain visible, set defaults for hidden fields, and keep required fields visible unless a valid default is supplied.

4Run the agent

Start runs from Workflow Runs, Workflows, or Coding. Status labels and filters follow the Kanban board: Planning, Ready to Implement, Implementing, Review, Blocker, and Done.

bash
curl -X POST http://localhost:4208/api/workflows/coding-agent \
  -H 'Content-Type: application/json' \
  -d '{
    "projectSlug": "YOUR_PROJECT_SLUG",
    "workflowSlug": "coding-agent",
    "input": {
      "prompt": "Describe the coding change you want.",
      "repositoryId": "YOUR_REPOSITORY_ID",
      "runtimeEnvironmentId": "YOUR_RUNTIME_ENVIRONMENT_ID",
      "planMode": true
    }
  }'