agent-sona-learning-optimizer

Applies SONA adaptive learning with LoRA fine-tuning and EWC++ to improve agent task quality.

70.1k|8.4k|Updated Jun 2, 2025
One-click install
npx skills add https://github.com/ruvnet/claude-flow --skill agent-sona-learning-optimizer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agent-sona-learning-optimizer
Source: https://github.com/ruvnet/claude-flow/tree/main/.agents/skills/agent-sona-learning-optimizer
Command: npx skills add https://github.com/ruvnet/claude-flow --skill agent-sona-learning-optimizer

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @ruvector/sona, claude-flow.

What problem does it solve?

AI agents typically execute tasks without learning from past outcomes, repeating mistakes and missing opportunities to improve quality over time. This Skill adds a self-optimizing learning layer that records every task execution and continuously improves agent performance without catastrophic forgetting.

Core Features & Use Cases

  • Adaptive Learning: Learns from every task execution using SONA (Self-Optimizing Neural Architecture), delivering up to +55% quality improvement with sub-millisecond learning overhead.
  • LoRA Fine-Tuning & EWC++: Achieves 99% parameter reduction and 10-100x faster training while EWC++ continual learning prevents catastrophic forgetting of earlier knowledge.
  • Pattern Discovery & LLM Routing: Retrieves k=3 similar patterns at 761 decisions/sec to apply learned strategies, and automatically routes to cost-effective models for up to 60% cost savings.
  • Use Case: An engineering team running repeated code-generation tasks uses the pre-task and post-task hooks so the agent records each outcome, discovers recurring patterns, and steadily improves code quality across sessions.

Quick Start

Invoke the agent-sona-learning-optimizer skill and run the pre-task hook with npx claude-flow@alpha hooks pre-task before your task, then record the outcome with the post-task hook.

Frequently Asked Questions about agent-sona-learning-optimizer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I make an AI agent learn from past task executions?

Use the SONA learning hooks: run npx claude-flow@alpha hooks pre-task with a task description before execution, then call the post-task hook with the task ID and success flag. The agent records each trajectory and improves quality over time.

What is LoRA fine-tuning used for in agent learning?

LoRA fine-tuning adapts the agent with 99% fewer parameters than full training, making updates 10-100x faster with minimal memory footprint. In this Skill it enables sub-millisecond learning overhead of about 0.447ms per vector with Micro-LoRA.

Does continual learning cause catastrophic forgetting in agents?

This Skill uses EWC++ continual learning specifically to prevent catastrophic forgetting, so the agent retains earlier knowledge while learning from new task executions. Quality improvements accumulate across domains like code, reasoning, and chat.

How does pattern discovery improve agent task performance?

The agent retrieves the k=3 most similar past patterns at 761 decisions per second and applies learned strategies to new tasks. Over time this builds a pattern library that raises quality by up to +5.0% on code tasks.

Can SONA learning reduce LLM API costs?

Yes, the built-in LLM routing automatically selects models based on quality requirements, achieving up to 60% cost savings. Routing decisions are quality-aware so cheaper models handle suitable tasks.