Recipe Registry API
HTTP API endpoints for recipe registry server
Recipe Registry API
HTTP API endpoints for the recipe registry server started via praisonai serve registry.
Base URL + Playground
# Start registry server
praisonai serve registry --port 7777Base URL: http://127.0.0.1:7777
Endpoints
GET /healthz
Health check endpoint.
noneNo parameters required.
curl http://127.0.0.1:7777/healthzimport requests
response = requests.get("http://127.0.0.1:7777/healthz")
health = response.json()
print(f"Status: {health['status']}")
print(f"Auth required: {health['auth_required']}")const response = await fetch("http://127.0.0.1:7777/healthz");
const health = await response.json();
console.log(`Status: ${health.status}`);Response:
{
"status": "healthy",
"auth_required": true,
"read_only": false,
"version": "1.0.0"
}GET /v1/recipes
List all recipes in the registry.
stringFilter by tags (comma-separated)
integerMaximum number of results (default: 50)
integerOffset for pagination (default: 0)
curl http://127.0.0.1:7777/v1/recipesimport requests
response = requests.get("http://127.0.0.1:7777/v1/recipes")
data = response.json()
for recipe in data["recipes"]:
print(f"- {recipe['name']} v{recipe['version']}")const response = await fetch("http://127.0.0.1:7777/v1/recipes");
const { recipes } = await response.json();
recipes.forEach(r => console.log(`- ${r.name} v${r.version}`));Response:
{
"recipes": [
{
"name": "my-agent",
"version": "1.0.0",
"description": "A helpful AI agent",
"tags": ["agent", "assistant"]
}
],
"total": 1
}GET /v1/recipes/{name}
Get information about a specific recipe.
stringRecipe name
curl http://127.0.0.1:7777/v1/recipes/my-agentimport requests
response = requests.get("http://127.0.0.1:7777/v1/recipes/my-agent")
info = response.json()
print(f"Latest: {info['latest']}")
print(f"Versions: {list(info['versions'].keys())}")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/{name}/{version}
Get information about a specific version.
stringRecipe name
stringVersion string (e.g., “1.0.0”)
curl http://127.0.0.1:7777/v1/recipes/my-agent/1.0.0import requests
response = requests.get("http://127.0.0.1:7777/v1/recipes/my-agent/1.0.0")
version_info = response.json()
print(f"Checksum: {version_info['checksum']}")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/{name}/{version}/download
Download a recipe bundle.
stringRecipe name
stringVersion string
stringETag for conditional download
curl -o my-agent-1.0.0.praison \
http://127.0.0.1:7777/v1/recipes/my-agent/1.0.0/downloadimport requests
response = requests.get(
"http://127.0.0.1:7777/v1/recipes/my-agent/1.0.0/download"
)
with open("my-agent-1.0.0.praison", "wb") as f:
f.write(response.content)Response: Binary .praison bundle file
Headers:
Content-Type: application/gzipETag: "sha256:abc123..."
POST /v1/recipes/{name}/{version}
Publish a recipe bundle. Requires authentication if token is configured.
stringRecipe name
stringVersion string
stringBearer token for authentication
stringBase64-encoded .praison bundle
booleanOverwrite 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\"}"import requests
import base64
import os
# Read and encode bundle
with open("my-agent-1.0.0.praison", "rb") as f:
bundle_b64 = base64.b64encode(f.read()).decode()
response = requests.post(
"http://127.0.0.1:7777/v1/recipes/my-agent/1.0.0",
headers={
"Authorization": f"Bearer {os.environ['PRAISONAI_REGISTRY_TOKEN']}"
},
json={"bundle": bundle_b64}
)
result = response.json()
print(f"Published: {result['name']}@{result['version']}")Response:
{
"ok": true,
"name": "my-agent",
"version": "1.0.0",
"checksum": "sha256:abc123...",
"published_at": "2024-01-15T10:30:00Z"
}DELETE /v1/recipes/{name}/{version}
Delete a recipe version. Requires authentication if token is configured.
stringRecipe name
stringVersion string
stringBearer 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"import requests
import os
response = requests.delete(
"http://127.0.0.1:7777/v1/recipes/my-agent/1.0.0",
headers={
"Authorization": f"Bearer {os.environ['PRAISONAI_REGISTRY_TOKEN']}"
}
)
print(f"Deleted: {response.status_code == 200}")Response:
{
"ok": true,
"message": "Deleted my-agent@1.0.0"
}GET /v1/search
Search recipes by query.
stringSearch query (matches name, description, tags)
curl "http://127.0.0.1:7777/v1/search?q=agent"import requests
response = requests.get(
"http://127.0.0.1:7777/v1/search",
params={"q": "agent"}
)
results = response.json()
for r in results:
print(f"- {r['name']}: {r['description']}")const response = await fetch("http://127.0.0.1:7777/v1/search?q=agent");
const results = await response.json();
results.forEach(r => console.log(`- ${r.name}: ${r.description}`));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 serve registry --token $PRAISONAI_REGISTRY_TOKENHeader format:
Authorization: Bearer <token>Protected endpoints:
POST /v1/recipes/{name}/{version}– PublishDELETE /v1/recipes/{name}/{version}– Delete
Unprotected endpoints:
GET /healthz– Health checkGET /v1/recipes– ListGET /v1/recipes/{name}– InfoGET /v1/recipes/{name}/{version}– Version infoGET /v1/recipes/{name}/{version}/download– DownloadGET /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 ./recipesRelated
- Recipe Registry – Python API reference
- Recipe Registry Server – Server deployment
- Recipe CLI – CLI commands