Crate vex_core

Crate vex_core 

Source
Expand description

§VEX Core

Core types for the VEX protocol — adversarial, temporal, cryptographically-verified AI agents.

§Key Types

  • Agent — Fractal agent with evolutionary capabilities
  • ContextPacket — Time-aware, hashable context unit
  • MerkleTree — Cryptographic verification of context hierarchies
  • Genome — Evolutionary traits that map to LLM parameters

§Quick Start

use vex_core::{Agent, AgentConfig};

// Create an agent
let agent = Agent::new(AgentConfig {
    name: "Researcher".to_string(),
    role: "You are a helpful research assistant".to_string(),
    max_depth: 3,
    spawn_shadow: true,
});

// Spawn a child agent
let child = agent.spawn_child(AgentConfig {
    name: "Specialist".to_string(),
    role: "You analyze data".to_string(),
    max_depth: 2,
    spawn_shadow: false,
});

§Merkle Verification

use vex_core::{MerkleTree, Hash};

// Build a Merkle tree from context hashes
let leaves = vec![
    ("ctx1".to_string(), Hash::digest(b"context 1")),
    ("ctx2".to_string(), Hash::digest(b"context 2")),
];
let tree = MerkleTree::from_leaves(leaves);

// Verify integrity
assert!(tree.root_hash().is_some());

Re-exports§

pub use agent::Agent;
pub use agent::AgentConfig;
pub use agent::AgentHandle;
pub use agent::AgentId;
pub use context::CompressionLevel;
pub use context::ContextPacket;
pub use evolution::tournament_select;
pub use evolution::Fitness;
pub use evolution::GeneticOperator;
pub use evolution::Genome;
pub use evolution::LlmParams;
pub use evolution::StandardOperator;
pub use evolution_memory::EvolutionMemory;
pub use evolution_memory::TraitAdjustment;
pub use fitness::EvaluationContext;
pub use fitness::FitnessEvaluator;
pub use fitness::FitnessReport;
pub use fitness::HeuristicEvaluator;
pub use genome_experiment::GenomeExperiment;
pub use merkle::Hash;
pub use merkle::MerkleNode;
pub use merkle::MerkleProof;
pub use merkle::MerkleTree;
pub use merkle::ProofDirection;
pub use merkle::ProofStep;
pub use rule::OptimizationRule;

Modules§

agent
Agent types for VEX
context
Context packets for VEX agents
evolution
Evolutionary operators for VEX agents
evolution_memory
Evolution memory using temporal decay
fitness
Multi-dimensional fitness evaluation
genome_experiment
Genome experiment recording for evolution learning
merkle
Merkle tree implementation for context verification
rule