Prompts
Prompts
Prompts are reusable instruction snippets attached to an agent. Each prompt belongs to one agent within your organization and is indexed for semantic search.
All prompt endpoints require the prompts.manage capability.
List Prompts
GET /orgs/{organizationId}/promptsQuery Parameters:
agentId(optional) — filter to prompts for a single agentorderBy(optional) — sort fieldlimit(optional) — results per page (default:20)cursor(optional) — pagination offset
Response:
{
"items": [
{
"promptId": "prompt-123",
"organizationId": "org-456",
"agentId": "agent-789",
"creatorUserId": "user-101",
"name": "Support triage",
"description": "Classify and route inbound support messages",
"instructions": "You are a triage assistant...",
"visibility": "private",
"createdAt": "2024-01-01T00:00:00Z",
"updatedAt": "2024-01-01T00:00:00Z"
}
],
"totalRows": 1,
"offset": 0
}Create Prompt
POST /orgs/{organizationId}/promptsRequired Fields:
agentId— the agent this prompt belongs to (must exist)name— prompt namedescription— short descriptioninstructions— the prompt body
Request Body:
{
"agentId": "agent-789",
"name": "Support triage",
"description": "Classify and route inbound support messages",
"instructions": "You are a triage assistant..."
}Response: the created Prompt object (with promptId).
Creating a prompt generates a semantic embedding from its name, description, and
instructions so it can be found via search. The embedding is stored server-side and
is not returned in API responses.
Get Prompt
GET /orgs/{organizationId}/prompts/{id}Returns a single prompt.
Update Prompt
PUT /orgs/{organizationId}/prompts/{id}Updates the prompt’s fields and regenerates its embedding.
Request Body:
{
"name": "Support triage v2",
"description": "Updated routing rules",
"instructions": "You are a triage assistant..."
}Delete Prompt
DELETE /orgs/{organizationId}/prompts/{id}Permanently deletes the prompt.
Search Prompts
GET /orgs/{organizationId}/prompts/searchSemantic search across an agent’s prompts.
Query Parameters:
q(required) — the search queryagentId(required) — the agent whose prompts to searchlimit(optional) — results (default:5)offset(optional) — offset (default:0)
Response:
{
"items": [
{
"promptId": "prompt-123",
"organizationId": "org-456",
"agentId": "agent-789",
"name": "Support triage",
"description": "Classify and route inbound support messages",
"instructions": "You are a triage assistant...",
"similarity": 0.87
}
]
}Each result includes a similarity score (higher is closer). Embeddings are omitted
from search results.