Skip to main content

langchain-lumify

LangChain integration for Lumify — the agent-ready sports intelligence API. Load all Lumify tools (schedules, live scores, odds, public betting splits, and explainable AI bet confidence across 8+ sports) into any LangChain or LangGraph agent in one call.

It's a thin, typed wrapper over langchain-mcp-adapters pointed at Lumify's hosted MCP server (https://lumify.ai/mcp).

Install

pip install langchain-lumify
# Agent examples also need:
pip install langchain

Or install the latest from source:

pip install "git+https://github.com/lumifyai/lumify.git#subdirectory=clients/langchain-lumify"

Get a key

Grab a free instant key in seconds — no signup, email, or card at https://lumify.ai/docs/ai (100 credits, 14-day expiry). For a persistent account with 1,000 starter credits, use https://lumify.ai/api-keys.

Set it as LUMIFY_API_KEY, or pass it explicitly. get_lumify_tools requires a key by default so the first tool call does not fail with an opaque 401. Pass require_api_key=False only if you want to introspect the public tools/list catalog. Raw lmfy-... values and Bearer lmfy-... copy-pastes are both accepted.

Quick start

import asyncio
from langchain_lumify import get_lumify_tools
from langchain.agents import create_agent


async def main():
    tools = await get_lumify_tools()  # reads LUMIFY_API_KEY
    agent = create_agent("openai:gpt-4.1", tools)
    result = await agent.ainvoke(
        {"messages": "What's the best MLB bet today, with the rationale?"}
    )
    print(result["messages"][-1].content)


asyncio.run(main())

Pass a key explicitly or point at a self-hosted endpoint:

tools = await get_lumify_tools(api_key="lmfy-...", url="https://lumify.ai/mcp")

Toolkit

from langchain_lumify import LumifyToolkit

toolkit = await LumifyToolkit.acreate()          # loads the tools
agent = create_agent("openai:gpt-4.1", toolkit.get_tools())

Do not call LumifyToolkit() with no args — that raises. Always use acreate().

Tools

Loads the full Lumify MCP tool surface (18 tools): list_sports, list_seasons, list_events, get_event, batch_get_events, query_events, get_live_score, get_odds, get_odds_history, get_stats, get_splits, get_intelligence, list_teams, get_team, search_players, get_player, get_player_events, and estimate_cost (free pre-call credit-cost estimate).

Links

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

langchain_lumify-0.1.1.tar.gz (30.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_lumify-0.1.1-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file langchain_lumify-0.1.1.tar.gz.

File metadata

  • Download URL: langchain_lumify-0.1.1.tar.gz
  • Upload date:
  • Size: 30.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.12

File hashes

Hashes for langchain_lumify-0.1.1.tar.gz
Algorithm Hash digest
SHA256 4984518a145159adcda9b8739c0d8ccaf432ea77b995aaa847006102727f2583
MD5 b72d87c3927c6dde6437d15aef62a5b3
BLAKE2b-256 bb76f000b9f9d66a223c00401fbd5177b9f46c7f8991adec303d7cf187e09831

See more details on using hashes here.

File details

Details for the file langchain_lumify-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for langchain_lumify-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e55bea1ce78530621b546ae97bd4430e3cd73e36ccc74cded2b2a42799821b98
MD5 4ca54fe9a73b859592b08c217aeadff0
BLAKE2b-256 0413ef5feb340c4a20b8b940a0fe5236b99b82ea48027a51f128c9483e4c0c9e

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