TL;DR: A registry of servers and tools with owners, data classes, side effects, approved versions and description fingerprints; an onboarding review to get in. A gateway that authenticates agents and users, exchanges tokens per backend, projects a small tool set per agent role and task, evaluates calls against a policy engine, isolates backends from each other (timeouts, circuit breakers, concurrency limits per server), caches tool listings, and writes an audit record for every call. Run it as tier-one infrastructure: multiple instances and regions, SLOs, and a design where one slow server never slows the others.
How to approach it
Cover the control plane (registry, onboarding, policy) and the data plane (the request path) separately, then reliability and operations, then the numbers that size it.
A strong answer
Control plane.
- Registry: server, owner team, purpose, data classification, side-effect level per tool, status, approved version and fingerprint of each tool's name, description and schema.
- Onboarding: a review covering data, side effects, authorization model and tests; servers start in a sandbox environment and graduate.
- Policy: rules in a policy engine (for example Cedar or Open Policy Agent, as of 2026) such as "support agents may call refunds_create up to ₹5,000 for the session user's orders", versioned and tested.
Data plane, per call.
- Authenticate the agent (workload identity) and the user (delegated token).
- Resolve the tool through the registry; reject unapproved or changed definitions.
- Evaluate policy with the agent, user, tool and arguments.
- Exchange the token for one bound to the backend, with minimal scopes.
- Call the backend with a timeout, through its own circuit breaker and concurrency limit.
- Record the call: caller, user, tool, version, decision, latency, outcome.
Projection. Agents never see 300 servers' tools. The gateway exposes a per-role, per-task tool set (often under 20 tools), cached and refreshed when the registry changes.
Isolation between backends. Each backend has its own timeout, breaker and concurrency pool, so one slow server cannot exhaust shared resources. Long-running calls use task handles rather than holding gateway connections.
Sizing the audit trail.
def audit_volume(calls_per_s, bytes_per_record=1_200, days=90):
per_day_gb = calls_per_s * 86_400 * bytes_per_record / 1e9
return round(per_day_gb, 1), round(per_day_gb * days / 1000, 1)
print(audit_volume(2_000)) # => (207.4, 18.7)
At 2,000 calls a second, roughly 200 GB of audit records a day and about 19 TB over a 90-day retention window. Records reference payloads rather than embedding them, which is what keeps this manageable.
Reliability. Several instances per region behind a load balancer, stateless request handling (session and task state in shared stores), SLOs on added latency (say p99 under 50 ms of gateway overhead) and availability, and a failure mode per dependency: if the policy engine is unavailable, deny writes and allow reads only if policy says so.
What interviewers probe next
"Doesn't a central gateway become a bottleneck?" It is horizontally scaled and stateless on the request path; the heavy work (the backend call) is not done by the gateway. The risk is organisational: make onboarding fast enough that teams do not route around it.
"Where do per-record permissions live, gateway or server?" The gateway enforces coarse policy (which tools, which argument ranges); the server enforces record-level permissions with the user's identity. Both, not either.
"How do you handle a server that changes its tool descriptions?" The fingerprint differs from the approved one; the gateway keeps serving the approved definition or holds the tool until review.
How it's scored
Weak: A reverse proxy that forwards all servers' tools to every agent.
Hire: Registry, authentication, policy and projection at a gateway with logging.
Strong Hire: Separates control and data planes, includes onboarding, fingerprints and a policy engine, exchanges tokens per backend, isolates backends with per-server timeouts, breakers and pools, sizes audit storage, runs the gateway as stateless multi-region infrastructure with SLOs and defined failure modes, and splits coarse policy at the gateway from record-level checks in servers.
Common mistakes
- Exposing every server's tools to every agent.
- One shared connection pool so a slow backend blocks all others.
- Forwarding the same token to every backend.
- An onboarding process so slow that teams bypass the gateway.