Библиотека / ИИ-агенты и ассистенты
ИИ-агенты и ассистенты
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.
Что делает
## 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.
Шаги
- Webhook - Query
- Support Agent
- OpenRouter - Agent
- Calculator Tool
- Order Lookup Tool
- Respond
Похожие автоматизации
Код, Git и инструменты разработчикаSlack в роли точек останова для отладки рабочих процессов n8nШагов: 7Чат-боты и боты для мессенджеровЧат с ассистентом OpenAI с памятью и калькуляторомШагов: 4ИИ-агенты и ассистентыБазовый чат-агент OpenAI с памятью и калькуляторомШагов: 5Чат-боты и боты для мессенджеровЧат-агент OpenAI с памятью и калькуляторомШагов: 7