Recipe Registry API
HTTP API endpoints for the recipe registry server started via praisonai registry serve.
Base URL + Playground
# Start registry server
praisonai registry serve --port 7777
Base URL: http://127.0.0.1:7777
Endpoints
GET /healthz
Health check endpoint.
curl http://127.0.0.1:7777/healthz
Response:
{
"status": "healthy",
"auth_required": true,
"read_only": false,
"version": "1.0.0"
}
GET /v1/recipes
List all recipes in the registry.
Filter by tags (comma-separated)
Maximum number of results (default: 50)
Offset for pagination (default: 0)
curl http://127.0.0.1:7777/v1/recipes
Response:
{
"recipes": [
{
"name": "my-agent",
"version": "1.0.0",
"description": "A helpful AI agent",
"tags": ["agent", "assistant"]
}
],
"total": 1
}
GET /v1/recipes/
Get information about a specific recipe.
curl http://127.0.0.1:7777/v1/recipes/my-agent
Response:
{
"name": "my-agent",
"latest": "1.0.0",
"versions": {
"1.0.0": {
"checksum": "sha256:abc123...",
"published_at": "2024-01-15T10:30:00Z"
}
}
}
GET /v1/recipes//
Get information about a specific version.
Version string (e.g., “1.0.0”)
curl http://127.0.0.1:7777/v1/recipes/my-agent/1.0.0
Response:
{
"name": "my-agent",
"version": "1.0.0",
"checksum": "sha256:abc123...",
"published_at": "2024-01-15T10:30:00Z",
"manifest": {
"description": "A helpful AI agent",
"tags": ["agent", "assistant"],
"author": "praison"
}
}
GET /v1/recipes///download
Download a recipe bundle.
ETag for conditional download
curl -o my-agent-1.0.0.praison \
http://127.0.0.1:7777/v1/recipes/my-agent/1.0.0/download
Response: Binary .praison bundle file
Headers:
Content-Type: application/gzip
ETag: "sha256:abc123..."
POST /v1/recipes//
Publish a recipe bundle. Requires authentication if token is configured.
Bearer token for authentication
Base64-encoded .praison bundle
Overwrite existing version (default: false)
# Encode bundle as base64
BUNDLE=$(base64 -i my-agent-1.0.0.praison)
curl -X POST http://127.0.0.1:7777/v1/recipes/my-agent/1.0.0 \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $PRAISONAI_REGISTRY_TOKEN" \
-d "{\"bundle\": \"$BUNDLE\"}"
Response:
{
"ok": true,
"name": "my-agent",
"version": "1.0.0",
"checksum": "sha256:abc123...",
"published_at": "2024-01-15T10:30:00Z"
}
DELETE /v1/recipes//
Delete a recipe version. Requires authentication if token is configured.
Bearer token for authentication
curl -X DELETE http://127.0.0.1:7777/v1/recipes/my-agent/1.0.0 \
-H "Authorization: Bearer $PRAISONAI_REGISTRY_TOKEN"
Response:
GET /v1/search
Search recipes by query.
Search query (matches name, description, tags)
curl "http://127.0.0.1:7777/v1/search?q=agent"
Response:
[
{
"name": "my-agent",
"version": "1.0.0",
"description": "A helpful AI agent",
"tags": ["agent", "assistant"]
}
]
Authentication
When the server is started with --token, write operations require authentication:
# Start server with token
praisonai registry serve --token $PRAISONAI_REGISTRY_TOKEN
Header format:
Authorization: Bearer <token>
Protected endpoints:
POST /v1/recipes/{name}/{version} - Publish
DELETE /v1/recipes/{name}/{version} - Delete
Unprotected endpoints:
GET /healthz - Health check
GET /v1/recipes - List
GET /v1/recipes/{name} - Info
GET /v1/recipes/{name}/{version} - Version info
GET /v1/recipes/{name}/{version}/download - Download
GET /v1/search - Search
Errors
| Status | Description |
|---|
| 200 | Success |
| 201 | Created (publish) |
| 304 | Not Modified (ETag match) |
| 400 | Invalid request |
| 401 | Unauthorized (missing/invalid token) |
| 404 | Recipe or version not found |
| 409 | Conflict (version exists, use force) |
| 500 | Server error |
Error Response:
{
"error": "Recipe not found: my-agent",
"code": 404
}
CLI Equivalent
# List recipes
praisonai recipe list --registry http://localhost:7777
# Search recipes
praisonai recipe search agent --registry http://localhost:7777
# Publish recipe
praisonai recipe publish ./my-recipe \
--registry http://localhost:7777 \
--token $TOKEN
# Pull recipe
praisonai recipe pull my-agent \
--registry http://localhost:7777 \
-o ./recipes