What you will learn
- Say what an LLM provider and an LLM proxy are, and which one holds the vendor key
- Explain why an agent holds a proxy key and does not need the vendor key
- Define a guardrail and say where it is enforced
- Tell where the list of available guardrails comes from
Before you start
- What is Choreo Agent Manager? Not started In progress Done
A language model is a service run by a vendor, and the vendor charges for every call. If every agent in your company holds the vendor’s key, one leak means a stolen key and a large bill. Agent Manager puts a gateway in the middle and splits the key in two.
Two objects
An LLM providerAn organisation level connection to a model vendor such as OpenAI or Anthropic. It holds the vendor address and key, and is deployed to gateways.Analogy:The company's contract with a supplier, held by purchasing.See it in the glossary is the organisation’s connection to a model vendor. You create it from a Provider templateA built-in starting point for an LLM provider, such as openai, anthropic, awsbedrock, azure-openai, azureai-foundry, gemini or mistralai.See it in the glossary. The built-in templates are openai, anthropic, awsbedrock, azure-openai, azureai-foundry, gemini and mistralai. The provider holds the vendor’s address and the vendor key. AMS encrypts the key before it saves it.
An LLM proxyA project level entry point that points at one LLM provider and has its own API key. Agents call the proxy and never see the vendor key.Analogy:A purchase card issued to one project. It can be cancelled without touching the contract.See it in the glossary is a project’s entry point. It points at one provider and has a key of its own, the Proxy keyThe key an agent shows to an LLM proxy. It is opaque text, not a JWT, and works only for that proxy. The real vendor key stays at the gateway.Analogy:A fuel card issued to one project, as opposed to the company's master account with the supplier.See it in the glossary. Agents call the proxy. When you attach a model to an agent, or choose a judge model for a monitor, Agent Manager creates the proxy resources for you.
Providers and proxies are saved in AMS’s database. To take effect they are deployed to a gateway, which learns about them over its WebSocket connection to AMS.
Why two keys
The agent holds the proxy key
The agent shows the proxy key to the AI gatewayThe doorway for agent traffic to model vendors and tool servers. It runs each request through a chain of policies, such as keys, limits and guardrails, before passing it on.Analogy:Airside security and customs. ID check, bag scan, then the real boarding document.See it in the glossary. The key works for that proxy only. If it leaks, you cancel it and the vendor account is untouched.
The gateway holds the vendor key
The key reaches the gateway ahead of time, when the provider is deployed. At call time the gateway adds it to the outgoing request, so the agent does not hold it.
Lesson L4.3.1 follows the whole call in detail. This lesson stays at the level of the objects.
Guardrails
A GuardrailA gateway policy that checks or limits traffic, such as a content filter or rate limit. It is set at the gateway, so agents need no code changes.See it in the glossary is a gateway policy that checks or limits the traffic of an LLM provider, an LLM proxy or an MCP proxy. Two ideas matter most.
- It is enforced at the gateway. Rules about what agents may send live in one place, so they apply without changing any agent code.
- It is part of the configuration. A guardrail is saved in the provider or proxy configuration as a name, a version and a list of settings. Adding one goes through the ordinary update call, and then the configuration is deployed to the gateways.
The gateway’s build file lists many policies. Some limit the size of what is sent, such as content-length-guardrail and word-count-guardrail. Some look at the content, such as pii-masking-regex and regex-guardrail. Others limit usage, such as the request, token and cost based rate limits.
Where the menu comes from
Each gateway pushes the manifest of the policies it has installed to AMS when it connects. The console’s policy lists are answered from that push. A policy counts as available only if every gateway in scope has it, so a gateway that is missing a policy takes it off the menu.
Your turn
Open Try it. Scroll the story to follow one request, then open The credentials map and click the row for the LLM proxy API key. Read who holds it and who checks it. Finish with the matcher on providers, proxies and keys.
Recap
- A provider is the organisation’s vendor connection and holds the vendor key. A proxy is a project’s entry point with a key of its own.
- The agent holds the proxy key. The gateway adds the vendor key to the outgoing call.
- A guardrail is a gateway policy, so it applies without changing agent code.
- The menu of guardrails comes from the policy manifests that the gateways push to AMS.
Wrap up
Recap
Tick each one when you could explain it to a colleague.
Finished?
Chapter complete. Every lesson in this chapter is done.
Progress cannot be saved in this browser, so it will be forgotten when you leave this page.
Quick check
Spotted something wrong or unclear in this lesson? Report an inaccuracy (opens GitHub in a new tab)