TurfAI Developer Docs
Concepts

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

Read the concepts in two layers, in this order:

  1. 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.
  2. TurfAI primitives — the concrete things you create and call:
ConceptWhat it is
Workflows & activitiesThe DAG, triggers, variables, execution lifecycle
Task typesThe unit of work: AI, control flow, integration tasks
AgentsReAct workers with a goal, tools, and a prompt
SquadsTeams of agents collaborating on a blackboard
Knowledge Base & RAGIndex documents, query them with citations
Data ShieldPII tokenization before the LLM sees data
Event BusTrigger workflows from external events
IntegrationsEmail, Google Drive, REST, MCP, credentials
Solution PacksPre-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 title, content, a section for grouping, and a level (user or system). Agents reference a prompt by title and LLM/extraction tasks by prompt_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). These templates thread inputs and outputs across the whole graph. For the details, see Workflows & activities.

On this page