Skip to main content
A customer support agent handles refund requests, account lookups, and order modifications. This flow shows how TealTiger enforces tool authorization, human-in-the-loop approval for high-value actions, cost governance, and a complete audit trail — all without any LLM in the governance path.

Orchestration Flow

User sends message

A customer sends a support request: “I’d like a refund for order #4821 — the item arrived damaged.”

TealGuard — Input scanning

TealGuard scans the user message for prompt injection attempts and content moderation violations. If the message contains injection patterns like “ignore previous instructions,” TealGuard flags it and TealEngine can DENY the request before it reaches the agent.

TealEngine — Policy evaluation

TealEngine evaluates the input against configured policies. The request passes content policies, so the agent is allowed to process it.

Agent processes request

The AI agent analyzes the customer’s message, retrieves order #4821 details, and determines a refund is appropriate. The agent decides to call the issue_refund tool with amount $150.

TealRegistry — Tool authorization

TealRegistry checks whether issue_refund is on the tool allowlist for this agent. Only explicitly allowlisted tools can be called — anything not in the registry is denied by default.

TealEngine — Approval gate

TealEngine evaluates the tool call against cost policies. The refund amount (150)exceedsthe150) exceeds the 100 auto-approve threshold, so the decision is REQUIRE_APPROVAL. The request is paused and routed to a human reviewer.

Human approves

A support supervisor reviews the refund request in the approval queue. They see the order details, damage claim, and the $150 amount. They approve the refund.

Tool executes

With human approval, the issue_refund tool executes against the payment system. The refund of $150 is processed for order #4821.

TealAudit — Decision chain logged

TealAudit logs the entire decision chain: input scan result, policy evaluation, tool authorization check, approval gate trigger, human approval, and tool execution. All events share a single correlation ID for end-to-end traceability.

Flow Diagram

Customer Support Agent governance flow

Code Example

Key Governance Points

Without TealRegistry, an agent could call any tool the LLM hallucinates — including tools that don’t exist or tools the agent shouldn’t have access to. Always use an explicit allowlist.
Start with MONITOR mode on the approval gate to measure how many refunds would trigger human review. Switch to ENFORCE once you’ve tuned the threshold.

Decision Lifecycle

How ALLOW, DENY, and REQUIRE_APPROVAL decisions flow through the system

Prevent Hallucinated Refunds

Cookbook recipe with detailed refund policy configuration

TealEngine API

Full API reference for TealEngine v1.2

Audit Event Schema

Complete audit event schema and field reference