Skip to main content

Antarraksha AI Agent Enforcement SDK for LangChain

Project description

antarraksha-langchain

Antarraksha AI Agent Enforcement SDK for LangChain.

Installation

pip install antarraksha-langchain

Quick Start

from antarraksha_langchain import AntarakshaCallbackHandler

handler = AntarakshaCallbackHandler(
    base_url="https://antarraksha.ai",
    agent_id="my-agent",
    passport_id="ANTK-PASS-xxx",
)

# Every LLM and tool call is now enforced
from langchain_openai import ChatOpenAI
llm = ChatOpenAI(model="gpt-4o", callbacks=[handler])

Tool Wrapping

from langchain_community.tools import ShellTool
from antarraksha_langchain import AntarakshaSafeTool, AntarakshaClient

client = AntarakshaClient(agent_id="my-agent", passport_id="ANTK-PASS-xxx")
client.register()

safe_shell = AntarakshaSafeTool(wrapped_tool=ShellTool(), antarraksha_client=client)
# safe_shell.run("ls") — enforced by Antarraksha before execution

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_langchain-0.1.1.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

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

antarraksha_langchain-0.1.1-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file antarraksha_langchain-0.1.1.tar.gz.

File metadata

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

File hashes

Hashes for antarraksha_langchain-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f2814c790f20f3c8478e836fbca905dcc501b4f9414b5ee9dc0efb0bdf2f3339
MD5 ebd683dd24d15b30daa5efdc2e26bc2d
BLAKE2b-256 284a83cc7f036cf4e36704b06e13dfd48b8769f1bc4c6a47aa8ffd0d09f30015

See more details on using hashes here.

File details

Details for the file antarraksha_langchain-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for antarraksha_langchain-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 81e42280412872c21e4f2e2ea81e9d18fa16c02591f3c8647078a258e8b0f329
MD5 84c428208eee75ad47d3710eb26942b6
BLAKE2b-256 c637080089f3f000ade8f35e074c9a38fdfe7098f069be06d297a19abb14c85a

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