Bibliothek / KI-Agenten & Assistenten
KI-Agenten & Assistenten
Debug AI agent tool calls with OpenRouter, calculator and webhook
When an API call/webhook arrives, it runs an AI agent with OpenRouter and OpenAI / ChatGPT.
Was sie bewirkt
## Debug AI agent tool calls with OpenRouter, Calculator and OpenTelemetry ### Quick overview This workflow gives a support agent a Calculator tool and a simulated order lookup tool, so you can compare a correct calculation, a found order and an empty lookup that still reports success. It is the Exercise 4 template from the n8n Production AI Playbook post on Audit & Trace. Order data is synthetic. ### How it works 1. Receives a POST webhook request with a query. 2. Support Agent, an AI Agent using an OpenRouter chat model, decides which tool to call. 3. Calculator Tool handles arithmetic. Order Lookup Tool returns a simulated order, or an empty string for unknown orders. 4. Respond returns the agent's answer. ### Setup 1. Add an OpenRouter API credential to OpenRouter - Agent. If you change models, choose one that supports tool calling. 2. Optionally enable OpenTelemetry tracing in Settings > OpenTelemetry to see a span for each tool call. 3. Select Execute workflow and POST {"query":"What is 47 times 89?"} to the Webhook Test URL. Repeat with a query about order ORD-1001 and one about ORD-8888. 4. Compare the tool results in the agent logs with each reply to find the empty lookup.
Die Schritte
- Webhook - Query
- Support Agent
- OpenRouter - Agent
- Calculator Tool
- Order Lookup Tool
- Respond
Ähnliche Automatisierungen
Code, Git & EntwicklertoolsSlack als Debug-Breakpoints für n8n-Workflows nutzen7 SchritteChatbots & Messaging-BotsMit einem OpenAI-Assistenten mit Gedächtnis und Taschenrechner chatten4 SchritteKI-Agenten & AssistentenEinfacher OpenAI-Chat-Agent mit Gedächtnis und Taschenrechner5 SchritteChatbots & Messaging-BotsOpenAI-Chat-Agent mit Speicher und Taschenrechner7 Schritte