Concepts
Gateway
The gateway sits between your agents and the model providers, and applies your policies and budgets to every request.
What it is
The gateway is where Clovie checks your agents' AI traffic. Every request that reaches it is identified, checked against your policies, budgets and kill switches, forwarded to the model provider and recorded, so you control and can prove what your agents do.
When to use it
- Platform teams connect agents to the gateway so that every model call goes through one governed path, whichever provider or framework the agent uses.
- Security teams rely on it to block, mask or hold risky requests before they reach a model, and to stop an agent at once with a kill switch.
- Finance teams get every request's tokens and cost, attributed to the agent and team, and budgets that are enforced in real time.
- Compliance teams get one record of every decision, with the reason, for audits.
How it works
Your agent sends its request to the gateway instead of straight to the provider. The gateway checks it, forwards it with your provider key and streams the answer back.
- Your agent to Clovie gateway
- Clovie gateway to Model provider: allowed
- Clovie gateway to Policies, budgets, kill switches + audit record
What happens to a request
For every request, the gateway:
- Identifies the agent from its agent key.
- Checks the agent may run. A disabled or archived agent, or one stopped by a kill switch, is turned away.
- Applies your policies. Each policy that applies to the agent can allow the request, block it, redact it or hold it for a person to approve. Policies in monitor mode only record what they would have done.
- Checks budgets and limits. If a budget in enforce mode is exhausted, the request is blocked or moved to a lower-cost model, depending on how you set it up.
- Forwards the request to the model provider with your provider key, and streams the answer back.
- Records the outcome: the decision, the reason, the tokens used and the cost.
Your agent sees a normal provider response, or a clear error that says which check stopped the request and why.
Ways traffic reaches Clovie
You can bring traffic to Clovie in several ways, and mix them. Your policies are written once and apply to all of them.
| Way | What changes for the agent | Best for |
|---|---|---|
| Explicit endpoint | The agent's base URL and key point to the Clovie gateway. | Agents your teams build and can configure. |
| Zero-code routing | Nothing: the agent keeps calling the provider's own address, and your DNS or HTTPS proxy sends that traffic through Clovie in your network. | Agents you can't change, or many workloads at once. |
| Agent front door | Your application calls a vendor-managed agent (for example Copilot Studio, Bedrock Agents or Vertex AI Agent Engine) through Clovie, so its input and answers are checked. | Agents that run inside a vendor platform. |
| Copilot Studio runtime protection | Nothing: Copilot Studio asks Clovie before an agent runs a tool, in Teams, Microsoft 365 Copilot and every other channel, and skips the tools your policies block. | Copilot Studio agents, wherever people talk to them. |
| Your own AI gateway | Nothing: the gateway you already run (for example Kong, Apigee, Azure API Management, Envoy or Portkey) asks Clovie before each request, or sends Clovie its telemetry. | Organizations that keep their existing gateway. |
| Gateway in your network | The agent's base URL points to a Clovie gateway that runs in your data center or cloud account, managed from Clovie. | Keeping prompts and answers inside your network. |
Clovie labels every agent with how its traffic was governed: fully by a Clovie gateway, enforced through your own gateway, or only observed.
Set it up
To use the explicit endpoint, register an agent to get its agent key, then point the agent's SDK at the gateway. See Connect an agent for step-by-step examples.
Request formats
The gateway accepts three request formats, so most SDKs work without changes:
| Format | Path | Typical SDKs |
|---|---|---|
| Chat Completions | /v1/chat/completions | OpenAI SDKs, LangChain, most frameworks |
| Messages | /v1/messages | Anthropic SDKs, Claude-based tools |
| Responses | /v1/responses | OpenAI Responses API |
Streaming works in all three formats. See Connect an agent for examples.
Models
An agent asks for a model by name, for example gpt-4o or anthropic/claude-sonnet-5. It can only use models your organization has enabled in AI Governance → Models → Catalog. If you set a Default Model on the agent, the agent can send auto as the model name and the gateway uses the default.
Keys and credentials
Two kinds of keys are involved, and they never mix:
- Agent keys identify your agents to the gateway. Agents hold them.
- Provider keys are your accounts with model providers. Only Clovie holds them, and the gateway uses them to call the provider. See Provider credentials.
What you'll see
Each request appears as a run in AI Governance → Activity → Agent runs, with its decision, tokens and cost. Every allow, block, redaction and approval is in AI Governance → Activity → Audit log, and costs roll up by agent and team in AI Governance → Costs.
Limits and good to know
When the gateway cannot check a request
If Clovie cannot evaluate your policies for a moment, your organization decides what happens with When Clovie can't fully inspect: reject requests until checks are back (Block, the default), or let traffic continue and raise an alert (Allow with alert). You choose this per organization, so teams that put availability first can opt into Allow with alert.
Where the gateway runs
With Clovie SaaS, your agents use Clovie's hosted gateway. With a self-hosted install, the gateway runs in your own network, so requests never leave it on the way to your models. See Choose SaaS or self-hosted.
Zero-code routing runs in your own network, as part of a self-hosted install. Policies only govern traffic that reaches Clovie: an agent that calls a provider directly, outside every path above, is not checked. Copilot Studio agents in Microsoft channels such as Teams and Microsoft 365 Copilot are governed at their actions with Copilot Studio runtime protection.