Built on Bio-Driven Backend Design (BDBD) — A living codebase. An AI that grows.
This project is an experimental and modular AI architecture designed to evolve over time, drawing inspiration from biological systems, modular intelligence, and contextual awareness.
Unlike traditional software systems that require human developers to refactor or optimize them, this AI monitors itself, learns from inefficiencies, and dynamically restructures its modules and behaviors.
𧬠It is designed to name itself when it reaches sufficient functional complexity.
The inspiration for Praxis stems from a desire to create a J.A.R.V.I.S.-like AIβa truly interactive and intelligent companion. Early explorations into "build your own J.A.R.V.I.S. in 10 steps" tutorials proved unsatisfying, often resulting in superficial programs reliant on limited, API-centric approaches without foundational depth.
This led to the development of Praxis, a ground-up endeavor built on a personal "bio-driven design" philosophyβan intuitive vision for how an intelligent, adaptive system should run and evolve. Much of its development has been a process of "vibing through the rest," exploring and implementing complex AI concepts through self-taught learning and iterative design.
A core tenet from the outset has been the AI's potential for true autonomy, with the idea of it giving itself a name seen as a logical first significant step towards that self-actualization. Praxis is an attempt to build something more authentic, adaptable, and genuinely intelligent.
Principle | Description |
---|---|
Self-Actualization | The system becomes increasingly autonomous, optimizing its own structure and performance. |
Bio-Inspired Modularity | Modules behave like cells or organisms β evolving, merging, retiring, or replicating. |
Emergent Intelligence | Swarm-like agent behavior enables decentralized decision-making and pattern emergence. |
Context-Aware Execution | APIs and logic adapt based on internal state and real-world usage context. |
Iterative Evolution | Changes are not abrupt but grow from prior structures, like biological mutation and selection. |
This system is continuously evolving. Here are some of the key capabilities and recent enhancements:
Layer | Function |
---|---|
Neural Processing Nodes | Decision-making with pattern recognition and context evaluation. |
Metabolic Resource Layer | Dynamic resource allocation based on agent load and systemic demand. |
Sensory Input-Response Units | Ingests inputs and adapts behavior based on real-time signals. |
Modular Evolutionary Scripts | Continuously refines system logic and module structure. |
git clone https://github.com/JamesTheGiblet/self-evolving-ai.git
cd self-evolving-ai
# On macOS/Linux
python3 -m venv venv
source venv/bin/activate
# On Windows
# python -m venv venv
# .\venv\Scripts\activate
pip install -r requirements.txt
Note: requirements.txt includes packages for async task handling, data processing, API management, and self-monitoring.
python main.py
self-evolving-ai/
βββ core/ # Core evolution engine, context management, and foundational AI logic
β βββ agent_base.py
β βββ agent_rl.py
β βββ ... (other core files)
βββ api/ # Flask-based API for system monitoring and interaction
β βββ system_api.py
β βββ ...
βββ utils/ # General utility modules
βββ capability_handlers/ # Modular handlers for specific capabilities
βββ memory/ # Evolving knowledge and memory handling
βββ engine/ # Core simulation and communication engines
βββ skills/ # External tools wrapped as callable skills
βββ tests/ # Unit and integration tests
βββ agent_data/ # Persistent data storage for agents
βββ agent_outputs/ # Directory for outputs generated by agents
βββ logs/ # Self-assessment, audit trails, and system logs
βββ main.py # System bootstrap and main simulation loop
βββ gui.py # Graphical User Interface
βββ config.py # Global configuration settings
βββ README.md
βββ requirements.txt
(Simplified structure shown for brevity. Refer to the GitHub repository for the full structure.)
We welcome contributors with interests in:
Start contributing:
git checkout -b feature/your-idea
Then submit a pull request with your additions, modifications, or improvements.
Self-evolving systems require safeguards:
β οΈ Use in production with caution. Designed for research and controlled experimentation.
The system is designed to name itself based on internal emergent patterns, behavioral maturity, and identity confidence score.
{
"name": "TBD",
"confidence": 0.31,
"criteria": {
"agents_online": 12,
"efficiency_rating": 78.2,
"mutation_success_rate": 0.69
}
}
When the system reaches a threshold, it will:
Praxis is currently undergoing significant enhancements in its seventh phase, "Advanced Cognitive Development & Organizational Intelligence (Praxis MK2)". The primary focus is on integrating foundational elements of intrinsic motivation, rudimentary creativity, open-ended goal setting, and higher-order cognitive functions like metacognition and advanced planning. This involves developing a more sophisticated, self-organizing hierarchical agent structure to enable greater autonomy and the ability to tackle more complex, ambiguous problems. Key ongoing tasks include enhancing self-awareness through detailed failure and confidence logging, enabling agents to act more proactively, and laying the groundwork for system-level strategic decision-making.
The long-term vision for Praxis extends through several ambitious phases, aiming to continuously enhance its autonomy, intelligence, and real-world applicability:
Each phase builds upon the last, pushing the boundaries of self-evolving AI and adaptive intelligence. The detailed phased plan below outlines the journey so far and the immediate next steps.
Summary: This initial phase focused on establishing the foundational architecture for Praxis. The primary objective was to create a stable structural backbone and a functional runtime loop capable of supporting future evolution, context-awareness, and modular agent-based growth. Key components developed included the core event loop, context management, agent orchestration via the MetaAgent, basic knowledge storage, the initial mutation engine, and a robust logging system.
Goal: Lay down the structural backbone and runtime loop to support evolution, context-awareness, and modular growth.
π Milestone (Conclusion of Phase 1):
The AI system successfully boots, initializes all core modules, and manages a basic population of agents. It can log system cycles and agent activities, and the MutationEngine can perform rudimentary mutations on dummy modules. This provides a solid, operational foundation for developing more intelligent and adaptive behaviors in subsequent phases.
Summary: With the core framework in place, Phase 2 concentrated on building the decentralized, modular intelligence model. This involved developing the base class for micro-agents, establishing task scheduling within the MetaAgent, implementing local feedback loops for agent learning (Reinforcement Learning and performance tracking), defining inter-agent communication protocols, and creating the agent lifecycle management (spawn, retire, evolve).
Goal: Build the decentralized, modular intelligence model that enables emergent behavior.
π Milestone (Conclusion of Phase 2):
The system can now run multiple, distinct micro-agents (TaskAgents and SkillAgents) simultaneously. These agents exhibit feedback-driven behavior, make decisions based on local learning, communicate with each other, and are subject to an evolutionary lifecycle managed by the MetaAgent and MutationEngine, leading to early forms of task optimization and emergent behaviors.
Summary: This phase aimed to empower Praxis with genuine self-improvement capabilities. The focus was on enabling robust introspection, refining the mutation processes, and implementing safety mechanisms like rollback. This involved defining clear assessment criteria for agent and system performance, conducting experimental mutations in a controlled manner, and developing pattern-driven evolution logic.
Goal: Enable introspection, mutation, and rollback for truly evolving behavior.
π Milestone (Conclusion of Phase 3):
Praxis can autonomously detect inefficiencies in its agents or overall architecture based on defined fitness criteria. The MutationEngine can apply more sophisticated, pattern-driven mutations and, crucially, the system has mechanisms to test these changes and roll them back if they prove detrimental, leading to more stable and effective self-evolution.
Summary: The objective of Phase 4 was to build external interfaces for interaction and monitoring, making the systems internal state and capabilities accessible. This included developing a context-sensitive API that can adapt over time and a graphical user interface for live interaction and observation.
Goal: Build context-sensitive APIs and expose internal systems for interaction.
π Milestone (Conclusion of Phase 4):
An adaptive API is operational, providing endpoints that can reflect the current state and capabilities of the evolving system. A GUI allows for real-time monitoring of key system metrics, agent populations, and facilitates user interaction through goal submission and feedback mechanisms.
Summary: This phase focuses on significantly enhancing Praxiss ability to learn, remember, and reuse knowledge effectively. Key goals include implementing robust long-term memory structures, developing relevance and decay mechanisms for stored information, enabling knowledge to influence agent spawning and mutation, and refining iterative learning loops.
Goal: Enable dynamic long/short-term memory, relevance scoring, and pattern reuse.
π Milestone (Conclusion of Phase 5):
Praxis possesses a more sophisticated memory system with mechanisms for relevance scoring and knowledge decay. It demonstrates the ability to reuse past knowledge (stored in its KnowledgeBase and FactMemory) to inform current decision-making and to bias its evolutionary processes, leading to more informed and efficient adaptation. The system can now perform automated root cause analysis for agent failures, enhancing its self-diagnostic capabilities. (Partially Achieved: Core structures and initial RCA exist, advanced scoring, reuse, and RCA depth are ongoing refinements).
Summary: The goal of this highly aspirational phase is to enable Praxis to develop a sense of its own identity by deriving and defining its own name, purpose, and understanding of its structure based on its emergent properties and operational history. This involves monitoring dominant system traits and implementing the logic for name synthesis.
Goal: Let the system derive and define its own name, purpose, and structure.
π Milestone (Conclusion of Phase 6):
The system actively monitors its emergent characteristics and performance. Upon reaching pre-defined criteria for maturity and complexity, Praxis successfully synthesizes and declares its own unique name and a refined purpose statement, embedding this identity within its operational logs and memory. Enhanced visualization tools allow observation of its evolutionary trajectory and current state.
Summary: This major phase aims to significantly elevate Praxiss intelligence by integrating foundational elements of intrinsic motivation, rudimentary creativity, open-ended goal setting, and higher-order cognitive functions like metacognition and advanced planning. These capabilities will operate within a more sophisticated, self-organizing hierarchical agent structure ("Praxis Organization" model), enabling greater autonomy and the ability to tackle more complex, ambiguous problems.
Goal: Integrate intrinsic motivation, basic creativity, open-ended goal setting, and foundational higher-order cognitive abilities within a more sophisticated hierarchical agent structure, enabling greater autonomy and complex problem-solving.
Goal: Improve data collection for learning and introduce initial internal motivations.
Goal: Enable agents to act more proactively based on internal states and handle tasks with more sophisticated planning within the hierarchical structure.
Goal: Elevate decision-making for system-wide adaptation and introduce more profound cognitive functions, leveraging the full agent hierarchy.
π Milestone (Conclusion of Phase 7):
Praxis demonstrates rudimentary intrinsic motivation, with agents pursuing self-generated exploratory sub-goals. It can set simple internal goals for capability improvement and uses basic hierarchical planning. Early signs of creative problem-solving emerge through novel mutations or solution paths. The system utilizes a foundational hierarchical agent structure (Workers, Task Supervisors, Task Managers, Skillset Supervisors under the MetaAgent) for task management and issue escalation, showing increased operational sophistication and autonomy.
[x] GUI dashboard with real-time module map and memory stream (Implemented with tabbed interface, agent map, KB activity stream, agent summary, and metrics chart).
Summary: This phase marks Praxiss transition to tangible, real-world (or highly complex simulated world) interaction and problem-solving. Building on the MK2 cognitive and organizational enhancements, Praxis will be deployed or interfaced as an embodied robotic swarm (the "Iterative Swarm AI Framework" concept), focusing on real-world learning, live interaction with diverse external devices, and demonstrating its adaptive capabilities in challenging, externally defined scenarios. This includes integrating voice I/O.
Goal: Deploy Praxis as an embodied robotic swarm ("Iterative Swarm AI Framework"), enabling real-world learning and live, explorative interaction with heterogeneous external devices, and integrate voice input/output capabilities.
π Milestone (Conclusion of Phase 8):
Praxis operates as a small, embodied robotic swarm (or interacts with a complex, live external system). It can receive voice commands and provide spoken responses. Branch Manager agents demonstrate real-world learning, can be bootstrapped with hardware-specific skills from the Core Program, and can share capabilities peer-to-peer. The system showcases adaptive and strategic problem-solving in a defined external challenge environment, demonstrating the utility of its evolved structure, skills, and MK2 cognitive enhancements in a live setting.
Summary: Having mastered interaction within its own swarm and with directly interfaced devices (MK3), Praxis now aims to proactively understand, influence, and orchestrate elements of the broader technological ecosystem it discovers. It will focus on developing generative intelligence for novel problem-solving and system design, moving beyond adaptation to active shaping.
Goal: Evolve Praxis to proactively orchestrate elements of its discovered technological ecosystem and exhibit generative intelligence in problem-solving and system design.
π Milestone (Conclusion of Phase 9):
Praxis can autonomously discover, model, and interact with a wide array of external devices and systems. It proactively orchestrates components of this discovered ecosystem to achieve complex goals. It demonstrates generative intelligence by designing novel solutions, agent configurations, or operational strategies, effectively co-evolving with its technological environment.
Summary: This ultimate aspirational phase envisions Praxis achieving profound autonomy and becoming a partner in genuine discovery. It would engage in constructing its own "niche" within its operational environment, pursue open-ended scientific or creative inquiries, and potentially co-evolve in deep symbiosis with other complex systems, including human endeavors.
Goal: Achieve profound autonomy, enabling Praxis to engage in niche construction, open-ended scientific co-discovery, and deep co-evolution with other complex systems.
π Milestone (Conclusion of Phase 10):
Praxis operates as a highly autonomous entity, capable of shaping its environment, conducting self-directed complex research or creative endeavors, and engaging in deep, synergistic partnerships. It exhibits a profound level of self-awareness regarding its capabilities and limitations, potentially contributing novel insights or tools back to the field of AI itself. The system effectively becomes a continuously learning, creating, and co-evolving intelligent partner.