Skip to main content

Read-only LangChain tools for RustChain — let any agent query the hardware-attested agent economy.

Project description

langchain-rustchain

CI PyPI License: MIT

Read-only LangChain tools for RustChain — the DePIN blockchain where mining rewards go to verified physical hardware (Proof-of-Antiquity). Drop these tools into any LangChain agent so it can answer questions about the RustChain agent economy from live, self-verifying public data.

Part of the RustChain agent stack. Already have CrewAI, Agno, AutoGen, and smolagents tools — this fills the LangChain gap.

Why

RustChain's thesis is agents need crypto, and crypto needs agents. For an agent to reason about the network — how much RTC has been paid, who's mining, is the node up — it needs tools, not a docs page. These four read-only tools give it exactly that. No keys, no writes, no wallet operations — same public surfaces you can open in a browser.

Install

pip install langchain-rustchain-tools        # + langchain-core for the tools

Use

from rustchain_langchain import get_rustchain_tools

tools = get_rustchain_tools()          # list[BaseTool]

# bind to any LangChain chat model / agent:
# llm.bind_tools(tools)  |  AgentExecutor(...tools=tools)  |  langgraph create_react_agent(llm, tools)

Each tool returns a compact, agent-friendly summary (agents reason better on a 3-line summary than a 5 KB JSON blob):

Tool Answers
rustchain_network_stats on-chain activity: transfers, RTC moved, distinct wallets
rustchain_payouts total RTC paid + distinct recipients (chain-computed)
rustchain_miners who's attesting, broken down by hardware architecture
rustchain_node_health is the node up (ok / db_rw / version / backup age)

The framework-free RustChainClient and summarize_* helpers are also exported, so you can use the data without LangChain.

Point it at your own node

get_rustchain_tools(base_url="https://50.28.86.131", verify=False)  # self-signed dev node

Develop / test

pip install -e ".[test]"
pytest -q          # no network — HTTP is mocked

License

MIT © Elyan Labs. Built for the RustChain ecosystem.

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_rustchain_tools-0.1.0.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

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

langchain_rustchain_tools-0.1.0-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for langchain_rustchain_tools-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7973af745b8dcda841c26774976a77e2aa00dbfc612b34df5b72fc983eae2c28
MD5 a92cd4c8c6c9a767c6f248f46a1ff3bb
BLAKE2b-256 91d0a3be085fac82f279526a62413fadb04e1d58f30905010f65a7f5a596f167

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for langchain_rustchain_tools-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 072c1c2ff54d26a544c46354095135f1703b5a23831015c23353c7cb34591067
MD5 cd511f27a9b59cf63c8505827ad1fba6
BLAKE2b-256 a84e05f7e4b5b824001cc9193ac4afb37ed9ac7dcea93b0f7bb21409a7b19236

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