https://github.com/lmnr-ai/index
The SOTA Open-Source Browser Agent for autonomously performing complex tasks on the web
https://github.com/lmnr-ai/index
ai ai-agent browser-agent claude-3-7-sonnet gemini-pro llm sota
Last synced: 15 days ago
JSON representation
The SOTA Open-Source Browser Agent for autonomously performing complex tasks on the web
- Host: GitHub
- URL: https://github.com/lmnr-ai/index
- Owner: lmnr-ai
- License: apache-2.0
- Created: 2024-11-30T19:34:02.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-05-13T15:27:08.000Z (17 days ago)
- Last Synced: 2025-05-13T16:39:43.988Z (17 days ago)
- Topics: ai, ai-agent, browser-agent, claude-3-7-sonnet, gemini-pro, llm, sota
- Language: Python
- Homepage:
- Size: 2.48 MB
- Stars: 2,120
- Watchers: 18
- Forks: 104
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-github-repos - lmnr-ai/index - The SOTA Open-Source Browser Agent for autonomously performing complex tasks on the web (Python)
README




# Index
Index is a state-of-the-art open-source browser agent that autonomously executes complex web tasks. It turns any website into an accessible API and can be seamlessly integrated with just a few lines of code.
- [x] Powered by reasoning LLMs with vision capabilities.
- [x] Gemini 2.5 Pro (really fast and accurate)
- [x] Claude 3.7 Sonnet with extended thinking (reliable and accurate)
- [x] OpenAI o4-mini (depending on the reasoning effort, provides good balance between speed, cost and accuracy)
- [x] Gemini 2.5 Flash (really fast, cheap, and good for less complex tasks)
- [x] `pip install lmnr-index` and use it in your project
- [x] `index run` to run the agent in the interactive CLI
- [x] Supports structured output via Pydantic schemas for reliable data extraction.
- [x] Index is also available as a [serverless API.](https://docs.lmnr.ai/index-agent/api/getting-started)
- [x] You can also try out Index via [Chat UI](https://lmnr.ai/chat).
- [x] Supports advanced [browser agent observability](https://docs.lmnr.ai/index-agent/tracing) powered by open-source platform [Laminar](https://github.com/lmnr-ai/lmnr).prompt: go to ycombinator.com. summarize first 3 companies in the W25 batch and make new spreadsheet in google sheets.
https://github.com/user-attachments/assets/2b46ee20-81b6-4188-92fb-4d97fe0b3d6a
## Documentation
Check out full documentation [here](https://docs.lmnr.ai/index-agent/getting-started)
## Quickstart
### Install dependencies
```bash
pip install lmnr-index 'lmnr[all]'# Install playwright
playwright install chromium
```### Setup model API keys
Setup your model API keys in `.env` file in your project root:
```
GEMINI_API_KEY=
ANTHROPIC_API_KEY=
OPENAI_API_KEY=
# Optional, to trace the agent's actions and record browser session
LMNR_PROJECT_API_KEY=
```### Run Index with code
```python
import asyncio
from index import Agent, GeminiProvider
from pydantic import BaseModel
from lmnr import Laminar
import os# to trace the agent's actions and record browser session
Laminar.initialize()# Define Pydantic schema for structured output
class NewsSummary(BaseModel):
title: str
summary: strasync def main():
llm = GeminiProvider(model="gemini-2.5-pro-preview-05-06")
agent = Agent(llm=llm)# Example of getting structured output
output = await agent.run(
prompt="Navigate to news.ycombinator.com, find a post about AI, extract its title and provide a concise summary.",
output_model=NewsSummary
)
summary = NewsSummary.model_validate(output.result.content)
print(f"Title: {summary.title}")
print(f"Summary: {summary.summary}")
if __name__ == "__main__":
asyncio.run(main())
```### Run Index with CLI
Index CLI features:
- Browser state persistence between sessions
- Follow-up messages with support for "give human control" action
- Real-time streaming updates
- Beautiful terminal UI using TextualYou can run Index CLI with the following command.
```bash
index run
```Output will look like this:
```
Loaded existing browser state
╭───────────────────── Interactive Mode ─────────────────────╮
│ Index Browser Agent Interactive Mode │
│ Type your message and press Enter. The agent will respond. │
│ Press Ctrl+C to exit. │
╰────────────────────────────────────────────────────────────╯Choose an LLM model:
1. Gemini 2.5 Flash
2. Claude 3.7 Sonnet
3. OpenAI o4-mini
Select model [1/2] (1): 3
Using OpenAI model: o4-mini
Loaded existing browser stateYour message: go to lmnr.ai, summarize pricing page
Agent is working...
Step 1: Opening lmnr.ai
Step 2: Opening Pricing page
Step 3: Scrolling for more pricing details
Step 4: Scrolling back up to view pricing tiers
Step 5: Provided concise summary of the three pricing tiers
```### Running CLI with a personal Chrome instance
You can use Index with personal Chrome browser instance instead of launching a new browser. Main advantage is that all your existing logged-in sessions will be available.
```bash
# Basic usage with default Chrome path
index run --local-chrome
```## Use Index via API
The easiest way to use Index in production is with [serverless API](https://docs.lmnr.ai/index-agent/api/getting-started). Index API manages remote browser sessions, agent infrastructure and [browser observability](https://docs.lmnr.ai/index-agent/api/tracing). To get started, create a project API key in [Laminar](https://lmnr.ai).
### Install Laminar
```bash
pip install lmnr
```### Use Index via API
```python
from lmnr import Laminar, LaminarClient
# you can also set LMNR_PROJECT_API_KEY environment variable# Initialize tracing
Laminar.initialize(project_api_key="your_api_key")# Initialize the client
client = LaminarClient(project_api_key="your_api_key")for chunk in client.agent.run(
stream=True,
model_provider="gemini",
model="gemini-2.5-pro-preview-05-06",
prompt="Navigate to news.ycombinator.com, find a post about AI, and summarize it"
):
print(chunk)
```## Browser agent observability
Both code run and API run provide advanced browser observability. To trace Index agent's actions and record browser session you simply need to initialize Laminar tracing before running the agent.
```python
from lmnr import LaminarLaminar.initialize(project_api_key="your_api_key")
```Then you will get full observability on the agent's actions synced with the browser session in the Laminar platform. Learn more about browser agent observability in the [documentation](https://docs.lmnr.ai/index-agent/tracing).
---
Made with ❤️ by the [Laminar team](https://lmnr.ai)