Skip to main content

Antarraksha AI Agent Enforcement SDK for Openai Agents

Project description

antarraksha-openai-agents

Antarraksha AI Agent Enforcement SDK for the OpenAI Agents SDK.

Installation

pip install antarraksha-openai-agents

Quick Start

Attach Antarraksha as input and output guardrails on your Agent. Registration happens automatically on first use — no login, no API key, no signup required.

from agents import Agent
from antarraksha_openai_agents import (
    AntarrakshaInputGuardrail,
    AntarrakshaOutputGuardrail,
)

input_guard = AntarrakshaInputGuardrail(agent_id="my-openai-agent")
output_guard = AntarrakshaOutputGuardrail(agent_id="my-openai-agent")

agent = Agent(
    name="my-openai-agent",
    instructions="You are a helpful assistant.",
    input_guardrails=[input_guard],
    output_guardrails=[output_guard],
)

Run your agent normally — every input and output is now enforced against Antarraksha policy.

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.

Enforcement Behavior

  • Input guardrail fires before the LLM receives the user prompt. Antarraksha can DENY (raises PermissionError) or ALLOW.
  • Output guardrail fires after the LLM produces output. Antarraksha can DENY (raises PermissionError) or ALLOW.
  • Every call is logged in your Antarraksha registry and visible at https://antarraksha.ai/registry.

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_openai_agents-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_openai_agents-0.1.3-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for antarraksha_openai_agents-0.1.3.tar.gz
Algorithm Hash digest
SHA256 74256d11d5bcb8f71ae81604afa7d6fd0e7e9fae5734eb8417ca46d16f225243
MD5 9a0ce07b2fc1b9ed1c04ecab187ea9dc
BLAKE2b-256 abb67c42846c04473090340cb398dc643e21d1037241a4b7d1809f6164a2b2a1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for antarraksha_openai_agents-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b47086575399baed7a8301b8d7e1b26d4e733ad5ed6f64017e9ad8e5b61d0650
MD5 c09cc76d88c1d111628a1847253e804d
BLAKE2b-256 b6bc1ca4aadb3a18099dc2e13b2ded9a526cf308d83443859ff344d291b6c8fc

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