TurfAITurfAI Developers
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

Two layers of concepts, in 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 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.

On this page