Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Reason given by maintainers: Deprecado

Governance AI Agent Guardrails SDK for Python

SDK oficial para instrumentar agentes, tools y pasos LLM con Governance AI Agent Guardrails.

Publicacion objetivo en PyPI:

pip install governanceai-guardrails-agent

Import principal:

import agent_control
from agent_control import ControlViolationError, ControlSteerError, control

API cubierta

  • POST /agent-guardrails/runtime/agents/init
  • GET /agent-guardrails/runtime/agents/{agent_name}/controls
  • POST /agent-guardrails/runtime/evaluate
  • POST /agent-guardrails/runtime/events

Autenticacion

El SDK usa:

  • app_number en requests
  • Authorization: Bearer <APP_API_KEY>

Puedes configurar por argumentos o por variables:

  • AGENT_CONTROL_URL
  • AGENT_CONTROL_APP_NUMBER
  • AGENT_CONTROL_APP_API_KEY

Quick start

import asyncio

import agent_control
from agent_control import ControlViolationError, control


@control("query_db", step_type="tool")
async def query_db(query: str, context: dict | None = None) -> str:
    return f"Executed: {query}"


async def main() -> None:
    agent_control.init(
        agent_name="support_bot",
        agent_description="Customer support automation",
        base_url="https://api.governanceai.example",
        app_number=123456,
        app_api_key="ga_live_replace_me",
        default_metadata={"environment": "production"},
    )

    try:
        print(await query_db("SELECT * FROM tickets", context={"tenant": "acme"}))
    except ControlViolationError as exc:
        print(f"Blocked by {exc.control_name}: {exc.message}")


asyncio.run(main())

Que resuelve

  • Registro del agente y sus pasos
  • Decoradores @control() para pasos sync/async
  • Evaluacion pre y post por step
  • Eventos de ejecucion, bloqueo, steering y error
  • Metadata runtime por trace/span

Errores, timeout y retry

AgentControlClient soporta:

  • timeout_seconds
  • max_retries
  • retry_backoff_seconds
  • retry_status_codes

Errores del cliente:

  • AgentControlError
  • status_code
  • response_body

Tests y release

Instalacion editable:

pip install -e ./sdk/python-agents

Tests:

python -m pytest ./sdk/python-agents/tests

Build:

python -m build ./sdk/python-agents

Publicacion:

python -m twine upload dist/*

Semver y changelog

Metadata

Release files for governanceai-guardrails-agent 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for governanceai-guardrails-agent 0.1.0
File Size Uploaded Provenance
governanceai_guardrails_agent-0.1.0.tar.gz 12.7 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for governanceai-guardrails-agent 0.1.0
File Interpreter ABI Platform
governanceai_guardrails_agent-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 24.0 kB

Release files / governanceai_guardrails_agent-0.1.0.tar.gz

Download URL governanceai_guardrails_agent-0.1.0.tar.gz
Size 12.7 kB
Tags Source
SHA-256 checksum
How to use checksums
7451d03c4415b529ed44e92e02e476285050d518da266869d0419c98c0009a67
BLAKE2b-256 checksum
How to use checksums
bf390f97929e20fad6dd1b768b047987f7b4d54a7e612b6ead54da95c6f0e768
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 22, 2026.

Transparency log

Release files / governanceai_guardrails_agent-0.1.0-py3-none-any.whl

Download URL governanceai_guardrails_agent-0.1.0-py3-none-any.whl
Size 11.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b28ff739d052887c1001b65de4384d24ae896896981893a8a35ff96abeae6f41
BLAKE2b-256 checksum
How to use checksums
2457e4361324a06e660d0c1d2fda373253daa32c7fe9bd92b2fdfdf025a01652
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 22, 2026.

Transparency log

Security for governanceai-guardrails-agent 0.1.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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for governanceai_guardrails_agent-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 22, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page