### Install teapot CLI Source: https://github.com/akku1139/teapot/blob/main/README.md Install the teapot-coding-agent globally using npm. Requires Node.js 24+. ```sh npm install -g teapot-coding-agent ``` -------------------------------- ### Configure Multiple Providers Source: https://github.com/akku1139/teapot/blob/main/README.md Example configuration for defining multiple OpenAI-compatible providers and assigning them to specific agents. ```jsonc { "providers": { "openrouter": { "baseUrl": "https://openrouter.ai/api/v1", "apiKey": "sk-or-..." }, "local": { "baseUrl": "http://localhost:8080/v1", "apiKey": "llama.cpp" } }, "defaultProvider": "openrouter", "agents": [ { "id": "coder", "workspace": "~/proj", "model": "anthropic/claude-sonnet-4" }, { "id": "reviewer", "workspace": "~/proj", "provider": "local" } ] } ``` -------------------------------- ### GET /api/ws Source: https://github.com/akku1139/teapot/blob/main/README.md Connect to the live event stream. ```APIDOC ## WS /api/ws ### Description Establish a WebSocket connection to receive live event streams from the system. ### Method WS ### Endpoint /api/ws ``` -------------------------------- ### Manual Configuration File Source: https://github.com/akku1139/teapot/blob/main/README.md Define providers and agents manually in a JSON configuration file. Save this at ~/.config/teapot-coding-agent/config.json to skip the setup wizard. ```json { "providers": { "openrouter": { "baseUrl": "https://openrouter.ai/api/v1", "apiKey": "sk-or-your-key", "model": "anthropic/claude-sonnet-4" } }, "defaultProvider": "openrouter", "agents": [ { "id": "main", "workspace": "/home/you/my-project" } ] } ``` -------------------------------- ### GET /api/agents Source: https://github.com/akku1139/teapot/blob/main/README.md List all configured agents. ```APIDOC ## GET /api/agents ### Description Retrieve a list of all agents currently configured in the system. ### Method GET ### Endpoint /api/agents ``` -------------------------------- ### Agent Workspace Structure Source: https://github.com/akku1139/teapot/blob/main/README.md Example of how multiple agents are organized within their respective project directories. ```text ├─ agent: android ── ~/projects/android-app ├─ agent: kernel ── ~/projects/kernel └─ agent: web ── ~/projects/film-sims-web ``` -------------------------------- ### Session Log Format Source: https://github.com/akku1139/teapot/blob/main/README.md Example of the append-only JSONL format used for session logs. ```jsonl {"v":1,"id":"e1","type":"prompt","data":{"source":"user","text":"..."}} {"v":1,"id":"e2","type":"tool_call","data":{"callId":"…","name":"bash","argsRaw":"…"}} {"v":1,"id":"e3","type":"tool_result","data":{"callId":"…","ok":true,"durationMs":117}} {"v":1,"id":"e4","type":"message","data":{"role":"assistant","content":"…"}} ``` -------------------------------- ### GET /api/agents/:id/file Source: https://github.com/akku1139/teapot/blob/main/README.md Fetch the content of a file from an agent's workspace. ```APIDOC ## GET /api/agents/:id/file ### Description Read the text content of a file within the agent's workspace. ### Method GET ### Endpoint /api/agents/:id/file ### Parameters #### Query Parameters - **path** (string) - Required - The file path to fetch ``` -------------------------------- ### GET /api/agents/:id/events Source: https://github.com/akku1139/teapot/blob/main/README.md Retrieve event logs for a specific agent. ```APIDOC ## GET /api/agents/:id/events ### Description Fetch the event history for a specific agent. ### Method GET ### Endpoint /api/agents/:id/events ### Parameters #### Query Parameters - **limit** (integer) - Optional - Maximum number of events to return - **before** (string) - Optional - ID to paginate upward from ``` -------------------------------- ### Run teapot Source: https://github.com/akku1139/teapot/blob/main/README.md Launch the teapot agent and access the interface at http://localhost:7788. ```sh teapot ``` -------------------------------- ### Development Commands Source: https://github.com/akku1139/teapot/blob/main/README.md Common commands for building and testing the project from a local checkout. ```sh pnpm install pnpm dev # run TypeScript natively pnpm dev-web # Vite HMR (separate terminal) pnpm test # node --test pnpm build # tsc + vite build → dist/ + public/ ``` -------------------------------- ### Run Teapot with API Token and Network Configuration Source: https://github.com/akku1139/teapot/blob/main/README.md Use this command to expose Teapot on a specific host and port while enforcing authentication via an API token. ```sh TEAPOT_API_TOKEN=mysecret teapot --host 0.0.0.0 --port 7788 ``` -------------------------------- ### POST /api/agents Source: https://github.com/akku1139/teapot/blob/main/README.md Create a new agent instance. ```APIDOC ## POST /api/agents ### Description Create a new agent with the specified configuration. ### Method POST ### Endpoint /api/agents ### Request Body - **workspace** (string) - Required - The working directory for the agent - **id** (string) - Optional - Unique identifier for the agent - **provider** (string) - Optional - The provider to use - **model** (string) - Optional - The model to use - **start** (boolean) - Optional - Whether to start the agent immediately ``` -------------------------------- ### Define hook configuration structure Source: https://github.com/akku1139/teapot/blob/main/docs/hooks-design.md The configuration uses a JSONC format to define hooks for specific events, supporting matchers and command execution parameters. ```jsonc { "hooks": { "PreToolUse": [ { "matcher": "bash", // exact | a|b list | regex "hooks": [ { "type": "command", "command": "/opt/teapot/hooks/guard.sh", "timeout": 10, // seconds "async": false } // true = fire-and-forget ] } ], "PostToolUse": [ { "matcher": ".*", "hooks": [ ... ] } ], "UserPromptSubmit": [ ... ], "Stop": [ ... ], // round end (idle / error / done) "PreCompact": [ ... ], // can inject context before summarization "PostCompact": [ ... ], "SessionStart": [ ... ], "SessionEnd": [ ... ] } } ``` -------------------------------- ### HTTP API Endpoints Source: https://github.com/akku1139/teapot/blob/main/README.md List of available REST and WebSocket API routes for interacting with agents. ```text GET /api/agents list POST /api/agents create { workspace, id?, provider?, model?, start? } GET /api/agents/:id/events?limit=300 events ( ?before= pages upward ) GET /api/agents/:id/branches branch list GET /api/agents/:id/file?path= fetch text file PUT /api/agents/:id/file?path= save { content, baseContent? } (409 on conflict) GET /api/agents/:id/raw?path= raw media bytes GET /api/agents/:id/tree file tree POST /api/agents/:id/prompt send { text, start?, images?: [{url}] } → { promptId } POST /api/agents/:id/prompt/cancel withdraw { promptId } (409 once delivered) POST /api/agents/:id/goal { text?, status?, verify? } POST /api/agents/:id/start|stop|fork|load DELETE /api/agents/:id remove (logs kept) GET /api/metrics RSS / heap / loadavg WS /api/ws live event stream ``` -------------------------------- ### Verification Contract Workflow Source: https://github.com/akku1139/teapot/blob/main/README.md Conceptual flow for autonomous goal completion and independent audit verification. ```text goal: "Add account deletion to the auth module" verify: "npm test passes with zero failures / README documents the endpoint" ↓ on finish independent audit → approved ⇒ done · changes-required ⇒ gaps queued back to the worker ``` -------------------------------- ### Apply theme before first paint Source: https://github.com/akku1139/teapot/blob/main/frontend/index.html This IIFE should be placed in the document head to ensure the theme is applied before the page renders. It handles both automatic system preference detection and manual theme overrides. ```javascript (function () { try { var auto = localStorage.getItem("teapot.theme.auto") === "1"; var t; if (auto) { var prefersLight = matchMedia("(prefers-color-scheme: light)").matches; t = localStorage.getItem(prefersLight ? "teapot.theme.light" : "teapot.theme.dark"); } else { t = localStorage.getItem("teapot.theme"); } document.documentElement.dataset.theme = t || "dark"; } catch (e) { /* private mode etc — keep defaults */ } })(); ``` -------------------------------- ### POST /api/agents/:id/prompt Source: https://github.com/akku1139/teapot/blob/main/README.md Send a prompt to an agent. ```APIDOC ## POST /api/agents/:id/prompt ### Description Send a prompt to the specified agent to initiate a task. ### Method POST ### Endpoint /api/agents/:id/prompt ### Request Body - **text** (string) - Required - The prompt text - **start** (boolean) - Optional - Whether to start processing - **images** (array) - Optional - List of image objects with URLs ``` -------------------------------- ### Scheduled Task Configuration Source: https://github.com/akku1139/teapot/blob/main/README.md JSON configuration for defining automated tasks using cron syntax. ```json { "tasks": [{ "id": "nightly", "agent": "main", "schedule": "0 3 * * *", "prompt": "Check git status and test results, report anything broken" }] } ``` -------------------------------- ### PUT /api/agents/:id/file Source: https://github.com/akku1139/teapot/blob/main/README.md Save content to a file in an agent's workspace. ```APIDOC ## PUT /api/agents/:id/file ### Description Save content to a file. Returns 409 on conflict. ### Method PUT ### Endpoint /api/agents/:id/file ### Parameters #### Query Parameters - **path** (string) - Required - The file path to save ### Request Body - **content** (string) - Required - The new file content - **baseContent** (string) - Optional - The original content for conflict checking ``` -------------------------------- ### Gyaru Review Output Format Source: https://github.com/akku1139/teapot/blob/main/skills/gyaru-review/SKILL.md Standardized format for reporting findings during a code review. ```text - 💅 — → FIX NOW / fine as-is ``` -------------------------------- ### Define hook decision object Source: https://github.com/akku1139/teapot/blob/main/docs/hooks-design.md The decision object returned by hooks dictates whether an action is allowed or denied, with support for providing reasons and additional context. ```jsonc { "decision": "allow" | "deny", "reason": "...", // required with deny — SHOWN TO THE MODEL "systemMessage": "...", // operator-facing toast in the web UI "hookSpecificOutput": { // phase 2: "additionalContext": "...", // appended to the tool result "tool_input": { ... } // rewrite arguments before execution } } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.