Metadata-Version: 2.4
Name: nodeflare
Version: 0.1.0
Summary: On-chain intelligence tools for AI agents — balances, approvals, wallet-report, token-safety & a natural-language Answer Engine across 23 EVM chains. LangChain / CrewAI / LlamaIndex packs.
Project-URL: Homepage, https://nodeflare.app
Project-URL: Documentation, https://nodeflare.app/docs
Project-URL: Repository, https://github.com/Nodeflare-app/nodeflare-python
Project-URL: Issues, https://github.com/Nodeflare-app/nodeflare-python/issues
Author-email: NodeFlare <info@nodeflare.app>
License: MIT
License-File: LICENSE
Keywords: agent-tools,ai-agents,blockchain,crewai,ethereum,evm,langchain,llamaindex,mcp,onchain,rpc,token-safety,wallet,web3
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 :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Provides-Extra: all
Requires-Dist: crewai>=0.30; extra == 'all'
Requires-Dist: langchain-core>=0.2; extra == 'all'
Requires-Dist: llama-index-core>=0.10; extra == 'all'
Requires-Dist: pydantic>=2; extra == 'all'
Provides-Extra: crewai
Requires-Dist: crewai>=0.30; extra == 'crewai'
Requires-Dist: pydantic>=2; extra == 'crewai'
Provides-Extra: langchain
Requires-Dist: langchain-core>=0.2; extra == 'langchain'
Requires-Dist: pydantic>=2; extra == 'langchain'
Provides-Extra: llamaindex
Requires-Dist: llama-index-core>=0.10; extra == 'llamaindex'
Requires-Dist: pydantic>=2; extra == 'llamaindex'
Description-Content-Type: text/markdown

# nodeflare

**On-chain intelligence for AI agents — one call, 23 EVM chains.**

`nodeflare` gives your agent the on-chain answers it actually needs — *is this token a
scam, what does this wallet hold, what will this transaction do* — across 23 EVM chains
in a single call, **including young chains (Robinhood, Plasma, Ink, Zircuit) that
Alchemy, Moralis and revoke.cash leave as empty shells.**

It ships framework-native tool packs for **LangChain**, **CrewAI** and **LlamaIndex**,
plus a plain Python client. Get a free API key (2M compute units/month, no card) at
**[nodeflare.app](https://nodeflare.app)**.

```bash
pip install nodeflare              # plain client, stdlib-only, zero deps
pip install "nodeflare[langchain]" # + LangChain tools
pip install "nodeflare[crewai]"    # + CrewAI tools
pip install "nodeflare[llamaindex]"# + LlamaIndex tools
```

## Why

Agents that touch money need on-chain *judgment*, not raw JSON-RPC. Wiring that up
per-chain — an indexer here, a token-safety API there, none of which cover the new
chains — is the tax. NodeFlare collapses it into six tools that already speak 23
chains and return decisions, not hex.

| Tool | Answers |
|------|---------|
| `token_safety` | Is this ERC-20 safe to trade? (ownership, upgradeable proxy, holder concentration, honeypot sim → risk score) |
| `wallet_report` | Everything about a wallet in one call: balances + USD total + top holdings + active approvals |
| `token_allowances` | What has this wallet approved, and which approvals are unlimited/risky? |
| `multichain_balances` | Native + ERC-20 balances (USD-priced), optionally auto-discovering every token held |
| `simulate_transaction` | Will this tx revert? How much gas? What tokens move? |
| `onchain_answer` | Plain-English question → cited verdict (the Onchain Answer Engine) |

The light path (metadata, balances, revert/gas) works without a key. The **deep checks**
— approvals, holder concentration, asset-change tracing, and the Answer Engine — need a
free `NODEFLARE_API_KEY`.

## Plain client

```python
from nodeflare import NodeFlareClient

nf = NodeFlareClient(api_key="nf_live_…")   # or set NODEFLARE_API_KEY

# Risk-check a token before an agent buys it
print(nf.token_safety("base", "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"))

# One-call wallet report across all 23 chains
print(nf.wallet_report("0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"))

# Natural-language verdict
print(nf.onchain_answer("Is token 0xdAC17F958D2ee523a2206206994597C13D831ec7 on eth safe?"))
```

## LangChain

```python
from nodeflare.langchain import get_nodeflare_tools
from langchain.chat_models import init_chat_model

tools = get_nodeflare_tools()                  # uses NODEFLARE_API_KEY
llm = init_chat_model("claude-opus-4-8").bind_tools(tools)
# ... hand `tools` to any LangChain agent / AgentExecutor
```

## CrewAI

```python
from crewai import Agent
from nodeflare.crewai import get_nodeflare_tools

analyst = Agent(
    role="On-chain risk analyst",
    goal="Vet tokens and wallets before the crew acts on them",
    tools=get_nodeflare_tools(),
)
```

## LlamaIndex

```python
from llama_index.core.agent import ReActAgent
from nodeflare.llamaindex import get_nodeflare_tools

agent = ReActAgent.from_tools(get_nodeflare_tools(), llm=llm)
```

## Auth

Every `get_nodeflare_tools()` and `NodeFlareClient()` reads `NODEFLARE_API_KEY` from the
environment, or takes `api_key="nf_live_…"` explicitly. Grab a free key at
[nodeflare.app](https://nodeflare.app) — 2M compute units/month, no card, crypto or card
top-ups when you outgrow it.

## Links

- Site & keys — https://nodeflare.app
- Remote MCP server (Claude / ChatGPT connectors) — `https://mcp.nodeflare.app`
- npm (`nodeflare-mcp`, `nodeflare-agentkit`) — https://www.npmjs.com/package/nodeflare-mcp

MIT © NodeFlare
