maigp-bedrock-agentcore
AIGP governance for the AWS Bedrock AgentCore Runtime.
Part of MAIGP — the Mediated AI Governance Protocol: a runtime consent / scope / evidence layer for AI systems. Every governed call is CHECKed before it runs (policy, scope, jurisdiction, circuit-breaker) and RECORDed + TRACEd as tamper-evident evidence after.
What it governs
Governs agents running on BedrockAgentCoreApp — model, tools, and helper resolution.
Governance model
This adapter maps the framework's lifecycle onto the AIGP agent-governance loop provided by maigp-agent-core:
| Framework event | AIGP action |
|---|---|
| run / invocation start | CHECK (pre_invoke) — allowed? under what authority? |
| each model reply | token accounting (on_model_call) |
| each tool / function call | tool governance (on_tool_call) |
| run complete | RECORD + TRACE (post_invoke) |
| failure | on_error (recorded, then re-raised) |
Install
pip install maigp-bedrock-agentcore
Pulls in maigp-agent-core (shared lifecycle) and, transitively, maigp-client.
Quick start
from aigp_agentcore import AgentCoreGovernance, governance_middleware
gov = AgentCoreGovernance(gov_url="https://gov.example.com",
app_id="my-bedrock-agent", hmac_secret="secret")
# Register as AgentCore middleware: pre-invoke policy check, helper
# resolution (endpoints + tokens), post-invoke evidence, enforcement.
app.add_middleware(governance_middleware(gov))
AIAP agency gate (opt-in, 1.2.0)
Off by default: with no gate, nothing changes. Pass an AgencyGate from
maigp-agent-core and the governed entrypoint needs
an AIAP agency grant (RFC-001) once the CHECK lets the run proceed:
from aigp_agentcore import AgencyGate, AgentCoreGovernance
gate = AgencyGate(broker_url, agent_id, token_provider, # the agent's own token, from a callable
scopes={"my-agent-id": {"resources": ["bedrock:InvokeModel"]}})
gov = AgentCoreGovernance(gov_url=..., app_id=..., agent_id="my-agent-id", agency=gate)
@app.entrypoint
@gov.governed
def invoke_agent(payload, context=None):
bedrock = gov.agency_session().client("bedrock-runtime") # the grant's credentials, not ambient ones
...
- The scope key is the CHECK's use case (
agent_id, elseapp_id); the CHECK'srequest_idis sent as the AIGP trace id. The grant is kept and reused until shortly before it expires. - Fail closed in every mode, TRACE included: a refusal, an unreachable broker, an empty token, a
failing token provider or a missing
aiap-clientraisesAgencyRequiredError(aGovernanceBlockedError) and the entrypoint does not run. A CHECK that blocks never asks the broker. - Also:
require_agency()/arequire_agency(),agency_grant,release_agency(). - Install:
pip install 'maigp-bedrock-agentcore[agency]'([agency-aws]adds boto3).
Package naming
The distribution is maigp-bedrock-agentcore (the import module remains aigp_agentcore). It was renamed from maigp-agentcore because PyPI rejected that name as too similar to the core library maigp-agent-core.
Helper resolution
HelperResolver fetches downstream endpoints + tokens from the vault (VLT_PRJ) and records traces/evidence to the governance app (GOV_APP).
Links
- Protocol, specs & full adapter catalog: https://github.com/owner-spec/aigp-protocol
- Issues: https://github.com/owner-spec/aigp-protocol/issues
License: Proprietary. © Kanjani AI Research & Causum.
Metadata
Release files for maigp-bedrock-agentcore 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| maigp_bedrock_agentcore-1.2.0.tar.gz | 23.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| maigp_bedrock_agentcore-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 37.0 kB
Release files / maigp_bedrock_agentcore-1.2.0.tar.gz
| Download URL | maigp_bedrock_agentcore-1.2.0.tar.gz |
|---|---|
| Size | 23.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7bce59f203e634114ed430cc6e2cfc53593144ebf7a3c38ac018da17f8f8dac7
|
|
BLAKE2b-256 checksum How to use checksums |
e0c3a6cafd61c29b7634237d77fbbf42cc485bd5ad160c9edca38fdd2dba3fbd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / maigp_bedrock_agentcore-1.2.0-py3-none-any.whl
| Download URL | maigp_bedrock_agentcore-1.2.0-py3-none-any.whl |
|---|---|
| Size | 13.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5b6890873c271709fda4e98fbcd3ec04bdc11cbb697217cc2329076a197e99c3
|
|
BLAKE2b-256 checksum How to use checksums |
f01ae3a9cd94d6f0e0b0070bea0154f1ad50067af0b7bbd4ea6735728c1d02a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for maigp-bedrock-agentcore 1.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.