Skip to main content

LangChain integration for Lumify — load all Lumify sports-intelligence tools (schedules, live scores, odds, betting splits, explainable AI bet confidence) into any LangChain or LangGraph agent via MCP.

Project description

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

Until the package is on PyPI, install from the public repo:

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: list_sports, list_seasons, list_events, get_event, batch_get_events, query_events, get_live_score, get_odds, get_odds_history, get_splits, get_intelligence, list_teams, get_team, search_players, get_player, and get_player_events.

Links

License

MIT

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_lumify-0.1.0.tar.gz (11.0 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.0-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: langchain_lumify-0.1.0.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for langchain_lumify-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4c28b5dd80b952f94f3485a68b6d014aba9a9d796323da4ae596e5cc917015ee
MD5 52822a6feae89219f73f83a865943d5a
BLAKE2b-256 03e85e310cfe7952ec0dcaa064b7510909c00faac5ae33086b8cd4dc92931fac

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for langchain_lumify-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f2d9913b2e7fc231e1ee520e098841ac41ce12f242bee1ce0fdec549e30f147b
MD5 c007ea4cb27b2b14dc6905f4e1c39b4a
BLAKE2b-256 b811cea97f9ca26572c53b8dd015d16b3f6039bf01530d5f0d38ef71cb5bc231

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