Observed since 20 Oct, 18:02 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Self-improving tool ecosystem with V1 (pattern-based generation), V2 (learning-based optimization), and V3 (unified coordination)
Self-improving tool ecosystem for AccuralAI
This package implements the V3 unified adaptive tools architecture that combines:
# From repository root
pip install -e packages/accuralai-adaptive-tools
# With dev dependencies
pip install -e packages/accuralai-adaptive-tools[dev]
See /plan/QUICKSTART-ADAPTIVE-TOOLS.md for detailed setup instructions.
Create ~/.accuralai/config.toml:
[adaptive_tools]
enabled = true
mode = "v3" # "v1", "v2", or "v3"
[adaptive_tools.v1.synthesis]
backend_id = "google"
model = "gemini-2.5-flash-lite"
temperature = 0.2
[adaptive_tools.v2.optimizer]
algorithm = "bayesian"
max_trials = 50
# Start AccuralAI CLI
accuralai
# Generate new tool from pattern (V1)
>>> /tool propose "merge CSV files"
# Optimize existing workflow (V2)
>>> /plan optimize analyze_logs
# View unified status (V3)
>>> /adaptive status
# Evolve tools and plans together
>>> /tool evolve
accuralai_adaptive_tools/
├── contracts/ # Data models and protocols
│ ├── models.py # Pydantic models
│ └── protocols.py # Protocol definitions
├── telemetry/ # Shared telemetry system
│ ├── collector.py # Main collector
│ ├── router.py # Route to V1/V2
│ └── storage.py # SQLite persistence
├── registry/ # Unified registry
│ └── unified.py # Tools + Plans
├── v1/ # Pattern-based generation
│ ├── telemetry/ # Pattern detection
│ ├── synthesis/ # Code generation
│ ├── sandbox/ # Safe execution
│ └── approval/ # Workflows
├── v2/ # Learning-based optimization
│ ├── planlang/ # DSL parser/validator
│ ├── execution/ # Plan executor
│ ├── optimization/ # Bayesian optimizer
│ └── memory/ # Recipe store
├── coordinator/ # V3 coordination
│ └── v3.py # Main coordinator
└── cli/ # CLI integration
└── commands.py # All commands
User Action
↓
Telemetry Event
↓
Router (decides V1 vs V2)
↓
┌───────────────┴───────────────┐
↓ ↓
V1 System V2 System
(Pattern → Tool) (Metrics → Plan)
↓ ↓
└──────→ Unified Registry ←─────┘
↓
Better Performance
↓
(Loop continues)
/tool evolve # Analyze patterns and propose improvements
/tool propose <desc> # Create tool from description
/tool review <id> # Review specific proposal
/tool approve <id> # Approve proposal
/tool reject <id> # Reject proposal
/tool metrics <name> # View tool performance
/tool versions <name> # View tool history
/tool rollback <name> <v> # Rollback to version
/plan generate <task> # Generate plan from description
/plan run <name> # Execute saved plan
/plan optimize <name> # Optimize hyperparameters
/plan compare <p1> <p2> # Statistical A/B test
/adaptive status # View V1+V2+V3 status
[adaptive_tools]
enabled = true
mode = "v3" # "v1", "v2", or "v3"
[adaptive_tools.v3]
auto_coordinate = true
compound_tracking = true
v1_sequence_threshold = 10
v1_failure_threshold = 0.2
v2_latency_threshold_ms = 500
v2_cost_threshold_cents = 10
[adaptive_tools.v1]
auto_propose = false
approval_mode = "manual"
[adaptive_tools.v1.synthesis]
backend_id = "google"
model = "gemini-2.5-flash-lite"
temperature = 0.2
[adaptive_tools.v1.sandbox]
executor = "subprocess"
timeout_s = 10
max_memory_mb = 256
[adaptive_tools.v2]
max_optimization_trials = 50
ab_test_sample_size = 100
significance_level = 0.05
[adaptive_tools.v2.optimizer]
algorithm = "bayesian"
acquisition_function = "ei"
[adaptive_tools.telemetry]
storage_path = "~/.accuralai/adaptive-tools/telemetry.db"
retention_days = 30
batch_size = 100
# All tests
pytest packages/accuralai-adaptive-tools/tests -v
# Specific subsystem
pytest packages/accuralai-adaptive-tools/tests/v1 -v
pytest packages/accuralai-adaptive-tools/tests/v2 -v
pytest packages/accuralai-adaptive-tools/tests/coordinator -v
ruff check packages/accuralai-adaptive-tools/
ruff format packages/accuralai-adaptive-tools/
Compare AccuralAI performance with and without adaptive tools using the Google Gemini backend:
# Set your Google API key
export GOOGLE_GENAI_API_KEY=your_key_here
# Run all scenarios
python packages/accuralai-adaptive-tools/tests/benchmarks/run_adaptive_benchmark.py
# Run specific scenario
python packages/accuralai-adaptive-tools/tests/benchmarks/run_adaptive_benchmark.py "Multi-Step Data Processing"
# Or via pytest
pytest packages/accuralai-adaptive-tools/tests/benchmarks/test_adaptive_vs_baseline_benchmark.py -v -s
What it tests:
Metrics compared:
Expected results:
Run the comprehensive system benchmark:
python packages/accuralai-adaptive-tools/tests/benchmarks/test_adaptive_system_benchmark.py
This tests all subsystems (V1, V2, V3) and provides scores across 7 categories.
/plan/accuralai-adaptive-tools-v3-spec.md/plan/QUICKSTART-ADAPTIVE-TOOLS.md/plan/adaptive-tools-comparison.md/plan/accuralai-adaptive-tools-integration.mdContributions welcome! Please see the main AccuralAI repository for guidelines.
MIT License - see repository root for details.
Questions? See /plan/ directory for detailed specifications or open an issue.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.2.1 | 26 Jan 2026 | 12 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 18:02 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:e603b0385c58d4df77d7f173874efe877692434e49fa7befab2b1a2b8f0caab1