Metadata-Version: 2.4
Name: dpx-langchain
Version: 1.0.0
Summary: DPX settlement and intelligence tools for LangChain agents — quote, ESG scoring, oracle status, and settlement execution.
Project-URL: Homepage, https://untitledfinancial.com
Project-URL: Documentation, https://docs.untitledfinancial.com
Project-URL: Repository, https://github.com/untitledfinancial/DPX-API
Author-email: "Untitled_ LuxPerpetua Technologies, Inc." <case@untitledfinancial.com>
License: MIT
License-File: LICENSE
Keywords: ai-agent,cross-border,dpx,esg,fintech,langchain,payments,settlement,stablecoin,usdc
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: Topic :: Office/Business :: Financial
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Requires-Dist: httpx>=0.24.0
Requires-Dist: langchain-core>=0.2.0
Provides-Extra: langchain
Requires-Dist: langchain>=0.2.0; extra == 'langchain'
Description-Content-Type: text/markdown

# dpx-langchain

DPX settlement and intelligence tools for LangChain agents.

```bash
pip install dpx-langchain
```

## Tools

| Tool | Description |
|------|-------------|
| `DpxQuoteTool` | Binding fee quote — amount, rate breakdown, quoteId (300s TTL) |
| `DpxSettleTool` | Execute settlement — cross-border or domestic, sandbox by default |
| `DpxEsgTool` | Live ESG score for a wallet — 6 institutional sources, hourly |
| `DpxOracleTool` | Oracle stability status — STABLE/CAUTION/UNSTABLE + recommendation |
| `DpxOracleFullTool` | Full 10-layer oracle output — macro, climate, FX, geopolitical |
| `DpxRailsTool` | Local payment rail health — PIX, SEPA, FedACH, CHAPS, UPI |

## Usage

```python
from dpx_langchain import get_dpx_tools
from langchain.agents import create_react_agent

tools = get_dpx_tools()
agent = create_react_agent(llm=llm, tools=tools, prompt=prompt)
```

Or individual tools:

```python
from dpx_langchain import DpxQuoteTool, DpxSettleTool, DpxEsgTool, DpxOracleTool

tools = [DpxQuoteTool(), DpxSettleTool(), DpxEsgTool(), DpxOracleTool()]
```

Exclude specific tools:

```python
tools = get_dpx_tools(exclude=["dpx_oracle_full", "dpx_rail_status"])
```

## Environment variables

| Variable | Default | Description |
|----------|---------|-------------|
| `DPX_ORACLE_URL` | `https://stability.untitledfinancial.com` | Override for local dev |
| `DPX_AGENT_URL` | `https://agent.untitledfinancial.com` | Override for local dev |

## Example agent interaction

```
User: What's the fee to settle $500,000 USD to EUR?

Agent: [calls dpx_quote(amount_usd=500000, has_fx=True)]
       DPX quote for $500,000 cross-border:
       • All-in rate: 2.035%
       • Total fee: $10,175
       • Net received: $489,825
       • Oracle: STABLE
       • Quote ID: q_... (valid 300 seconds)
```

## Links

- [DPX Protocol](https://untitledfinancial.com)
- [Docs](https://docs.untitledfinancial.com)
- [PyPI](https://pypi.org/project/dpx-langchain)
