Key Concepts
Knowledge base rotation - The pattern of overwriting your knowledge base with the latest data after each run. Today's "new" scrape becomes the "old" baseline for future comparisons. This is what gives the agent memory across runs without requiring a database.
Structured outputs for decision-making - Instead of having the LLM return freeform text, you define specific output variables (a boolean, an analysis string, a severity level) that downstream nodes can act on programmatically. This is what makes conditionals possible after an LLM step.
Quick Reference
Agent architecture (node by node)
- Five inputs - one URL per competitor
- Code node (Firecrawl API) - scrapes all five competitor pages. Outputs:
result_1 through result_5 - Get sheet values node ("Check Knowledge Base") - reads cells
A10:E10 from the Google Sheet. Output: knowledge_base_status - LLM node - evaluates whether the knowledge base has data. Output:
data (returns true or false) - Conditional - branches on the value of
data
If false (no existing data):
- Five "store competitor" nodes - each writes one scrape result to its respective cell (
A10 through E10)
If true (data exists):
- Get row node - pulls old scrapes from
A10:E10. Output: old_data - LLM node (difference analysis) - compares old data vs. new scrapes. For each competitor, outputs three structured variables:
- Change detected - boolean (
true/false) - Change analysis - description of what changed
- Severity - how significant the change is (e.g., low, medium, high)
- Five "update knowledge base" nodes - overwrites old scrapes with today's data for future runs
- Conditional - for each competitor, checks if severity equals
high OR medium - LLM node ("Slack Notification") - formats a summary of significant changes into a Slack message
- Slack node - delivers the report
Generating the Firecrawl code node
- Export the agent as a JSON file
- Upload the JSON to Claude along with a screenshot of your code node setup
- Prompt Claude to generate code using the Firecrawl API with five inputs and five outputs
- Paste the generated code back into your code node
- Map each input variable to its competitor URL and add your Firecrawl API key
Tips from the build
- Use
test.com (or any throwaway URL) when testing your API call - you just need to confirm the scrape works, not analyze real data yet - Name every node and output clearly:
check_knowledge_base, old_data, slack_notification - not defaults - The screenshot trick matters: giving Claude a visual of your node setup produces significantly better code output than a text description alone