Metadata-Version: 2.4
Name: axiom-langchain
Version: 0.1.0
Summary: Axiom Stack Oracle tool for LangChain AI agents — autonomous M2M RWA data purchasing on Solana
Home-page: https://github.com/axiom-rwa/axiom-stack
Author: Axiom RWA
Author-email: Axiom RWA <sdk@axiom-rwa.io>
License: MIT
Project-URL: Documentation, https://docs.axiom-rwa.io/sdk/python
Project-URL: Source, https://github.com/axiom-rwa/axiom-stack
Project-URL: Bug Tracker, https://github.com/axiom-rwa/axiom-stack/issues
Keywords: langchain,solana,rwa,oracle,ai-agent,m2m
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: langchain>=0.2.0
Requires-Dist: langchain-core>=0.2.0
Requires-Dist: solana>=0.36.0
Requires-Dist: solders>=0.25.0
Requires-Dist: python-dotenv>=1.0.0
Requires-Dist: requests>=2.31.0
Requires-Dist: pydantic>=2.0.0
Provides-Extra: openai
Requires-Dist: langchain-openai>=0.1.0; extra == "openai"
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
Requires-Dist: twine>=5.0; extra == "dev"
Requires-Dist: build>=1.0; extra == "dev"
Dynamic: author
Dynamic: home-page
Dynamic: requires-python

# axiom-langchain

**Axiom Stack Oracle tool for LangChain AI agents** — plug-and-play M2M Real World Asset data purchasing on Solana.

```bash
pip install axiom-langchain
```

## Quick start

```python
from axiom_langchain import AxiomValuationTool
from langchain.agents import create_agent
from langchain_openai import ChatOpenAI

tool = AxiomValuationTool()
agent = create_agent(model="openai:gpt-4o", tools=[tool])
result = agent.invoke({"messages": [
    {"role": "user", "content": "What is the valuation for HAWTHORNE-001? Buy the data."}
]})
```

The tool autonomously:
1. Transfers **0.01 SOL** to the Axiom Treasury on Solana
2. Confirms the transaction and captures the signature
3. Calls `GET /api/v1/oracle/{asset_id}?tx_signature={sig}`
4. Returns structured valuation data (consensus score, confidence, NOI, audit hash) to the LLM

## Environment variables

| Variable | Default | Description |
|---|---|---|
| `RPC_URL` | `http://127.0.0.1:8899` | Solana RPC endpoint |
| `KEYPAIR_PATH` | `~/.config/solana/id.json` | Agent wallet keypair |
| `AXIOM_TREASURY` | `6QWBRGkjnBTJzP8gP6EkeTFiHLepNTfPJZ3JHvmWXXnY` | Treasury pubkey |
| `M2M_FEE_LAMPORTS` | `10000000` | Micro-payment in lamports (0.01 SOL) |
| `AXIOM_API_URL` | `https://api.axiomstack.com` | Oracle API base URL (preferred) |
| `AXIOM_API_BASE` | _(see `AXIOM_API_URL`)_ | Legacy alias for the API base URL |

## License

MIT
