Prompts
Managing Prompts
The Prompts page, who can change prompts, limits, and the prompt API.
Prompts are managed on the Prompts page in the dashboard and through the prompt endpoints of the API. The Prompts page lists every inline and GitHub prompt in the organization, shows which routers use each one, and flags GitHub files that failed to sync.
The Prompts page
The Prompts page opens from Prompts in the top navigation. Tiles across the top count the organization's prompts under Prompts, Inline, GitHub, Bound routers, Unused and Errored, where Bound routers counts the prompts bound to at least one router. The table lists one prompt per row with these columns, which the Columns menu shows or hides:
| Column | Shows |
|---|---|
| Name | The prompt name, or the file name of a GitHub prompt with its repository and path on hover. |
| Status | synced, pending or error for a GitHub prompt. |
| Tags | The labels on the prompt. A GitHub prompt shows its prompt repo's tags. |
| Bound to | The routers the prompt is bound to. |
| Updated | When the prompt last changed. |
The side rail offers built-in views, and any filtered list can be saved under My views with Save view:
| View | Lists |
|---|---|
| All prompts | Every prompt in the organization. |
| Inline | Inline prompts. |
| GitHub Managed | GitHub prompts. |
| Recently changed | Prompts changed in the last 7 days. |
| Sync errors | GitHub prompts whose last fetch failed. |
| Unused | Prompts bound to no router. |
The list can be filtered further:
| Filter | Values |
|---|---|
| Source | All, Inline or GitHub. |
| Status | Any, Synced, Pending or Error. |
| Bound to | Any, A router or Unbound. |
| GitHub repository | One connected prompt repo. |
| Tags | One or more tags. |
The New Prompt menu creates an inline prompt, connects a repository from a connected GitHub organization, connects a new GitHub organization, and opens Manage GitHub orgs. See Inline Prompt and GitHub Prompt.
Access
Every member of an organization can create, edit and delete inline prompts, connect and disconnect prompt repos, and track files. Connecting and disconnecting a GitHub organization requires an organization admin, because it grants Multi-Router access to that organization's repositories. Binding a prompt to a router is part of changing the router. API keys reach prompts through the scopes below.
| Scope | Allows |
|---|---|
prompts:read | Listing and reading prompts and their revisions. |
prompts:write | Creating and editing inline prompts. |
prompts:delete | Deleting inline prompts. |
prompt_repos:read | Listing and reading prompt repos and their files. |
prompt_repos:write | Connecting prompt repos and tracking files. |
prompt_repos:delete | Disconnecting prompt repos and untracking files. |
github:read | Listing GitHub connections. |
github:delete | Disconnecting GitHub organizations. |
Limits
Prompts and prompt repos have the following limits:
| Item | Limit |
|---|---|
| Prompt name | 80 characters |
| Revision title | 200 characters |
| Inline prompt content, text or chat | 128 KiB |
| Chat prompt messages | 64 |
| GitHub prompt file | 2 MiB, at the latest commit or pinned |
| Revisions returned by the API | The 100 most recent |
| Requests that check GitHub, per organization | 60 per minute |
| Prompt repo name | 80 characters |
| Prompt repos per organization | 200 |
| Tracked files per prompt repo | 1,000 |
| File paths per request | 100 |
| File path | 512 characters |
| Branch name | 250 characters |
Prompt API
The prompt endpoints cover inline prompts, GitHub prompts, prompt repos and GitHub connections:
| Endpoint | Description |
|---|---|
GET /v1/prompts | Lists prompts. |
POST /v1/prompts | Creates an inline prompt. |
GET /v1/prompts/{id} | Reads one prompt, including its body and variables. |
PATCH /v1/prompts/{id} | Changes an inline prompt, saving a new revision when the body changes. |
DELETE /v1/prompts/{id} | Deletes an inline prompt and its revisions. |
GET /v1/prompts/{id}/versions | Lists revisions or commits, newest first. |
GET /v1/prompts/{id}/versions/{version} | Reads one revision or commit, including its body. |
POST /v1/prompts/{id}/versions/{version}/restore | Makes an earlier inline revision current. |
GET /v1/prompts/{id}/routers | Lists the routers bound to the prompt. |
POST /v1/prompt-repos | Connects a repository and branch, and tracks files. |
GET /v1/prompt-repos | Lists prompt repos. |
GET /v1/prompt-repos/{id} | Reads one prompt repo. |
PATCH /v1/prompt-repos/{id} | Renames a prompt repo. |
DELETE /v1/prompt-repos/{id} | Disconnects a prompt repo. |
GET /v1/prompt-repos/{id}/files | Lists tracked files. |
POST /v1/prompt-repos/{id}/files | Tracks one more file. |
DELETE /v1/prompt-repos/{id}/files | Stops tracking the file named in the path query parameter. |
GET /v1/prompt-repos/{id}/commits | Lists the branch's commits, optionally for one file. |
GET /v1/github/connections | Lists connected GitHub organizations. |
GET /v1/github/connections/{login} | Reads one GitHub connection. |
DELETE /v1/github/connections/{login} | Disconnects a GitHub organization. |
Prompts, prompt repos and model groups also have tags endpoints. See Prompts in the API Reference for scopes, conditional writes and errors. GET /v1/prompts returns a page of prompts in data, with next_cursor and has_more for paging. It accepts these query parameters:
| Parameter | Description |
|---|---|
source | inline or github. |
type | text or chat. |
prompt_repo_id | Only the GitHub prompts of one prompt repo. |
limit | Prompts per page, from 1 to 200. The default is 50. |
cursor | The next_cursor of the previous page. |
A GitHub prompt read with GET /v1/prompts/{id} carries its repository details:
Prompts in Traffic
Traffic records the prompt and revision each request used. See Prompts in Traffic on the overview and Observability.