LangChain integration for the Yutori API — n1 browser control, browser automation, web research, and monitoring
Project description
langchain-yutori
LangChain integration for the Yutori API — n1 browser control, browser automation, deep research, and recurring web monitors.
Installation
pip install langchain-yutori
This package is implemented as a standalone LangChain integration package. It uses the official yutori
Python SDK for Browsing, Research, and Scouts, and wraps n1 as a LangChain chat model.
Installing langchain-yutori also installs the yutori Python package, plus the yutori CLI.
Components
| Class | Type | Description |
|---|---|---|
ChatYutoriN1 |
ChatModel |
Yutori n1 browser navigation model (OpenAI-compatible) |
YutoriBrowsingTool |
BaseTool |
Execute web browsing tasks on a remote browser |
YutoriResearchTool |
BaseTool |
Perform deep and broad research using 100+ tools |
YutoriScoutingTool |
BaseTool |
Create and manage recurring web monitors with Scouts |
Authentication
Recommended:
yutori auth login
This opens your browser and saves your API key locally for the SDK and this package to use.
Or set your API key via environment variable:
export YUTORI_API_KEY="yt-..."
Or pass it directly to each class.
Get your API key at platform.yutori.com.
Usage
ChatYutoriN1
n1 is Yutori's pixels-to-actions LLM for browser navigation. It accepts screenshots and returns browser actions (click, type, scroll, etc.).
from langchain_yutori import ChatYutoriN1
from langchain_core.messages import HumanMessage
from yutori.n1 import aplaywright_screenshot_to_data_url
llm = ChatYutoriN1() # uses YUTORI_API_KEY env var
image_url = await aplaywright_screenshot_to_data_url(page)
message = HumanMessage(content=[
{"type": "image_url", "image_url": {"url": image_url}},
{"type": "text", "text": "What is the next action to complete the task: 'Add item to cart'?"},
])
response = llm.invoke([message])
# Returns tool_calls with browser actions
With Playwright, use the SDK helper so the image is captured with the SDK's default JPEG capture settings and encoded to a WebP data URL optimized for n1.
ChatYutoriN1 accepts image URLs but does not capture or preprocess screenshots itself, so if you
are using Playwright you should call the SDK helper directly before passing the image into LangChain.
If you execute returned browser actions yourself, n1 coordinates are normalized to a 1000x1000
space. Convert them back into viewport pixels with the SDK helper:
from yutori.n1 import denormalize_coordinates
coords = [500, 250]
x, y = denormalize_coordinates(coords, width=1280, height=800)
await page.mouse.click(x, y)
For the full n1 input requirements and action schema, see the Yutori docs: https://docs.yutori.com
YutoriBrowsingTool
Runs a browser automation agent on Yutori's cloud browser. The tool creates the task and polls until it completes (up to 20 minutes by default; tasks typically take 5–15 minutes).
from langchain_yutori import YutoriBrowsingTool
tool = YutoriBrowsingTool()
result = tool.run({
"task": "Find the price of the MacBook Pro 14-inch M4",
"start_url": "https://www.apple.com",
})
print(result) # JSON string with task result
In a LangChain agent:
from langchain_openai import ChatOpenAI
from langchain.agents import create_tool_calling_agent, AgentExecutor
from langchain_core.prompts import ChatPromptTemplate
from langchain_yutori import YutoriBrowsingTool
tools = [YutoriBrowsingTool()]
llm = ChatOpenAI(model="gpt-4o")
prompt = ChatPromptTemplate.from_messages([
("system", "You are a helpful assistant with web browsing capabilities."),
("human", "{input}"),
("placeholder", "{agent_scratchpad}"),
])
agent = create_tool_calling_agent(llm, tools, prompt)
executor = AgentExecutor(agent=agent, tools=tools)
executor.invoke({"input": "What's the current price of AAPL on Yahoo Finance?"})
YutoriResearchTool
Performs deep and broad research using Yutori's research agent (100+ MCP tools). Creates the task and polls until complete.
from langchain_yutori import YutoriResearchTool
tool = YutoriResearchTool()
result = tool.run({
"query": "What are the top 5 AI coding assistants in 2026 and how do their pricing models compare?",
"user_location": "San Francisco, CA, US",
})
print(result) # JSON string with research report
YutoriScoutingTool
Manages Yutori Scouts — recurring web monitors that run on a schedule and surface findings.
from langchain_yutori import YutoriScoutingTool
tool = YutoriScoutingTool()
# Create a scout (runs daily by default)
result = tool.run({
"action": "create",
"query": "Monitor Hacker News for posts about browser automation agents",
"output_interval": 3600, # hourly
})
# List all scouts
scouts = tool.run({"action": "list"})
# Get updates from a specific scout
updates = tool.run({
"action": "get_updates",
"scout_id": "abc123...",
"limit": 10,
})
# Pause / resume / delete
tool.run({"action": "pause", "scout_id": "abc123..."})
tool.run({"action": "resume", "scout_id": "abc123..."})
tool.run({"action": "delete", "scout_id": "abc123..."})
Configuration
Browsing and Research tools accept poll_interval (seconds between status checks, default 60, minimum 60) and timeout (max wait seconds, default 1200):
tool = YutoriBrowsingTool(
api_key="yt-...",
poll_interval=10.0,
timeout=300.0,
)
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file langchain_yutori-0.1.0.tar.gz.
File metadata
- Download URL: langchain_yutori-0.1.0.tar.gz
- Upload date:
- Size: 136.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d73600f164951efcc245729a13a2e2e80055d51d131607b2f73bd88d2cdaecc
|
|
| MD5 |
a0261e0dfeec0425a546f10c51a48739
|
|
| BLAKE2b-256 |
2bcf57bd5fd6beba78d2b6b650e83469d0ce888d68533f2fc3e4a07596c4ab5e
|
Provenance
The following attestation bundles were made for langchain_yutori-0.1.0.tar.gz:
Publisher:
publish-langchain-yutori.yml on yutori-ai/langchain-yutori
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
langchain_yutori-0.1.0.tar.gz -
Subject digest:
1d73600f164951efcc245729a13a2e2e80055d51d131607b2f73bd88d2cdaecc - Sigstore transparency entry: 1323872561
- Sigstore integration time:
-
Permalink:
yutori-ai/langchain-yutori@1b3d78497faf62057fcf5a2066439c8b83ab50df -
Branch / Tag:
refs/tags/langchain-yutori/v0.1.0 - Owner: https://github.com/yutori-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-langchain-yutori.yml@1b3d78497faf62057fcf5a2066439c8b83ab50df -
Trigger Event:
push
-
Statement type:
File details
Details for the file langchain_yutori-0.1.0-py3-none-any.whl.
File metadata
- Download URL: langchain_yutori-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e5748913708328bd16a52bf4a32847edd9b8fba9d69af8ec6ea97a9bd7564db9
|
|
| MD5 |
b33e1e7d55cf8a30a7d427a80cefa44f
|
|
| BLAKE2b-256 |
1b7f25fb37dc3a1708371c2c3f3c44c4fbb264cdbb9beb4df85e5a470b404d80
|
Provenance
The following attestation bundles were made for langchain_yutori-0.1.0-py3-none-any.whl:
Publisher:
publish-langchain-yutori.yml on yutori-ai/langchain-yutori
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
langchain_yutori-0.1.0-py3-none-any.whl -
Subject digest:
e5748913708328bd16a52bf4a32847edd9b8fba9d69af8ec6ea97a9bd7564db9 - Sigstore transparency entry: 1323872656
- Sigstore integration time:
-
Permalink:
yutori-ai/langchain-yutori@1b3d78497faf62057fcf5a2066439c8b83ab50df -
Branch / Tag:
refs/tags/langchain-yutori/v0.1.0 - Owner: https://github.com/yutori-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-langchain-yutori.yml@1b3d78497faf62057fcf5a2066439c8b83ab50df -
Trigger Event:
push
-
Statement type: