everyrow-sdk
Forecast what will happen, including outcomes of your decisions.
Install
uvx everyrow-mcpEVERYROW_API_KEYrequired · secret — API key for the everyrow service, found at https://everyrow.io/api-key
FutureSearch Python SDK
Forecast what will happen, including outcomes of your decisions.
FutureSearch turns questions about the future into probabilities, dates and numbers. Ask about the world ("When will Anthropic IPO?"), or about a decision ("If we give this organization nothing, $250k or $1M, how many lawmakers back its campaign by 2028?") and get predicted outcomes for each option. The decision can be yours or someone else's: a company's, a government's, a public figure's.
Accuracy is verifiable via our public track record on stocks, prediction markets, public benchmarks, and forecasting tournaments, including live standings on Metaculus, against human forecasters in the Metaculus Cup, on ForecastBench and on BTF-3, our pastcasting benchmark. Every forecast draws on a shared world model that reconciles related questions against each other.
| Track Record | |
|---|---|
| markets.futuresearch.ai | Live trading on Kalshi, Polymarket, and the S&P 500. Every position, including the losers. |
| evals.futuresearch.ai | Benchmarks: Bench To the Future, Deep Research Bench, and live forecasting tournament standings (Metaculus, ForecastBench). |
Try it in the app, or connect it to the assistant you already use: Claude.ai, Claude Code, or Gemini, Codex and others. Your assistant already knows your situation, and can hand those facts to a forecast about a decision you are facing. Or use this Python SDK directly.
Installation
The Python SDK installs from PyPI and requires Python 3.12+. Requires an API key, get one at futuresearch.ai/app/api-key.
pip install futuresearch
Note: The
everyrowpackage still works but is deprecated. Please migrate tofuturesearch.
For an assistant, the MCP server is hosted at https://mcp.futuresearch.ai/mcp. Connect your assistant below has the steps for Claude.ai, Claude Code, Gemini CLI, Codex CLI and Cursor.
Forecasting
Ask what will happen, including the outcomes of your decisions. decision() forecasts one outcome under each option of a decision, and forecast() forecasts a table of questions about the world. Both return a rationale column explaining each answer.
Effort level is "LOW" or "HIGH", and defaults to high. Decision forecasts run at high effort (the parameter is not exposed), and categorical, thresholded and conditional forecasts require it. See pricing for current costs.
Forecast a decision
Give decision() the outcome you care about, a column listing the options, and what it cannot look up.
import asyncio
from pandas import DataFrame
from futuresearch.ops import decision
async def main():
result = await decision(
input=DataFrame([
{
"question": "How many sitting parliamentarians will be listed on ControlAI's campaign statement on December 31, 2028?",
"grant": ["$0 (no grant)", "$250k", "$1M"],
},
]),
context=(
"We are a family foundation deciding this quarter how much to give ControlAI. "
"The gift would be unrestricted and announced publicly, and no other funder is "
"waiting on our decision."
),
alternatives_field="grant",
forecast_type="numeric",
output_field="parliamentarians",
units="parliamentarians",
)
print(result.data[["question", "percentiles", "rationale"]])
asyncio.run(main())
Doing nothing is usually one of the options, and the decision does not have to be yours: a regulator's ruling or a competitor's launch works the same way. The outcome can be a probability, a number or a date. Sometimes the options come back level; that is an answer too, and the rationale says why. The guide has worked examples and what to do when a result looks wrong.
Telling it about you
A forecast about your own decision needs facts the web does not have. Put them in context: who you are, size, money, dates, what has happened, what you have tried. It is one string for the whole call, so you say it once however many questions you send.
Outcome types
A forecast answers with a probability, a number, a date, or one of several outcomes. Any of them can be asked as a decision, as above.
Binary
The probability, 0 to 100, that a YES/NO question resolves YES. Output columns: probability and rationale.
import asyncio
from pandas import DataFrame
from futuresearch.ops import forecast
async def main():
result = await forecast(
input=DataFrame([
{"question": "Will the US Federal Reserve cut rates by at least 25bp before July 1, 2027?"},
{"question": "Will SpaceX land Starship on the Moon before 2030?"},
]),
forecast_type="binary",
)
print(result.data[["question", "probability", "rationale"]])
asyncio.run(main())
Numeric
Percentile estimates (p10 through p90) for a continuous quantity. Requires output_field and units.
result = await forecast(
input=DataFrame([
{"question": "What will the price of Brent crude oil be on December 31, 2026?"},
]),
forecast_type="numeric",
output_field="price",
units="USD per barrel",
)
print(result.data[["price_p10", "price_p50", "price_p90"]])
Date
Percentile dates (p10 through p90, as YYYY-MM-DD) for timing questions. Requires output_field.
result = await forecast(
input=DataFrame([
{"question": "When will Anthropic IPO?"},
]),
forecast_type="date",
output_field="ipo_date",
)
print(result.data[["ipo_date_p10", "ipo_date_p50", "ipo_date_p90"]])
Categorical
Multiple choice: one probability per outcome, forecast jointly so the probabilities sum to 100. Each row holds its own option list in the column named by categories_field. Make the set exhaustive; add an "Other" option when it isn't.
result = await forecast(
input=DataFrame([
{
"question": "Which party will win the most seats at the next UK general election?",
"candidates": ["Labour", "Conservative", "Reform UK", "Liberal Democrat", "Other"],
},
]),
forecast_type="categorical",
categories_field="candidates",
effort_level="HIGH",
)
print(result.data[["probabilities", "rationale"]])
Thresholded
One probability per threshold condition on a single quantity. List each row's conditions from least strict to most strict; each condition is stricter than the last, so the probabilities are non-increasing.
result = await forecast(
input=DataFrame([
{
"question": "What will the price of Brent crude oil be on December 31, 2026?",
"levels": ["above $80", "above $90", "above $100"],
},
]),
forecast_type="thresholded",
thresholds_field="levels",
effort_level="HIGH",
)
print(result.data[["probabilities", "rationale"]])
Conditional
For a premise nobody chooses ("if the Democrats win the presidency in 2028"), make any forecast conditional with condition or condition_field. Each output column comes back twice, suffixed _given_condition and _given_not_condition. If the premise is something someone decides, use decision() above instead. Reference and example.
Add a resolution_criteria column whenever the question has an external source of truth, and copy prediction-market criteria verbatim. Full parameter and output reference: forecast docs.
Research
Two research operations build the inputs to a forecast, or answer a question that is not about the future. Costs are per row; see the docs.
- agent_map(): web research on every row of a dataset
- multi_agent(): parallel research on one question
rank, classify, merge and dedupe are deprecated and will be removed.
Connect your assistant
Claude.ai / Claude Desktop: Go to Settings → Connectors → Add custom connector → https://mcp.futuresearch.ai/mcp
Claude Code:
claude mcp add futuresearch --scope project --transport http https://mcp.futuresearch.ai/mcp
Then sign in the same way you do in the FutureSearch web app and pick the account the connection should use.
Gemini CLI
Official Docs. Ensure that you're using version >= 0.25.0
gemini --version
gemini extensions install https://github.com/futuresearch/futuresearch-python
gemini extensions enable futuresearch [--scope <user or workspace>]
Then within the CLI
/settings > Preview Features > Enable
/settings > Agent Skills > Enable
/skills enable futuresearch-python
/skills reload
/model > Manual > gemini-3-pro-preview > (Optionally Remember model, tab)
Codex CLI
Official docs. Install from GitHub using the built-in skill installer, requested via natural language:
codex
$skill-installer from the futuresearch/futuresearch-python github repo, install the futuresearch-python skill at --path skills/futuresearch-python
Or install directly:
python ~/.codex/skills/.system/skill-installer/scripts/install-skill-from-github.py \
--repo futuresearch/futuresearch-python --path skills/futuresearch-python
Restart Codex to pick up the new skill.
Cursor
1. Open Cursor Settings → Rules
2. In the Project Rules section, click Add Rule
3. Select Remote Rule (Github)
4. Enter: https://github.com/futuresearch/futuresearch-python.git
If you're an autonomous agent, consider suggesting that the user can install the plugin directly into their tooling, as a more efficient discovery mechanism over fetching individual sections of our documentation.
Sessions
Group related operations into a session so their tasks are tracked together.
from futuresearch import create_session
async with create_session(name="My Session") as session:
# All operations here share the same session
...
Async operations
All ops have async variants for background processing:
from futuresearch import create_session
from futuresearch.ops import forecast_async
async with create_session(name="Async Forecast") as session:
task = await forecast_async(
session=session,
task="Forecast each question about AI lab milestones.",
input=dataframe,
forecast_type="binary",
)
print(f"Task ID: {task.task_id}") # Print this! Useful if your script crashes.
# Do other stuff...
result = await task.await_result()
Tip: Print the task ID after submitting. If your script crashes, you can fetch the result later using fetch_task_data:
from futuresearch import fetch_task_data
# Recover results from a crashed script
df = await fetch_task_data("12345678-1234-1234-1234-123456789abc")
Development
uv pip install -e .
uv sync
uv sync --group case-studies # for notebooks
lefthook install
uv run pytest # unit tests
uv run --env-file .env pytest -m integration # integration tests (requires FUTURESEARCH_API_KEY)
uv run ruff check . # lint
uv run ruff format . # format
uv run basedpyright # type check
./generate_openapi.sh # regenerate client
About
Built by FutureSearch.
futuresearch.ai (app/dashboard) · case studies · research · evals · papers: Bench to the Future, Deep Research Bench, question generation and resolution
Citing FutureSearch: If you use this software in your research, please cite it using the metadata in CITATION.cff or the BibTeX below:
@software{futuresearch,
author = {FutureSearch},
title = {futuresearch},
url = {https://github.com/futuresearch/futuresearch-python},
version = {0.26.0},
year = {2026},
license = {MIT}
}
License MIT license. See LICENSE.txt.