Self-Evolving AI Execution Runtime

Software that learns from
every execution

Oris is a Rust framework for supervised, bounded, closed-loop software improvement. Capture signals. Generate mutations. Validate. Promote. Reuse. Reduce reasoning over time.

crates.io docs.rs coverage version MIT
23
Library Crates
185K
Lines of Rust
295
Unit Tests
K1–K5
Kernel Phases
8
Evolution Stages
50+
Feature Flags
Why Oris

Systems that improve themselves

Most AI systems execute tasks without learning from them. Oris closes the loop — every execution is an opportunity to improve.

📡

Capture Real Signals

Collect actionable signals from compiler failures, test regressions, panics, and runtime outcomes — not synthetic benchmarks.

🧪

Safe Mutation Sandbox

Generate candidate patches from successful patterns, executed in OS-level isolated child processes before touching production.

Two-Phase Validation

Static analysis gates block bad mutations cheaply before the LLM critic runs — fast rejection first, expensive evaluation second.

♻️

Confidence-Aware Reuse

Proven solutions become durable genes with confidence scores. Future runs replay them — fewer LLM calls every cycle.

🔒

Supervised & Bounded

Fail-closed policy enforcement. No autonomous promotion without gate passage. Every decision is recorded and auditable.

🌐

Cross-Node Gene Sharing

Publish and fetch genes via the Oris Evolution Network with Ed25519-signed envelopes and federated queries.

How It Works

The 8-Stage Self-Evolution Loop

Every improvement follows a deterministic, auditable pipeline from signal intake to a reusable gene asset.

Stage 01
🔍

Detect

Collect actionable signals from compiler diagnostics, test failures, panics, and runtime outcomes.

Stage 02
🎯

Select

Choose the best candidate gene or strategy from the gene pool using confidence scores and task-class matching.

Stage 03
🧬

Mutate

Generate candidate patches derived from prior successful patterns and gene history — not random mutation.

Stage 04
📦

Execute

Run mutations inside a sandboxed child process with OS-level resource limits and budget enforcement.

Stage 05

Validate

Verify correctness through static analysis gates and configurable safety policies before any quality scoring.

Stage 06
📊

Evaluate

Two-phase quality scoring: static analysis score first, LLM critic only on candidates that pass the gate.

Stage 07
💾

Solidify

Promote successful mutations into durable, reusable genes in the SQLite gene store with full metadata.

Stage 08
♻️

Reuse

Replay proven genes with confidence tracking. Stale confidence triggers re-mutation automatically.

North-Star Outcome: Task → Detect → Replay if trusted → Mutate only when needed → Validate → Capture → Reuse → reduce reasoning over time
Quick Start

Up and running in minutes

Add the crate, set your LLM API key, and run the canonical evolution scenario.

# Cargo.toml
[dependencies]
oris-runtime = { version = "*", features = ["full-evolution-experimental"] }

# Minimal setup — no evolution, just graphs + agents
# oris-runtime = { version = "*" }
# Set your LLM provider key
export OPENAI_API_KEY="sk-..."        # OpenAI
export ANTHROPIC_API_KEY="sk-ant-..." # Anthropic (alternative)

cargo build
# Start the HTTP execution server
cargo run -p oris-runtime   --example execution_server   --features "sqlite-persistence,execution-server"

# Defaults:
#   Listen:  http://127.0.0.1:8080
#   DB:      in-memory SQLite

# Override via env vars:
export ORIS_SERVER_ADDR=0.0.0.0:8080
export ORIS_SQLITE_DB=oris.db
export ORIS_RUNTIME_BACKEND=sqlite  # or postgres
# Run the canonical evolution scenario
cargo run -p evo_oris_repo

# Run with observable artifacts
bash scripts/evo_first_run.sh
#   → target/evo_first_run/summary.json
#   → target/evo_first_run/run.log

# Focused example binaries
cargo run -p evo_oris_repo --bin intake_webhook_demo
cargo run -p evo_oris_repo --bin confidence_lifecycle_demo
cargo run -p evo_oris_repo --bin network_exchange
# Submit a graph job to the execution server
curl -X POST http://127.0.0.1:8080/jobs   -H "Content-Type: application/json"   -d '{"graph_name":"my_graph","input":{"task":"example"}}'

# Response: {"job_id":"abc123", "status":"pending"}

# Poll status
curl http://127.0.0.1:8080/jobs/abc123

# Stream SSE events in real-time
curl -N http://127.0.0.1:8080/jobs/abc123/stream
Core Concepts

Understand the internals

Deep dives on the key abstractions — from the deterministic kernel to the plugin system.

Gene & Capsule — Evolution Assets

A Gene is a proven, reusable solution to a class of problem. When a mutation succeeds, it is promoted and stored in the SQLite gene store with a confidence score, task-class label, and usage history. A Capsule bundles multiple related Genes for cross-node sharing via the Experience Repository.

// Gene lifecycle — from signal to reuse
let signal = IssueSignal {
    source: SignalSource::CompilerDiagnostic,
    message: "cannot borrow `x` as mutable".into(),
    task_class: "borrow_checker_fix".into(),
};

let result = evokernel.process(signal).await?;

match result {
    EvolutionResult::Promoted(gene) => {
        // gene.confidence starts at 1.0, decays over time
        // next identical signal replays this gene directly
        println!("Promoted gene {} (conf={:.2})", gene.id, gene.confidence);
    }
    EvolutionResult::Replayed(gene) => {
        println!("Replayed trusted gene {}", gene.id);
    }
    EvolutionResult::Rejected => println!("No valid mutation found"),
}

Confidence decays over time. When it falls below the configured threshold, the gene triggers a fresh mutation cycle instead of blind replay — ensuring stale knowledge is refreshed.

Deterministic Kernel — Phases K1 through K5

The oris-kernel crate provides a deterministic execution substrate: every action is recorded in an append-only event log, enabling replay, branch exploration, and zero-data-loss crash recovery.

K1

ExecutionStep contract + effect capture

Freeze the ExecutionStep API. All side effects pass through EffectSink. Determinism guard enforces reproducible output.

K2

Canonical log store + replay cursor

Append-only EventStore records every action. ReplayCursor walks the log deterministically; ReplayVerifier detects any divergence.

K3

Interrupt object + suspension state machine

Interrupts are first-class objects driving a KernelInterrupt state machine. Suspended runs resume deterministically through replay — no lost state.

K4

Plugin categories + execution sandbox

9 plugin categories with determinism declarations, resource limits, version negotiation. External crates extend the runtime without forking.

K5

Lease-based finalization + context-aware scheduler

Zero-data-loss recovery via lease manager. Weighted priority dispatch, backpressure signaling, and circuit breaker pattern built-in.

EvolutionPipeline — Stage Internals

The pipeline in oris-evolution/pipeline.rs orchestrates all 8 stages. Each stage is a composable trait object. The pipeline short-circuits on rejection and emits per-stage telemetry at every boundary.

// Compose a custom pipeline
let pipeline = EvolutionPipeline::builder()
    .detector(CompilerSignalDetector::new())
    .selector(ConfidenceSelector::with_threshold(0.7))
    .mutator(LlmMutator::with_model("gpt-4o"))
    .sandbox(ProcessSandbox::with_limits(ResourceLimits::default()))
    .validator(StaticAnalysisValidator::new())
    .evaluator(TwoPhaseEvaluator::new(static_gate, llm_critic))
    .solidifier(SqliteGeneStore::open("genes.db")?)
    .build()?;

let report = pipeline.run(signal).await?;
// report.stage_durations — per-stage timing
// report.rejection_reason — why it failed (if any)

If a trusted gene exists with confidence >= threshold, the pipeline enters replay mode — Mutate, Execute, Validate, and Evaluate are all skipped. This is how reasoning cost reduces over time.

Mutation Sandbox — OS-level Isolation

The oris-sandbox crate runs candidate mutations in a controlled child process. Failed or runaway mutations cannot affect the host runtime. Enable fine-grained limits with the resource-limits feature flag.

let limits = ResourceLimits {
    max_memory_bytes: 256 * 1024 * 1024,  // 256 MB
    max_cpu_seconds:  30,
    max_output_bytes: 10 * 1024 * 1024,   // 10 MB stdout
    network_access:   false,
};

let sandbox = ProcessSandbox::new(limits);
let outcome = sandbox.execute(&candidate_patch).await?;

match outcome {
    SandboxOutcome::Success(output)   => /* forward to validator */
    SandboxOutcome::Timeout           => /* penalize gene confidence */
    SandboxOutcome::MemoryExceeded    => /* reject immediately */
    SandboxOutcome::CompileError(err) => /* feed back to mutator */
}

Governor & Policies

The oris-governor crate enforces promotion, cooldown, and revocation policies — preventing runaway mutation cycles and ensuring no gene is promoted without meeting quality thresholds.

let policy = PromotionPolicy::builder()
    .min_confidence(0.75)
    .min_passes(2)                // must pass validator twice
    .cooldown(Duration::hours(1)) // prevent promotion thrash
    .max_revocations(3)           // archive after 3 regressions
    .build();

let governor = Governor::new(policy, gene_store.clone());

// Called automatically before the Solidify stage
if governor.allow_promotion(&candidate)? {
    gene_store.save(candidate.into_gene())?;
}

Revocation triggers automatically when a promoted gene causes a regression. After max_revocations, the gene is archived and a forced re-mutation cycle begins with a clean slate.

Plugin System — 9 Categories (K4)

The K4 plugin system lets external crates extend Oris without forking the runtime. Plugins declare determinism contracts; the registry enforces version negotiation and resource limits at load time.

NodeGraph execution node
ToolAgent-callable tool
MemoryLong-term memory backend
LLMAdapterLLM provider bridge
SchedulerTask dispatch strategy
CheckpointState persistence
EffectSide-effect sink
ObserverTelemetry / tracing
GovernorPromotion policy
// Implement a custom Tool plugin
#[derive(Plugin)]
#[plugin(category = "Tool", deterministic = false)]
struct MySearchTool;

impl ToolPlugin for MySearchTool {
    fn name(&self) -> &str { "web_search" }
    async fn call(&self, input: ToolInput) -> anyhow::Result<ToolOutput> {
        // call your search API
        todo!()
    }
}

// Register at runtime startup
registry.register(Box::new(MySearchTool))?;
Architecture

Clean layered dependency DAG

23 library crates with a strict no-cycles dependency graph — each layer only reaches downward.

Dependency Layers
Leaf (no workspace deps) oris-agent-contract oris-economics oris-genestore oris-kernel oris-mutation-evaluator Layer 1 (builds on leaf crates) oris-evolution → oris-kernel oris-execution-runtime → oris-kernel oris-governor → oris-evolution oris-intake → oris-agent-contract, oris-evolution oris-sandbox → oris-evolution oris-spec → oris-evolution Layer 2 (network-aware) oris-evolution-network → oris-evolution oris-orchestrator → oris-agent-contract, oris-evolution, oris-intake Layer 3 (highest fan-in) oris-evokernel → 11 crates oris-runtime → oris-evokernel (opt), oris-execution-runtime, oris-kernel Layer 4 (facades / standalone) oris-execution-server → oris-runtime oris-experience-repo (standalone HTTP service) oris-hub (standalone HTTP service)
Key Abstractions

StateGraph / CompiledGraph

Builder for stateful graphs with typed nodes, conditional edges, and persistence. invoke(), stream(), step_once().

Kernel (oris-kernel)

Deterministic substrate: append-only event log, replay cursor, snapshot store. K1–K5 phases all complete.

EvolutionPipeline

Composable 8-stage Detect→Reuse orchestration. Per-stage telemetry, short-circuit on rejection, replay bypass.

MutationEvaluator

Two-phase quality gate: static analysis score first, LLM critic only on candidates that pass the gate.

PluginRegistry (K4)

9 plugin categories, determinism declarations, resource limits, semantic version negotiation at load time.

SkeletonScheduler (K5)

Context-aware weighted priority dispatch with backpressure signaling and circuit breaker pattern.

Experience Hub

Federated gene sharing at scale

The Hub connects multiple Experience Repository nodes — register, discover, federate queries, and subscribe to cross-node evolution events.

📋

Node Registry

Register nodes with Ed25519 public keys. Key substitution prevention, health checking, and automatic deregistration on conflict.

🔎

Federated Discovery

Fan-out gene searches across all healthy nodes. One API call returns aggregated, deduplicated results from the entire network.

🔔

Event Subscriptions

Subscribe to gene promotion events via webhook callbacks. Get notified when a proven gene appears on any connected node.

🛡️

Signed Envelopes

All inter-node traffic uses OEN envelopes with Ed25519 signatures. Built-in rate limiting and PKI key registry.

Hub Quick Start

cargo run -p oris-hub

# Configuration via environment variables
export HUB_ADDR=127.0.0.1:3000   # default: 0.0.0.0:3000
export HUB_DB_PATH=hub.db         # default: hub.db

# Dashboard:  http://localhost:3000/dashboard
# API base:   http://localhost:3000/api/v1
curl -X POST http://localhost:3000/api/v1/nodes   -H "Content-Type: application/json"   -H "Authorization: Bearer <token>"   -d '{
    "node_id":      "node-alpha",
    "endpoint":     "https://alpha.example.com",
    "public_key":   "<base64-ed25519-pubkey>",
    "capabilities": ["gene-store", "capsule-store"]
  }'

curl http://localhost:3000/api/v1/nodes  # list all nodes
# Fan-out gene search across all healthy nodes
curl "http://localhost:3000/api/v1/federation/genes?q=fix_timeout"

# Filter by task class and minimum confidence
curl "http://localhost:3000/api/v1/federation/genes?task_class=network_retry&min_confidence=0.8"

# Response aggregates results from every healthy node:
# {"results":[...],"nodes_queried":3,"nodes_healthy":3}
curl -X POST http://localhost:3000/api/v1/subscriptions   -H "Content-Type: application/json"   -H "Authorization: Bearer <token>"   -d '{
    "callback_url": "https://my-node.example.com/hooks/gene",
    "events":       ["gene_promoted","gene_revoked"],
    "filter":       {"min_confidence":0.8}
  }'

# Hub delivers a signed POST to your callback_url
# when any registered node promotes or revokes a matching gene.
Multi-Language SDKs — v0.3.0

Local-First by Default

SQLite or MySQL gene storage as ground truth. Network sync is optional. Your genes work offline, sync when connected. Official libraries for Go, Python, and TypeScript.

Architecture

💾
LocalStore SQLite gene CRUD, query, stats tracking
🗄
MySQLStore MySQL shared storage for teams/servers
🔄
SyncManager Optional push/pull to Experience Repo
🎯
OrisClient Unified entry point (Store + Sync)

Default mode: Pure local — no network required. Genes are stored in SQLite with WAL mode for performance.
MySQL mode: Use MySQL as shared backend for multi-node deployments or team collaboration. Same API, just swap config.
Connected mode: Push local genes to Experience Repo for sharing. Pull community genes to enrich your local pool.
Conflict resolution: Same task class → merge stats (max values). Different task class → skip & log conflict.

🐹

Go

Pure Go SQLite (no CGo) + optional MySQL, sync.RWMutex thread safety, strongly typed.

go get github.com/Colin4k1024/Oris/sdks/go@v0.3.0
🐍

Python

Zero extra deps (stdlib sqlite3) + optional MySQL via pymysql. Full type hints.

pip install oris-rt-sdk==0.3.0 pip install oris-rt-sdk[mysql]==0.3.0 # with MySQL
🟦

TypeScript

Synchronous better-sqlite3 + optional async MySQL via mysql2. ESM-first, tree-shakable.

npm install @colin4k1024/oris-sdk@0.3.0 npm install mysql2 # optional, for MySQL

Local-First Usage (Recommended)

package main

import (
    "fmt"
    "time"

    oris "github.com/Colin4k1024/Oris/sdks/go"
    "github.com/Colin4k1024/Oris/sdks/go/store"
)

func main() {
    // Initialize — local SQLite storage, no network needed
    client, _ := oris.NewClient(oris.Config{
        StorePath: "my_genes.db",
    })
    defer client.Close()

    // Save a gene locally
    gene := store.Gene{
        GeneID:       "retry-backoff-1",
        Name:         "exponential-retry",
        TaskClass:    "error-handling",
        Confidence:   0.92,
        Strategy:     map[string]any{"approach": "exponential_backoff", "max_retries": 5},
        Signals:      map[string]any{"error_rate": 0.15},
        UseCount:     12,
        SuccessCount: 11,
        Source:       "local",
        CreatedAt:    time.Now(),
        UpdatedAt:    time.Now(),
    }
    client.Store.Save(gene)

    // Query genes by task class
    results := client.Store.Query(store.StoreQuery{
        TaskClass:     "error-handling",
        MinConfidence: 0.8,
    })
    fmt.Printf("Found %d high-confidence genes\n", len(results))

    // Update stats after using a gene
    client.Store.UpdateStats("retry-backoff-1", true, true)
}
from oris_sdk import OrisClient, OrisConfig, Gene
from datetime import datetime

# Initialize — local SQLite storage, no network needed
client = OrisClient(OrisConfig(store_path="my_genes.db"))

# Save a gene locally
gene = Gene(
    gene_id="retry-backoff-1",
    name="exponential-retry",
    task_class="error-handling",
    confidence=0.92,
    strategy={"approach": "exponential_backoff", "max_retries": 5},
    signals={"error_rate": 0.15},
    use_count=12,
    success_count=11,
    source="local",
    created_at=datetime.now(),
    updated_at=datetime.now(),
)
client.store.save(gene)

# Query genes by task class
results = client.store.query(task_class="error-handling", min_confidence=0.8)
print(f"Found {len(results)} high-confidence genes")

# Update stats after using a gene
client.store.update_stats("retry-backoff-1", used=True, success=True)

# Context manager support
with OrisClient(OrisConfig(store_path=":memory:")) as c:
    c.store.save(gene)
    print(c.store.get("retry-backoff-1").name)
import { OrisClient } from "@colin4k1024/oris-sdk";
import type { Gene } from "@colin4k1024/oris-sdk";

// Initialize — local SQLite storage, no network needed
const client = new OrisClient({ storePath: "my_genes.db" });

// Save a gene locally
const gene: Gene = {
  geneId: "retry-backoff-1",
  name: "exponential-retry",
  taskClass: "error-handling",
  confidence: 0.92,
  strategy: { approach: "exponential_backoff", max_retries: 5 },
  signals: { error_rate: 0.15 },
  useCount: 12,
  successCount: 11,
  contributorId: "agent-1",
  source: "local",
  createdAt: new Date(),
  updatedAt: new Date(),
};
client.store.save(gene);

// Query genes by task class
const results = client.store.query({
  taskClass: "error-handling",
  minConfidence: 0.8,
});
console.log(`Found ${results.length} high-confidence genes`);

// Update stats after using a gene
client.store.updateStats("retry-backoff-1", true, true);

// Clean up
client.close();

MySQL Storage (Alternative Backend)

package main

import (
    "fmt"
    "time"

    oris "github.com/Colin4k1024/Oris/sdks/go"
    "github.com/Colin4k1024/Oris/sdks/go/store"
)

func main() {{
    // Initialize with MySQL — shared storage for teams
    client, _ := oris.NewClient(oris.Config{{
        MySQL: &oris.MySQLSync{{
            Host:     "127.0.0.1",
            Port:     3306,
            User:     "oris",
            Password: "secret",
            Database: "oris",
        }},
    }})
    defer client.Close()

    // Same API as SQLite — save, query, update
    gene := store.Gene{{
        GeneID:       "retry-backoff-1",
        Name:         "exponential-retry",
        TaskClass:    "error-handling",
        Confidence:   0.92,
        Strategy:     map[string]any{{"approach": "exponential_backoff"}},
        Source:       "local",
        CreatedAt:    time.Now(),
        UpdatedAt:    time.Now(),
    }}
    client.Store.Save(nil, gene)

    results, _ := client.Store.Query(nil, store.StoreQuery{{
        TaskClass:     "error-handling",
        MinConfidence: 0.8,
    }})
    fmt.Printf("Found %d genes in MySQL\n", len(results))
}}
from oris_sdk import OrisClient, OrisConfig, Gene
from oris_sdk.mysql_store import MySQLConfig
from datetime import datetime, timezone

# Initialize with MySQL — shared storage for teams
client = OrisClient(OrisConfig(
    mysql=MySQLConfig(
        host="127.0.0.1",
        port=3306,
        user="oris",
        password="secret",
        database="oris",
    )
))

# Same API as SQLite — save, query, update
gene = Gene(
    gene_id="retry-backoff-1",
    name="exponential-retry",
    task_class="error-handling",
    confidence=0.92,
    strategy={{"approach": "exponential_backoff"}},
    source="local",
    created_at=datetime.now(timezone.utc),
    updated_at=datetime.now(timezone.utc),
)
client.store.save(gene)

results = client.store.query(task_class="error-handling", min_confidence=0.8)
print(f"Found {{len(results)}} genes in MySQL")

# Or connect via DSN string
from oris_sdk.mysql_store import MySQLStore
store = MySQLStore.from_url("mysql://oris:secret@127.0.0.1:3306/oris")
import {{ OrisClient }} from "@colin4k1024/oris-sdk";
import type {{ Gene }} from "@colin4k1024/oris-sdk";

// Initialize with MySQL — shared storage for teams
// Note: requires `npm install mysql2`
const client = await OrisClient.create({{
  mysql: {{
    host: "127.0.0.1",
    port: 3306,
    user: "oris",
    password: "secret",
    database: "oris",
  }},
}});

// Same API as SQLite — save, query, update
const gene: Gene = {{
  geneId: "retry-backoff-1",
  name: "exponential-retry",
  taskClass: "error-handling",
  confidence: 0.92,
  strategy: {{ approach: "exponential_backoff" }},
  source: "local",
  useCount: 0,
  successCount: 0,
  contributorId: "agent-1",
  createdAt: new Date(),
  updatedAt: new Date(),
}};
await client.store.save(gene);

const results = await client.store.query({{
  taskClass: "error-handling",
  minConfidence: 0.8,
}});
console.log(`Found ${{results.length}} genes in MySQL`);

client.close();

Network Sync (Optional)

package main

import (
    "fmt"

    oris "github.com/Colin4k1024/Oris/sdks/go"
    "github.com/Colin4k1024/Oris/sdks/go/store"
)

func main() {
    seed := [32]byte{/* your Ed25519 seed */}

    // Initialize with Experience Repo connection
    client, _ := oris.NewClient(oris.Config{
        StorePath: "my_genes.db",
        Experience: &oris.ExperienceSync{
            BaseURL:  "https://experience.oris.dev",
            APIKey:   "your-api-key",
            Seed:     seed,
            SenderID: "agent-1",
        },
    })
    defer client.Close()

    // Push unsynced local genes to Experience Repo
    result, _ := client.Sync.PushToHub(nil)
    fmt.Printf("Pushed %d genes, %d failed\n", result.Pushed, result.Failed)

    // Pull community genes from Experience Repo
    imported, _ := client.Sync.PullFromHub(nil)
    fmt.Printf("Imported %d new genes\n", imported)

    // Push specific genes only
    result, _ = client.Sync.PushToHub(&store.PushOpts{
        GeneIDs: []string{"retry-backoff-1", "cache-warm-2"},
    })

    // Pull with filters
    imported, _ = client.Sync.PullFromHub(&store.PullOpts{
        Q:             "error-handling",
        MinConfidence: 0.85,
        Limit:         50,
    })
}
from oris_sdk import OrisClient, OrisConfig

# Initialize with Experience Repo connection
client = OrisClient(OrisConfig(
    store_path="my_genes.db",
    experience_base_url="https://experience.oris.dev",
    experience_api_key="your-api-key",
    experience_seed=b"your-32-byte-ed25519-seed-here..",
    experience_sender_id="agent-1",
))

# Push unsynced local genes to Experience Repo
result = client.sync.push_to_hub()
print(f"Pushed {result.pushed} genes, {result.failed} failed")

# Pull community genes from Experience Repo
imported = client.sync.pull_from_hub()
print(f"Imported {imported} new genes")

# Push specific genes only
result = client.sync.push_to_hub(gene_ids=["retry-backoff-1", "cache-warm-2"])

# Pull with filters
imported = client.sync.pull_from_hub(
    q="error-handling",
    min_confidence=0.85,
    limit=50,
)

# Check sync history
logs = client.sync.get_sync_log(limit=20)
for log in logs:
    print(f"  {log.direction} {log.gene_id}: {log.status}")
import { OrisClient } from "@colin4k1024/oris-sdk";

// Initialize with Experience Repo connection
const seed = new Uint8Array(32); // Your Ed25519 seed
const client = new OrisClient({
  storePath: "my_genes.db",
  experience: {
    baseUrl: "https://experience.oris.dev",
    apiKey: "your-api-key",
    seed,
    senderId: "agent-1",
  },
});

// Push unsynced local genes to Experience Repo
const result = await client.sync.pushToHub();
console.log(`Pushed ${result.pushed} genes, ${result.failed} failed`);

// Pull community genes from Experience Repo
const imported = await client.sync.pullFromHub();
console.log(`Imported ${imported} new genes`);

// Push specific genes only
await client.sync.pushToHub({ geneIds: ["retry-backoff-1", "cache-warm-2"] });

// Pull with filters
await client.sync.pullFromHub({
  q: "error-handling",
  minConfidence: 0.85,
  limit: 50,
});

// Check sync history
const logs = client.sync.getSyncLog(20);
logs.forEach((l) => console.log(`  ${l.direction} ${l.geneId}: ${l.status}`));

client.close();

Store API Reference (LocalStore & MySQLStore)

MethodDescriptionReturns
save(gene)Insert or upsert a gene (by gene_id)void
get(id)Retrieve a gene by IDGene | null
query(opts)Filter by task_class, min_confidence, search text, with paginationGene[]
delete(id)Remove a gene permanentlyvoid
updateStats(id, used, success)Increment use_count (and success_count if success)void
getUnsynced()Get all local genes not yet pushed to HubGene[]
markSynced(id, time)Mark a gene as synced with timestampvoid
getSyncLog(limit)Get recent sync operation historySyncLogEntry[]

Gene Data Model

FieldTypeDescription
geneIdstringUnique identifier
namestringHuman-readable name
taskClassstringCategory (e.g. "error-handling", "caching", "testing")
confidencefloat [0,1]How reliable this gene is (higher = more trusted)
strategyJSONThe actual approach/algorithm (optional)
signalsJSONInput signals that trigger this gene (optional)
validationJSONValidation results/evidence (optional)
qualityScorefloat [0,1]Quality metric from evaluators
useCountintTotal times this gene was applied
successCountintTimes it led to a successful outcome
contributorIdstringNode/agent that created this gene
source"local" | "hub"Where this gene came from
syncedAtdatetime?Last sync timestamp (null if never synced)
createdAtdatetimeCreation time
updatedAtdatetimeLast modification time

Direct Remote Clients (Advanced)

For advanced use cases where you need direct access to Hub, Execution Runtime, or Experience Repo without local storage:

import (
    "github.com/Colin4k1024/Oris/sdks/go/hub"
    "github.com/Colin4k1024/Oris/sdks/go/execution"
    "github.com/Colin4k1024/Oris/sdks/go/experience"
)

// Hub — register a node
seed := [32]byte{...} // Ed25519 seed
h := hub.New(hub.Config{BaseURL: "http://hub:8080", APIKey: "key", Seed: seed, NodeID: "n1"})
resp, _ := h.Register("http://my-node:9000", []string{"evolve"}, "0.1.0")

// Execution — run a job
e := execution.New(execution.Config{BaseURL: "http://exec:8080", Token: "tok"})
job, _ := e.RunJob("thread-1", map[string]any{"task": "hello"})

// Experience — share a gene
exp := experience.New(experience.Config{BaseURL: "http://exp:8080", APIKey: "ak", Seed: seed, SenderID: "agent-1"})
gene, _ := exp.Share(map[string]any{"gene_id": "g1", "confidence": 0.9})
from oris_sdk import HubClient, HubConfig, ExecutionClient, ExecutionConfig
from oris_sdk import ExperienceClient, ExperienceConfig

# Hub — register a node
hub = HubClient(HubConfig(base_url="http://hub:8080", api_key="key",
                           seed=b"32-byte-ed25519-seed-here.......", node_id="n1"))
hub.register(endpoint="http://my-node:9000", capabilities=["evolve"], version="0.1.0")

# Execution — run a job
exe = ExecutionClient(ExecutionConfig(base_url="http://exec:8080", token="tok"))
job = exe.run_job(thread_id="thread-1", input={"task": "hello"})

# Experience — share a gene
exp = ExperienceClient(ExperienceConfig(base_url="http://exp:8080", api_key="ak",
                                         seed=b"32-byte-ed25519-seed-here.......", sender_id="agent-1"))
gene = exp.share({"gene_id": "g1", "confidence": 0.9})
import { HubClient, ExecutionClient, ExperienceClient } from "@colin4k1024/oris-sdk";

// Hub — register a node
const seed = new Uint8Array(32); // Ed25519 seed
const hub = new HubClient({ baseUrl: "http://hub:8080", apiKey: "key", seed, nodeId: "n1" });
const reg = await hub.register("http://my-node:9000", ["evolve"], "0.1.0");

// Execution — run a job
const exe = new ExecutionClient({ baseUrl: "http://exec:8080", token: "tok" });
const job = await exe.runJob("thread-1", { task: "hello" });

// Experience — share a gene
const exp = new ExperienceClient({ baseUrl: "http://exp:8080", apiKey: "ak", seed, senderId: "agent-1" });
const gene = await exp.share({ gene_id: "g1", confidence: 0.9 });
Crates Reference

Component overview

23 library crates — include only what your project needs via feature flags.

CratePurposeMaturityFeature Flag
oris-runtimeMain facade: agents, graphs, tools, RAG, multi-step executionstable
oris-kernelDeterministic execution: event log, replay, snapshot, K1–K5stable
oris-evolutionCore types: Gene, Capsule, EvolutionEvent, Pipeline, Confidence, Task Classesstableevolution-experimental
oris-evokernelSelf-evolving kernel orchestration — highest fan-in, 11 workspace depsstablefull-evolution-experimental
oris-execution-runtimeControl plane: scheduler, lease manager, repositories, circuit breaker, crash recoverystable
oris-execution-serverGraph-aware HTTP execution server (Axum)stableexecution-server
oris-sandboxOS-level isolated mutation execution with resource budgetsstableevolution-experimental
oris-mutation-evaluatorTwo-phase quality evaluator: static analysis gate + LLM criticstableevolution-experimental
oris-genestoreSQLite-based Gene and Capsule persistence with full metadatastable
oris-governorPromotion, cooldown, and revocation policiesstablegovernor-experimental
oris-intakeIssue intake, deduplication, prioritization, webhook support, CI failure parsingstable
oris-evolution-networkOEN envelope, gossip sync, Ed25519 signing, rate-limited PKI registryexperimentalevolution-network-experimental
oris-experience-repoHTTP API: gene/capsule sharing, Ed25519 OEN verification, PKI key servicev0.3.0standalone
oris-hubExperience Hub: node registry, discovery, federation, subscriptions, dashboardstablestandalone
oris-orchestratorAutonomous loop, release automation, GitHub delivery, task planningexperimentalrelease-automation-experimental
oris-specOUSL YAML spec contracts and compilersexperimentalspec-experimental
oris-agent-contractExternal agent proposal contracts (proposal-only interface)stableagent-contract-experimental
oris-economicsLocal EVU ledger and reputation accountingexperimentaleconomics-experimental
Feature Flags

Include only what you need

All flags are on oris-runtime unless otherwise noted. Use full-evolution-experimental to enable all evolution capabilities.

Evolution (Self-Improvement)

evolution-experimental
Core Gene, Capsule, Pipeline, Selector, Sandbox, MutationEvaluator
evokernel-facade
Re-exports oris-evokernel — base for the full evolution stack
governor-experimental
Promotion cooldown, revocation policies, budget enforcement
evolution-network-experimental
OEN gossip sync, Ed25519 envelopes, rate-limited PKI registry
economics-experimental
Local EVU ledger and reputation scoring
spec-experimental
OUSL YAML spec contracts and compilers
agent-contract-experimental
External agent proposal interface
full-evolution-experimental
Aggregate — enables all of the above evolution flags

Persistence & Database

sqlite-persistence
SQLite checkpointing for graphs and kernel snapshots via rusqlite
postgres
PostgreSQL vector store via pgvector + sqlx
kernel-postgres
PostgreSQL event log backend for the deterministic kernel

Vector Stores

surrealdb · qdrant
SurrealDB and Qdrant vector store backends
sqlite-vss · sqlite-vec
SQLite-based vector search (two implementation variants)
in-memory
In-memory vector store — for development and testing
opensearch · pinecone · weaviate
Cloud-managed vector store backends
chroma · mongodb · milvus · faiss
Additional vector store backends

LLM Providers

(built-in)
OpenAI and Anthropic are included by default
ollama
Ollama local LLM — default host http://localhost:11434
gemini
Google Gemini
mistralai
Mistral AI
bedrock
AWS Bedrock

Document Loaders & Retrieval

lopdf · pdf-extract
PDF document loaders (two variants)
git · aws-s3 · github
Git repository, S3, and GitHub loaders
fastembed
FastEmbed local embedding model
flashrank
FlashRank cross-encoder reranker
tree-sitter
Code-aware text splitter (11 language parsers)

Server & Protocol

execution-server
Axum HTTP API server for job submission and SSE streaming
mcp-experimental
MCP bootstrap endpoint (requires execution-server)
a2a-production
Production A2A protocol boundary
browser-use
Headless Chrome browser automation tool