Six-crate Rust workspace (core/sim/llm/store/server/bin) backing a Three.js + WebGL frontend. Live at http://127.0.0.1:7777 via `cargo run`. Sim - Event-driven scheduler with min-heap, per-engram tick, staggered Spawn events (40 ms apart) so each engram's flight is visually readable. - Solid-donut torus topology (replaces original spherical density-driven shell, see Topology Pivot in docs/system-analysis.md). Configurable major/minor radii in config.toml; live `POST /api/galaxy/:id/resize`. - Physics: Verlet integration + friction; in-hole pull + galactic spin (CCW around +z) for spiral-ejection ejection from the donut centre; soft tube boundary with velocity-reflecting wall. - Cosine-weighted gravity (kiddo k-NN within radius 25, threshold 0.50) and synapse formation (threshold 0.62) gated to inside-the-tube only. - LM Studio integration via OpenAI-compatible REST: batched embeddings, optional Bearer auth, semaphore-bounded parallel ops per §13.5. Server - axum HTTP + WebSocket. Routes: /healthz, /api/galaxy CRUD, /seed, /ingest, /resize, /engrams/:id, /ws/galaxy/:id/events. - Binary 12-byte-aligned position frames at ~20 Hz; JSON for sparse events (Hello, EngramCreated, SynapseCreated, TorusUpdated). - Layered config: config.toml (defaults) + config.local.toml (secrets, gitignored) merged on startup. Frontend - Vite + vanilla TypeScript + three.js 0.169. - Engrams render as additive bloom-friendly point sprites with a per-engram hash-driven hue rotation and breathing pulse. - Comet-style velocity-aligned trails; additive ribbon synapses whose endpoints track engram positions every frame. - UnrealBloomPass + ACES tone-mapping for the linked-particles look. - HUD shows torus dims, engram + synapse counts, LM Studio status; controls for seed, ingest, and live torus resize. Docs - README replaced with docs/IDEA.md; system-analysis.md updated with the topology pivot decisions and Galaxy Ejection refinement notes (the implementation plan lives in ~/.claude/plans, gitignored). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
6.7 KiB
Sophia
Sophia is a system that provides an organic, self organizing, self actualizing, agent based database.
Main components
- Space of Recollection: A 3-diementional space where all enitites live in.
- The Space fo Recollection is an ever increasing Space, it grows with the number of Engrams, and contains them all.
- Cycle: A fourth dimension that allows the simulation of the world to progress and evolve. Moves forward by default.
- Engrams: Autonous entities that inhabit the Space during cycles.
- The Great Reflection: It's source of all Engrams, a portal in or out of the Space of Recollection, opens or collapses to allow engrams to materiaze.
Layers of the System
- On the highest level of the sytems there is a user, a user which created Engrams
- Engrams can hold any type of data, text, files, images, etc. This source data contibute to their self diefinition.
- The user can query the sytem to retrive information, which should be retrived based on the knowledge available in the system.
- On the middle level there are Egnrams of Engrams (though syntesis), which evolve their own sef-definition
- On the lowest level there are Engrams interacting with each other.
Engrams
-
Engrams are autonomous agents, each with its own information and goals.
-
Engrams can develop/destroy relationships with other Engrams, this connecttions are called "Synapsis" and hold information too.
-
Engrams are composed of:
- A Manifest: A description of their attributes.
- Taxonomy: Who am I?
- Goals: What is my will ?
- Memories: What have I experienced?
- State: Idle, syntetizing, searching, etc.
- A Manifest: A description of their attributes.
-
Engrams have the following Goals:
- I wanna understand and define myself.
- I wanna be close to other Engrams that are similar to me.
- I wanna be unique or unquely part of another Engram (though syntesis).
- I wanna record and remember my history.
-
Engrams have at least the following function:
- move()
- introspect()
- compare(engramB)
- memorize()
- recall()
- syntetize(engramB)
-
Engrams:
- Their size is a function of how many other Engrams I have syntetized
- Their visibiliy (how far can I see other engrams) is a function of how big they are
- Memory is a function of interactions with other Engrams.
Questions to clarify mechanics
Space & Movement:
- Is the 3D space continuous or discrete (grid)? Does it have boundaries or is it truly unbounded?
- Its a continuous and unbounded space.
- What determines an Engram's position when it first materializes? Random? Embedding-based?
- The Great reflection inhabits the center and ends of space like a dounut, new Engrams start at its centerm decaing ones move to the edge.
- How does move() work — does each Engram compute forces (attraction/repulsion) from neighbors, or is it goal-directed pathfinding?
- Each engram and Engram of Engram has a self proplusion, relative to their size, but there are external factors that affect it, like curiosity (new engrams have mroe) or gravity (theres a tendency to explore areas with more Engrams) Engram Lifecycle:
- When two Engrams synthesize(), do the originals disappear, or does a new parent Engram form while children persist inside it? (Absorption vs. federation)
- There is a federation, only true duplicates after a threshold get abosorved.
- Can Engrams die/decay? If nothing references or interacts with an Engram for many cycles, does it fade?
- Yes
- Is there an upper bound on synthesis depth? (Engram of Engrams of Engrams...)
- No upper bound, but as Engrams of Engrams grow, they start acting as a collective. Synapses:
- Are Synapses directional (A knows B, but B doesn't know A) or always bidirectional?
- The are bidirectional, allways
- What information does a Synapse hold — just weight/strength, or richer metadata (e.g., "related because X")?
- Synapsis hold richer metdata, specfiically what does the relationship betweent the two is, also can hold memories.
- Do Synapses decay over time without reinforcement?
- Synampsis do not decay, but are affected by absoprtion processes.
The Great Reflection (I/O portal): 10. When a user queries the system, does the query itself become a temporary Engram that "searches" the space? Or is retrieval handled externally?
- Yes, are engrams too.
- Does ingestion happen in bulk or one-at-a-time? Can the system handle streaming input?
- Both. Bulk ingeestion is called seeding.
Cycles & Simulation: 12. What happens in a single Cycle? Does every Engram get one action, or is it continuous/event-driven?
- Continuous and event driven, events can come from inside and outside.
- Is the simulation always running in the background, or only advances when triggered
- Alleawy running and evolving
- "Moves forward by default" — can Cycles move backward? Is there a concept of rewinding state?
- Yes, there is a timeline, which can be reconstructed with the indiviudal memories.
Intelligence layer: 15. What drives introspect() and compare() — LLM calls, embedding similarity, rule-based heuristics, or a mix?
- A mix, but whe probably need a sort of universal slate to which any manifest can be computed to, and that helps with the comparison in spite of the difference in formats.
- How much autonomy do Engrams have? Is each one making LLM calls independently, or is there a shared "consciousness" scheduler?
- They have their own consciousness on the level of following their set of rules, ideally eeasily computable, and the can also call LLMs on their own.
Possible improvements & extensions
- Gravity model: Engrams could exert gravitational pull proportional to their size,
naturally clustering related knowledge without explicit pathfinding.
- Yes.
- Dreams / Defragmentation cycles: Periodic "offline" phases where the system reorganizes
- Not for now. more aggressively (like sleep consolidation in neuroscience).
- Attention mechanism: Queries could emit a "signal wave" through the space — Engrams that resonate propagate it further, creating activation patterns for retrieval.
- Thats a cool idea, lets explore
- Forgetting curve: Engrams/Synapses that are never accessed could gradually lose fidelity or sink to the edges of space, implementing Ebbinghaus-style decay.
- Lets explore-
- Conflict resolution: When two Engrams hold contradictory information, synthesis could
produce a "tension" Engram that flags the contradiction.
- Explore
- Visualization: The 3D space is naturally suited for a real-time WebGL/Three.js
visualization where users can watch their knowledge self-organize.
- I do want a way to see it. lets explore it.
- Multi-user spaces: Multiple users contributing Engrams to a shared Space, with ownership/provenance tracked.
- not for now