LangChain tool for Ceki — real Chrome sessions for AI agents
Project description
langchain-ceki
LangChain toolkit for Ceki — drive a real Chrome session from your LangChain agent. Structural tools that wrap ceki-sdk.
Install
pip install langchain-ceki
Use
import os
os.environ["CEKI_API_KEY"] = "your_key_here" # or export it
from langchain_ceki import CekiToolkit
from langchain.agents import AgentExecutor, create_tool_calling_agent
toolkit = CekiToolkit(default_rent={"schedule_id": 4242, "mode": "main"})
tools = toolkit.get_tools()
agent = create_tool_calling_agent(llm, tools, prompt)
executor = AgentExecutor(agent=agent, tools=tools)
try:
result = await executor.ainvoke({
"input": (
"Open https://my-app.example.com, log in with the saved profile, "
"and return the dashboard's headline number."
),
})
print(result["output"])
finally:
await toolkit.aclose() # ALWAYS — leaving sessions open burns credit
Tools
| Tool | What it does |
|---|---|
ceki_rent_browser |
Rent a real Chrome session and return its session_id. Pass it to every other tool. |
ceki_navigate |
Open a URL. |
ceki_click |
Click at viewport coordinates. Mouse jitter ON by default; human=False to teleport. |
ceki_type |
Type text into the focused element. Cadence + jitter ON by default. |
ceki_scroll |
Scroll by delta_y pixels with easing. |
ceki_screenshot |
PNG of the current viewport as base64. |
ceki_snapshot |
Screenshot + drained chat messages from the provider. |
ceki_chat_send |
Send a chat message to the human provider (e.g. ask for a captcha code). |
ceki_stop |
End the session. Always call when done. |
Both sync (tool._run / tool.invoke) and async (tool._arun / tool.ainvoke) paths are supported. The sync path is safe to call from a synchronous LangChain runnable; calling it from inside an already-running event loop raises with a clear hint to switch to ainvoke.
Get an API key at ceki.me.
Use responsibly
Use only on sites you own or have authorization to operate on.
License
MIT.
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_ceki-0.1.0.tar.gz.
File metadata
- Download URL: langchain_ceki-0.1.0.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd8a532323e5758f22036db6ab15c5b19decb7f9e73c3d75fecd8772a5c1d6ef
|
|
| MD5 |
ca3de6825a4f3ca02fe9c7fa2d0845d5
|
|
| BLAKE2b-256 |
ab694d05135dea4c4cf8f7d9edb1dd2a7608c6b7ec6d8d4c7510bde7b3f805fd
|
File details
Details for the file langchain_ceki-0.1.0-py3-none-any.whl.
File metadata
- Download URL: langchain_ceki-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.2 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 |
e935517899452c62ba51020ece2066e53375f21f13c3065816863c0d1714a47e
|
|
| MD5 |
62ec30ae350feb0fd592d9267c568a74
|
|
| BLAKE2b-256 |
e9c03c47c74e7990ab4c549abcaea01a4f895b856f1169135d0a684dd6d83f1f
|