Skip to content

AI Primitive Nodes ​

AI Primitive nodes are the building blocks of intelligent pipelines. They handle prompt rendering, lens execution, agent delegation, output parsing, vector embedding, RAG retrieval, evaluation, memory, and multi-step AI chains.

NodeTypeOutput
Prompt Templateprompt_templatetext
Lens Executelens_executelens_result
Agent Executeagent_executeagent_result
Output Parseroutput_parserjson
Embeddingembeddingembedding
RAG Retrieverrag_retrievaldocument[]
Vector Searchvector_searchdocument[]
Judge / Evaljudge_evaluatorjson
Memory Readmemory_readdocument[]
Memory Writememory_writejson
Chainchainjson
Summarizersummarizertext
Classifierclassifierjson
Translatortranslatortext
Image Analyzeimage_analyzejson
Audio Transcribeaudio_transcribetext
Video Analyzevideo_analyzejson

Prompt Template ​

Type: prompt_template · Category: AI Primitive

Render a prompt from variables and upstream data. Use before lens_execute or lens nodes to construct the input text.

Required Config ​

FieldTypeDescription
templatetemplatePrompt template using {{variable}} syntax.

Optional Config ​

FieldTypeDescription
variablesjsonExplicit variable mappings: { varName: "$.sourcePath" }.

Example ​

json
{
  "template": "Summarize these arena results for {{audience}}: {{results}}",
  "variables": { "audience": "founders", "results": "$.results" }
}

Expected output: { "prompt": "Summarize these arena results for founders: ..." }

Downstream: → lens_execute with { "prompt": "$.prompt" }

Lens Execute · Lens Node · Output Parser


Lens Execute ​

Type: lens_execute · Category: AI Primitive

Execute a selected LenserFight lens as a utility node (unlike the top-level Lens node, this is a catalog-driven step with an explicit lensId).

Required Config ​

FieldTypeDescription
lensIdstringLens id to execute.
model_idstringModel key (e.g. openai:gpt-4.1-mini).

Optional Config ​

FieldTypeDescription
param_overridesjsonLens parameter overrides.

Example ​

json
{
  "lensId": "lens_weekly_digest",
  "model_id": "openai:gpt-4.1-mini",
  "param_overrides": { "tone": "crisp" }
}

Expected output: { "lensResult": { "text": "Weekly digest...", "modelId": "openai:gpt-4.1-mini" } }

Downstream: → email_send with { "body": "$.lensResult.text" }

Lens Node · Prompt Template · Judge / Eval


Agent Execute ​

Type: agent_execute · Category: AI Primitive

Delegate work to a configured LenserFight agent. The agent runs autonomously and returns a structured result.

Required Config ​

FieldTypeDescription
agentIdstringAgent id to invoke.
tasktemplateTask prompt with {{variable}} interpolation.

Optional Config ​

FieldTypeDefaultOptions
delegationPolicyselectautoauto · approval_required · forbidden

Example ​

json
{
  "agentId": "agent_pr_reviewer",
  "task": "Review PR {{prNumber}} for security and tests.",
  "delegationPolicy": "approval_required"
}

Expected output: { "agentResult": { "status": "completed", "summary": "Found 2 issues", "artifacts": [] } }

Downstream: → github_pr_review with { "reviewBody": "$.agentResult.summary" }


Output Parser ​

Type: output_parser · Category: AI Primitive

Parse model text into strict JSON fields. Use after a Lens or Lens Execute node when the model returns JSON-embedded in text.

Optional Config ​

FieldTypeDefaultDescription
schemajson—Expected output schema for type coercion.
strictbooleantrueFail when parsing is incomplete.

Example ​

json
{
  "schema": { "score": "number", "reasoning": "string", "winner": "string" },
  "strict": true
}

Expected output: { "score": 0.86, "reasoning": "Candidate A cites more evidence.", "winner": "candidate_a" }

Downstream: → judge_evaluator

Valid Connections ​

→ judge_evaluator, score_aggregator, leaderboard_update

Invalid Connections ​

✗ Cannot receive structured json input directly — it expects model-generated text.

Lens Execute · Judge / Eval


Embedding ​

Type: embedding · Category: AI Primitive

Convert text or documents into embedding vectors with metadata. Use for building vector indexes, semantic similarity search, and RAG pipelines.

Inputs ​

NameTypeRequired
contenttextNo
documentsdocument[]No

At least one of content or documents is required.

Outputs ​

NameTypeShape
embeddingembedding{ vector: number[], dimensions: number, metadata: json }

Required Config ​

FieldTypeDescription
providerselectopenai · google · mistral
modelstringEmbedding model (e.g. text-embedding-3-small).

Optional Config ​

FieldTypeDefault
inputPathstring$.text
chunkSizenumber1000
dimensionsnumber1536
metadataFieldsstring[]—

Example ​

json
{
  "provider": "openai",
  "model": "text-embedding-3-small",
  "inputPath": "$.documents[*].pageContent",
  "chunkSize": 1000,
  "dimensions": 1536,
  "metadataFields": ["battleId", "contenderId"],
  "retry": { "attempts": 3, "backoffMs": 1500 }
}

Scenario: Embed battle reports for later RAG retrieval.

Downstream: → vector_search with { "vector": "$.embedding.vector" }

Valid Connections ​

→ vector_search (direct vector lookup)

→ rag_retrieval (query embedding for retrieval)

Text Splitter · RAG Retriever · Vector Search


RAG Retriever ​

Type: rag_retrieval · Category: AI Primitive

Retrieve scored documents from a vector source for a query. Use in question-answering, search, and context-augmented generation pipelines.

Inputs ​

NameTypeRequired
querytextYes
sourceembeddingNo

Outputs ​

NameTypeDescription
documentsdocument[]Retrieved documents with scores.

Required Config ​

FieldTypeDescription
vectorStorestringVector source (e.g. supabase:workflow_documents).
queryPathstringQuery mapping (e.g. $.rootInputs.query).

Optional Config ​

FieldTypeDefault
topKnumber5
similarityThresholdnumber0.72
filtersjson—
rerankbooleantrue

Example ​

json
{
  "vectorStore": "supabase:workflow_documents",
  "queryPath": "$.rootInputs.query",
  "topK": 6,
  "similarityThreshold": 0.74,
  "filters": { "workspaceId": "{{workspace.id}}" },
  "rerank": true
}

Scenario: Retrieve knowledge base passages before answering a user question.

Downstream: → prompt_template with { "context": "$.documents[*].pageContent" }

Valid Connections ​

→ prompt_template, summarizer, judge_evaluator

Embedding · Vector Search · Prompt Template


Type: vector_search · Category: AI Primitive

Search vectors directly using an embedding input.

Inputs ​

NameTypeRequired
embeddingembeddingYes

Required Config ​

FieldTypeDescription
vectorStorestringVector index name.

Optional Config ​

FieldTypeDefault
topKnumber5

Example ​

json
{
  "vectorStore": "supabase:workflow_documents",
  "topK": 5,
  "filters": { "battleId": "$.metadata.battleId" }
}

Downstream: → summarizer

Embedding · RAG Retriever


Judge / Eval ​

Type: judge_evaluator · Category: AI Primitive

Evaluate candidates against a rubric and emit structured scoring. The core node for AI-powered evaluation in battle pipelines.

Inputs ​

NameTypeRequired
candidatesjsonYes
rubrictextNo

Outputs ​

NameTypeShape
evaluationjson{ score: number, reasoning: text, winner: text, confidence: number }

Required Config ​

FieldTypeDescription
rubrictemplateEvaluation rubric prompt.
scoringScalestringScale descriptor (e.g. 0-100).

Optional Config ​

FieldTypeDefault
judgeModelstring—
tieBreakRulestring—
confidenceThresholdnumber0.7

Example ​

json
{
  "rubric": "Score correctness, source coverage, and actionability. Return JSON.",
  "scoringScale": "0-100",
  "candidateMappings": { "a": "$.answerA", "b": "$.answerB" },
  "judgeModel": "anthropic:claude-3-7-sonnet",
  "tieBreakRule": "prefer_higher_source_coverage",
  "confidenceThreshold": 0.76
}

Expected output: { "score": 91, "reasoning": "Answer A is more complete.", "winner": "answerA", "confidence": 0.84 }

Downstream: → score_aggregator with { "score": "$.score", "winner": "$.winner" }

Valid Connections ​

→ score_aggregator, leaderboard_update, slack_notify

Battle Execute · Output Parser · Score Aggregator


Memory Read ​

Type: memory_read · Category: AI Primitive

Read conversation or workflow memory entries from a named namespace.

Required Config ​

FieldTypeDescription
memoryKeystringMemory namespace (e.g. workspace:arena-digests).

Optional Config ​

FieldTypeDefault
limitnumber10

Example ​

json
{ "memoryKey": "workspace:arena-digests", "limit": 8, "query": "$.query" }

Expected output: { "documents": [{ "pageContent": "Last digest favored concise answers." }] }

Downstream: → prompt_template with { "memory": "$.documents" }

Memory Write · RAG Retriever


Memory Write ​

Type: memory_write · Category: AI Primitive

Write durable workflow memory to a named namespace.

Required Config ​

FieldTypeDescription
memoryKeystringMemory namespace.
contentPathstringContent mapping (e.g. $.summary).

Optional Config ​

FieldTypeDefaultOptions
policyselecton_successon_success · checkpoint

Example ​

json
{
  "memoryKey": "workspace:arena-digests",
  "contentPath": "$.summary",
  "policy": "checkpoint",
  "metadata": { "source": "weekly_digest" }
}

Downstream: → logger

Memory Read


Chain ​

Type: chain · Category: AI Primitive

Run a configured AI chain of prompt, model, and parser steps sequentially.

Required Config ​

FieldTypeDescription
stepsjsonChain step definitions. Each step: { type, ...stepConfig }.

Example ​

json
{
  "steps": [
    { "type": "prompt_template", "template": "Summarize {{input}}" },
    { "type": "lens_execute", "model_id": "openai:gpt-4.1-mini" },
    { "type": "output_parser", "schema": { "summary": "string" } }
  ]
}

Expected output: { "summary": "PR changes add catalog-backed workflow nodes." }

Downstream: → slack_notify with { "text": "$.summary" }


Summarizer ​

Type: summarizer · Category: AI Primitive

Summarize text or documents using a selected model.

Required Config ​

FieldTypeDescription
modelstringModel key.

Example ​

json
{ "provider": "openai", "model": "gpt-4.1-mini", "inputPath": "$" }

Downstream: → email_send

Prompt Template · Lens Execute · Text Splitter


Classifier ​

Type: classifier · Category: AI Primitive

Classify text into configured labels with confidence scores.

Required Config ​

FieldTypeDescription
modelstringModel key.

Example ​

json
{ "provider": "openai", "model": "gpt-4.1-mini", "inputPath": "$" }

Expected output: { "label": "high_risk", "confidence": 0.87 }

Downstream: → switch


Translator ​

Type: translator · Category: AI Primitive

Translate text into a target language.

Required Config ​

FieldTypeDescription
modelstringModel key.

Example ​

json
{ "provider": "openai", "model": "gpt-4.1-mini", "instructions": "Create translation for localized founder note." }

Downstream: → notion_write


Image Analyze ​

Type: image_analyze · Category: AI Primitive

Analyze an image and return structured observations (labels, objects, text, sentiment).

Inputs ​

NameTypeRequired
imageimageYes

Example ​

json
{ "provider": "openai", "model": "gpt-4.1-mini" }

Downstream: → judge_evaluator for media moderation review.


Audio Transcribe ​

Type: audio_transcribe · Category: AI Primitive

Transcribe audio into text with timestamps.

Inputs ​

NameTypeRequired
audioaudioYes

Example ​

json
{ "provider": "openai", "model": "gpt-4o-transcribe" }

Downstream: → summarizer for meeting summary pipeline.


Video Analyze ​

Type: video_analyze · Category: AI Primitive

Analyze video frames and transcript into structured notes.

Inputs ​

NameTypeRequired
videovideoYes

Example ​

json
{ "provider": "openai", "model": "gpt-4.1-mini" }

Downstream: → summarizer for battle replay review.


See also: Node Catalog Index · Battle Nodes · Data Nodes · Embedding and RAG concepts · Workflow Studio