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.0.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.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: antarraksha_langchain-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 0e15cb1e7f0248503e8b6ab8e1d8458bfc2fdad2528d94fd4a427fe0f31da6ad
MD5 28e66b867cd85cda5a902bccd26425b9
BLAKE2b-256 db2cb3dae4d740800e190b5df67a1cc59b7cb1087d0570c477b8bfd442b2a95f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for antarraksha_langchain-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 306d05aa55fc5c272ef7cca88fcbf23379a9f8d75464b48aec14d1dd0aeb199c
MD5 70194c1220383a06c8c5f7fc7af27c41
BLAKE2b-256 131fd0e6d596af942c49e786a0b0370bf44c91d239f81a26867212b203031091

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