CrewAI toolkit for Ceki — real Chrome sessions for AI agents with persistent profiles across runs
Project description
crewai-ceki
CrewAI toolkit for Ceki — drive a real Chrome session from your CrewAI agent.
Killer combo. CrewAI's structured planning + Ceki's profile export = browser sessions that remember themselves across runs. Log in once, your crew walks straight into the dashboard on the next run — no cookies in your code, no second login.
Install
pip install crewai-ceki
The squat alias ceki-crewai is reserved by the same project and depends on crewai-ceki — both resolve to the same symbols.
Architecture
Variant C — structural toolkit. Eleven crewai.tools.BaseTool subclasses that the CrewAI agent's own LLM plans across:
| Tool | What it does |
|---|---|
ceki_rent_browser |
Rent a real Chrome session and return its session_id. |
ceki_navigate |
Open a URL. |
ceki_click |
Click at viewport coordinates. Mouse jitter ON by default. |
ceki_type |
Type into the focused element. Cadence + jitter ON by default. |
ceki_scroll |
Scroll by delta_y pixels. |
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 (captcha / OTP). |
ceki_stop |
End the session — always call this when done. |
ceki_export_profile |
Killer: export cookies/storage/fingerprint to disk. |
ceki_restore_profile |
Killer: restore a saved profile into a fresh rent. |
There is no server-side NL endpoint and no LLM lives inside this package — your CrewAI agent's own model does the planning.
Quick start
import os
os.environ["CEKI_API_KEY"] = "your_ceki_key" # https://ceki.me dashboard
from crewai import Agent, Task, Crew
from crewai_ceki import CekiCrewaiToolkit
toolkit = CekiCrewaiToolkit(default_rent={"schedule_id": 4242})
browser_agent = Agent(
role="Web Operator",
goal="Drive the rented browser to complete the task.",
backstory=(
"You operate a real Chrome session via the ceki_* tools. After a "
"successful login, ALWAYS call ceki_export_profile so future runs "
"can skip the login. On a fresh rent for a site you previously "
"logged into, ALWAYS try ceki_restore_profile BEFORE navigating."
),
tools=toolkit.get_tools(),
)
task = Task(
description="Open https://example.com and report the page title.",
expected_output="The page title as a string.",
agent=browser_agent,
)
try:
Crew(agents=[browser_agent], tasks=[task]).kickoff()
finally:
toolkit.close()
The killer combo — persistent profiles
Tell your agent in its backstory:
After a successful login, always call ceki_export_profile.
On a fresh rent for a previously-logged-in site, always call
ceki_restore_profile before navigating.
That is the entire setup. Now every login the crew performs is durable:
# Run A — crew logs into your.example.com, then:
ceki_export_profile(session_id, profile_name="your-example")
# → JSON written to ~/.cache/ceki-crewai/profiles/your-example.json
# Process restarts. The file survives.
# Run B — fresh rent on a new browser:
ceki_restore_profile(session_id, profile_name="your-example")
# → cookies, localStorage, sessionStorage, fingerprint all restored
ceki_navigate(session_id, "https://your.example.com/dashboard")
# → already authenticated
By default profiles live under ~/.cache/ceki-crewai/profiles/. Override with:
from pathlib import Path
toolkit = CekiCrewaiToolkit(
default_rent={"schedule_id": 4242},
profile_dir=Path("/var/lib/myapp/ceki-profiles"),
)
Or override via the CEKI_PROFILE_DIR environment variable. If you'd rather keep the JSON in your own store, pass it via the payload argument to either tool and the toolkit skips the disk read/write.
See examples/persistent_session.py for an end-to-end runnable demo.
Use responsibly
Use only on sites you own or have authorization to operate on (your own apps, your own dashboards, public data within site Terms of Service, accessibility audits you're responsible for).
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 crewai_ceki-0.1.0.tar.gz.
File metadata
- Download URL: crewai_ceki-0.1.0.tar.gz
- Upload date:
- Size: 15.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
59a3e8a9680fd0fe358f3081856cbae9d8f75974f5ec813bde118dd2d83423e4
|
|
| MD5 |
265bb9ac4397960ef3eefaef0c3c82b2
|
|
| BLAKE2b-256 |
277b60fe236fbc13c44105ea563c3e99f84db888fea7e94b9c5603940c850842
|
File details
Details for the file crewai_ceki-0.1.0-py3-none-any.whl.
File metadata
- Download URL: crewai_ceki-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.3 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 |
4510d971b8addd71f256250754f261e756ef6d858a6425cfe4ef52a320e10299
|
|
| MD5 |
806a20e478db6e30cac5f80d96f87188
|
|
| BLAKE2b-256 |
38177d47e903e42a5ebe0d15052d5c39b7f18c4335717f80e0e0f370c1fb508d
|