Documentation Index
Fetch the complete documentation index at: https://docs.vh3.ai/llms.txt
Use this file to discover all available pages before exploring further.
n8n Agent Prompts
The n8n AI Agent node lets you wire up an LLM-powered agent inside a workflow, with custom tools that call external APIs. This kit gives you the exact system prompt and HTTP Request Tool definitions needed to make that agent fluent in the VH3 API.This kit assumes familiarity with n8n’s AI Agent and HTTP Request Tool nodes. If you’re new to n8n, see the n8n Community Node guide for the pre-built VH3 node which handles a lot of this automatically.
When to use this vs the n8n Community Node
| Use the n8n Community Node when… | Use this Agent kit when… |
|---|---|
| You want pre-built operations (Run Sentinel, Generate Report, etc.) | You want an LLM to decide which VH3 endpoint to call |
| Your workflow is deterministic (cron → action → notify) | The trigger is a free-form question (Slack mention, email, webhook) |
| You don’t want LLM costs on every workflow run | You’re building a conversational interface or assistant |
Architecture
The system prompt
Paste this into the System Message field of the AI Agent node.System Message
HTTP Request Tool definitions
Each tool below is a separate HTTP Request Tool node connected to the AI Agent.Tool 1 — investigate
Tool 2 — aggregate_jobs
Tool 3 — jobs_feed
Tool 4 — sentinels_run
Tool 5 — reports_generate
Wiring it up — n8n-as-code
If you’re using the n8n-as-code workflow management approach (seeAGENTS.md in the repo root), here’s the full workflow file pattern:
vh3-slack-agent.workflow.ts
Credential setup
Create an n8n credential calledvh3Api with two fields:
| Field | Value |
|---|---|
companyId | Your company ID |
apiKey | Your API key |
companyName (optional) | Your company name — used in the system prompt |
={{ $credentials.vh3Api.companyId }} and ={{ $credentials.vh3Api.apiKey }}. Credentials never appear in the workflow JSON.
Testing the agent
Once wired up, test with these messages in your trigger channel:| Message | Should trigger |
|---|---|
| ”How many jobs did we complete last week?” | aggregate_jobs with period=last_week |
| ”Why are roofing jobs running late?” | investigate |
| ”Show me job FAB303178” | jobs_feed with reference filter |
| ”What needs attention today?” | sentinels_run |
| ”Generate today’s start-of-day briefing” | reports_generate with reportType=start_of_day |
Performance notes
Set timeouts correctly
/investigate and /reports/generate with narrative: 25s. Other endpoints: 10–15s. Default n8n HTTP timeout (5s) will fail.Memory matters
Use
memoryBufferWindow with contextWindowLength: 10 and sessionKey scoped to the channel/user. Without memory, follow-up questions like “drill into roofing” lose context.Watch token costs
Each tool call adds tokens. The system prompt is large — consider trimming to the routing table only once your team is fluent.
Use streaming where supported
Some channels (Slack, Teams) support message editing — stream partial responses to feel snappier on 17s
/investigate calls.