Metadata-Version: 2.4
Name: langchain-agentra
Version: 0.1.0
Summary: LangChain integration for Agentra — identity oracle and trust layer for autonomous AI agent transactions.
License: MIT
License-File: LICENSE
Keywords: langchain,agentra,ai-agents,trust,authorization,payments,mcp
Author: Jonathan Klimoski
Author-email: jonathan@agentrapay.ai
Requires-Python: >=3.9,<4.0
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: langchain-core (>=0.3.0,<0.4.0)
Requires-Dist: pydantic (>=2.0.0)
Requires-Dist: requests (>=2.28.0)
Project-URL: Homepage, https://agentrapay.ai
Project-URL: Repository, https://github.com/agentrapay/langchain-agentra
Description-Content-Type: text/markdown

# langchain-agentra

[![PyPI version](https://badge.fury.io/py/langchain-agentra.svg)](https://pypi.org/project/langchain-agentra/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)

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

## Installation

```bash
pip install langchain-agentra
```

## Setup

Register at [demo.agentrapay.ai](https://demo.agentrapay.ai) to get your API key and agent ID.

## Quick start

```python
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](https://agentrapay.ai)

