Sign In

langchain-prediction-markets

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

langchain-prediction-markets

LangChain tools for prediction market data. World state, uncertainty index, edges, and market detail from 30,000+ markets.

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
4
100%
Maintainers
1
Weekly downloads
 
Created
Source

langchain-prediction-markets

LangChain tools for real-time prediction market data. Drop-in tools that give any LangChain agent world awareness from 30,000+ markets.

npm

Install

npm install langchain-prediction-markets @langchain/core

Quick Start

import { ChatOpenAI } from '@langchain/openai'
import { createReactAgent } from '@langchain/langgraph/prebuilt'
import { predictionMarketTools } from 'langchain-prediction-markets'

const agent = createReactAgent({
  llm: new ChatOpenAI({ model: 'gpt-4o' }),
  tools: predictionMarketTools(),
})

const result = await agent.invoke({
  messages: [{ role: 'user', content: 'What are the key geopolitical risks right now?' }],
})

Tools

ToolDescription
get_world_stateFull world state (~800 tokens) with index, movers, edges, divergences
get_uncertainty_indexFour-signal uncertainty index (0-100)
get_market_edgesActionable mispricings with reasoning and causal path
get_market_detailSingle market detail with optional orderbook
get_world_changesIncremental changes since a given time

Individual Tools

import { getWorldState, getUncertaintyIndex, getMarketEdges } from 'langchain-prediction-markets'
// Use individually in any LangChain agent

License

MIT — SimpleFunctions

Keywords

langchain

FAQs

Package last updated on 06 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts