Core concepts
The building blocks of an AI application on TurfAI — and how they fit together.
A TurfAI workflow is a directed acyclic graph (DAG) of nodes on a visual canvas. Work flows through four stages: a trigger feeds inputs in, tasks orchestrate the work (including AI agents and squads), an optional human approves, and integration tasks act on the world.
How to read this section
Two layers of concepts, in order:
- AI-app patterns — vendor-neutral best practices (ReAct agents, RAG, HITL, multi-agent orchestration, governance) and how each maps onto a TurfAI primitive. Read this first if you're new to building AI applications.
- TurfAI primitives — the concrete things you create and call:
| Concept | What it is |
|---|---|
| Workflows & activities | The DAG, triggers, variables, execution lifecycle |
| Task types | The unit of work: AI, control flow, integration tasks |
| Agents | ReAct workers with a goal, tools, and a prompt |
| Squads | Teams of agents collaborating on a blackboard |
| Knowledge base & RAG | Index documents, query them with citations |
| Data Shield | PII tokenization before the LLM sees data |
| Event Bus | Trigger workflows from external events |
| Integrations | Email, Google Drive, REST, MCP, credentials |
| Solution packs | Pre-built domain bundles you install and fork |
Prompts
A prompt is reusable system instruction text, managed as a first-class resource
(/api/prompts) with a name, content, category, and visibility (private, public, or
system). Agents and LLM/extraction tasks reference a prompt by title or ID instead of
inlining it, so domain expertise lives in one editable place. Prompts support {{variable}}
templating like the rest of the platform.
Data flow
Every node can reference any earlier node's output with {{variable_name}} templates, and
extract nested fields with JSONPath ($.classification.type). Variables come from three
places: the trigger payload, upstream node outputs, and workflow context (user_id,
execution_id). This is the glue that threads inputs and outputs across the whole graph —
see Workflows for the details.