Skip to main content

Index - SOTA browser AI agent for autonomous task execution on the web

Project description

Static Badge X (formerly Twitter) Follow Static Badge

Index

Index is a state-of-the-art open-source browser agent that autonomously executes complex tasks on the web.

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

Index API

Index API is available as hosted api on the Laminar platform. Index API manages remote browser sessions and agent infrastructure. Index API is the best way to run AI browser automation in production. To get started, sign up and create project API key.

Install Laminar

pip install lmnr

Use Index via API

from lmnr import Laminar, AsyncLaminarClient
# you can also set LMNR_PROJECT_API_KEY environment variable

# Initialize tracing
Laminar.initialize(project_api_key="your_api_key")

# Initialize the client
client = AsyncLaminarClient(api_key="your_api_key")

async def main():

    # Run a task
    response = await client.agent.run(
        prompt="Navigate to news.ycombinator.com, find a post about AI, and summarize it"
    )

    # Print the result
    print(response.result)
    
if __name__ == "__main__":
    asyncio.run(main())

When you call Index via API, you automatically get full browser agent observability on Laminar platform. Learn more about Index browser observability.

Local Quick Start

Install dependencies

pip install lmnr-index

# Install playwright
playwright install chromium

Run the agent

import asyncio
from index import Agent, AnthropicProvider

async def main():
    # Initialize the LLM provider
    llm = AnthropicProvider(
            model="claude-3-7-sonnet-20250219",
            enable_thinking=True, 
            thinking_token_budget=2048)
    
    # Create an agent with the LLM
    agent = Agent(llm=llm)
    
    # Run the agent with a task
    output = await agent.run(
        prompt="Navigate to news.ycombinator.com, find a post about AI, and summarize it"
    )
    
    # Print the result
    print(output.result)
    
if __name__ == "__main__":
    asyncio.run(main())

Stream the agent's output

from index import Agent, AnthropicProvider

agent = Agent(llm=AnthropicProvider(model="claude-3-7-sonnet-20250219"))    

# Stream the agent's output
async for chunk in agent.run_stream(
    prompt="Navigate to news.ycombinator.com, find a post about AI, and summarize it"):
    print(chunk)

Enable browser agent observability

To trace Index agent's actions and record browser session you simply need to initialize Laminar tracing before running the agent.

from lmnr import Laminar

Laminar.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.

Index observability

Run with remote CDP url

import asyncio
from index import Agent, AnthropicProvider, BrowserConfig

async def main():
    # Configure browser to connect to an existing Chrome DevTools Protocol endpoint
    browser_config = BrowserConfig(
        cdp_url="<cdp_url>"
    )
    
    # Initialize the LLM provider
    llm = AnthropicProvider(model="claude-3-7-sonnet-20250219", enable_thinking=True, thinking_token_budget=2048)
    
    # Create an agent with the LLM and browser
    agent = Agent(llm=llm, browser_config=browser_config)
    
    # Run the agent with a task
    output = await agent.run(
        prompt="Navigate to news.ycombinator.com and find the top story"
    )
    
    # Print the result
    print(output.result)
    
if __name__ == "__main__":
    asyncio.run(main())

Customize browser window size

import asyncio
from index import Agent, AnthropicProvider, BrowserConfig

async def main():
    # Configure browser with custom viewport size
    browser_config = BrowserConfig(
        viewport_size={"width": 1200, "height": 900}
    )
    
    # Initialize the LLM provider
    llm = AnthropicProvider(model="claude-3-7-sonnet-20250219")
    
    # Create an agent with the LLM and browser
    agent = Agent(llm=llm, browser_config=browser_config)
    
    # Run the agent with a task
    output = await agent.run(
        "Navigate to a responsive website and capture how it looks in full HD resolution"
    )
    
    # Print the result
    print(output.result)
    
if __name__ == "__main__":
    asyncio.run(main())

Made with ❤️ by the Laminar team

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

lmnr_index-0.1.3.tar.gz (2.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lmnr_index-0.1.3-py3-none-any.whl (1.3 MB view details)

Uploaded Python 3

File details

Details for the file lmnr_index-0.1.3.tar.gz.

File metadata

  • Download URL: lmnr_index-0.1.3.tar.gz
  • Upload date:
  • Size: 2.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for lmnr_index-0.1.3.tar.gz
Algorithm Hash digest
SHA256 aa8c495f0836766c5966e76d7507d5748c75dd7b19ed709da5911f09f0b0ed92
MD5 1ffa63afef4e375551cf61a9791e7f5a
BLAKE2b-256 917085db3bf401e7166a1438ee4c966b6913a1a33f6710770ead0e284bfda783

See more details on using hashes here.

Provenance

The following attestation bundles were made for lmnr_index-0.1.3.tar.gz:

Publisher: publish.yml on lmnr-ai/index

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lmnr_index-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: lmnr_index-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for lmnr_index-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5e1d611064e9aba1e3fb2ce68a86f69cbde609b9ec8648aecb0b84357cf2cba0
MD5 aeec20362120bec5643fb145ef878c5c
BLAKE2b-256 2dde94c9308bb24f81a8c6bd07402af50609a17c1f9b2f559d0da8d1295cd76f

See more details on using hashes here.

Provenance

The following attestation bundles were made for lmnr_index-0.1.3-py3-none-any.whl:

Publisher: publish.yml on lmnr-ai/index

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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