Skip to content

Chains

Chains are sequential multi-step pipelines defined in YAML. Each step specifies which tools to use and a system prompt that guides the LLM’s behavior for that step.

name: my-chain
description: What this chain does
tier: free
steps:
- id: step-1
tools: [tool_a, tool_b]
systemPrompt: Instructions for this step.
- id: step-2
tools: [tool_c]
systemPrompt: Instructions for the next step. Can reference results from step-1.
- id: step-3
tools: [tool_d, tool_e]
systemPrompt: Final step instructions.
FieldTypeDescription
namestringUnique chain identifier
descriptionstringWhat the chain does
tierfree | paidContent tier
stepsarrayOrdered list of execution steps
steps[].idstringStep identifier
steps[].toolsstring[]Tools available for this step
steps[].systemPromptstringLLM instructions for the step
name: tax-prep
description: Analyze transactions for tax-deductible expenses and generate Schedule C summary
tier: paid
steps:
- id: scan
tools: [transaction_search]
systemPrompt: >
Find all transactions that could be business-related or tax-deductible.
Search broadly across software, subscriptions, travel, meals, office
supplies, professional services.
- id: categorize-for-tax
tools: [categorize]
systemPrompt: >
Categorize identified business transactions using IRS Schedule C line
items (advertising, car/truck, insurance, office, supplies, travel,
meals, utilities, other).
- id: flag-deductions
tools: [anomaly_detect, transaction_search]
systemPrompt: >
Flag questionable deductions, mixed-use expenses needing allocation,
meals over $75, and items missing documentation.
- id: generate-report
tools: [spending_summary, export_transactions]
systemPrompt: >
Generate a tax summary by Schedule C line item with totals, flagged
items, and estimated tax savings. Export business expenses.
name: cash-flow-forecast
description: Forecast cash flow by analyzing income/expense trends and projecting future balances
tier: paid
steps:
- id: analyze-trends
tools: [spending_summary, transaction_search]
systemPrompt: >
Analyze 3-6 months of income and expense trends. Calculate monthly
totals and identify direction.
- id: identify-recurring
tools: [anomaly_detect, transaction_search]
systemPrompt: >
Identify all recurring income and expenses with frequency and amounts.
Note any recent changes.
- id: project
tools: [spending_summary]
systemPrompt: >
Project income, expenses, and net balance for the next 6 months using
3-month moving average with seasonal adjustments.
- id: report
tools: [spending_summary, export_transactions]
systemPrompt: >
Generate cash flow forecast with monthly projection table, risk
indicators (savings rate, months to negative), and recommendations.

Each step runs sequentially. The LLM receives the step’s system prompt and has access only to the tools listed for that step. Results from earlier steps are available as context for later steps.

If any step fails, the chain stops and reports the error.