Skip to content

v0.2.7

Choose a tag to compare

@Timwood0x10 Timwood0x10 released this 13 Jul 11:15
· 2 commits to main since this release

[0.2.7] - 2026-07-13

This is a major milestone release — 270 commits, 99 features, 27 fixes, 74 refactors since v0.2.5.
Four big themes: all pipelines connected, all modules closed-loop, GA evolved again, dynamic workflow.

Theme 1: All Pipelines Connected

  • Phase 3-6 WiredEvolutionSystem Integration: genome_wiring_system.go unifies all evolution phases into a single WiredEvolutionSystem with Reflector, HypothesisGen, MetaCtrl (Phase 3-5), DiffReg, Coordinator, GenomeReg (Phase 6). RunIdleEvolution() Phase 6 generates diff patches as PatchProposal with SourceGA and Priority 6. Full reflection loop and diff engine integration.
  • Service Bridge: service_bridge.go provides bidirectional conversion between API and internal strategy representations: toAPIStrategy(), toInternalStrategy(), cloneParams(), cloneDimensionScores(). Enables the evolution system to integrate with the HTTP API layer without exposing internal types.
  • Memory Pipeline Complete: End-to-end memory pipeline with ReportGenerator, PushService, and report formatting for human-readable evolution summaries. Full cycle: evaluation → distillation → report → push.
  • Internal Evolution Module (internal/evolution/): New standalone evolution runtime with coordinator, diff, genome, patch sub-packages. 4 Differs (Workflow, Scheduler, Knowledge, Recovery), 5 Executors (Graph, Recovery, Knowledge, Memory + StrategyStore), 6 Genomes (Workflow, Scheduler, Knowledge, Recovery, Planner, Memory).
  • Internal Evidence Module (internal/evidence/): Evidence data primitives + MemoryStore. Feeds evolution decisions with structured execution evidence.
  • Internal Knowledge Module (internal/knowledge/): Full AKF Knowledge Fabric with linker, compiler, pipeline, retriever, runtime, provider (code, evolution, memory, mysql, vector), store (memory, postgres, sqlite), MCP integration, and workflow orchestration.

Theme 2: All Modules Closed-Loop

  • Memory Evolution Genome: MemoryGenomeConfig with configurable parameters: MaxHistory [3–50], MaxSessions [20–500], MaxDistilledTasks [500–20000], UseStructuredCleaning. Implements Mutate(), Crossover(), Fitness() with heuristic fitness based on evidence quality. Works alongside the strategy genome in the evolution pipeline.
  • Planner Evolution Genome: PlannerGenomeConfig with strategy selection: balanced, architecture-first, memory-first. Configurable MaxSources [3–30] and MinRelevance [0.1–0.9]. Heuristic fitness assessment based on evidence coverage and consistency. Evolves planning behavior alongside strategy parameters.
  • Memory Patcher: RuntimeComponent implementation with Snapshot(), Apply(), CanApply() lifecycle. Supports PatchChangePlanner, PatchChangeBudget, PatchChangeReducer for controlled memory system changes. Enables the evolution system to propose and apply memory configuration patches.
  • Agent Age Eviction: AgentMaxAge config limits strategy lifespan; GenerationCreated tracking ensures agents survive exactly AgentMaxAge generations. Legacy strategies (GenerationCreated==0) exempted.
  • Confidence Calculation: Added sample-based confidence to AggregateEvidenceCrossTask, enabling evidence quality scoring in cross-task aggregation.
  • Truncate Utility Consolidation: Unified internal/ares_memory/internal/truncate package for reusable truncation logic across memory and LLM modules.

Theme 3: GA Evolution v2

  • NSGA-II Multi-Objective Selection: Pareto-based multi-objective optimization for strategy evolution. NondominatedSortingSelection with non-dominated sorting, crowding distance computation, and Pareto front ranking. Four default optimization dimensions: success_rate (maximize, 0.40 weight), quality (maximize, 0.25), cost (minimize, 0.20), latency (minimize, 0.15). Direction-aware Pareto dominance ensures proper handling of minimize vs maximize objectives. Configurable via WithSelectionStrategy("nsga2") or WithSelectionStrategy("nondominated").
  • Split Canonical/Selection Score: Score field represents canonical fitness (never modified by GA internals), SelectionScore field is adjusted by fitness sharing per epoch. effectiveScore() falls back to Score when SelectionScore is zero, enabling backward compatibility with existing scoring pipelines.
  • Fitness Sharing with 3 Strategies: Diversity-preserving fitness sharing with three automatic scaling strategies: full O(n²) pairwise for small populations (< 100), reservoir sampling for medium populations, spatial grid index for large populations (> 500). shareSigma = 0.3, FitnessNicheRadius = 0.15. Elites are exempt from sharing penalty. Configurable via WithFitnessSharing(true).
  • Steady-State GA: EvolveSteadyState() method replaces only max(1, int(float64(p.Size) * replaceRate)) worst individuals per generation (default 30%). Enables online learning — population persists across generations, only bottom performers are replaced by new candidates. Ideal for production deployments where the system learns continuously without full generation resets. Configurable via WithSteadyState(true) and WithReplaceRate(rate).
  • Experience-Guided Mutation System: Three-tier evolution experience pipeline: ToolCallRecord → RawExperience → NormalizedExperience → EvolutionHint. GuidanceProvider interface provides directional hints for mutation. ToolCallExperienceCollector captures tool call outcomes. MemoryExperienceStore with dictionary-based indexing stores and retrieves evolution hints. AggregateEvidence computes success rate, p50/p95 latency, and confidence scores for cross-task evidence aggregation.

Theme 4: Dynamic Workflow Engine

  • MutableDAG: Thread-safe mutation (add/remove nodes and edges at runtime). Incremental cycle detection on edge insertion.
  • DynamicExecutor: ApplyMode for hot-reload without stopping execution.
  • GraphPatchExecutor: Insert, remove, or replace nodes at runtime — DAG topology evolution.
  • ExecuteFromCheckpoint: Lightweight workflow resume from checkpoint via Graph.ExecuteFromCheckpoint(). Checkpoint integration via PluginBus hooks.
  • LoopPlugin: Controlled execution loops with configurable iteration limits.
  • RouterPlugin Auto-Wiring: Automatic plugin registration based on declared capabilities.

Documentation

  • Architecture Diagram Overhaul: Updated README architecture diagram to 6-layer model (added Evolution Engine layer), with GA engine details (7 selectors, 3 crossover, 6 mutation, 6 genomes), runtime evolution pipeline, and data flow sequence diagram.
  • GA Deep-Dive Articles: Updated docs/articles/en/autonomous-evolution-deep-dive.md and docs/articles/zh/autonomous-evolution-deep-dive.md with 6 new subsections (9.11-9.16) covering NSGA-II, steady-state GA, split score, experience system, memory evolution, and Phase 3-6 integration.
  • GA-in-the-Trenches: Updated docs/articles/en/ga-in-the-trenches.md and docs/articles/zh/ga-in-the-trenches.md with steady-state GA, NSGA-II, split score lessons, and new Lesson 6 on experience systems.
  • Overview Update: Updated docs/articles/zh/autonomous-evolution-overview.md with service bridge, memory evolution, and experience hints coverage.
  • Feature Doc Update: Updated docs/en/features/autonomous-evolution.md and docs/zh/features/autonomous-evolution.md with all new GA features.
  • Analysis Plan Sync: Updated GA_ANALYSIS.md and GA_DEVELOPMENT_PLAN.md to reflect completed implementation status.

Integrated Examples & Infrastructure Fixes

  • Knowledge Base Example (examples/11-knowledge-import/): Complete structure-aware markdown knowledge base with CLI import/query, multi-agent team import, and dialog-based chat. Integrates parser (6 BlockTypes), section-first chunker, PostgreSQL + pgvector embedding, batch transactions, and retry with exponential backoff.
  • AKG Knowledge Graph Builder (examples/11-knowledge-import/akg/): Builds working knowledge graphs from the knowledge base via KnowledgeRuntime.Execute(). 147 nodes, 27K edges, 73ms build. Uses the existing PGProvider (tag column bug fixed), planner, linkers (DecisionLinker, ArchitectureLinker, TimelineLinker, SimilarityLinker), and reducer — zero custom infrastructure.
  • LLM Failover: FailoverClient wired through SDK's WithFallbackLLM() option. Automatic 30s timeout → cooldown → fallback. Verified with ollama chain.
  • GA Evolution Integration: --evolve CLI command calls Runtime.Evolve() with population (10 agents × 3 generations). executeAndScore bug fixed (nil pointer on runtime field). Best strategy scored 99.5/100.
  • Event Store Tool Chain Recording: Agent.Run() now emits EventToolCallStarted/EventToolCallCompleted events to ares_events.EventStore for every tool call, capturing tool name, arguments, result, and success status.
  • Chaos Engineering + Resurrection: ToolWrapper with fault injection (failure rate, latency, kill-after-N-calls) and AgentSupervisor for health monitoring. --chaos-fail/--chaos-latency/--chaos-kill flags.
  • SDK AKG Context Injection: buildMessages() queries KnowledgeRuntime before each agent run and injects compiled knowledge graph context into the system prompt. Enabled via WithEvolution() + WithKnowledge().
  • DeepSeek ReasoningContent Support: Added ReasoningContent field to Message and AssistantMsg structs, wired through toMap() for proper round-trip serialization of DeepSeek thinking mode responses.
  • PGProvider Bug Fix: scanRow() scanned the tag column via SQL but never assigned it to obj.Tags. Fixed — tag column data now properly populates KnowledgeObject.Tags.
  • 14 Lint Fixes: errcheck, noctx, gosec G114, goconst, staticcheck SA9003/QF1012, unused dead code — all resolved across 8 files. Zero warnings on go build + go vet.