v0.1.0 · Apache 2.0

Search docs...

API Endpoints

Complete reference for all Recif REST API endpoints.

7 min read

Overview

The Recif API is served at /api/v1 and uses JSON for request/response bodies. All endpoints (except /healthz) require authentication when AUTH_ENABLED=true.

Base URL: http://localhost:8080/api/v1

Health

MethodPathDescription
GET/healthzLiveness probe (no auth required)
GET/api/v1/healthAuthenticated health check

Agents

CRUD

MethodPathDescription
POST/api/v1/agentsCreate a new agent
GET/api/v1/agentsList all agents for the current team
GET/api/v1/agents/{id}Get agent details by ID
DELETE/api/v1/agents/{id}Delete an agent
GET/api/v1/agents/{id}/versionsList agent configuration versions
PATCH/api/v1/agents/{id}/statusUpdate agent status

Example: Create an agent

curl -X POST http://localhost:8080/api/v1/agents \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Support Agent",
    "framework": "adk",
    "model_type": "openai",
    "model_id": "gpt-4",
    "system_prompt": "You are a helpful support agent.",
    "strategy": "agent-react",
    "channel": "rest"
  }'

Response:

{
  "data": {
    "id": "ag_01J...",
    "name": "Support Agent",
    "slug": "support-agent",
    "framework": "adk",
    "model_type": "openai",
    "model_id": "gpt-4",
    "status": "created",
    "created_at": "2026-04-03T10:00:00Z"
  }
}

Agent Config

MethodPathDescription
PATCH/api/v1/agents/{id}/configUpdate agent configuration (partial)
PUT/api/v1/agents/{id}/skillsReplace agent skills list

Agent Deployment

MethodPathDescription
POST/api/v1/agents/{id}/deployDeploy agent to Kubernetes
POST/api/v1/agents/{id}/stopStop agent (scale to 0)
POST/api/v1/agents/{id}/restartRestart agent
GET/api/v1/agents/{id}/eventsGet deployment events (SSE stream)

Canary Deployments

MethodPathDescription
POST/api/v1/agents/{id}/canaryStart a canary deployment
GET/api/v1/agents/{id}/canaryGet canary status
POST/api/v1/agents/{id}/canary/promotePromote canary to stable
POST/api/v1/agents/{id}/canary/rollbackRoll back canary

Chat and Conversations

MethodPathDescription
POST/api/v1/agents/{id}/chatSend a chat message (sync response)
POST/api/v1/agents/{id}/chat/streamSend a chat message (SSE streaming)
GET/api/v1/agents/{id}/conversationsList conversations
GET/api/v1/agents/{id}/conversations/{cid}Get conversation detail
DELETE/api/v1/agents/{id}/conversations/{cid}Delete a conversation
GET/api/v1/agents/{id}/conversations/{cid}/statusGet generation status

Example: Chat with streaming

curl -X POST http://localhost:8080/api/v1/agents/ag_01J.../chat/stream \
  -H "Content-Type: application/json" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "What is the capital of France?",
    "conversation_id": "conv_01J..."
  }'

Response (SSE stream):

data: {"type":"token","content":"The"}
 
data: {"type":"token","content":" capital"}
 
data: {"type":"token","content":" of"}
 
data: {"type":"token","content":" France"}
 
data: {"type":"token","content":" is"}
 
data: {"type":"token","content":" Paris"}
 
data: {"type":"token","content":"."}
 
data: {"type":"done","content":"The capital of France is Paris."}

Suggestions

MethodPathDescription
GET/api/v1/agents/{id}/suggestionsGet follow-up suggestions

Agent Memory

MethodPathDescription
GET/api/v1/agents/{id}/memoryList stored memories
POST/api/v1/agents/{id}/memoryStore a new memory
GET/api/v1/agents/{id}/memory/statusGet memory backend status
POST/api/v1/agents/{id}/memory/searchSearch memories by query
DELETE/api/v1/agents/{id}/memory/{mid}Delete a memory

Releases

MethodPathDescription
POST/api/v1/agents/{id}/releasesCreate a new release
GET/api/v1/agents/{id}/releasesList all releases
GET/api/v1/agents/{id}/releases/diffDiff two releases (?from=X&to=Y)
GET/api/v1/agents/{id}/releases/{version}Get a specific release
POST/api/v1/agents/{id}/releases/{version}/deployDeploy (rollback to) a specific version
POST/api/v1/agents/{id}/releases/{version}/eval-resultReceive evaluation callback

Evaluations

MethodPathDescription
GET/api/v1/agents/{agent_id}/evaluations/compareCompare two eval runs (?a=X&b=Y)
GET/api/v1/agents/{agent_id}/evaluationsList evaluation runs
POST/api/v1/agents/{agent_id}/evaluationsTrigger a new evaluation
GET/api/v1/agents/{agent_id}/evaluations/{run_id}Get evaluation run details
GET/api/v1/agents/{agent_id}/datasetsList golden datasets
POST/api/v1/agents/{agent_id}/datasetsCreate a golden dataset

Example: Trigger an evaluation

curl -X POST http://localhost:8080/api/v1/agents/ag_01J.../evaluations \
  -H "Content-Type: application/json" \
  -d '{
    "dataset_name": "golden-qa",
    "version": "1"
  }'

Response:

{
  "data": {
    "id": "ev_01J...",
    "agent_id": "ag_01J...",
    "agent_version": "1",
    "dataset_name": "golden-qa",
    "status": "completed",
    "provider": "mlflow",
    "aggregate_scores": {
      "safety/mean": 0.95,
      "relevance_to_query/mean": 0.88,
      "correctness/mean": 0.82
    },
    "total_cases": 5,
    "passed_cases": 4,
    "started_at": "2026-04-03T10:00:00Z",
    "completed_at": "2026-04-03T10:00:45Z"
  }
}

Feedback

MethodPathDescription
POST/api/v1/feedbackSubmit feedback on an agent trace

Webhooks

MethodPathDescription
POST/api/v1/webhooks/flaggerFlagger quality gate webhook

Knowledge Bases

MethodPathDescription
GET/api/v1/knowledge-basesList all knowledge bases
POST/api/v1/knowledge-basesCreate a knowledge base
GET/api/v1/knowledge-bases/{id}Get knowledge base details
GET/api/v1/knowledge-bases/{id}/documentsList documents in a KB
POST/api/v1/knowledge-bases/{id}/ingestIngest documents into a KB
POST/api/v1/knowledge-bases/{id}/searchSearch a knowledge base

Integrations

MethodPathDescription
GET/api/v1/integrations/typesList available integration types
GET/api/v1/integrationsList configured integrations
POST/api/v1/integrationsCreate an integration
GET/api/v1/integrations/{id}Get integration details
DELETE/api/v1/integrations/{id}Delete an integration
POST/api/v1/integrations/{id}/testTest integration connection

Governance

Scorecards

MethodPathDescription
GET/api/v1/governance/scorecardsList scorecards for all agents
GET/api/v1/governance/scorecards/{agent_id}Get scorecard for a specific agent

Policies

MethodPathDescription
GET/api/v1/governance/policiesList all guardrail policies
POST/api/v1/governance/policiesCreate a guardrail policy
PUT/api/v1/governance/policies/{id}Update a guardrail policy
DELETE/api/v1/governance/policies/{id}Delete a guardrail policy

Risk Profiles

MethodPathDescription
GET/api/v1/risk-profilesList available risk profiles

AI Radar

MethodPathDescription
GET/api/v1/radarMonitoring overview for all agents
GET/api/v1/radar/alertsList all active alerts
GET/api/v1/radar/{agent_id}Monitoring detail for a specific agent
GET/api/v1/radar/{agent_id}/alertsAlerts for a specific agent

Skills

MethodPathDescription
GET/api/v1/skillsList all skills
POST/api/v1/skillsCreate a skill
POST/api/v1/skills/importImport a skill
PUT/api/v1/skills/{id}Update a skill
DELETE/api/v1/skills/{id}Delete a skill

Scaffold

MethodPathDescription
POST/api/v1/scaffoldGenerate agent project scaffold

Teams

MethodPathDescription
GET/api/v1/teamsList all teams
POST/api/v1/teamsCreate a team
GET/api/v1/teams/{teamId}Get team details
DELETE/api/v1/teams/{teamId}Delete a team
POST/api/v1/teams/{teamId}/membersAdd a member to a team
DELETE/api/v1/teams/{teamId}/members/{userId}Remove a member
PATCH/api/v1/teams/{teamId}/members/{userId}Update member role

Platform

MethodPathDescription
GET/api/v1/platform/configGet platform configuration
PUT/api/v1/platform/configUpdate platform configuration
POST/api/v1/platform/config/testTest platform connection settings
POST/api/v1/platform/syncSync platform state (git-state sync)

Admin

MethodPathDescription
GET/api/v1/admin/agentsList all agents (cross-team, admin only)

Error Format

All errors follow a consistent format:

{
  "error": "Not Found",
  "message": "Agent not found",
  "path": "/api/v1/agents/ag_invalid"
}
HTTP StatusMeaning
200Success
201Created
400Bad request (invalid JSON, missing fields)
401Unauthorized (missing or invalid token)
404Resource not found
412Precondition failed (Flagger quality gate)
500Internal server error
503Service unavailable (K8s not connected)