From identity at Layer 1 to intelligence analytics at Layer 10. Every layer is versioned, rollback-safe, and deployed to 3 targets.
Kynetra Prime is a 10-layer operating system for intelligence. Layers 1–4 handle identity, perception, memory, and orchestration. Layers 5–7 handle execution, action, and reflection. Layers 8–10 handle learning, governance, and analytics.
The brain that routes, decomposes, plans, and coordinates. Every inbound request passes through a 7-step processing pipeline before any regent acts.
async process(input: RawInput): Promise<PrimeResult> {
const context = await perception.process(input); // L2
const domains = await router.classify(context);
const policy = await policyGate.preCheck(context); // block if restricted
const subtasks = await decomposer.decompose(context);
const plan = await planner.plan(subtasks, context);
const results = await execute(plan, context); // Head Regents
await reflect(plan, results, context); // L7 learning loop
return synthesize(results);
}
| Mode | Trigger | Behaviour |
|---|---|---|
| Reactive | Simple single-domain task | Direct route to Head Regent — no decomposition |
| Deliberative | Complex multi-step task | Full decomposition + planning + sequential execution |
| Collaborative | Cross-domain task | Multiple Head Regents coordinated with dependency graph |
| Supervisory | High-risk or low-confidence | Human-in-loop approval gates at critical points |
| Score | Action |
|---|---|
| > 80 | Auto-execute |
| 50–80 | Human review required |
| 30–50 | Escalate to supervisor regent |
| < 10 | Block execution entirely |
Four-tier memory system. Each type has a distinct storage backend optimised for its access pattern.
| Memory Type | Store | Content | Retention |
|---|---|---|---|
| Semantic | pgvector / Pinecone | Policies, SOPs, domain rules, product knowledge | Indefinite, version-controlled |
| Episodic | Postgres (append-only) | Past task executions, outcomes, human corrections, lessons | 12 months rolling, compressed |
| Procedural | Document store + Git | Versioned workflow steps, success rates, execution times | All versions retained |
| Strategic | Postgres + analytics | Cross-domain patterns, evidence sets, confidence scores | Until invalidated |
All external interactions are ring-classified before execution. Ring 3+ requires explicit approval. Every action is circuit-breakered and audit-logged.
| Ring | Category | Examples | Approval |
|---|---|---|---|
| Ring 1 | Read | crm.read · analytics.query · order.fetch | None |
| Ring 2 | Low Write | task.create · note.add · tag.update | None |
| Ring 3 | Critical | order.modify · pricing.update · campaign.launch | Required |
| Ring 4 | Restricted | payment.process · refund.issue · contract.sign | Required + audit |
Five distinct learning paths, each improving a different aspect of regent behaviour. Controlled by 4 approval modes — nothing is auto-deployed above low risk.
| Mode | What Changes | Risk | Auto-Approve |
|---|---|---|---|
| Conservative | Retrieval ranking, memory summaries | Low | Yes |
| Managed | Prompts, policies, tool ordering | Medium | No — requires review |
| Supervised | Workflow templates, skill logic | Medium-High | No — sandbox pass + review |
| Restricted | Model routing, autonomy expansion | High | No — executive approval |
Every learning candidate is: pattern-mined from reflections → hypothesis generated → sandbox-evaluated → approval-gated → version-released → 24h monitored with auto-rollback.
Provider-agnostic model routing. Claude is primary. OpenRouter handles cost optimisation and provider redundancy. Selection is automatic based on task complexity score.
// Intelligent routing logic selectModel(complexity: TaskComplexity, constraints: Constraints) { if (complexity.requiresReasoning && complexity.score > 80) return models.primary; // Claude Opus if (complexity.score > 40) return models.fast; // Claude Sonnet if (constraints.costOptimize) return models.fallback; // OpenRouter return models.efficient; // Claude Haiku }
Kynetra Prime runs identically on 3 deployment targets. Application code is unchanged — only the DeploymentTarget adapter swaps.
// Platform-agnostic deployment interface interface DeploymentTarget { name: "vercel-supabase" | "cloudflare" | "docker"; db: DatabaseAdapter; // Supabase | D1 | Postgres storage: StorageAdapter; // Supabase | R2 | MinIO events: EventBusAdapter; // Inngest | Queues | NATS workflows: WorkflowAdapter; // Inngest | Workers | Temporal cache: CacheAdapter; // Supabase | KV | Redis vectorStore: VectorStoreAdapter; // pgvector | Vectorize | pgvector }
Every regent in the 334-strong fleet is registered with an immutable identity record. Version-controlled, domain-scoped, risk-tiered.
interface RegentIdentity {
regentId: string; // "X2-007"
name: string; // "ReturnProcessorRegent"
domain: DomainType;
headRegent: string;
roleType: "specialist" | "head" | "orchestrator";
capabilities: Capability[];
toolPermissions: ToolPermission[];
learningScope: LearningScope;
riskTier: "low" | "medium" | "high";
version: string; // semver "1.3.0"
createdAt: Date;
lastUpdatedAt: Date;
}