Skip to content

Best Practices

Start (cron: "0 9 * * *")
-> HTTP API (fetch news API)
-> Agent (summarize top stories)
-> End
Start (mention trigger)
-> Agent (classify intent: question, complaint, praise, spam)
-> If/Else (is spam?)
-> True: End
-> False: Agent (generate response with brand memory)
-> End
Start (manual)
-> Agent (break down query into sub-questions)
-> Parallel Fork
-> HTTP API (source 1)
-> HTTP API (source 2)
-> Parallel Join
-> Agent (synthesize findings)
-> End
Start (webhook from GitHub)
-> HTTP API (fetch PR diff)
-> Agent (review code for bugs and style)
-> End
  1. Use cheaper models for simple tasksgpt-4o-mini handles most classification and formatting
  2. Limit chat history — Set chatHistoryLimit to 10-20 messages instead of unlimited
  3. Use routing strategies — Let the system pick the optimal model per request
  4. Set budget limits — Configure daily/monthly budgets to prevent runaway costs
  5. Cache with brand memory — Pre-load common knowledge instead of re-fetching
  • Overly broad system prompts — Be specific about what the agent should do
  • Missing error handling — Use guardrail nodes to catch bad inputs
  • No budget limits — Always set daily limits on production agents
  • Too many tool iterations — Set maxToolIterations to prevent infinite loops
  • Ignoring chat history costs — Long conversations can be expensive with large models