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.3.tar.gz (4.2 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.3-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: antarraksha_crewai-0.1.3.tar.gz
  • Upload date:
  • Size: 4.2 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.3.tar.gz
Algorithm Hash digest
SHA256 442a34a3c7197ceee0709b02963188af26ea49fc1e175540b25eafb3ec1a08e4
MD5 ff1aa11d76c2d50f6809b598931ca175
BLAKE2b-256 5306380f9a8eceea8911c821aee3d1483386828142b2ebf4e688922502483e57

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for antarraksha_crewai-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 91856370480d7ef8705a8b978a90fc3206253b574cc82acd462501f60d2219d5
MD5 a1ed6cc1c2107ef3dbe32a4a13a6423d
BLAKE2b-256 997bf4043e12457b2d7d1fd5764cb7b21405934d5cd0bb3c946e2aaf5926beec

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