$ show nottelabs/notte
Notte is a full-stack web AI agent framework and browser automation SDK. The implementation is a multi-package Python monorepo: notte-core provides shared domain models, actions, error hierarchies, telemetry, and configuration; notte-browser implements Playwright/Patchright browser control, DOM snapshotting, scraping pipelines, and form-filling heuristics; notte-agent contains the LLM-driven agent loop, deterministic fallback, and workflow execution; notte-llm wraps LiteLLM with structured completions, retries, and a file-based prompt library; notte-sdk is the client for the hosted Notte cloud API with remote sessions, agents, vaults, personas, and serverless functions; notte-integrations adds notifiers and third-party CDP session providers. Primary entry points are `NotteClient` for cloud usage, `NotteSession` for local browser automation, and `Agent`/`AgentFallback` for autonomous and hybrid scripted-agent workflows.
The LLM identified 5 files worth highlighting for reuse:
Detects and fills form fields across 20+ field types using a large set of heuristic CSS selectors, regex fallbacks, and conflict resolution for name and address fields. This is a practical, domain-independent browser-automation component that could be extracted for any Playwright-based form-filling project.
Places clickable labels on screenshots by analyzing local color uniformity, scoring candidate placements, and falling back across positions. The algorithm is reusable for any tool that needs to overlay annotations or bounding-box labels on images.
Wraps LiteLLM completions into structured Pydantic outputs, resolving JSON-schema $refs, converting oneOf to anyOf, and applying provider-specific schema fixes for Gemini/OpenAI. Its retry, fallback, and error-classification logic is a reusable pattern for reliable LLM integrations.
Masks URLs in markdown before sending content to an LLM and restores them afterward, including traversal of nested Pydantic fields. This token-budget optimization is a non-obvious, reusable pattern for any LLM pipeline that must preserve link data while reducing context size.
Converts typed action dictionaries into BaseAction instances using a registry-based dispatch with backward-compatible aliases. It demonstrates a clean, extensible pattern for type-safe command parsing and serialization across an action hierarchy.