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.4.tar.gz (4.7 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.4-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: antarraksha_autogen-0.1.4.tar.gz
  • Upload date:
  • Size: 4.7 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.4.tar.gz
Algorithm Hash digest
SHA256 fec7d81b26523bdb635b338813881ebd1f07a4c1d3922d0c0d421bef43ab828b
MD5 f9a9d04ee4a92be2d3672f0141e1796b
BLAKE2b-256 b4504258b24b70f47b63e129ccd9a28baea90e8709d19e65a898f059907de34b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for antarraksha_autogen-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 28c596dac1be1055684bdd81f48c097b827c73335968c8b2ae2f18d3807d3cb1
MD5 5ae78493c93e7a7d2b2c01ce43d82abd
BLAKE2b-256 89b98f9e2635be72904b0821aba8c1657933f0d7f053047aa7fd006957d18e1c

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