| title | Quickstart |
|---|---|
| last_reviewed | 2026-07-12 |
| owner | docs-team |
Use a native ACS manifest for policy and an Agent OS adapter for framework lifecycle mediation.
pip install agent-governance-toolkit[full]python -m agent_os.cli.cmd_policy_gen \
--template strict \
--output policies/
agt lint-policy policies/manifest.yamlThe generated directory contains manifest.yaml and policy.rego. The
manifest binds the Rego policy to native intervention points.
fromagent_control_specificationimportAgentControl, HostSessionruntime=AgentControl.from_path("policies/manifest.yaml")
session=HostSession(
runtime,
agent_id="quickstart-agent",
session_id="quickstart-session",
)
evaluation=session.pre_tool_call(
tool_name="delete_file",
args={"path": "report.txt"},
)
print(evaluation.verdict)
print(evaluation.reason_code)Attempted tool calls are charged before evaluation, including denied attempts. The runtime itself remains free of session counters.
fromagent_os.integrations.langchain_adapterimportLangChainKernelkernel=LangChainKernel(runtime=runtime)Every supported adapter receives the native runtime through runtime=. Policy
definitions, blocked content, tool catalogs, budgets, transforms, and approval
belong in the manifest rather than the adapter constructor.
fromagent_os.exceptionsimportPolicyViolationErrorifnotevaluation.verdict.decision.permits:
error=PolicyViolationError.from_evaluation_result(evaluation)
print(str(error))
print(error.evaluation_result.audit_record())The public exception text is sanitized. Trusted code can use the attached
PolicyEvaluation for structured audit and dispatch.