AI Steps

Add AI reasoning to any point in a workflow. Multi-model support, Knowledge Graph access, and structured output — all configured per step.


What is an AI Step?

An AI step sends a prompt to a language model, optionally with access to Knowledge Graph tools, previous step outputs, and structured output schemas. Unlike simple LLM API calls, AI steps are contextual — they can read business memory, reference past executions, and write insights back to the graph.


Model Tiers

AgentLed routes AI steps to the optimal model based on task complexity. Each tier maps to a default model, configurable at the workspace level.

TierUse CaseDefault Model
NanoTitle generation, classificationgpt-4o-mini
MiniSummaries, lightweight analysisgpt-4o-mini
StandardAgentic tasks, workflow buildinggpt-4o
MaxDeep reasoning, long-context scoringclaude-sonnet-4-20250514

Supported providers: OpenAI, Anthropic, Google (Gemini), Mistral, DeepSeek, Moonshot, xAI.


Configuration

Add an AI step to a workflow with a prompt, model tier, and optional settings:

{
  "type": "ai",
  "name": "Score Investor Fit",
  "config": {
    "modelTier": "max",
    "prompt": "Score this investor for fit with the startup profile.\n\nInvestor: {{investor}}\nStartup: {{startup_profile}}\n\nUse kg_search to find prior scoring history. Use kg_write to store your score.",
    "outputSchema": {
      "score": "number (0-10)",
      "rationale": "string",
      "confidence": "number (0-1)",
      "sector_match": "boolean"
    },
    "temperature": 0.3,
    "maxTokens": 2000
  }
}

Knowledge Graph Access

Every AI step automatically receives four KG tools when the workspace has a Knowledge Graph configured:

  • kg_search — Semantic search across entities and insights
  • kg_traverse — Follow relationship edges
  • kg_nodes — List entities by type
  • kg_write — Persist scores and insights

The model decides when and how to use these tools based on the prompt context. No explicit tool calling configuration is needed.


Variable Interpolation

Reference outputs from previous steps using double-brace syntax:

"prompt": "Analyze this company:\n\n{{enrichment_step.company_data}}\n\nPrevious score: {{scoring_step.score}}"

// Available variables:
// {{step_name.field}}    — output from a named step
// {{input.field}}        — workflow input parameters
// {{batch.current}}      — current item in a batched step

Testing AI Steps

Test prompts without creating a full workflow using the MCP test_ai_action tool:

// From Claude Code or any MCP client:
"Test this AI prompt: 'Classify this company as B2B or B2C based on: {{company_description}}'
with input: { company_description: 'Stripe provides payment processing APIs for internet businesses' }"

Next Steps