Agent Map
agent_map runs one web research agent per row of a DataFrame, in parallel. Each agent searches the web, reads pages, and returns structured results that populate new columns. The transform is live web research: agents fetch and synthesize external information per row.
For a single question, or to generate a list from scratch, use multi_agent instead.
single_agentis deprecated. Usemulti_agentfor a single question.
Examples
agent_map
from pandas import DataFrame
from futuresearch.ops import agent_map
companies = DataFrame([
{"company": "Stripe"},
{"company": "Databricks"},
{"company": "Canva"},
])
result = await agent_map(
task="Find the company's most recent annual revenue",
input=companies,
)
print(result.data.head())
Each row gets its own agent that researches independently.
Response model
agent_map supports structured output via a custom Pydantic model.
from pandas import DataFrame
from pydantic import BaseModel, Field
from futuresearch.ops import agent_map
companies = DataFrame([
{"company": "Stripe"},
{"company": "Databricks"},
{"company": "Canva"},
])
class CompanyFinancials(BaseModel):
annual_revenue_usd: int = Field(description="Most recent annual revenue in USD")
employee_count: int = Field(description="Current number of employees")
last_funding_round: str = Field(description="Most recent funding round, e.g. 'Series C'")
result = await agent_map(
task="Research each company's financials and latest funding",
input=companies,
response_model=CompanyFinancials,
)
print(result.data.head())
The output now has annual_revenue_usd, employee_count, and last_funding_round columns.
Parameters
| Name | Type | Description |
|---|---|---|
task |
str | The agent task describing what to research for each row |
input |
DataFrame | UUID | The rows to research |
session |
Session | Optional, auto-created if omitted |
effort_level |
EffortLevel | LOW, MEDIUM, or HIGH (default: MEDIUM) |
response_model |
BaseModel | Optional schema for structured output |
Effort levels
The effort level controls how thorough the research is on each row.
LOW: a single LLM call, cheapest and fastestMEDIUM: multiple sources consulted (default)HIGH: deep research, cross-referencing sources, higher accuracy
Via MCP
MCP tool: futuresearch_agent
| Parameter | Type | Description |
|---|---|---|
csv_path |
string | Path to input CSV file |
task |
string | What to research for each row |
Related docs
Guides
Reference
- multi_agent for a single question or to generate a list