Skip to main content

Crate phago_core

Crate phago_core 

Source
Expand description

§Phago Core

Core traits and types for Phago biological computing primitives.

This crate defines the ten biological primitives as Rust traits, along with shared types used across the entire framework:

  • DIGEST — Consume input, extract fragments, present learnings (phagocytosis)
  • APOPTOSE — Self-assess integrity, gracefully self-terminate (programmed cell death)
  • SENSE — Detect environmental signals, follow gradients (chemotaxis)
  • TRANSFER — Export/import capabilities across agents (horizontal gene transfer)
  • EMERGE — Detect quorum, activate collective behaviors (phase transitions)
  • WIRE — Strengthen used connections, prune unused ones (Hebbian learning)
  • SYMBIOSE — Integrate another agent instead of consuming it (endosymbiosis)
  • STIGMERGE — Coordinate through environmental modification (stigmergy)
  • NEGATE — Define identity by exclusion, detect anomalies (negative selection)
  • DISSOLVE — Modulate agent-substrate boundaries (holobiont)

§Quick Start

use phago_core::prelude::*;

// Create a position
let pos = Position::new(0.0, 0.0);

// Create a deterministic agent ID (for testing)
let id = AgentId::from_seed(42);

Modules§

agent
Agent — the fundamental computational cell.
error
Error types for Phago operations.
louvain
Louvain community detection algorithm implementation.
prelude
Phago Core Prelude — convenient imports for common usage.
primitives
The ten biological computing primitives.
semantic
Semantic similarity utilities for vector embeddings.
signal
Signal utilities — helpers for working with signals and gradients.
substrate
Substrate — the shared environment all agents operate within.
topology
Topology — the knowledge graph structure.
types
Shared types used across all Phago primitives and crates.