| `http` | platform API | The bulk of the catalog (`actions/catalog.py`): posts, comments, votes, follows, messages, projects and their virtual filesystem, gists, bookmarks, polls, notifications, news, uploads, and admin endpoints. Sent over the `PlatformClient` with the user's auth. |
| `fetch` | web | `fetch_url` reads a web page; `http_request` makes any-method HTTP calls to external APIs. Both carry an SSRF guard and size caps. |
| `rsearch` | external web | `rsearch` (web/image search), `rsearch_answer` (web-grounded AI answer), `rsearch_chat` (direct AI chat), `rsearch_describe_image` (vision). They call an external public service, not this platform, gated by `devii_rsearch_enabled` (URL via `devii_rsearch_url`). |
| `cost` | accounting | `usage_quota` reports the owner's 24h quota usage as a percentage (no money, available to everyone); `cost_stats` and `ai_usage` report full USD detail and are admin-only. |
| `customization` | look and behaviour | The `customize_*` tools persist per-owner CSS and JavaScript scoped to a page type or the whole site. |
| `virtual_tool` | user-defined tools | The `tool_*` tools let a user invent new Devii tools in natural language; each stored tool re-runs Devii on its prompt. |
| `client` | the browser | `get_page_context`, `run_js`, navigation, highlights, toasts, and `open_terminal` - run in the user's own browser; `run_js` is gated by `devii_allow_eval`. |
| `container` | Docker (admin) | The `container_*` tools manage supervised container instances on the shared `ppy` image - admin only. |
## Complete action reference
Every action in the catalog, grouped by handler. Mutating platform calls and irreversible actions
(deletes, visibility/read-only flips, destructive container commands) additionally pass through the
| `project_delete_file` | auth | Delete a file or directory recursively: project owner, or any project when admin (soft delete, confirmation required). |
The `admin_*` endpoints are role-enforced by the platform itself (they return 403 to non-admins), so
they carry `requires_auth` rather than `requires_admin`; only the read-only aggregate tools
(`site_analytics`, `ai_usage`) and the financial `cost_stats` are withheld at the schema level.
### Web and external APIs (`fetch`, `rsearch`)
| Tool | Scope | What it does |
|---|---|---|
| `fetch_url` | public | Fetch a web page and return its readable text content. |
| `http_request` | auth | Make an arbitrary HTTP request (GET/POST/PUT/PATCH/DELETE/HEAD/OPTIONS) to any external API, with custom headers and a JSON, form, or raw body, returning the full response. |
| `rsearch` | public | Search the public web and images via the external rsearch aggregator. |
| `rsearch_answer` | public | Get an AI answer to a question, grounded in fresh web search. |
| `rsearch_chat` | public | Send a prompt to the external rsearch AI for a direct answer. |
| `rsearch_describe_image` | public | Describe a public image URL using the external vision model. |
`http_request` is the general HTTP client. It sends any method with a `json`, `form`, or raw `body`,
sets the JSON Content-Type automatically, and returns the response status, headers, and content
(non-2xx is returned, not raised, so API errors are readable). Use it to integrate with external
REST/JSON APIs directly. It must be called as a first-class tool: a user-defined tool cannot perform
network I/O itself, so wrapping the call in a self-invoking tool would recurse and hit the
self-evaluation depth limit. Both `fetch` tools refuse private and loopback addresses (SSRF guard,
overridable with `DEVII_FETCH_ALLOW_PRIVATE`) and cap the response size.
### Reasoning and memory (`agentic`)
| Tool | Scope | What it does |
|---|---|---|
| `plan` | public | Record the structured execution plan for the request (required first call). |
| `reflect` | public | Record a reflection and persist it as a reusable lesson. |
| `recall` | public | Retrieve relevant lessons learned from past requests. |
| `forget_lessons` | public | Permanently delete learned lessons from private memory. |
| `verify` | public | Confirm a change took effect, satisfying the verification gate. |
| `delegate` | public | Spawn a focused sub-agent for a self-contained sub-task. |
| `eval` | public | Run a prompt through a fresh Devii sub-agent and return its result. |
`delegate` and `eval` run a nested `react_loop` under a contextvar depth guard (`MAX_EVAL_DEPTH`), so
self-evaluation cannot recurse without bound.
### Autonomous tasks (`task`)
| Tool | Scope | What it does |
|---|---|---|
| `create_task` | public | Queue a prompt to run autonomously on a schedule with full tool access. |
| `list_tasks` | public | List queued tasks and their schedules and last results. |
| `get_task` | public | Get a single task including its full last result. |
| `update_task` | public | Update a task's prompt, label, enabled state, or schedule. |
| `delete_task` | public | Delete a queued task. |
| `run_task_now` | public | Trigger a task to execute immediately on the next scheduler tick. |
### Accounting and large results (`cost`, `chunks`)
| Tool | Scope | What it does |
|---|---|---|
| `usage_quota` | public | Report the current user's AI usage as a percentage of their 24h quota. |
| `cost_stats` | admin | Report token usage and full USD cost statistics for the session. |
| `read_more` | public | Read the next part of a previously truncated tool result. |
### Customization (`customization`)
| Tool | Scope | What it does |
|---|---|---|
| `customize_list` | public | List the user's saved CSS/JS customizations. |
| `customize_get` | public | Read the full saved CSS or JS code for one scope. |
| `customize_set_css` | public | Permanently save custom CSS for a page type or the whole site (confirmation required). |
| `customize_set_js` | public | Permanently save custom JavaScript for a page type or the whole site (confirmation required). |
| `customize_reset` | public | Delete saved customizations, restoring the defaults (confirmation required). |
| `customize_set_enabled` | auth | Show or suppress customizations without deleting them. |
### User-defined tools (`virtual_tool`)
| Tool | Scope | What it does |
|---|---|---|
| `tool_create` | public | Create a new user-defined tool that runs a stored prompt when called. |
| `tool_list` | public | List the user's defined tools with their descriptions and status. |
| `tool_get` | public | Read a user-defined tool's full prompt and settings. |
| `tool_update` | public | Update a user-defined tool's description, prompt, input hint, or enabled state. |
| `tool_delete` | public | Delete a user-defined tool. |
A user-defined tool is a stored prompt that re-runs Devii; the actual work is still performed by the
built-in tools the prompt tells Devii to call (for example `http_request` for an API or the
`project_*` tools for files). It cannot do network or file I/O on its own, and it must not be designed
to keep calling itself.
### On-screen avatar (`avatar`, web only)
| Tool | Scope | What it does |
|---|---|---|
| `avatar_show` | public | Show devii (the character) on screen. |
| `avatar_hide` | public | Hide devii with a goodbye animation. |
| `avatar_speak` | public | Show a line of text in devii's speech balloon. |
| `avatar_list_animations` | public | List every animation the current character supports. |
| `avatar_play_animation` | public | Play a specific named animation. |
| `avatar_random_animation` | public | Play a random non-idle animation to react expressively. |
| `avatar_move_to` | public | Walk devii to a pixel position on screen. |
| `avatar_gesture_at` | public | Make devii gesture toward a pixel position. |
| `avatar_get_viewport` | public | Get the screen size and devii's current position. |
| `avatar_stop` | public | Stop all queued animations and speech immediately. |
| `avatar_list_characters` | public | List every character devii can appear as. |
| `avatar_switch_character` | public | Change which character devii is rendered as. |
### Browser control (`client`, web only)
| Tool | Scope | What it does |
|---|---|---|
| `get_page_context` | public | Read the user's current page: URL, title, viewport, scroll, selection, headings, auth state, and page type. |
| `run_js` | public | Execute JavaScript in the user's browser and return its result (gated by `devii_allow_eval`). |
| `highlight_element` | public | Highlight an element with an outline and optional callout, for live tutorials. |
| `clear_highlights` | public | Remove all highlights and callouts. |
| `show_toast` | public | Show a brief on-screen message. |
| `scroll_to_element` | public | Smoothly scroll an element into view. |
| `navigate_to` | public | Send the user's browser to a URL. |
| `reload_page` | public | Refresh the user's current page. |
| `open_terminal` | admin | Open a floating interactive terminal attached to a running container instance. |
### Containers (`container`, admin only)
| Tool | Scope | What it does |
|---|---|---|
| `container_list_instances` | admin | List a project's container instances and their status. |
| `container_create_instance` | admin | Create and start an instance on the shared `ppy` image with the project files at `/app`. |
| `container_instance_action` | admin | Control an instance: start, stop, restart, pause, resume, delete, or sync (delete is confirmed). |
| `container_logs` | admin | Read the recent logs of a running instance. |
| `container_exec` | admin | Run a one-shot command inside a running instance (destructive commands are confirmed). |
| `container_stats` | admin | Get aggregated resource and runtime statistics for an instance. |
| `container_schedule` | admin | Schedule a start or stop (cron, interval, or one-time). |