Skip to content
NEWMeet Alaaddin, your AI genie with a voice. trig8n launches 1 January 2027. See what is new

Library / AI Agents & Assistants

AI Agents & Assistants

Log, audit and escalate AI agent tool calls with Groq, Discord and data tables

When you run it, it runs an AI agent with Groq and OpenAI / ChatGPT using Groq, Data Table, Discord.

What it does

## Log, audit and escalate AI agent tool calls ### How it works A chat agent is told to answer only from its tools, a calculator and a demo order lookup, with memory per session and intermediate steps switched on. After every reply a Code node runs deterministic rules over the run: a number in the answer that no tool result, question or earlier clean turn contains; an order, invoice or refund question answered without the lookup; instruction-like text inside a tool result; more tool calls than the policy allows; an agent that did not answer. A second Groq call judges whether the prose is supported. The rules decide FLAGGED on their own; the judge can only raise CLEAN to REVIEW, never clear a rule. Anything not CLEAN goes to flagged_answers and Discord, every tool call goes to agent_flight_log with the verdict, and the reply carries the status. Every morning a schedule counts the log, stores a digest and posts it when anything needs attention, including when nothing ran at all. ### Setup 1. Add a Groq credential to both Groq nodes and a Discord webhook credential to both Discord nodes. 2. Run Set Up Tables once: it creates the four data tables and seeds four demo orders, one deliberately poisoned. Every other node finds its table by name. 3. Ask the chat about order 1002, then about order 1004. 4. Tune Set Audit Policy: number length, ignore list, required tools, injection phrases. Activate the workflow so the daily digest runs. ### Customization tips Swap the demo lookup for your real tools and point required_tools at their names. The rules are arithmetic and phrase lists, not judgement; the judge is a model that text can fool. A flag is a pointer for a person, not a verdict.

The steps

  1. Set Up Tables (run once)
  2. Create Orders Table
  3. Create Flight Log Table
  4. Create Flagged Answers Table
  5. Create Digests Table
  6. Build Four Demo Orders
  7. Upsert Demo Orders
  8. Chat With The Agent
  9. Set Audit Policy
  10. Run Agent With Tools
  11. Groq Chat Model
  12. Remember The Conversation
  13. Calculator
  14. Look Up Demo Order

33 steps in total.

Similar automations