An AI sidekick that can take multi‑step actions with tools, check its own work against success criteria, and present a friendly Gradio chat UI.
- Runtime & orchestration: [LangGraph] worker ↔ evaluator loop with tool routing
- UI: Gradio chat (+ success criteria box)
- Tools out of the box:
- Playwright browser toolkit (navigate, scrape, interact)
- File management (sandboxed read/write)
- Push notifications (Pushover)
- Web search (Google Serper)
- Wikipedia lookup
- Python REPL
- Generate images (Pollinations)
Create a .env file in the project root:
OPENAI_API_KEY=sk-...
SERPER_API_KEY=...
PUSHOVER_TOKEN=...
PUSHOVER_USER=...
SERPER_API_KEY=...
LANGSMITH_TRACING="true"
LANGSMITH_ENDPOINT="https://api.smith.langchain.com"
LANGSMITH_API_KEY=...
LANGSMITH_PROJECT=...
Using uv:
uv sync
uv run playwright installFrom the project root:
# Run the entry from inside /code
cd code
uv run python app.py
# or: uv run ./app.py (Windows PowerShell)- Worker LLM receives your request + success criteria and can call tools.
- Evaluator LLM checks the last answer against the criteria.
- The graph routes
worker → tools → worker → evaluatoruntil:- success criteria are met, or
- the assistant asks a clear question, or
- a safety turn/recursion limit is reached.
The worker prompt includes a short “tool policy” so it actually uses the tools instead of hallucinating results.
