Skip to main content

Antarraksha AI Agent Enforcement SDK for Crewai

Project description

antarraksha-crewai

Antarraksha AI Agent Enforcement SDK for CrewAI.

Installation

pip install antarraksha-crewai

Quick Start

Instantiate the Antarraksha guardrail and call its check methods from inside your CrewAI tasks or tool wrappers. Registration happens automatically on first use — no login, no API key, no signup required.

from antarraksha_crewai import AntarrakshaGuardrail

guardrail = AntarrakshaGuardrail(agent_id="my-crew-agent")

result = guardrail.check_tool_call(tool_name="search_web", parameters={"query": "..."})
if result["decision"] == "DENY":
    raise PermissionError(result["reason"])

result = guardrail.check_llm_call(model_name="gpt-4o", prompt_length=512)
if result["decision"] == "DENY":
    raise PermissionError(result["reason"])

Wire check_tool_call into your tool callbacks and check_llm_call into your LLM wrapper. 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_crewai-0.1.4.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

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

antarraksha_crewai-0.1.4-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for antarraksha_crewai-0.1.4.tar.gz
Algorithm Hash digest
SHA256 f0b85aa6c28b1afffe7f867a7234a041bf85fb44f37efa5a35fa56df940845ab
MD5 2e29375c13cfd10da6387c331009e9fe
BLAKE2b-256 32bf90cfc84debd8acaf2ac0eef808ef3c37edbae3bcd7b06b33ac2d7ef47938

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for antarraksha_crewai-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 70398cf49e854ef441a0a7e67e74da7ae44c7efcf425956ee4f1897ab671574d
MD5 5eb5be7e934b96cb326387e3e9772195
BLAKE2b-256 8585a0f7e7a48e23e2d15f96b48143efebb17f55a0103e7a347eabb365e76f86

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