How ahmadfauzi34/ai_agent_builder works
ai_agent_builder is deterministic math/graph execution and research infrastructure with Rust as the reference runtime and host-facing WASM, Node, and Python interfaces. The principal workflow is to define layers and graph inputs, build and bind an executable plan, run it, then inspect traces or verify execution evidence; workspace and resolution facilities manage related runtime identity and review state. Math programs, evolutionary optimization, semantic ingress, and proof-oriented evidence are distinct capabilities. Several links reflect README-documented boundaries; unsampled implementations are represented at their known directory paths, and uncertain wiring is omitted.
Main entry points: agent.rs Layer and graph builder · registry.rs Layer registry · multi_input_graph.rs Multi-input ingress · workspace_ops.rs Workspace operations
Components 24
Graph execution
- Layer and graph builder
src/agent.rs - Multi-input ingress
src/graph/multi_input_graph.rs - Candidate verification
src/graph/graph_candidate_verification.rs - Graph mutation
src/graph/graph_mutation_transaction.rs - Trainable layers
src/layers
Math and optimization
- Versioned math programs
src/math/program.rs - Math kernels
src/math/numeric.rs - Evolution strategies
src/es
Runtime state and proof
- Layer registry
src/registry.rs - Runtime protocol
src/protocol.rs - Agent workspace
src/workspace.rs - Workspace operations
src/workspace_ops.rs - Authorization
src/authorization.rs - Effective specifications
src/effective_spec.rs - Runtime evidence
src/evidence/runtime_resolution_evidence.rs - Resolution workflow
src/resolution - Runtime contracts
src/contracts.rs - Layer state records
src/layers/state_record.rs - Contract inventory
src/registry/runtime_contract/inventory.rs
Host interfaces
- Rust reference runtime
src/lib.rs - Node host
hosts/node/node.mjs - Python facade
ffi/burn_research_ffi/facade.py - Python ABI
ffi/src/lib.rs
Other components
- External consumer
Connections 26
- External consumer → Rust reference runtime: calls runtime
README.md - External consumer → Node host: uses host
README.md - External consumer → Python facade: uses facade
README.md - Python facade → Python ABI: calls ABI
README.md - Layer and graph builder → Layer registry: initializes layers
src/agent.rs - Layer and graph builder → Runtime protocol: encodes packets
src/agent.rs - Multi-input ingress → Layer and graph builder: builds graph plan
src/graph/multi_input_graph.rs - Multi-input ingress → Runtime protocol: validates contracts
src/graph/multi_input_graph.rs - Layer registry → Runtime protocol: decodes run steps
src/registry.rs - Layer registry → Trainable layers: dispatches layers
src/registry.rs - Versioned math programs → Math kernels: uses kernels
src/math/program.rs - Workspace operations → Agent workspace: updates workspace
src/workspace_ops.rs - Workspace operations → Layer and graph builder: builds graph
src/workspace_ops.rs - Workspace operations → Layer registry: initializes layers
src/workspace_ops.rs - Runtime evidence → Authorization: checks authority
src/evidence/runtime_resolution_evidence.rs - Runtime evidence → Effective specifications: uses specification
src/evidence/runtime_resolution_evidence.rs - Runtime evidence → Agent workspace: records runtime state
src/evidence/runtime_resolution_evidence.rs - Resolution workflow → Effective specifications: reviews specification
- Candidate verification → Multi-input ingress: verifies graph inputs
- Graph mutation → Candidate verification: rechecks candidates
- Evolution strategies → Versioned math programs: optimizes objectives
- Rust reference runtime → Versioned math programs: exports capabilities
src/lib.rs - Rust reference runtime → Multi-input ingress: exports ingress
src/lib.rs - Contract inventory → Layer registry: catalogs contracts
src/registry/runtime_contract.rs - Runtime contracts → Layer and graph builder: defines agent contracts
src/contracts.rs - Trainable layers → Layer state records: records weights
src/layers/embedding.rs