Metadata-Version: 2.4
Name: agent_lens_core
Version: 0.1.1
Summary: Seamlessly Integrating AI with the Web
License-File: LICENSE
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.11
Requires-Dist: beautifulsoup4>=4.12.3
Requires-Dist: httpx>=0.27.2
Requires-Dist: langchain-anthropic>=0.3.1
Requires-Dist: langchain-fireworks>=0.2.5
Requires-Dist: langchain-google-genai>=2.0.8
Requires-Dist: langchain-openai>=0.2.14
Requires-Dist: langchain>=0.3.14
Requires-Dist: maincontentextractor>=0.0.4
Requires-Dist: playwright>=1.49.0
Requires-Dist: posthog>=3.7.0
Requires-Dist: pydantic>=2.10.4
Requires-Dist: python-dotenv>=1.0.1
Requires-Dist: requests>=2.32.3
Provides-Extra: dev
Requires-Dist: build>=1.2.2; extra == 'dev'
Requires-Dist: hatch>=1.13.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.24.0; extra == 'dev'
Requires-Dist: pytest>=8.3.3; extra == 'dev'
Requires-Dist: tokencost>=0.1.16; extra == 'dev'
Description-Content-Type: text/markdown

<img src="./static/agent-lens.png" alt="Agent Lens Logo" width="full"/>

<br/>

[![Documentation](https://img.shields.io/badge/Documentation-📕-blue)](https://docs.agent-lens.com)
[![Twitter Follow](https://img.shields.io/twitter/follow/agent_lens?style=social)](https://x.com/agent_lens)

Make websites accessible for AI agents 🤖.

Agent lens is the easiest way to connect your AI agents with the browser.

To learn more about the library, check out the [documentation 📕](https://docs.agent-lens.com).

# Quick start

With pip:

```bash
pip install agent_lens_core
```

(optional) install playwright:

```bash
playwright install
```

Spin up your agent:

```python
from langchain_openai import ChatOpenAI
from agent_lens_core import Agent
import asyncio

async def main():
    agent = Agent(
        task="Find a one-way flight from Bali to Oman on 12 January 2025 on Google Flights. Return me the cheapest option.",
        llm=ChatOpenAI(model="gpt-4o"),
    )
    result = await agent.run()
    print(result)

asyncio.run(main())
```

And don't forget to add your API keys to your `.env` file.

```bash
OPENAI_API_KEY=
```

For other settings, models, and more, check out the [documentation 📕](https://docs.agent-lens.com).

# Demo

Prompt: Find flights on kayak.com from Zurich to Beijing from 25.12.2024 to 02.02.2025.

![flight search 8x 10fps](https://github.com/user-attachments/assets/ea605d4a-90e6-481e-a569-f0e0db7e6390)

<br/><br/>

## More examples

For more examples see the [examples](examples) folder

# Contributing

Contributions are welcome! Feel free to open issues for bugs or feature requests.

## Local Setup

To learn more about the library, check out the [local setup 📕](https://docs.agent-lens.com/development/local-setup).

---

<div align="center">
  Made with ❤️ in Zurich and San Francisco
</div>
