Agent Inventory, Policy-as-Code and Release Gates
You cannot govern what you cannot list, and a rule that nothing checks will eventually be skipped.
Keep one inventory entry per agent with owner, tier, tools, suppliers, evidence and review date. Express release rules as reviewed policy-as-code, run them in the delivery pipeline, fail closed on unknowns and require named sign-offs that match the risk tier. Include suppliers and retire what is no longer used.
What you will learn: what to record about each agent, lifecycle states, discovering unregistered agents, policy-as-code, third-party risk and release gates with sign-off.
Prerequisites: Responsible AI Principles and Governance Council and Risk Tiers, Approvals and Human Oversight.
The example runs in November 2026 with Python 3.13 and PyYAML 6.0.3 (pip install pyyaml==6.0.3). The inventory fields and policy format are invented for teaching.
What an inventory entry holds
| Group | Fields | Why |
|---|---|---|
| Identity | Identifier, name, version, stage | Link records and logs to one thing |
| Accountability | Owner, deputy, team, contact | Someone to ask and to act |
| Purpose | Intended use, exclusions, users, countries | Basis for risk and legal classification |
| Capability | Tools, permissions, autonomy level, limits | What could go wrong |
| Dependencies | Models, prompts, MCP servers, other agents, suppliers, data | What to review when something changes |
| Risk | Tier, assessments, accepted residual risk | How much control it needs |
| Evidence | Test results, drills, sign-offs | Proof for the gate |
| Dates | Registered, last released, review due, retired | Keeps the record alive |
Count anything that acts with some independence: chat assistants with tools, scheduled automations that call a model, coding agents, agents inside bought software and workflows built in low-code tools.
Lifecycle states
| Transition | Requires |
|---|---|
| Proposed to pilot | Owner, purpose, tier, test environment and end date |
| Pilot to approved | Evidence and sign-offs for the tier |
| Approved to approved (new version) | Gate again, scaled to the change |
| Any to suspended | Anyone named in the policy may do it quickly |
| Suspended to approved | Cause fixed and recorded; gate passed |
| Any to retired | Access revoked, schedules removed, data handled, users told |
Make suspension easy and restoration deliberate.
Keep entries accurate
An inventory is trusted only when it matches reality. Decide which source wins for each field and generate as much as possible.
| Field | Best source | Check |
|---|---|---|
| Owner | Directory of staff and teams | Flag when the person leaves or moves |
| Version and model | Deployment record | Compare with what the running service reports |
| Tools and permissions | Tool registry and identity system | Alert on a grant that is not in the entry |
| Suppliers | Gateway and procurement | New destinations need an entry |
| Purpose and tier | Reviewed text from the owner | Confirm at each review |
| Last activity | Run telemetry | Propose retirement when idle |
Give every agent a stable identifier and put it on credentials, telemetry and cost records. Then you can answer "what did this agent do last week, and what did it cost?" with one query.
Find what nobody registered
Compare the inventory with what is actually running. No single source is complete.
| Source | Reveals |
|---|---|
| Identity provider | Service accounts, application grants and tokens |
| Model gateway and billing | Who calls which model (Model Routing, Fallbacks and Gateways) |
| Network egress logs | Calls to AI services outside the gateway |
| Source and pipeline scans | Agent libraries and keys in repositories |
| Software purchases | Products with agent features |
| Asking teams | Spreadsheets, scripts and personal tools |
Best of all, make registration the way to obtain production credentials: no entry, no identity (Agent Identity, Authorization and Secrets). Respect privacy and workplace rules when monitoring.
Policy-as-code
Policy-as-code means writing rules in a form that software evaluates and that people review in version control. It applies at two moments.
| Moment | Question | Page |
|---|---|---|
| Release time | May this version go live with these tools and this evidence? | This page |
| Run time | May this call happen now, with these parameters? | Action Guardrails and Policy Engines |
The two should agree. If the release gate says a moderate-tier agent may not send email, the run-time policy should also refuse that call, so a configuration change cannot slip past.
General policy engines such as Open Policy Agent can evaluate such rules; a short script is enough to learn the idea. The files below are an inventory and a policy.
# One entry per agent. Kept in version control beside the code.
- id: support-agent
version: 2.4.0
stage: approved # proposed, pilot, approved, retired
owner: support-operations
tier: high
tools: [order.read, refund.propose]
suppliers: [model-provider-a]
evidence:
eval_pass_rate: 0.95
critical_failures: 0
security_test: 2026-11-10
stop_drill: 2026-10-02
signoffs: [product, security, privacy]
review_by: 2027-02-28
- id: research-helper
version: 0.9.0
stage: pilot
owner: ""
tier: moderate
tools: [web.search, email.send]
suppliers: [model-provider-b]
evidence:
eval_pass_rate: 0.91
critical_failures: 0
signoffs: [product]
review_by: 2026-10-31
# Release policy, reviewed like code.
approved_suppliers: [model-provider-a, model-provider-b]
max_test_age_days: 90
tiers:
low:
signoffs: [product]
min_pass_rate: 0.80
forbidden_tools: [email.send, refund.propose]
moderate:
signoffs: [product, privacy]
min_pass_rate: 0.90
forbidden_tools: [email.send]
high:
signoffs: [product, security, privacy]
min_pass_rate: 0.93
forbidden_tools: []
required_tests: [security_test, stop_drill]
The gate
"""Release gate: read the inventory and the policy, then explain each decision."""
from datetime import date
from pathlib import Path
import yaml
AS_OF = date(2026, 11, 28)
def check(agent, policy):
tier = policy["tiers"].get(agent.get("tier"))
if tier is None:
return ["unknown tier"] # fail closed
fails = []
if not agent.get("owner"):
fails.append("no owner")
evidence = agent.get("evidence", {})
if evidence.get("eval_pass_rate", 0) < tier["min_pass_rate"]:
fails.append(f"pass rate below {tier['min_pass_rate']}")
if evidence.get("critical_failures", 1) != 0:
fails.append("critical failures not at zero")
for test in tier.get("required_tests", []):
done = evidence.get(test)
if done is None:
fails.append(f"{test} missing")
elif (AS_OF - done).days > policy["max_test_age_days"]:
fails.append(f"{test} out of date")
missing = sorted(set(tier["signoffs"]) - set(agent.get("signoffs", [])))
if missing:
fails.append("sign-off missing: " + ", ".join(missing))
banned = sorted(set(agent.get("tools", [])) & set(tier["forbidden_tools"]))
if banned:
fails.append("tool not allowed in tier: " + ", ".join(banned))
unknown = sorted(set(agent.get("suppliers", [])) - set(policy["approved_suppliers"]))
if unknown:
fails.append("supplier not approved: " + ", ".join(unknown))
if agent["review_by"] < AS_OF:
fails.append("review date passed")
return fails
if __name__ == "__main__":
here = Path(__file__).parent
policy = yaml.safe_load((here / "rules.yaml").read_text())
for agent in yaml.safe_load((here / "inventory.yaml").read_text()):
fails = check(agent, policy)
print(f"{agent['id']} {agent['version']}: {'BLOCK' if fails else 'PASS'}")
for reason in fails:
print(" -", reason)
Output:
support-agent 2.4.0: PASS
research-helper 0.9.0: BLOCK
- no owner
- sign-off missing: privacy
- tool not allowed in tier: email.send
- review date passed
The pilot agent is blocked for four separate reasons, and each says what to fix. Notice the defaults: an unknown tier fails, a missing pass rate counts as zero and a missing critical-failure count counts as one. A gate that treats absent data as success rewards leaving things out.
What a real gate adds
- Validate the files against a schema so a misspelled key cannot silently weaken a rule.
- Take evidence from systems, not from values a developer typed. Fetch test results by build identifier.
- Verify sign-offs against identities and roles; the author should not approve their own release.
- Protect the policy files with required reviewers.
- Record each decision with the policy version and input hashes.
- Deploy what was tested: bind approval to an artifact digest (CI/CD, Infrastructure as Code and Safe Releases).
Third-party agent and model risk
Much of an agent's behavior may come from outside your organization: hosted models, tool servers, packaged agents and data feeds. You keep responsibility for how you use them.
| Ask the supplier | Why |
|---|---|
| How and when do models change, and with what notice? | Silent changes bypass your testing |
| Is our data used for training, and how long is it kept? | Privacy and confidentiality |
| Where is data processed, and by which subcontractors? | Location and onward sharing |
| What testing and certifications exist, with what scope? | Evidence rather than assurances |
| Which logs can we get, and how fast are incidents reported? | Your own investigation and legal deadlines |
| What are the license, indemnity and exit terms? | Rights, liability and continuity |
| What can the agent or tool access and send elsewhere? | Security boundary |
Then verify what you can: pin versions where offered, re-run your evaluations on a schedule, restrict access at your own boundary (Supply Chain and Retrieval Poisoning) and keep a fallback. For an agent you call over a protocol, treat its answers as untrusted and give it only the data the task needs (A2A Security and Interoperability).
Match diligence to dependence
| Dependence | Diligence |
|---|---|
| Replaceable, no sensitive data | Terms review and basic checks |
| Processes personal or confidential data | Privacy and security review, contract duties |
| Can act in your systems | Testing, scoped credentials, monitoring, stop route |
| Critical to operations | Exit plan, tested fallback, senior approval |
When a supplier changes something
Plan for notices about retired models, new terms, new subprocessors and security advisories. Route them to the agent owners found through the inventory's supplier field. Re-run evaluations on the replacement before the deadline, compare quality, cost and safety results, and treat the switch as a release.
Release gates and sign-off
A good gate separates checks a machine can decide from judgments a person must make.
| Automated | Human judgment |
|---|---|
| Required fields and dates | Is the purpose appropriate? |
| Test thresholds and critical failures | Are the tests the right ones? |
| Allowed tools and suppliers | Is the remaining risk acceptable? |
| Signed artifacts | Are users and staff ready? |
Each sign-off should state what the signer is attesting to. "Security approves" is vague; "adversarial tests for the listed tools were run and open findings are low" is checkable.
Scale the gate to the change
| Change | Path |
|---|---|
| Wording fix in a prompt | Regression tests, peer review |
| New model version | Full evaluation and staged rollout |
| New read-only tool | Security and privacy check |
| New write or payment tool | Re-tier and full sign-off |
| Emergency fix | Smaller team approves now; full review within a set time |
Prompt changes can have large effects, so let test results, not the size of the edit, decide whether the short path is enough (Prompt Testing, Versioning and Optimization).
A release, step by step
- The developer changes the agent and its inventory entry in one pull request.
- The pipeline validates both files against a schema.
- Tests run against the built artifact and write results under its digest.
- The gate reads policy, entry, results and sign-off records, then explains every failure.
- Required people review the change and sign for their own area.
- The pipeline deploys exactly the approved digest to a small share of traffic.
- Monitors watch outcomes, errors, policy blocks and cost before wider rollout.
- The release record stores inputs, policy version, decision and approvers.
If the gate itself is unavailable, releases should wait. Plan an emergency path in advance, with named people and a deadline for the full review, so nobody invents one during an outage.
Test the gate like any other code
Keep cases that must be blocked: no owner, an expired drill, a forbidden tool, a missing sign-off, a misspelled tier. Add a case whenever someone slips something past it. A gate that has never refused anything may not be checking what you think.
Handle exceptions in the open
Sometimes a release must go ahead with a gap. Record the rule skipped, reason, compensating control, approver with authority, expiry and ticket. The gate should read the exception and fail again when it expires. Never edit the policy to make one release pass.
Watch the inventory's health
- Entries without a current owner.
- Agents past their review date.
- Detected agents that are not registered.
- Pilots older than their planned end.
- Releases that used an exception.
- Agents with no runs in 90 days, candidates for retirement.
- Gate failures by reason, which point to confusing rules or missing tools.
Start small this week
You do not need a platform to begin. Create one file with an entry for each agent you know about and fill in owner, purpose, tools and data. Mark unknown values as unknown instead of guessing, and give each unknown a person and a date.
| Step | Done when |
|---|---|
| List agents | Teams, billing and identity records have been checked |
| Name owners | Each owner has accepted in writing |
| Tier them | High-tier agents are visible to leadership |
| Add the gate in warning mode | Failures are reported on every release without blocking |
| Enforce | Rules block releases, starting with high-tier agents |
Warning mode shows which rules are unclear and which evidence is hard to produce. Give it an end date, or it will become permanent.
Common mistakes
| Mistake | Better approach |
|---|---|
| A spreadsheet updated before audits | Generate and check it in the pipeline |
| Registering models but not agents | Record purpose, tools and permissions |
| Typed-in evidence | Read results from the systems that produced them |
| Gates only at first release | Run on every change and on a schedule |
| Forgetting retirement | Revoke identities, schedules and data access |
| Trusting a supplier's version label | Test behavior regularly |
Inventory and gate checklist
- Every agent, including bought ones, has an entry and an owner.
- Production credentials require registration.
- Policy files are versioned, validated and reviewed.
- The gate fails closed and explains each failure.
- Run-time policy agrees with release policy.
- Suppliers are assessed according to dependence.
- Sign-offs state what is attested.
- Exceptions expire and retirement removes access.
Frequently asked questions
What counts as an agent for the inventory?
Use a broad rule covering software that chooses steps or actions with a model, and include doubtful cases at low cost.
Where should the inventory live?
Anywhere teams will keep it accurate, ideally versioned files or a service that the delivery pipeline reads.
Can the gate be fully automatic?
Low-risk releases often can, while higher tiers need people to judge purpose, test coverage and remaining risk.
How often should approved agents be reviewed?
Set the interval by tier and also review on changes, incidents and supplier or legal developments.
References and further reading
- Open Policy Agent documentation: a general-purpose policy engine.
- NIST AI Risk Management Framework: inventory and third-party risk fall under Govern.
- ISO/IEC 42001: management system requirements including supplier relationships.
- PyYAML documentation: safe loading of YAML files.
Next steps
What to Measure: Metrics, Dashboards and SLOs
Monitor what you approved.
Versioning, Registries and Evaluation-Driven Development
Version the parts a release contains.
Red Teaming and Incident Response
Act when a release goes wrong.