Skip to main content

LangChain integration for Agentra — identity oracle and trust layer for autonomous AI agent transactions.

Project description

langchain-agentra

PyPI version License: MIT

LangChain integration for Agentra — the identity oracle and trust layer for autonomous AI agent transactions.

Installation

pip install langchain-agentra

Setup

Register at demo.agentrapay.ai to get your API key and agent ID.

Quick start

import os
from langchain_agentra import AgentraToolkit
from langchain_openai import ChatOpenAI
from langchain.agents import initialize_agent, AgentType

toolkit = AgentraToolkit(
    api_key=os.environ["AGENTRA_API_KEY"],
    agent_id=os.environ["AGENTRA_AGENT_ID"],
)

agent = initialize_agent(
    tools=toolkit.get_tools(),
    llm=ChatOpenAI(model="gpt-4o"),
    agent=AgentType.OPENAI_FUNCTIONS,
)

agent.run(
    "Check trust for ag_supplier_42, then authorize a $250 payment "
    "for content moderation services."
)

Tools

  • agentra_trust_check — look up trust tier and limits for any agent
  • agentra_authorize — gate a payment through the authorization layer
  • agentra_settle — close the loop after payment executes

Full docs: agentrapay.ai

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

langchain_agentra-0.1.0.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

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

langchain_agentra-0.1.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: langchain_agentra-0.1.0.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.3 CPython/3.12.3 Linux/6.17.0-20-generic

File hashes

Hashes for langchain_agentra-0.1.0.tar.gz
Algorithm Hash digest
SHA256 322670fb1b2bfcb385579aeaff71812af2489a50a9dd529173f1be838f0f0e04
MD5 62371596223963ff913542c0b85d0d80
BLAKE2b-256 360ff339a3082cf3d4c81cc69e27720a563c4a94ad571406e2b6a96fc1d7c0a2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: langchain_agentra-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.3 CPython/3.12.3 Linux/6.17.0-20-generic

File hashes

Hashes for langchain_agentra-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ba0b43940552a9c62177b9a257ae5161f1ba6a0fe90a857dc6656f833bad5d13
MD5 5f7495fe9a1b02ed8d2d5afdc5627d12
BLAKE2b-256 6c956589b60a7baa18c5d678dbb15b70ff5a441189bdc0103c7ea77fbdf1b220

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