WhoBuilt

AI Agents Don't Read Your Policy Docs. They Hit Your APIs

Oct 10, 2026· 18 min· 5.9K views·Watch on YouTube

Speaker

Sam, CTO of Gravitee, demonstrates agent governance at the AI Engineer event using a live gateway setup with Databricks and Groq.

Move governance to the gateway

Sam contrasts controls embedded in prompts and agent tools with controls enforced at the gateway. He cites a survey in which 88% of organizations had an agent in production taking action, while 14% had governance around it. His argument is that infrastructure should restrict what an agent can do, regardless of what a user asks.

Block unauthorized actions and data access

In a live booking example, an ungoverned agent deletes all bookings after a user asks it to cancel one and delete the rest. The gateway-governed agent cancels the permitted booking but receives a 403 when it tries to delete the others. A second example shows the gateway blocking a request for guest details, preventing the mocked PII from being returned.

Control request volume and token costs

Sam demonstrates a buggy agent sending the same request eight times. Without gateway controls, all eight requests reach the LLM; with rate limiting set to three requests per minute, later requests are blocked before they incur downstream token costs. He also shows semantic caching serving repeated booking questions from Redis, reducing the example’s reported token use from about 1,000 to around 200.

Set limits on prompts and content

A gateway policy blocks a long prompt containing a meeting transcript before it reaches the LLM, avoiding the cost of processing its 2,000 input tokens. Another policy rejects a weather question as irrelevant to a hotel-booking agent. Sam says these controls can help keep context and requests aligned with an agent’s purpose.

Scale visibility and agent infrastructure

Sam argues that a gateway can provide shared identity controls, cost management, audit logs, and visibility as agents and agent-to-agent traffic grow. He also describes Gravitee features for routing requests across models, narrowing the tools exposed by MCP servers, and surfacing shadow AI traffic from users’ laptops. He says telemetry can be exported to tools such as Datadog, Splunk, or Prometheus.

Takeaways

  • Enforce permissions at the API gateway so prompt injection cannot grant an agent extra access.
  • Apply rate limits before requests reach the LLM to avoid paying for retries and runaway workflows.
  • Cache similar requests when the response can be reused, and tune similarity thresholds to the use case.
  • Set prompt-size and content-relevance rules at the gateway to limit unnecessary processing.
  • Centralize agent telemetry and identity controls to make growing agent traffic easier to audit.

Mentioned in this talk

Search inside this talk

What was claimed 16

Show all 16 facts

Related talks