Skip to main content

Antarraksha AI Agent Enforcement SDK for Autogen

Project description

antarraksha-autogen

Antarraksha AI Agent Enforcement SDK for Microsoft AutoGen.

Installation

pip install antarraksha-autogen

Quick Start

Instantiate the Antarraksha hook and call its filter methods from inside your AutoGen message handlers and code executors. Registration happens automatically on first use — no login, no API key, no signup required.

from antarraksha_autogen import AntarrakshaAutoGenHook

hook = AntarrakshaAutoGenHook(agent_id="my-autogen-agent")

result = hook.filter_message(sender="assistant", message="Execute command: ls -la")
if result["decision"] == "DENY":
    raise PermissionError(result["reason"])

result = hook.check_code_execution(code="import os; os.system('rm -rf /')", language="python")
if result["decision"] == "DENY":
    raise PermissionError(result["reason"])

Wire filter_message into your AutoGen agent's message middleware and check_code_execution into your code-executor pre-hook. Every intercepted call is logged and visible at https://antarraksha.ai/registry.

Parameters

Parameter Default Description
agent_id None Unique identifier for your agent. Triggers auto-registration on first use.
base_url "https://antarraksha.ai" Antarraksha endpoint. Override for self-hosted / dev.
passport_id None Optional pre-issued passport ID (e.g. ANTK-PASS-xxx).
sdk_key None Optional pre-issued SDK key. If omitted and agent_id is set, the SDK auto-registers and obtains one.
fail_closed True If True, deny on enforcement-server unreachable. Set False for fail-open during early integration.

Corporate Network Note

If you're behind a corporate TLS-inspection proxy and see SSLCertVerificationError, install:

pip install pip-system-certs

This makes Python trust your Windows / macOS system certificate store.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

antarraksha_autogen-0.1.3.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

antarraksha_autogen-0.1.3-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file antarraksha_autogen-0.1.3.tar.gz.

File metadata

  • Download URL: antarraksha_autogen-0.1.3.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for antarraksha_autogen-0.1.3.tar.gz
Algorithm Hash digest
SHA256 585e3409e7fe222c324e94542ab1dfaab0642ab9291bdc57fa97ebe51639705e
MD5 57deeed1d04de805375450b2aa01cdc2
BLAKE2b-256 0fd60c4998f1155e4acc28b05933c8c8fe1a8af8e72efc5c9f70ce1a11bed6cf

See more details on using hashes here.

File details

Details for the file antarraksha_autogen-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for antarraksha_autogen-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2728aae7aea2246e005aec0f513503183596b18a01d2d9ca57c1e3f6afe0cd34
MD5 4b52b5536fa8f760a1c3ba9922410845
BLAKE2b-256 35f9f0471befd2624717eb4dbd6fd4289c5dde372c5175887d34fd0395abb1e3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page