Add self-evolving meta-layer system (clean extraction from updated main)#882
Open
jwm-axoni wants to merge 2 commits intoagent0ai:developmentfrom
Open
Add self-evolving meta-layer system (clean extraction from updated main)#882jwm-axoni wants to merge 2 commits intoagent0ai:developmentfrom
jwm-axoni wants to merge 2 commits intoagent0ai:developmentfrom
Conversation
added 2 commits
January 5, 2026 13:09
- Complete design for token/cost tracking across all LiteLLM providers - Architecture: TokenTracker → AgentContext → /poll → UI Widget - Identified 5 critical fixes during design review: 1. Add stream_options for streaming usage data 2. Handle final usage chunk in streaming mode 3. Use callback pattern for context access 4. Fallback to approximation when usage missing 5. Display 'Free' for local models - Phase 0 (Design) complete, ready for Phase 1 (Backend)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎯 Overview
This PR introduces a self-evolving meta-layer system that enables Agent Zero to learn and improve from its interactions through automated prompt evolution, tool suggestions, and comprehensive versioning.
✨ Features Added
1. Prompt Evolution Tool (
python/tools/prompt_evolution.py)2. Prompt Versioning System (
python/helpers/prompt_versioning.py)3. Tool Suggestion Engine (
python/helpers/tool_suggestions.py)4. Meta-Learning API (
python/api/meta_learning.py)5. Auto-Evolution Extension (
python/extensions/monologue_end/_85_prompt_evolution.py)📚 Documentation
Comprehensive documentation added in
docs/meta_learning/:🧪 Testing
Full test suite included:
tests/meta_learning/test_prompt_versioning.py- Versioning teststests/meta_learning/manual_test_*.py- Manual testing scriptstests/test_meta_learning_api.py- API endpoint tests (478 lines)tests/meta_learning/verify_test_structure.py- Test validation🏗️ Architecture
The meta-layer system follows Agent Zero's design principles:
📊 Files Changed
Added (18 files, 6,431 lines):
Modified: None (zero breaking changes)
🔄 Integration
The system integrates seamlessly with existing Agent Zero features:
🚀 Usage Example