v0.1.0 · Apache 2.0

Search docs...

Architecture

How Récif components fit together — two-layer architecture, Kubernetes-native, evaluation-driven lifecycle.

4 min read

High-Level Overview

Récif separates governance (platform) from execution (agents). Agents are autonomous — they run independently with their own LLM, tools, and channels. Récif is the control tower that optionally watches, evaluates, and governs them.

Note

Key insight: Corail agents work standalone (direct REST/Slack/CLI access) OR through the Récif platform (dashboard, governance, eval). Same agent, two access paths, no code changes. SeeIntroduction — Two Ways to Use Réciffor details.

Architecture Overview

Component Breakdown

ComponentTechPortRole
Récif APIGo 1.22808065+ REST endpoints — agent CRUD, releases, eval, governance, feedback
OperatorGo, kubebuilder8081Watches Agent CRDs → reconciles Deployment + Service + ConfigMap
DashboardNext.js 143000Chat, agent management, governance scorecards, AI Radar
CorailPython 3.138000/8001Agent runtime — LLM, tools, memory, SSE streaming, evaluation
PostgreSQLpgvector5432Agent metadata, knowledge base vectors
MLflowPython5000Trace storage, evaluation metrics, experiment tracking
recif-stateGit repoImmutable release artifacts (YAML), GitOps
IstioEnvoymTLS, traffic splitting for canary, observability

Request Flow

What happens when a user sends a message:

Request Flow

Deployment Flow

What happens when you deploy an agent:

Deployment Flow

Evaluation-Driven Lifecycle

The core differentiator: no agent ships without proof.

Evaluation-Driven Lifecycle

14 MLflow Scorers: Safety, Relevance, Correctness, Completeness, Fluency, Equivalence, Summarization, Guidelines, ExpectationsGuidelines, RetrievalRelevance, RetrievalGroundedness, RetrievalSufficiency, ToolCallCorrectness, ToolCallEfficiency.

Namespace Layout

Namespace Layout

NamespaceWhat RunsPurpose
recif-systemAPI, Operator, DashboardPlatform control plane
team-defaultAgent pods (one per agent)Default team namespace
team-{name}Agent pods for teamMulti-tenant isolation
mlflow-systemMLflow tracking serverEvaluation & traces
istio-systemIstiod, gatewaysService mesh (optional)

GitOps: Release Artifacts

Every agent version is an immutable YAML committed to Git:

recif-state/
├── agents/
   ├── code-reviewer/
   ├── current.yaml active version
   └── releases/
       ├── v1.yaml immutable
       ├── v2.yaml
       └── v3.yaml
   └── hr-assistant/
       ├── current.yaml
       └── releases/
           ├── v1.yaml
           ├── v2.yaml status: rejected
           └── v3.yaml status: pending_eval

Each release artifact contains: model config, system prompt, tools, skills, governance rules, checksum, changelog. Full audit trail via Git history.

Example Agent CRD

apiVersion: agents.recif.dev/v1
kind: Agent
metadata:
  name: hr-assistant
  namespace: team-default
spec:
  name: "HR Assistant"
  framework: corail
  strategy: agent-react
  channel: rest
  modelType: vertex-ai
  modelId: gemini-2.5-flash
  gcpServiceAccount: "hr-agent@my-project.iam.gserviceaccount.com"
  systemPrompt: "You are an HR assistant helping employees..."
  tools:
    - web-search
    - hr-knowledge-lookup
  knowledgeBases:
    - hr-policies
  skills:
    - agui-render
  storage: postgresql
  replicas: 2
  evalSampleRate: 10
  judgeModel: "openai:/gpt-4o-mini"

Technology Stack

LayerComponentTechnologyWhy
PlatformAPI ServerGo 1.22 + chiPerformance, K8s native
DashboardNext.js 14 + ReactModern frontend, SSR
Operatorkubebuilder (Go)Native K8s operator pattern
RuntimeCorailPython 3.13AI/ML ecosystem compatibility
Models7 providersRegistry pattern, lazy loading
ChannelsREST, Slack, CLI, WSMulti-channel by design
InfraDatabasePostgreSQL + pgvectorReliable, vector search
EvalMLflow GenAIIndustry standard, 14 scorers
MeshIstio + EnvoymTLS, canary traffic splitting
PackagingHelm 3Standard K8s packaging
IngestionMarée (Python)Docling, pluggable pipeline