Research agents tend to fail in the same three ways. They cannot read the pages that matter, because the content only exists after a browser has run the site's scripts. They estimate figures instead of looking them up. And they forget: every new question starts from zero, so the same sources are fetched, read and summarised again. This guide shows how LeanBrowser, LeanData and LeanMemory address each of those, and how they fit into a single loop.
Read the web the way a person does
LeanBrowser runs managed browsers in the cloud, so an agent sees a page after it has fully rendered. For most research the one-shot calls are enough: capture a page's text, pull specific elements by selector, or save a PDF for the record.
curl /api/v1/browser/scrape \ -H "Authorization: Bearer $LEANTOOLS_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "url": "https://example.com/investors/annual-report", "elements": [ { "selector": "h2" }, { "selector": "table.financials" } ] }'
Some sources need more than one request: a search form, pagination, a consent banner or a sign-in. For those, the agent opens a live session over Playwright or the DevTools protocol and drives it step by step. Persistent sessions keep cookies and storage between runs, private to your workspace, so an agent that signed in yesterday is still signed in today.
Take the figures from data, not from prose
Numbers are where research agents are easiest to trust and easiest to get wrong. Instead of extracting a figure from a paragraph, the agent queries it from LeanData. Every dataset in the catalogue is reached through the same MCP tools: list what is available, describe a dataset's columns, then query it with filters, ordering and paging.
{
"method": "tools/call",
"params": {
"name": "data.query",
"arguments": {
"dataset": "<dataset key>",
"filters": [ { "field": "year", "op": "between", "value": [2022, 2025] } ],
"orderBy": "year", "descending": true, "take": 50
}
}
}
Results arrive as pages, or as a stream for large answers, and every call reports what it cost. Because each query is structured, the agent can cite exactly which dataset and which filter a number came from.
Keep what was learned
LeanMemory is where the research accumulates. The agent keeps three kinds of memory side by side:
- Findings as records. Each conclusion goes into a table with its source URL, the query behind any figure, and when it was retrieved.
- Passages by meaning. The agent stores embeddings of the passages it read, produced with the embedding model of your choice, and retrieves them by meaning with metadata filters.
- A history of the work. An append-only event stream records each search, page and query, so any answer can be traced back to how it was reached.
-- Recent findings on a subject, with their sources SELECT finding, source_url, retrieved_at FROM findings WHERE subject = 'Northwind Traders' AND retrieved_at > now() - INTERVAL 30 DAY ORDER BY retrieved_at DESC;
When a finding turns out to be useful, or wrong, the agent sends that feedback to LeanMemory. Recall gets sharper the more the research is used.
The research loop
- Check memory first. Recall existing findings and passages on the subject, and note what is missing or out of date.
- Read only what is new. Use LeanBrowser for sources that have changed or were never read.
- Query the figures. Take every number from LeanData rather than from a paragraph.
- Write back with sources. Store findings, passages and events in LeanMemory, so the next question starts ahead.
Controls and costs
Give the research agent its own API key, scoped to the browser, data and memory services, with a monthly spend cap. Browser calls are billed per request, dataset queries per call and per 1,000 rows returned, and memory by the data it holds and moves. Current rates are on the pricing page, and every call appears in the activity log with its cost.
Getting started
- Create a workspace and an API key scoped to LeanBrowser, LeanData and LeanMemory.
- Connect your agent to the LeanTools MCP endpoint for the data tools, and call the browser and memory APIs with the same key.
- Create a findings table and an event stream in LeanMemory, then give the agent the loop above.
The LeanData guide describes the query model in full, and the API reference covers every browser call.