Skip to main content

langchain-pythia

PyPI License: MIT

LangChain integration for Pythia Oracle — on-chain calculated crypto indicators via Chainlink.

Access EMA, RSI, Bollinger Bands, Volatility, and more for 22 crypto tokens directly from your LangChain agents. Pythia is the first oracle delivering calculated technical indicators on-chain, not just prices. Includes Pythia Events (indicator alert subscriptions) and Pythia Visions (AI-calibrated market intelligence).

Installation

pip install langchain-pythia

Quick Start

from langchain_pythia import PythiaListTokensTool, PythiaTokenFeedsTool

# Use with any LangChain agent
tools = [PythiaListTokensTool(), PythiaTokenFeedsTool()]

# Or call directly
list_tool = PythiaListTokensTool()
print(list_tool.invoke(""))

feeds_tool = PythiaTokenFeedsTool()
print(feeds_tool.invoke({"engine_id": "bitcoin"}))

With a LangChain Agent

from langchain_openai import ChatOpenAI
from langgraph.prebuilt import create_react_agent
from langchain_pythia import (
    PythiaListTokensTool,
    PythiaTokenFeedsTool,
    PythiaHealthCheckTool,
    PythiaContractsTool,
    PythiaPricingTool,
    PythiaEventsInfoTool,
    PythiaSubscribeInfoTool,
    PythiaVisionsInfoTool,
    PythiaVisionHistoryTool,
)

tools = [
    PythiaListTokensTool(),
    PythiaTokenFeedsTool(),
    PythiaHealthCheckTool(),
    PythiaContractsTool(),
    PythiaPricingTool(),
    PythiaEventsInfoTool(),
    PythiaSubscribeInfoTool(),
    PythiaVisionsInfoTool(),
    PythiaVisionHistoryTool(),
]

llm = ChatOpenAI(model="gpt-4o")
agent = create_react_agent(llm, tools)

# Ask about on-chain indicators
response = agent.invoke(
    {"messages": [{"role": "user", "content": "What RSI feeds does Pythia have for Bitcoin?"}]}
)

Available Tools

Tool Description
PythiaListTokensTool List every tracked token with status, uptime, and data sources
PythiaTokenFeedsTool Get all indicator feed names (EMA, RSI, Bollinger, Volatility) for a token
PythiaHealthCheckTool Per-token 30-day uptime, data source health, incident report
PythiaContractsTool Contract addresses (operator, consumers, faucet, LINK) for on-chain integration
PythiaPricingTool Current pricing tiers and free trial faucet info
PythiaEventsInfoTool Pythia Events overview — indicator alert subscriptions
PythiaSubscribeInfoTool Plan a specific event subscription with cost and exact calls
PythiaVisionsInfoTool Pythia Visions overview — current pattern catalog, accuracy ranges, integration guide
PythiaVisionHistoryTool Recent Visions fired for a token with pattern breakdown

What Pythia Provides

  • A growing catalog of indicator feeds across multiple tokens — for the live token list and feed count, run PythiaListTokensTool or fetch feed-status.json
  • Indicator types: EMA, RSI, Bollinger Bands, VWAP, Volatility, USD Price (catalog evolves; PythiaTokenFeedsTool returns the active list per token)
  • Timeframes: 5-minute, 1-hour, 1-day, 1-week
  • On-chain delivery via Chainlink
  • Free trial via PythiaFaucet — no LINK needed
  • Pythia Events: Subscribe to indicator conditions (ABOVE/BELOW thresholds), get triggered on-chain
  • Pythia Visions: AI-calibrated market intelligence on-chain — walk-forward validated patterns, FREE. Live catalog via PythiaVisionsInfoTool.

Use Cases

  • AI trading agents that need on-chain technical signals
  • DeFi vault rebalancing based on RSI or volatility thresholds
  • Risk management using Bollinger Band width
  • Portfolio analysis with real-time calculated metrics

Related

License

MIT

Release files for langchain-pythia 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for langchain-pythia 0.3.1
File Size Uploaded
langchain_pythia-0.3.1.tar.gz 11.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for langchain-pythia 0.3.1
File Interpreter ABI Platform
langchain_pythia-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 23.7 kB

Release files / langchain_pythia-0.3.1.tar.gz

Download URL langchain_pythia-0.3.1.tar.gz
Size 11.4 kB
Tags Source
SHA-256 checksum
How to use checksums
7599219c1860b2c229e80288e969b435e7e008b1969c817039412a64afd7663f
BLAKE2b-256 checksum
How to use checksums
9a0ed9fc71a74a7de8860026cf692b7f6ba8b48104b9bb1b7670e750bf6bd20b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / langchain_pythia-0.3.1-py3-none-any.whl

Download URL langchain_pythia-0.3.1-py3-none-any.whl
Size 12.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f8aa5a1ab17b16db0eefbcc639d8d60c9092adbfcd633ac3bd93a7bcf9ed3f1a
BLAKE2b-256 checksum
How to use checksums
20dd92f070cbb7ddac29ff1c6ee3789c3f27ff7521a47b8a80549fcfd35c7bbb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page