TurfAITurfAI User Guide
Modules

Composer

Build workflows, agents, squads, and prompts by chatting.

What it is

The Conversational Composer is a chat interface for creating workflows, agents, squads, and prompts in plain English — accessible from every page via a floating button or Cmd+K. A backend AI agent designs the component, shows a visual preview, and creates it after you confirm. It exists to remove the steep learning curve of the form-based builder, which requires understanding nodes, edges, task types, config schemas, and input mappings.

The Composer is powered by a seeded system agent (turfai-composer). You don't configure it — you just describe what you want. The only thing you control is the chat input. Everything below ("Configuration parameters") describes how that agent is wired, so you understand what's happening behind the panel.

When to use it

Use it to draft a component fast — "Build a workflow that fetches invoices from Drive, extracts the total, and emails a summary" — then refine in the Visual Workflow Builder. It is the friendliest on-ramp for product/business users.

  • Good fit: drafting a first version, scaffolding a workflow you'll polish by hand, spinning up an agent or squad from a one-line description, navigating quickly ("take me to workflows").
  • Less good fit: fine-tuning a complex existing workflow with decision nodes and loops — the builder gives you precise control there.

How it works

Process flow — describe → preview → confirm:

Call flow — agent + tools:

The agent runs the same ReAct loop the rest of the platform uses: it reasons, calls a tool, reads the result, and repeats until it can answer. Because the intelligence lives in the backend agent (not a frontend LLM call), it reuses sessions, tool use, and the model configured on the agent.

Sub-features

  • Floating panel + Cmd+K — accessible from every page (a violet sparkle button, bottom-right). Sessions persist in the browser so you can pick up where you left off.
  • Suggestion chips — on an empty panel ("Build a workflow", "Create an agent", …) to get you started.
  • Structured response protocol:::composer_block markers render previews (workflow, agent, squad, prompt), navigation links, and creation-result cards.
  • Composer tools — list and create workflows, agents, squads, prompts; list task types.
  • System agent — ownerless; any authenticated user can use it.

Configuration parameters

The Composer is a seeded system agent (turfai-composer), not a user-configured module. The only input you control is the chat message. The settings below live on the seeded agent so you can understand its behavior; product teams don't edit them.

ParameterValueDescription
slugturfai-composerSystem-agent identifier; ownerless so any authenticated user can chat with it.
modelvertexSingle model today (Vertex AI).
temperature0.4Balances creativity vs. determinism in designs.
max_iterations12Cap on ReAct tool-call rounds per turn.
conversationaltrueMulti-turn chat (it remembers the conversation).
System promptseededConversation guidelines, block-format rules, task-type/input-mapping hints.
available_toolsthe 9 composer toolsSee below.

Composer tools (9)

The agent calls these silently during the ReAct loop — you never invoke them directly. Five list tools let it inspect what already exists; four create tools build the component after you confirm.

ToolPurposeUnderlying API
composer_list_task_typesList available workflow node types + their config schemasGET /api/workflows/task-types
composer_list_agentsSearch existing agents (name, slug, goal, model)GET /api/agents
composer_list_workflowsSearch existing workflows (name, ID, status, category)GET /api/activities
composer_list_squadsSearch existing squads (name, slug, process, agent count)GET /api/squads
composer_list_promptsSearch existing prompts (title, type, description)GET /api/prompts
composer_create_workflowCreate a workflow as a draft (validation skipped for drafts)POST /api/activities
composer_create_agentCreate an agent (goal, model, tools, temperature)POST /api/agents
composer_create_squadCreate a squad (process, agents, task DAG)POST /api/squads
composer_create_promptCreate a prompt (roles, type, level)POST /api/prompts

Structured response blocks (6 types)

The agent embeds JSON blocks in its text using :::composer_block markers; the panel parses them into rich UI. The types and purposes are documented below. The per-block JSON data schema is not yet documented — treat the example shapes in the system prompt as illustrative, not contractual.

Block typeRenders asPurpose
workflow_previewStep list with task-type badgesShow a draft workflow before creating it
agent_previewConfig card (goal, model, tools)Show a draft agent
squad_previewTeam + task-DAG viewShow a draft squad
prompt_previewPrompt structure (roles, type)Show a draft prompt
navigationClickable link (auto-routes)Jump to a page ("take me to workflows")
creation_resultSuccess card with an "Open" buttonConfirm a component was created, link to it

Per-block data JSON schemas (field names, required keys for each preview type) are not yet documented as a stable contract. They live in the seeded system prompt today and may change.

Dependencies

  • Agent infrastructure — reuses the agent ReAct loop, tools, sessions.
  • DMSpublic-chat endpoint, system-agent auth, draft-workflow creation (validation skipped for drafts).
  • Platform APIs — the create endpoints for each component type.

Tips & best practices

Describe → preview → confirm discipline. Always read the preview block before you approve. The agent only creates after an explicit confirmation ("yes", "create it", "looks good") — so a preview is a safe checkpoint, not a commitment.

Be specific about the goal, not the mechanics. State the outcome and the data; let the agent pick task types.

Vague (the agent will have to ask, or guess)Good (the agent can design immediately)
"build me a thing""Build an extraction workflow for invoices that pulls the total and invoice number, then emails a summary to finance@acme.com"
"make an agent""Create an agent that answers employee questions about our PTO policy using the HR knowledge base"
"set up a squad""Create a sequential squad: a researcher gathers sources, then a writer drafts a summary"

Name the inputs and the destination. "from Google Drive", "from an uploaded PDF", "email to X", "save to the knowledge base" — these let the agent wire the right source and sink nodes instead of asking.

Review before activating. The Composer creates workflows as drafts. Open the draft in the Visual Workflow Builder, verify the nodes and input mappings, then activate. Don't run a generated workflow blind.

One component per conversation thread. Keep a session focused on a single thing; start a new session (the "new session" button) for an unrelated component so context doesn't bleed.

Concrete examples

A typical end-to-end conversation. Note the ~15–40s pause after each request while the agent runs its ReAct loop and tool calls.

You:      Build an extraction workflow for invoices — pull the total and invoice
          number from a PDF in Google Drive, then email a summary to finance@acme.com.

Composer: Got it. Should the PDF come from a fixed Drive file, or be passed in at
          run time?

You:      Passed in at run time.

          … (~15–40s — agent reasons + calls composer_list_task_types) …

Composer: Here's the workflow I designed:

          [workflow_preview]  Invoice Processor
            1. Fetch from Google Drive   (google_drive_fetch_task)
            2. Extract Data              (extraction_task)
            3. Send Email                (email_send_task)

          Want changes, or shall I create it?

You:      Looks good — create it.

          … (~15–40s — agent calls composer_create_workflow) …

Composer: [creation_result]  ✅ Created workflow "Invoice Processor"  → Open

Clicking Open on the creation_result card routes you to the new draft. Navigation works the same way:

You:      Take me to workflows.
Composer: [navigation]  Workflows →    (click to route to /workflows)

Troubleshooting

SymptomCauseFix
Agent asks clarifying questions instead of designingRequest too vague — it can't infer the source, output, or goal.Answer its 1–2 questions, or restate with the inputs and destination spelled out (see Tips).
Generated component is wrongThe agent guessed a task type or input mapping you didn't intend.Ask it to revise in the same thread ("change step 2 to a classification task"), or delete the created component and redo. There is no undo in the Composer.
Response feels slow (15–40s)The ReAct loop makes several LLM calls + tool calls per turn.Expected. Keep requests focused so the agent needs fewer iterations; complex workflows take longer.
A draft workflow doesn't validate when you run itThe Composer skips validation for drafts, so issues surface on first run.Open the draft in the Visual Workflow Builder, fix input mappings/configs, then activate.
Nothing happens when you click an "Open" / nav linkRouting or the target entity is unavailable.Navigate to the section manually from the sidebar.

No undo. Created components are real (drafts for workflows). To remove a mistake, delete the component from its list page — the Composer can't roll back a creation.

Limitations

  • Response time — the ReAct loop with tool calls takes ~15–40 seconds.
  • No undo — created components must be deleted manually.
  • Single model (Vertex AI); complex workflows (decision nodes, loops) may need iteration.
  • Drafts skip validation — review generated workflows before activating.
  • Phase 1 (foundation) is complete; richer previews / context awareness are roadmap (below).

How to test

  1. Press Cmd+K (or the sparkle button) to open the Composer.
  2. Describe a simple workflow: "Build a workflow that extracts data from uploaded PDFs and emails a summary."
  3. Answer any clarifying question, then wait for the workflow_preview block to render.
  4. Confirm ("create it") and wait for the creation_result card.
  5. Click Open (or go to Workflows) and verify the created workflow exists as a draft, then open it in the builder and confirm it runs after you fix any mappings.
  6. Try "Take me to workflows" and confirm the navigation block routes you.

Roadmap

Phase 1 (foundation + backend agent + the 9 tools) is complete. The following are coming soon — not yet available:

  • Phase 2 — Enhanced previews (coming soon): mini ReactFlow canvas in workflow previews, auto-layout, smarter input_mapping wiring.
  • Phase 3 — Context awareness (coming soon): pass the current page to the session ("what does this workflow do?"), explain/improve existing components, "fork and customize" through conversation.
  • Phase 4 — Polish (coming soon): session history, mobile full-screen panel, streaming responses, actionable error recovery.
  • Per-block JSON schemas (coming soon): a documented, stable contract for each composer_block data shape.

Related modules: Visual Workflow Builder · Agents · Squads.

APIs used

MethodPathPurpose
POST/api/agents/turfai-composer/public-chatChat with the composer agent
POST/api/activitiesCreate a workflow (draft)
POST/api/agents · /api/squads · /api/promptsCreate agent / squad / prompt
GET/api/workflows/task-typesList node types for design
GET/api/agents · /api/activities · /api/squads · /api/promptsList existing components (search)

On this page