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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file antarraksha_openai_agents-0.1.3.tar.gz.
File metadata
- Download URL: antarraksha_openai_agents-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74256d11d5bcb8f71ae81604afa7d6fd0e7e9fae5734eb8417ca46d16f225243
|
|
| MD5 |
9a0ce07b2fc1b9ed1c04ecab187ea9dc
|
|
| BLAKE2b-256 |
abb67c42846c04473090340cb398dc643e21d1037241a4b7d1809f6164a2b2a1
|
File details
Details for the file antarraksha_openai_agents-0.1.3-py3-none-any.whl.
File metadata
- Download URL: antarraksha_openai_agents-0.1.3-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b47086575399baed7a8301b8d7e1b26d4e733ad5ed6f64017e9ad8e5b61d0650
|
|
| MD5 |
c09cc76d88c1d111628a1847253e804d
|
|
| BLAKE2b-256 |
b6bc1ca4aadb3a18099dc2e13b2ded9a526cf308d83443859ff344d291b6c8fc
|