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.2.tar.gz (4.3 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.2-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: antarraksha_langchain-0.1.2.tar.gz
  • Upload date:
  • Size: 4.3 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.2.tar.gz
Algorithm Hash digest
SHA256 4b0ef07510c473fade0ebedd0788300a1bff955cd66c91713753207540eec608
MD5 7a54105b7532d6cff3f84f92e9273a29
BLAKE2b-256 e5c755b5d36a5ab2fc6e96389aec02b3f719f0a20dfdf6b4b4b32b45a8944613

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for antarraksha_langchain-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0d48f554636389ee6a39164f656ac963aece8afb26fa85c7c16e644b1fe71e6b
MD5 6ae53e0dfbbf051fd2cf85acaf316375
BLAKE2b-256 7832a8e2c7b4262c8f93c9652bba2883e02ab8ac2c0f4f37142831c58265c248

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