Skip to content

Tags: Timwood0x10/ARES

Tags

v0.2.9

Toggle v0.2.9's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
0.2.6 (#42)

* refactor: extract embedding and experience APIs to public packages

* feat: add public knowledge API, workflow API, brand assets, and core evolution improvements

* fix: add cancel calls in example error paths and add agent public API

* feat: add self-healing evolution system and DAG runtime registration

* feat(api/evolution, examples): add public evolution API and example

* docs: add 4 new Chinese and English technical docs

* feat: add yaml-driven distillation threshold and new config options

* docs: add memory configuration comments to example and config files

* chore: rebrand project from GoAgent to ARES

* test(benchmark): add full suite of knowledge module benchmarks

* docs: add capability-module map docs

* chore: aggregate all recent codebase changes and improvements

* feat: add LLM-backed GA scoring, service discovery, and persistent knowledge stores

* feat(bootstrap,evolution): add autonomous LLM suggestion pipeline

* feat: add persistent PG strategy store, shared knowledge runtime, and live DAG patching

* feat: add memory evolution support and fix DAG reference issues

* fix,build,refactor: complete evolution system fixes and cleanups

* feat: add RAG support, improve error handling, and refactor concurrency

* refactor: centralize score clamping and config defaults

* feat(sdk): add RAG support with yaml config and tooling

* feat(sdk): add full zero-friction agent SDK implementation

* refactor: rename MustNew to NewRuntime, update all usages

* feat: introduce unified DAG workflow runtime with Runner and IR

* feat(workflow): unify and enhance runner implementation with core fixes

* refactor(workflow): implement compiled workflow bindings and resume execution

* chore: migrate entire codebase to unified DAG runner

* fix: stabilize workflow engine and add idempotent resume checkpointing

* chore: complete round archive implementation and wiring

* refactor: unify event store construction, improve panic logging

* chore: cut 0.2.8 release with unified DAG runner and archive module

* refactor(network): add SSRF defense transport, fix import allowlist tests

* feat(akg): add adaptive knowledge graph experimental implementation

* feat(akg): add LLM-free knowledge graph implementation

* chore: clean up package doc comments and add beta package docs

* feat: add MCP-style tool discovery system

* build: add latest benchmark results and polish codebase

* feat: add chaos fault injection, update docs and tests

* refactor: remove duplicated ErrNotDefined across codebase

* chore: aggregate various fixes, cleanups, and new features

* refactor: clean up memory system, fix auth and tooling hardening

* rm : quan model

* chore: aggregate all recent codebase improvements and fixes

* fix: harden SSRF/sandbox/streaming paths and repair confirmed review bugs

* fix,feat: complete GA fitness pipeline and harden core subsystems

* feat: wire real embedding into vector provider and bootstrap

- provider/vector: inject apiembedding.EmbeddingService via Config.Embedder.
  generateQueryVector uses real EmbedWithPrefix("query:") + normalizeUnit,
  with hashQueryVector as deterministic fallback only when embedder is nil.
  Embedder failure / empty vector returns an error (fail-loud) so a
  misconfigured embedder is observable instead of silently degrading search.
- bootstrap: construct NewVectorSearcher from postgres pool into
  Components.VectorStore; BuildKnowledgeRuntime registers the vector
  provider when vecStore + embedder are both present, skips + warns otherwise.
- tests: vector provider embedder path / failure / empty / hash determinism;
  bootstrap knowledge runtime construction with/without dependencies.

* docs: record embedding fail-loud decision and review closure

* refactor: consolidate and improve multiple codebase areas

* feat(akg,knowledge): implement full AKG closed loop with relevance scoring

* fix: close flight fitness write loop across all deployment paths

* feat: implement state-aware LLM evolution suggestions and graceful shutdown fixes

* chore: aggregate various fixes and improvements across codebase

* refactor: clean up review artifacts and consolidate knowledge tool wiring

* fix(bootstrap): fix context ignoring on shutdown timeout, null pointer, and configuration gating

* feat(bootstrap): add Stage 1 System Runtime observability and fix F04 live-DAG binding order

* feat(sdk,bootstrap,serve): stage 8 runtime closure - unify SDK wiring and fix live DAG

* refactor(bootstrap): Introduces an evidence storage interface and supports PostgreSQL persistence.

* chore: release v0.2.9 with runtime closure and persistence

v0.2.8

Toggle v0.2.8's commit message
chore: release v0.2.7 update changelog and add examples

v0.2.7

Toggle v0.2.7's commit message
chore: release v0.2.7 update changelog and add examples

0.2.6

Toggle 0.2.6's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
0.2.6 (#39)

* feat(evolution): add genetic algorithm genome package and update docs

* feat(evolution): add full genetic algorithm evolution system

* refactor(evolution): fix multi-byte prompt crossover, add strategy persistence, and update tests

* feat(evolution): add tool mutation, improve performance and add thread safety

* feat: add autonomous evolution framework with arena scoring and genome mutation support

* refactor: add event integrity checks, tool idempotency, and improved fallback

* refactor: replace inline event emission with shared events.Emit helper

* feat(evolution): add autonomous evolution and chaos engineering features

* feat: add autonomous genetic evolution system and tooling improvements

* fix(evolution): fix score agent clone bug and add new GA features

* feat(autonomous-evolution): add full GA evolution demo with LLM scoring and fitness sharing

* feat: add prompt crossover modes, hybrid scoring, and thread safety fixes

* fix(evolution): close wired scoring loop, thread scorer, and harden core paths

   - Thread API-level scorer into wired system adapter so scheduler path
     auto-scores offspring (was nil, breaking scoring loop)
   - Add initScores(0) after RunIdleEvolution in wired Evolve path
   - Add ScoreWithContext(ctx, strategy) to LLMScorer for context propagation
   - Cap lineages at 1000 entries to prevent unbounded memory growth
   - Rename PromptPoolMutation → PromptUniform (enum, comments, wiring)
   - Wire PromptCrossoverMode into createRawComponents (non-wired path)
   - Add categorical tool diversity (Params[tools]) to paramDistance
   - Make SetActive atomic: wrap *sql.DB in a BeginTx/Rollback/Commit
   - Fix default EliteCount 2→3, BreedingPoolRatio doc 0.3→0.6
   - DRY childID generation in Crossover into generateChildID helper
   - Log warning in ParseMutationType default case for unknown strings
   - Add uint/uint64/uint32 support to toFloat64

* fix: consolidate deterministic scoring, fix deadlocks and data races across core packages

   - Centralize 3 duplicate deterministic scorer implementations into a single
     DeterministicScore in llm_scorer.go; remove 6 unused constants in service.go
   - Fix ChaosExecutor exchange disconnect deadlock: executeExchangeDisconnect
     no longer re-acquires the mutex already held by Execute (non-reentrant sync.Mutex)
   - Fix GetSurvivalStatus data race: return a deep copy of the events timeline
   - Fix DreamCycle.SetEnabled/IsEnabled data race: guard config.Enabled with mutex
   - Add DefaultChaosExecutor.injectFaults mutex guard for e.rng concurrent access
   - Fix scheduler goroutine leak with cancel-before-start lifecycle pattern
   - Remove 2 unused files (arena_adapter.go, evolution_store.go), VerifyResult,
     VerifyReport, FaultWindowUptime, Skipped field, and other dead code
   - Add runtime warnings in RunScenarioReport for unsupported config fields
   - Replace hardcoded adaptive mutation constants with named constants
   - Add RetrievalGuard.Close() to prevent circuit breaker goroutine leak
   - Map new arena action types to flight diagnostic categories

* feat: add agent resurrection & snapshot system, update migration docs

* refactor(evolution): harden GA system with diversity tracking and validation

* fix(evolution): fix unevaluated score errors in evolution runs

* refactor(genome): implement atomic EvolveAfterScoring API and overhaul fitness sharing

* fix(arena): fix multiple bugs and improve robustness

* feat(scoring,evolution): add tiered scoring system and prompt mutation improvements

* refactor(arena/evolution): implement tiered scoring, evolution reports, and guardrails

* refactor(scoring, evolution, report): clean up formatting, add history tracking, guardrails, and e2e tests

* refactor(scoring cache): replace rwlock with atomic for hit/miss counters

* feat: add full evaluation system, MCP support, observability tooling, and examples

* feat: The project was renamed ARES

* Add JSONL training data pipeline for agent strategy evolution and experience distillation

* fix: add nil validation to leader.New and NewTaskDispatcher, extract magic number constants

* feat: integrate FailoverScorer into evolution scoring pipeline

✦  -  (new) — Project-level FailoverScorer abstraction: chains primary + fallback LLM clients with automatic timeout failover. Rate-limiting on primary only.
   -  — Added Fallbacks []LLMConfig field to LLMConfig.
   -
     - LLMScoreClient now wraps *llm.FailoverScorer instead of managing []*Client directly. Simpler API: NewLLMScoreClient(scorer, heuristic).
     - runRealEvolution() reads from config.Config, builds config list from primary + fallbacks, creates FailoverScorer, and wires it into the evolution system.
     - Removed deprecated ratelimit import (moved inside internal/llm).
   -  — Added fallbacks section with sensenova-u1-fast as backup model

* Enhance agent strategy configuration and memory management

* refactor: migrate all graph builder APIs to return errors instead of panicking

* chore: improve error handling, add logging, and fix multiple issues

* fix: improve llm response parsing and score extraction

* release: prepare 0.2.3

* perf: update benchmark results with 2026-06-24 run data

- Ran all 32 core benchmarks with benchtime=3x on darwin/arm64 (M3 Max, Go 1.26.4)
- 7 hot (<1us), 22 normal (1-100us), 3 cold (>100us)
- All zero-allocation paths preserved (eval, tool exec, result creation,
  event conversion, error wrapping, conflict detection)
- Updated README.md Benchmark Highlights and benchmark_report.md
- Added BenchmarkDistillation (76.9us, end-to-end) to report

* update : readme

* rm some docs

* chore: remove finetune server config and update gitignore

* refactor(evolution): restructure mutation logic and add experience-guided evolution system

* feat: add production readiness guardrails, shadow evaluation, and feedback recording

* refactor: clean up test code, fix mutation sampling, add adaptive feedback wiring

* feat(evolution): add guided mutation, memory scoring, and guardrails

* feat: add interview demo stack with web search tool and prompt length validation

This commit adds a complete autonomous interview search agent demo:
1. Adds web_search tool using SearXNG meta search engine
2. Adds prompt length validation for LLM requests
3. Adds SearXNG Docker configuration and demo setup scripts
4. Updates configs to support max prompt length setting
5. Adds interview demo example with full agent workflow

* feat(ares-evolution): add full autonomous evolution system with metrics and storage

* docs: add module analysis reports; fix evolution bugs; add runtime event bus

* feat(runtime): add execution collector, interrupt & loop plugins; refactor workflow engine

* feat(runtime): add arena fault injection & bus defensive hardening

* refactor(runtime): consolidate and improve plugin hook handling

* feat(runtime): add plugin system, recovery, tooling, and checkpointing

* feat(runtime,examples): add plugin system support and update demos

* chore: release various fixes and example updates

* chore:updates with fixes, perf, and new features

* refactor: clean up code, add error handling, and improve type safety

* refactor: rename project from GoAgent to ARES, add LLM failover, restructure examples

* feat(evolution): add batch LLM scorer, improve failover resilience

- Add BatchScorer interface + LLMScorer.BatchScore: N→1 API calls per
  generation with automatic sub-batch splitting (maxBatchSize=10)
- Wire batch scoring into service.scoreAgents with priority over per-agent path
- Failover client: unify cooldown to 30s on all errors, add per-provider
  timeout (20s default) instead of blocking on dead providers for 60s
- Update GA blog article with new data (3ms vs 5.58s, 1860x gap)
- Refresh run.log and failover tests

* feat(evolution): add batch LLM scorer, improve failover resilience

- Add BatchScorer interface + LLMScorer.BatchScore: N→1 API calls per
  generation with automatic sub-batch splitting (maxBatchSize=10)
- Wire batch scoring into service.scoreAgents with priority over per-agent path
- Failover client: unify cooldown to 30s on all errors, add per-provider
  timeout (20s default) instead of blocking on dead providers for 60s
- Update GA blog article with new data (3ms vs 5.58s, 1860x gap)
- Refresh run.log and failover tests

* chore: bulk complete multiple planned improvements

* chore: complete all planned P0/P1 performance improvements

* perf: increase concurrent LLM scoring limits and optimize sampling

* feat: complete p2 improvements and add multiple new features

* refactor: move HITL feedback plugin to workflow engine, update docs and client

* feat(runtime,workflow): add plugin lifecycle events and dynamic graph routing

* feat(graph): add LoopPlugin support and auto RouterPlugin wiring

- Add LoopPlugin support to Graph.Execute: after each full graph execution,
  check LoopPlugin's MaxIterations and UntilCondition to decide whether
  to re-execute from the start
- Add routeFromPluginBus helper for auto-detecting RouterPlugin from
  PluginBus (fallback when no explicit NodeRouter is set)
- Add 3 tests: MaxIterations, UntilCondition, no-plugin (one-shot)
- Track graph-level iteration count via __loop_iteration state key

* feat(graph): add lifecycle events and LoopPlugin support

- Emit EventWorkflowStarted before each graph iteration
- Emit EventStepStarted before each node execution
- Emit EventStepCompleted/EventStepFailed after each node
- Emit EventWorkflowCompleted on success, EventWorkflowFailed on error/cancel
- Add lifecycle event subscription test verifying event order
- LoopPlugin: MaxIterations and UntilCondition checked between iterations

* feat(graph): checkpoint integration via PluginBus hooks

- Set StartedAt on runtime.Step before BeforeStep call (needed by CheckpointPlugin)
- Add TestGraphCheckpointPlugin verifying checkpoint round-trip with graph
- No heavy changes needed: CheckpointPlugin is a standard BeforeStep/AfterStep
  hook and already works with the graph path

* feat(graph): add ExecuteFromCheckpoint for lightweight resume

- Refactor Execute into shared execute() helper accepting initialExecuted map
- ExecuteFromCheckpoint takes []string of pre-completed node IDs;
  automatically decrements their successors' in-degree so the graph
  continues from the first unexecuted node
- First iteration seeds executed set; subsequent LoopPlugin iterations
  reset to empty (full re-execution)
- Add 3 tests: skip completed nodes, all nodes done, empty list (fresh exec)
- Lightweight design: only tracks node IDs, no large data structures

* fix(graph): replace time.Sleep with channel-based event test pattern

- TestExecuteLifecycleEvents: use cancellable subscriber context + done
  channel instead of time.Sleep(50ms) to eliminate flakiness
- LoopPlugin type assertion already uses safe pattern (loop, ok := ...) -
  no change needed

* style: fix indentation in executor_test.go

* feat(runtime): add evolution plugin and register default instance

* feat(graph): enhance evolution router tests with agent resolver scenarios

* refactor(evolution): split genome_wiring, fix guardrails, wire dream cycle

   - Extract WiredEvolutionSystem/SystemConfig to genome_wiring_system.go
   - Add integration tests in genome_wiring_integration_test.go
   - Fix guardrails: log previous_best before mutation (guardrails.go)
   - Fix guardrails: populate unevaluatedCount, generation, lineageShares (dream_cycle.go)
   - Fix scheduler: add populationSizer interface, WaitGroup, deadlock (scheduler.go)
   - Fix shadow evaluator: add context.Context to scorer signature
   - Wire ActiveStrategyManager and ShadowEvaluator into DreamCycle
   - Cleanup: remove dead routeFromPluginBus, int() cast in test

* refactor: rename package bootstrap

* refactor: rename package callbacks

* Refactor event handling to use ares_events package

- Updated imports from events to ares_events across multiple files.
- Changed event type constants to use ares_events.EventType.
- Modified ObserverPlugin to handle ares_events instead of events.
- Adjusted DynamicExecutor and related components to emit and handle ares_events.
- Updated tests to reflect changes in event handling and ensure compatibility with ares_events.

* refactor: rename 14 internal packages to ares_xxx unified naming

Rename the following internal packages to use the ares_ prefix for
consistent naming across the project:

- bootstrap → ares_bootstrap
- callbacks → ares_callbacks
- ctxutil → ares_ctxutil
- shutdown → ares_shutdown
- ratelimit → ares_ratelimit
- security → ares_security
- config → ares_config
- eval → ares_eval
- observability → ares_observability
- integration → ares_integration
- events → ares_events
- mcp → ares_mcp
- protocol → ares_protocol
- quant → ares_quant

* Refactor workflow engine to use ares_runtime package

* refactor(api): move service implementations to internal/, keep api/ as thin abstraction layer

Move all independent service implementations from api/ to internal/ packages.
The api/ layer now only contains interface definitions, error types, HTTP handlers,
router, and client SDK — no business logic.

Moved packages:
- api/service/agent → internal/agents/
- api/service/graph → internal/workflow/graphservice/
- api/service/llm → internal/llmservice/
- api/service/memory → internal/memoryservice/
- api/service/retrieval → internal/retrievalservice/
- api/ares_evolution → internal/ares_evolution/service/
- api/ares_memory → internal/ares_memory/service/
- api/ares_retrieval → internal/ares_memory/retrieval_api/
- api/ares_experience → internal/ares_experience/service/
- api/eval → internal/ares_eval/service/
- api/marketmaking → internal/ares_quant/marketmaking_api/
- api/*.go → internal/api_impl/

api/ now serves as the public contract layer:
- api/core/ — interface definitions (AgentService, LLMService, etc.)
- api/errors/ — unified error types
- api/client/ — Go client SDK
- api/handler/ — HTTP handlers (thin delegation)
- api/router/ — route registration
- api/service/runtime/ — thin wrapper
- api/service/workflow/ — thin wrapper

* feat(api/core): add Arena, Evolution, and DreamCycle interfaces

- Add Arena interface for chaos engineering (fault injection, resilience scoring)
- Add Evolution interface for genetic algorithm (evolve, best strategy, lineages)
- Add DreamCycle interface for autonomous self-evolution
- Add Runtime interface for agent lifecycle management
- Add default config factories for all new modules
- api/core/ now exposes abstract APIs for all major ARES modules

* feat: add module logging, Event.ModuleName, and bootstrap wiring

Module Logging:
- Add logger.Module() helper for module-scoped structured logging
- Create module loggers for 12 core packages (runtime, workflow, memory,
  leader, sub, llm, mcp, arena, events, dashboard, flight, mcp)
- Convert slog calls to module loggers in all core packages

Event Traceability:
- Add ModuleName field to Event struct
- Update Emit() and PluginBus.Emit() to accept moduleName parameter
- Update all callers across runtime, workflow, leader, sub, memory,
  dashboard, arena, callbacks, and examples

API Layer:
- Add Arena interface for chaos engineering (fault injection, resilience scoring)
- Add Evolution interface for genetic algorithm (evolve, best strategy, lineages)
- Add DreamCycle interface for autonomous self-evolution
- Add Runtime interface for agent lifecycle management
- Add bootstrap package for factory wiring of all modules
- Add default config factories for all new modules

* update reademe

* feat(bootstrap): add MCP, Dashboard, Flight modules and quickstart example

Bootstrap:
- Add MCP manager to ARES container
- Add Dashboard orchestrator to ARES container
- Add Flight recorder to ARES container
- Update Stop() to gracefully shutdown all modules

Examples:
- Add examples/quickstart/ demonstrating bootstrap API usage
- Shows ARES creation, evolution, and runtime stats in ~50 lines

Verified: deprecated APIs (TruncationSelection, RouletteWheelSelection,
MultiPointCrossover, CrossoverWithHalfSplit) are only used by tests,
not production code. Marked for v2 removal.

* chore: remove 10 redundant examples, fix quickstart and bootstrap

Examples removed (redundant or too niche):
- simple, simple_newapi (replaced by quickstart)
- devagent, devagent_newapi (covered by travel)
- capability-demo (covered by quickstart)
- multi-agent-dialog (covered by travel)
- openrouter (too simple)
- quant-demo (duplicate of quant-trading)
- interview-demo (too niche)
- experience-bilingual (too niche)

Fixes:
- bootstrap: handle nil Evolution config gracefully
- quickstart: disable evolution (requires base strategy)

* refactor: rename internal packages with ares_ prefix and clean up old files

* refactor: rename internal packages and update docs to ares_ prefix

* docs: add and update architecture deep dive articles

* fix: fix ci

* feat(monitoring): add unified ARES Console monitoring plugin

Implements a RuntimePlugin-based monitoring console that provides:
- DAG engine for agent topology visualization with real-time state
- Node interaction engine (kill/resume/retry) via EventBus
- CostBar for per-agent resource consumption tracking
- DetailPanel with tasks, timeline, interactions, cost, trace
- 7 component tabs: events, memory, evolution, arena, workflow, mcp, llm
- TraceLinker for end-to-end span tree construction
- CostAggregator for per-agent LLM cost attribution
- Collector for event dispatch to all components
- Publisher with WSHub push and HTTP API handlers
- ConsoleAPI as top-level public interface (340 tests, race-safe)
- Code review fixes: interface decoupling, sentinel errors, race fixes

* feat(monitoring): add ARES Console monitoring plugin

- DAG engine for agent topology with real-time state tracking
- Node interaction engine (kill/resume/retry) via EventBus
- CostBar for per-agent resource consumption visualization
- DetailPanel with tasks, timeline, interactions, cost, trace
- 7 component tabs: events, memory, evolution, arena, workflow, mcp, llm
- TraceLinker for end-to-end span tree construction
- CostAggregator for per-agent LLM cost attribution
- RuntimeAdapter for zero-intrusion runtime integration
- ConsoleAPI as top-level public interface
- HTTP API with WSHub real-time push
- Publisher with SSE support and action handlers
- 358 tests passing with race detector

* feat(monitoring): add HTTP API, MCP integration, and TTL pruning

- Add Gin-based HTTP server with REST endpoints for nodes/agents/timeline
- Add MCP (Model Context Protocol) tool listing and invocation support
- Add TTL-based pruner for automatic agent/node cleanup
- Add DAG engine helpers: TrimTimeline and Nodes snapshot
- Add console API client with HTTP transport
- Guard collector startup on non-nil EventBus
- Add monitor-demo CLI entry point
- Add tests for all new components

* feat(monitoring): wire data layer, add tab pruning, implement SSE streaming

- Add Trim() to all 7 tabs (event, memory, llm, mcp, workflow, arena, evolution)
  for Pruner integration
- Define AgentTrackerReader/TraceReader interfaces in main_page, wire into
  MainPage event dispatch and plugin options
- Implement SSE streaming endpoint (handleSubscribe) replacing 501 placeholder
- Plugin Traces() now returns data from wired TraceLinker
- Fix errcheck lint: suppress unchecked resp.Body.Close and Encode returns
- Add tests for Trim, tracker/linker wiring, SSE, and full event flow

* feat(monitoring): add console SPA, rich agent detail, and demo workload

- Add embedded console SPA (index.html, style.css, app.js) served at /console/
  with dark glass theme, SVG DAG topology, agent cards, 7 tabs, detail panel
- Enrich agent detail endpoint with tasks, relationships (parent/children/peers),
  and event count breakdown by type
- DAG engine now sets ParentID on agent and task nodes from event payloads
- Agent tracker stores parent_id from agent.started events
- TraceLinker implements HandleEvent for EventSink interface
- Add WithTabMap plugin option for registering component tabs
- MainPage.Snapshot() populates Agents from tracker
- Demo emits realistic workload with parent-child agent hierarchy,

* feat(monitoring):fix dashbord

* feat(monitoring):fix js

* feat:fix dashboard

* feat: expose public tool & MCP APIs

   - api/tools: public Tool interface, Registry, ToolFunc, and built-in wrappers
   - api/mcp: Client (ConnectStdio/ConnectSSE), Registry with Discovery→Tagging→Scoring→Routing, MemoryStore
   - cmd/monitor-live: registryToolBinder adapter bridging api/tools.Registry to internal ToolBinder; MCP adapter wiring
   - examples: external-tools (custom tool demo), mcp-registry (full registry lifecycle demo)

* refactor(discovery): migrate and restructure MCP discovery system

* feat(discovery): add metadata support, health checks, and passive registration

* refactor: complete service discovery implementation with tests and examples

* feat: add public API for tools, MCP, and service discovery

- api/tools: self-contained tool registry with 5 built-in tools (calculator, regex, json, web_search, file), no internal/ dependency
- api/mcp: self-contained MCP client (stdio transport, DiscoverServers), no internal/ dependency
- api/discovery: service discovery engine with pluggable providers, identity merge, health check, event system
- internal/discovery: core engine, filesystem/binary probe providers, errgroup concurrency, deep-copy store
- cmd/monitor-live: real agent monitoring demo with LLM + MCP tools + chaos engineering (kill/resume/retry/random-kill/kill-all/recover)
- examples: discovery, external-tools, custom-store demos
- tests: 51 tests across discovery packages, all lint checks passing

* feat: add public API for tools, MCP, and service discovery

- api/tools: self-contained tool registry with 5 built-in tools
  (calculator, regex, json, web_search via SearXNG, file), no internal/ dependency
- api/mcp: self-contained MCP client (stdio transport, DiscoverServers), no internal/ dependency
- api/discovery: service discovery engine with pluggable providers,
  identity merge, health check, event system
- internal/discovery: core engine, filesystem/binary probe providers,
  errgroup concurrency, deep-copy store
- cmd/monitor-live: real agent monitoring demo with LLM + MCP tools
  + chaos engineering (kill/resume/retry/random-kill/kill-all/recover)
- scripts: fix start_interview_demo.sh Docker startup with proper
  health check and error handling
- tests: 51 tests across discovery packages

* feat: add chat API support with failover and tooling

* fix: restore and improve native LLM tool calling support

* fix: restore and improve native LLM tool calling support

* fix(llm): properly handle ollama tool call arguments

* fix(llm/chat): add proper tool formatting and auto tool choice for ollama

* refactor(llm/chat): remove explicit auto tool_choice for Ollama

* refactor(llm/chat): simplify ollama chat message construction

* feat(ares_evolution): add LLM-guided DreamCycle mutation with hint provider

   - Add LLMHintProvider in mutation/llm_hint_provider.go implementing
     HintProvider interface; collects strategy outcomes, calls LLM via
     Go template prompt, and emits structured MutationHints
   - Wire LLMHintProvider into DreamCycle via WithDreamCycleHintProvider
     option; record StrategyOutcome on both success and failure paths
   - Switch DreamCycle mutator from rawMutator to genomeMut in
     buildDreamCycle so it uses ExperienceGuidedMutator when enabled
   - Add EnableLLMHints, MaxHintHistory, LLMClient fields to SystemConfig;
     auto-construct LLMHintProvider in createWiredSystem with
     llmClientAdapter bridging service/mutation LLMClient interfaces

* feat(ares_evolution): add Intelligence Layer and refactor selection system

   Add meta-evolution, knowledge distillation, LLM reflection, multi-objective
   optimization, hypothesis generation, and guided pipeline. Replace bool-based
   selection config with strategy pattern. Add Pareto front tracking, generation
   history, EvolveAfterScoring(), and DimensionScores support.

* fix(genome): harden intelligence layer after review

   - hypothesis: add clampParam with paramRanges map for all LLM params
     (temperature, topK, topP, maxTokens, memoryLimit, etc.); remove
     dead duplicate param: check; guard non-float64 params with slog.Debug
   - knowledge: fix Record confidence to use ratio-based (not hardcoded
     0.5/0.6); replace bubble sort with sort.SliceStable; move
     SuccessCount into struct literal
   - reflection: keep correct bracket-depth extractJSONBracketOuter (no
     behavior change); improve error messages
   - meta_evolution: change generation guard from
      to  to wait for meaningful metrics
     before tuning
   - multi_objective: add slog.Warn when mixed single/multi-objective
     strategies fall back to Score comparison
   - guided_pipeline: add nil pop guard; remove temperature/top_k filter
     in HintsForTask (all params now pass through); document async
     feedback design (TOCTOU caveat)
   - population: extract computeStatsLocked to eliminate duplicated
     scoring logic in Stats() and appendHistoryLocked(); add
     validSelectionStrategies whitelist; add truncation strategy option;
     export StagnantGenerations() and CurrentMutationRate() public methods
   - test: +938 lines covering ParetoRank, clampParam edge cases,
     extractJSONBracketOuter, FormatHypotheses, ApplyHypothesis,
     GuidedPipeline nil guards, DistillFromHistory, LLMReflector error
     paths, Selection strategies, and multi-objective helpers

* Refactor mutation clamping and JSON extraction functions

* refactor(evolution): improve stagnation handling, add batch scoring, and polish configs

* feat: add full experience store, scoring adapters, promotion logic and fusion plan docs

* refactor: clean up codebase, fix formatting, and remove dead code

* feat: add ToolCallCollector, OutcomeRecorder, and experience service wiring

   - Add ToolCallExperienceCollector to convert ToolCallRecord into normalized experiences
   - Add OutcomeRecorder for runtime outcome → experience bridge
   - Add LLMScorer service wiring with config types (125 lines)
   - Extend genome_wiring_system with adapter registration
   - Cleanup aggregator.go unused import

* feat: add evolution reporting and real data pipeline demo

* refactor: standardize error handling across codebase

* test: fix and improve various unit tests

* refactor: remove deprecated MustEncode/Decode from JSONCodec, add SSE transport, add spatial indexing for fitness sharing, add many tests

* chore: cleanup unused code, fix test warnings, add new test files

* feat: add extensive evolution system improvements and monitoring fixes

* feat(evolution): add agent age eviction, prompt diversity guard improvements, and diversity reporting

* fix: SSE health probe, generation logging, diversity guard config, and cross-task evidence                                                                                                              internal/ares_evolution/genome/a+192
                                                                                                                                                                                                             internal/ares_evolution/genome+96 -8
     - Implement SSE health check via ConnectSSE (replaces hardcoded assumed healthy)                                                                                                                      internal/ares_evolution/geno+178 -24
     - Remove deprecated MustEncode/MustDecode from AHP codec                                                                                                                                                internal/ares_evolution/genom+199 -7
     - Add AggregateEvidenceCrossTask helper to suppress noisy mixed-task warnings                                                                                                                           internal/ares_evolution/genome/p+625
     - Fix generation=0 in logs by using absolute Population.Generation with callback_gen                                                                                                                    internal/ares_evolution/genome/p+131
     - Invert PromptDiversityGuardEnabled to DisablePromptDiversityGuard (default enabled)                                                                                                                   internal/ares_evolution/genome/s+182
     - Fix GenerationCreated off-by-one: use Generation+1 so agents survive exactly AgentMaxAge gens                                                                                                         internal/ares_evolution/genom+532 -7
     - Exempt legacy strategies (GenerationCreated==0) from age-based eviction                                                                                                                               internal/ares_evolution/genome/s+230
     - Fix diversity seed logging to capture replaced ID before overwrite                                                                                                                                    internal/ares_evolution/genome_wir+2
     - Add t.Helper/t.Fatalf in lineage selection tests for better error reporting

* feat: complete long-term memory pipeline with reports and push service

* refactor: clean up aggregate evidence logic and add confidence calculation

* fix: clean up stale FIXME comments and fix real bugs

* chore: clean up stale FIXME comments and add test coverage

* chore: clean up docs, fix resource leaks, and improve test quality

* refactor: consolidate truncate utilities and improve resource cleanup

* perf: optimize GA diversity and fitness sharing, clean up code

* docs: update readmes and changelog for v0.2.5

* fix: data race in PluginBus between Emit send and Subscribe cleanup close

Emit previously copied the subscriber list under RLock, released the lock,
then sent to subscriber channels. Subscribe's cleanup goroutine could close
the same channel between the copy and the send, causing a data race that Go's
race detector catches even with recover().

Fix: Emit holds RLock during the entire dispatch loop. The cleanup goroutine
needs exclusive Lock (sync.RWMutex), so it blocks until Emit finishes — no
concurrent close and send possible.

CI was running the uncommitted old code, which is why it failed.

* style(internal/ares_runtime): fix indentation in bus.go

* fix(engine): add early context cancellation check in dynamic executor

* refactor(genome, promotion, adapter): replace direct slog with structured elogger

* refactor: replace custom elog and direct slog with unified internal logger

* refactor: replace direct slog usage with module-based logging

* style: fix code formatting and indentation across codebase

* refactor: clean up codebase and fix logging context issues

* feat(resurrection): add SetSnapshotStore method for supervisor

* refactor: consolidate package-level error definitions into dedicated files

* refactor: extract and relocate duplicated executor/evolution boilerplate code

* refactor: extract and relocate duplicated executor/evolution boilerplate code

* refactor(bootstrap): restructure bootstrap module to use new provider pattern

* build: add initial ARES CLI tooling and runtime commands

* refactor(ares_bootstrap): add unified component wiring hub

* refactor: restructure API layers and clean up imports

* refactor(api): clean up service APIs and add comprehensive test suites

* feat(dashboard): add intelligence monitoring subsystem and arena bridge

* feat(monitoring): wire intelligence routes and console stub implementations

   - Add IntelProvider interface (AnomalyCount, InsightCount, SystemLevel,
     AgentLevel) and SetIntel() to MonitorPlugin for pluggable intelligence
   - Reimplement 5 ConsoleAPI stubs: AgentMemory delegates to intel,
     AgentEvolution returns empty records, MCPToolCalls delegates to
     MCPManager.ListTools(), LLMCalls delegates to CostBar data,
     Recommendations builds from anomaly/insight counts
   - Register 4 new intelligence endpoints on the /api group:
     /health, /health/agents, /anomalies, /insights
   - Add AgentWatcher in dashboard with AgentLister interface for
     proactive agent discovery and periodic health push over WebSocket
   - Update plugin tests to reflect changed LLMCalls and AgentEvolution
     behavior

* refactor: unify dashboard + monitoring, decouple api/client from internal

    - Consolidate dashboard/monitoring: mount dashboard routes (arena/flight/ws)
      on Gin engine; unify real-time push via WebSocket; bridge dashboard.Engine
      → monitoring.IntelProvider via IntelAdapter for real health/anomaly data
    - Eliminate api/client internal imports: Config now accepts core interfaces;
      NewClient stores pre-built services without importing internal/ packages
    - Fix 4 ConsoleAPI stubs (AgentMemory/AgentEvolution/MCPToolCalls/LLMCalls/
      Recommendations) by wiring intelligence engine + cost bar + MCP manager
    - Add EvolutionStore bridging flight genealogy into console AgentEvolution view
    - Add AgentWatcher for proactive health/anomaly push via WebSocket
    - Remove dead WireAllEvolutionComponents stubs, stale comments, escape hatches
    - Fix 8 arena resp.Body.Close lint warnings, 3 unused vars
    - Document all new types and functions per uber_go_style

* refactor: clean up code formatting and add missing interfaces/mocks

* docs: add client doc and example, e2e integration tests

   - api/client/doc.go — package-level doc with usage examples
   - api/client/example_test.go — runnable LLM Example function
   - api/integration/ — e2e tests for bootstrap, dashboard, monitoring, bridge

* refactor(api/memory): add distilled task config defaults

* chore: complete code compliance fixes and test refactoring

* style: fix code formatting and indentation across codebase

* chore: improve error handling for ignored errors

* feat: add builtin embedding tool, improve error handling, add agent service implementation

* feat: add embedding MCP server and MCP config hot-reload support

* feat: add builtin tools, tag system, and PDF/text/hash utilities

* feat(planner): implement full capability-driven tool planning layer

* feat(planner): implement full planner subsystem with tests

* refactor(planner): improve tool resolution, add DAG validation, and polish code

* feat(planner): add comprehensive math capabilities and tooling

* refactor: implement full agent service, tooling, and planner improvements

* chore: parameter validation, bridge fallback, and code cleanup

- Add ValidateParams with type/enum/required checks, auto-run on Execute
- Add ToolNode.WithBridge for planner fallback on tool failure
- Handle MCP tool name conflicts gracefully (warn + skip)
- Fix gofmt alignment across planner modules
- Update tests for NewEmptyRegistry and param validation
- Clean up example error handling (defer body close, ignored errs)
- Add .atomcode/ to gitignore, remove context7 from .mcp.json

* feat(planner): add automatic parameter extraction from natural language requests

* feat: add capability planner fallback for unknown agent tool calls

* feat(planner): add capability-based tool planning system

* style: align toolAdapter method signatures

* refactor: polish code quality, security and usability across codebase

* fix: handle error from core registry unregister and fix ignored register errors

* refactor: consolidate error imports and remove old error packages

* chore: error system unification and cleanup

- Remove internal/core/errors/ (716 lines dead code, zero imports)
- Update 54 import paths to use unified internal/errors
- Reorder imports in postgres test files (gofmt)
- Update api/agents tests for ErrNotImplemented (nilnil fix)
- Fix linter config (.golangci.yml: 7→16 linters)
- Add ExecutePlan() public API for pre-built DAG execution
- Add arena fault injection methods (9 RuntimeProvider methods)
- Update tasklist.md Phase 5 checkboxes
- Add multi-step DAG documentation and examples/dag-demo/
- Add planner/doc.go with full package documentation

* chore: cleanup code style and fix minor issues across codebase

* chore: cleanup and improve code quality across codebase

* refactor: consolidate constant definitions, fix lint issues, and improve code clarity

* refactor: consolidate and improve code quality across codebase

* refactor(handler): add common response key constants and new handler implementations

* feat: add LLM inference endpoints and supporting services

* refactor: introduce centralized error handling framework

* refactor: clean up code and standardize error strategy config

* feat: add 5-minute quickstart workflow and SDK foundation

* build: add complete example set and tooling

* refactor(sdk/examples/cmd): improve error handling and add CLI tooling

* feat: add config-driven setup, friendly error hints, and init command improvements

* docs: add cookbook examples and CI build examples step, plus site config

* docs: rewrite homepage and add github pages ci

* ci(github-actions): remove unused pages deployment env config

* fix: add workflow self-trigger and remove env protection

* chore: clean up unused examples, logs, and config files

* chore: complete framework maturity phase 1 with unified SDK, evaluation, and example updates

* docs: add tRPC-Agent-Go comparison and update existing docs

* v0.2.6

* chore: release v0.2.5 with performance, features and fixes

* chore: cleanup and small fixes across test and example code

* fix : ci depens error

v0.2.5

Toggle v0.2.5's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
0.2.5 (#36)

* feat(evolution): add genetic algorithm genome package and update docs

* feat(evolution): add full genetic algorithm evolution system

* refactor(evolution): fix multi-byte prompt crossover, add strategy persistence, and update tests

* feat(evolution): add tool mutation, improve performance and add thread safety

* feat: add autonomous evolution framework with arena scoring and genome mutation support

* refactor: add event integrity checks, tool idempotency, and improved fallback

* refactor: replace inline event emission with shared events.Emit helper

* feat(evolution): add autonomous evolution and chaos engineering features

* feat: add autonomous genetic evolution system and tooling improvements

* fix(evolution): fix score agent clone bug and add new GA features

* feat(autonomous-evolution): add full GA evolution demo with LLM scoring and fitness sharing

* feat: add prompt crossover modes, hybrid scoring, and thread safety fixes

* fix(evolution): close wired scoring loop, thread scorer, and harden core paths

   - Thread API-level scorer into wired system adapter so scheduler path
     auto-scores offspring (was nil, breaking scoring loop)
   - Add initScores(0) after RunIdleEvolution in wired Evolve path
   - Add ScoreWithContext(ctx, strategy) to LLMScorer for context propagation
   - Cap lineages at 1000 entries to prevent unbounded memory growth
   - Rename PromptPoolMutation → PromptUniform (enum, comments, wiring)
   - Wire PromptCrossoverMode into createRawComponents (non-wired path)
   - Add categorical tool diversity (Params[tools]) to paramDistance
   - Make SetActive atomic: wrap *sql.DB in a BeginTx/Rollback/Commit
   - Fix default EliteCount 2→3, BreedingPoolRatio doc 0.3→0.6
   - DRY childID generation in Crossover into generateChildID helper
   - Log warning in ParseMutationType default case for unknown strings
   - Add uint/uint64/uint32 support to toFloat64

* fix: consolidate deterministic scoring, fix deadlocks and data races across core packages

   - Centralize 3 duplicate deterministic scorer implementations into a single
     DeterministicScore in llm_scorer.go; remove 6 unused constants in service.go
   - Fix ChaosExecutor exchange disconnect deadlock: executeExchangeDisconnect
     no longer re-acquires the mutex already held by Execute (non-reentrant sync.Mutex)
   - Fix GetSurvivalStatus data race: return a deep copy of the events timeline
   - Fix DreamCycle.SetEnabled/IsEnabled data race: guard config.Enabled with mutex
   - Add DefaultChaosExecutor.injectFaults mutex guard for e.rng concurrent access
   - Fix scheduler goroutine leak with cancel-before-start lifecycle pattern
   - Remove 2 unused files (arena_adapter.go, evolution_store.go), VerifyResult,
     VerifyReport, FaultWindowUptime, Skipped field, and other dead code
   - Add runtime warnings in RunScenarioReport for unsupported config fields
   - Replace hardcoded adaptive mutation constants with named constants
   - Add RetrievalGuard.Close() to prevent circuit breaker goroutine leak
   - Map new arena action types to flight diagnostic categories

* feat: add agent resurrection & snapshot system, update migration docs

* refactor(evolution): harden GA system with diversity tracking and validation

* fix(evolution): fix unevaluated score errors in evolution runs

* refactor(genome): implement atomic EvolveAfterScoring API and overhaul fitness sharing

* fix(arena): fix multiple bugs and improve robustness

* feat(scoring,evolution): add tiered scoring system and prompt mutation improvements

* refactor(arena/evolution): implement tiered scoring, evolution reports, and guardrails

* refactor(scoring, evolution, report): clean up formatting, add history tracking, guardrails, and e2e tests

* refactor(scoring cache): replace rwlock with atomic for hit/miss counters

* feat: add full evaluation system, MCP support, observability tooling, and examples

* feat: The project was renamed ARES

* Add JSONL training data pipeline for agent strategy evolution and experience distillation

* fix: add nil validation to leader.New and NewTaskDispatcher, extract magic number constants

* feat: integrate FailoverScorer into evolution scoring pipeline

✦  -  (new) — Project-level FailoverScorer abstraction: chains primary + fallback LLM clients with automatic timeout failover. Rate-limiting on primary only.
   -  — Added Fallbacks []LLMConfig field to LLMConfig.
   -
     - LLMScoreClient now wraps *llm.FailoverScorer instead of managing []*Client directly. Simpler API: NewLLMScoreClient(scorer, heuristic).
     - runRealEvolution() reads from config.Config, builds config list from primary + fallbacks, creates FailoverScorer, and wires it into the evolution system.
     - Removed deprecated ratelimit import (moved inside internal/llm).
   -  — Added fallbacks section with sensenova-u1-fast as backup model

* Enhance agent strategy configuration and memory management

* refactor: migrate all graph builder APIs to return errors instead of panicking

* chore: improve error handling, add logging, and fix multiple issues

* fix: improve llm response parsing and score extraction

* release: prepare 0.2.3

* perf: update benchmark results with 2026-06-24 run data

- Ran all 32 core benchmarks with benchtime=3x on darwin/arm64 (M3 Max, Go 1.26.4)
- 7 hot (<1us), 22 normal (1-100us), 3 cold (>100us)
- All zero-allocation paths preserved (eval, tool exec, result creation,
  event conversion, error wrapping, conflict detection)
- Updated README.md Benchmark Highlights and benchmark_report.md
- Added BenchmarkDistillation (76.9us, end-to-end) to report

* update : readme

* rm some docs

* chore: remove finetune server config and update gitignore

* refactor(evolution): restructure mutation logic and add experience-guided evolution system

* feat: add production readiness guardrails, shadow evaluation, and feedback recording

* refactor: clean up test code, fix mutation sampling, add adaptive feedback wiring

* feat(evolution): add guided mutation, memory scoring, and guardrails

* feat: add interview demo stack with web search tool and prompt length validation

This commit adds a complete autonomous interview search agent demo:
1. Adds web_search tool using SearXNG meta search engine
2. Adds prompt length validation for LLM requests
3. Adds SearXNG Docker configuration and demo setup scripts
4. Updates configs to support max prompt length setting
5. Adds interview demo example with full agent workflow

* feat(ares-evolution): add full autonomous evolution system with metrics and storage

* docs: add module analysis reports; fix evolution bugs; add runtime event bus

* feat(runtime): add execution collector, interrupt & loop plugins; refactor workflow engine

* feat(runtime): add arena fault injection & bus defensive hardening

* refactor(runtime): consolidate and improve plugin hook handling

* feat(runtime): add plugin system, recovery, tooling, and checkpointing

* feat(runtime,examples): add plugin system support and update demos

* chore: release various fixes and example updates

* chore:updates with fixes, perf, and new features

* refactor: clean up code, add error handling, and improve type safety

* refactor: rename project from GoAgent to ARES, add LLM failover, restructure examples

* feat(evolution): add batch LLM scorer, improve failover resilience

- Add BatchScorer interface + LLMScorer.BatchScore: N→1 API calls per
  generation with automatic sub-batch splitting (maxBatchSize=10)
- Wire batch scoring into service.scoreAgents with priority over per-agent path
- Failover client: unify cooldown to 30s on all errors, add per-provider
  timeout (20s default) instead of blocking on dead providers for 60s
- Update GA blog article with new data (3ms vs 5.58s, 1860x gap)
- Refresh run.log and failover tests

* feat(evolution): add batch LLM scorer, improve failover resilience

- Add BatchScorer interface + LLMScorer.BatchScore: N→1 API calls per
  generation with automatic sub-batch splitting (maxBatchSize=10)
- Wire batch scoring into service.scoreAgents with priority over per-agent path
- Failover client: unify cooldown to 30s on all errors, add per-provider
  timeout (20s default) instead of blocking on dead providers for 60s
- Update GA blog article with new data (3ms vs 5.58s, 1860x gap)
- Refresh run.log and failover tests

* chore: bulk complete multiple planned improvements

* chore: complete all planned P0/P1 performance improvements

* perf: increase concurrent LLM scoring limits and optimize sampling

* feat: complete p2 improvements and add multiple new features

* refactor: move HITL feedback plugin to workflow engine, update docs and client

* feat(runtime,workflow): add plugin lifecycle events and dynamic graph routing

* feat(graph): add LoopPlugin support and auto RouterPlugin wiring

- Add LoopPlugin support to Graph.Execute: after each full graph execution,
  check LoopPlugin's MaxIterations and UntilCondition to decide whether
  to re-execute from the start
- Add routeFromPluginBus helper for auto-detecting RouterPlugin from
  PluginBus (fallback when no explicit NodeRouter is set)
- Add 3 tests: MaxIterations, UntilCondition, no-plugin (one-shot)
- Track graph-level iteration count via __loop_iteration state key

* feat(graph): add lifecycle events and LoopPlugin support

- Emit EventWorkflowStarted before each graph iteration
- Emit EventStepStarted before each node execution
- Emit EventStepCompleted/EventStepFailed after each node
- Emit EventWorkflowCompleted on success, EventWorkflowFailed on error/cancel
- Add lifecycle event subscription test verifying event order
- LoopPlugin: MaxIterations and UntilCondition checked between iterations

* feat(graph): checkpoint integration via PluginBus hooks

- Set StartedAt on runtime.Step before BeforeStep call (needed by CheckpointPlugin)
- Add TestGraphCheckpointPlugin verifying checkpoint round-trip with graph
- No heavy changes needed: CheckpointPlugin is a standard BeforeStep/AfterStep
  hook and already works with the graph path

* feat(graph): add ExecuteFromCheckpoint for lightweight resume

- Refactor Execute into shared execute() helper accepting initialExecuted map
- ExecuteFromCheckpoint takes []string of pre-completed node IDs;
  automatically decrements their successors' in-degree so the graph
  continues from the first unexecuted node
- First iteration seeds executed set; subsequent LoopPlugin iterations
  reset to empty (full re-execution)
- Add 3 tests: skip completed nodes, all nodes done, empty list (fresh exec)
- Lightweight design: only tracks node IDs, no large data structures

* fix(graph): replace time.Sleep with channel-based event test pattern

- TestExecuteLifecycleEvents: use cancellable subscriber context + done
  channel instead of time.Sleep(50ms) to eliminate flakiness
- LoopPlugin type assertion already uses safe pattern (loop, ok := ...) -
  no change needed

* style: fix indentation in executor_test.go

* feat(runtime): add evolution plugin and register default instance

* feat(graph): enhance evolution router tests with agent resolver scenarios

* refactor(evolution): split genome_wiring, fix guardrails, wire dream cycle

   - Extract WiredEvolutionSystem/SystemConfig to genome_wiring_system.go
   - Add integration tests in genome_wiring_integration_test.go
   - Fix guardrails: log previous_best before mutation (guardrails.go)
   - Fix guardrails: populate unevaluatedCount, generation, lineageShares (dream_cycle.go)
   - Fix scheduler: add populationSizer interface, WaitGroup, deadlock (scheduler.go)
   - Fix shadow evaluator: add context.Context to scorer signature
   - Wire ActiveStrategyManager and ShadowEvaluator into DreamCycle
   - Cleanup: remove dead routeFromPluginBus, int() cast in test

* refactor: rename package bootstrap

* refactor: rename package callbacks

* Refactor event handling to use ares_events package

- Updated imports from events to ares_events across multiple files.
- Changed event type constants to use ares_events.EventType.
- Modified ObserverPlugin to handle ares_events instead of events.
- Adjusted DynamicExecutor and related components to emit and handle ares_events.
- Updated tests to reflect changes in event handling and ensure compatibility with ares_events.

* refactor: rename 14 internal packages to ares_xxx unified naming

Rename the following internal packages to use the ares_ prefix for
consistent naming across the project:

- bootstrap → ares_bootstrap
- callbacks → ares_callbacks
- ctxutil → ares_ctxutil
- shutdown → ares_shutdown
- ratelimit → ares_ratelimit
- security → ares_security
- config → ares_config
- eval → ares_eval
- observability → ares_observability
- integration → ares_integration
- events → ares_events
- mcp → ares_mcp
- protocol → ares_protocol
- quant → ares_quant

* Refactor workflow engine to use ares_runtime package

* refactor(api): move service implementations to internal/, keep api/ as thin abstraction layer

Move all independent service implementations from api/ to internal/ packages.
The api/ layer now only contains interface definitions, error types, HTTP handlers,
router, and client SDK — no business logic.

Moved packages:
- api/service/agent → internal/agents/
- api/service/graph → internal/workflow/graphservice/
- api/service/llm → internal/llmservice/
- api/service/memory → internal/memoryservice/
- api/service/retrieval → internal/retrievalservice/
- api/ares_evolution → internal/ares_evolution/service/
- api/ares_memory → internal/ares_memory/service/
- api/ares_retrieval → internal/ares_memory/retrieval_api/
- api/ares_experience → internal/ares_experience/service/
- api/eval → internal/ares_eval/service/
- api/marketmaking → internal/ares_quant/marketmaking_api/
- api/*.go → internal/api_impl/

api/ now serves as the public contract layer:
- api/core/ — interface definitions (AgentService, LLMService, etc.)
- api/errors/ — unified error types
- api/client/ — Go client SDK
- api/handler/ — HTTP handlers (thin delegation)
- api/router/ — route registration
- api/service/runtime/ — thin wrapper
- api/service/workflow/ — thin wrapper

* feat(api/core): add Arena, Evolution, and DreamCycle interfaces

- Add Arena interface for chaos engineering (fault injection, resilience scoring)
- Add Evolution interface for genetic algorithm (evolve, best strategy, lineages)
- Add DreamCycle interface for autonomous self-evolution
- Add Runtime interface for agent lifecycle management
- Add default config factories for all new modules
- api/core/ now exposes abstract APIs for all major ARES modules

* feat: add module logging, Event.ModuleName, and bootstrap wiring

Module Logging:
- Add logger.Module() helper for module-scoped structured logging
- Create module loggers for 12 core packages (runtime, workflow, memory,
  leader, sub, llm, mcp, arena, events, dashboard, flight, mcp)
- Convert slog calls to module loggers in all core packages

Event Traceability:
- Add ModuleName field to Event struct
- Update Emit() and PluginBus.Emit() to accept moduleName parameter
- Update all callers across runtime, workflow, leader, sub, memory,
  dashboard, arena, callbacks, and examples

API Layer:
- Add Arena interface for chaos engineering (fault injection, resilience scoring)
- Add Evolution interface for genetic algorithm (evolve, best strategy, lineages)
- Add DreamCycle interface for autonomous self-evolution
- Add Runtime interface for agent lifecycle management
- Add bootstrap package for factory wiring of all modules
- Add default config factories for all new modules

* update reademe

* feat(bootstrap): add MCP, Dashboard, Flight modules and quickstart example

Bootstrap:
- Add MCP manager to ARES container
- Add Dashboard orchestrator to ARES container
- Add Flight recorder to ARES container
- Update Stop() to gracefully shutdown all modules

Examples:
- Add examples/quickstart/ demonstrating bootstrap API usage
- Shows ARES creation, evolution, and runtime stats in ~50 lines

Verified: deprecated APIs (TruncationSelection, RouletteWheelSelection,
MultiPointCrossover, CrossoverWithHalfSplit) are only used by tests,
not production code. Marked for v2 removal.

* chore: remove 10 redundant examples, fix quickstart and bootstrap

Examples removed (redundant or too niche):
- simple, simple_newapi (replaced by quickstart)
- devagent, devagent_newapi (covered by travel)
- capability-demo (covered by quickstart)
- multi-agent-dialog (covered by travel)
- openrouter (too simple)
- quant-demo (duplicate of quant-trading)
- interview-demo (too niche)
- experience-bilingual (too niche)

Fixes:
- bootstrap: handle nil Evolution config gracefully
- quickstart: disable evolution (requires base strategy)

* refactor: rename internal packages with ares_ prefix and clean up old files

* refactor: rename internal packages and update docs to ares_ prefix

* docs: add and update architecture deep dive articles

* fix: fix ci

* feat(monitoring): add unified ARES Console monitoring plugin

Implements a RuntimePlugin-based monitoring console that provides:
- DAG engine for agent topology visualization with real-time state
- Node interaction engine (kill/resume/retry) via EventBus
- CostBar for per-agent resource consumption tracking
- DetailPanel with tasks, timeline, interactions, cost, trace
- 7 component tabs: events, memory, evolution, arena, workflow, mcp, llm
- TraceLinker for end-to-end span tree construction
- CostAggregator for per-agent LLM cost attribution
- Collector for event dispatch to all components
- Publisher with WSHub push and HTTP API handlers
- ConsoleAPI as top-level public interface (340 tests, race-safe)
- Code review fixes: interface decoupling, sentinel errors, race fixes

* feat(monitoring): add ARES Console monitoring plugin

- DAG engine for agent topology with real-time state tracking
- Node interaction engine (kill/resume/retry) via EventBus
- CostBar for per-agent resource consumption visualization
- DetailPanel with tasks, timeline, interactions, cost, trace
- 7 component tabs: events, memory, evolution, arena, workflow, mcp, llm
- TraceLinker for end-to-end span tree construction
- CostAggregator for per-agent LLM cost attribution
- RuntimeAdapter for zero-intrusion runtime integration
- ConsoleAPI as top-level public interface
- HTTP API with WSHub real-time push
- Publisher with SSE support and action handlers
- 358 tests passing with race detector

* feat(monitoring): add HTTP API, MCP integration, and TTL pruning

- Add Gin-based HTTP server with REST endpoints for nodes/agents/timeline
- Add MCP (Model Context Protocol) tool listing and invocation support
- Add TTL-based pruner for automatic agent/node cleanup
- Add DAG engine helpers: TrimTimeline and Nodes snapshot
- Add console API client with HTTP transport
- Guard collector startup on non-nil EventBus
- Add monitor-demo CLI entry point
- Add tests for all new components

* feat(monitoring): wire data layer, add tab pruning, implement SSE streaming

- Add Trim() to all 7 tabs (event, memory, llm, mcp, workflow, arena, evolution)
  for Pruner integration
- Define AgentTrackerReader/TraceReader interfaces in main_page, wire into
  MainPage event dispatch and plugin options
- Implement SSE streaming endpoint (handleSubscribe) replacing 501 placeholder
- Plugin Traces() now returns data from wired TraceLinker
- Fix errcheck lint: suppress unchecked resp.Body.Close and Encode returns
- Add tests for Trim, tracker/linker wiring, SSE, and full event flow

* feat(monitoring): add console SPA, rich agent detail, and demo workload

- Add embedded console SPA (index.html, style.css, app.js) served at /console/
  with dark glass theme, SVG DAG topology, agent cards, 7 tabs, detail panel
- Enrich agent detail endpoint with tasks, relationships (parent/children/peers),
  and event count breakdown by type
- DAG engine now sets ParentID on agent and task nodes from event payloads
- Agent tracker stores parent_id from agent.started events
- TraceLinker implements HandleEvent for EventSink interface
- Add WithTabMap plugin option for registering component tabs
- MainPage.Snapshot() populates Agents from tracker
- Demo emits realistic workload with parent-child agent hierarchy,

* feat(monitoring):fix dashbord

* feat(monitoring):fix js

* feat:fix dashboard

* feat: expose public tool & MCP APIs

   - api/tools: public Tool interface, Registry, ToolFunc, and built-in wrappers
   - api/mcp: Client (ConnectStdio/ConnectSSE), Registry with Discovery→Tagging→Scoring→Routing, MemoryStore
   - cmd/monitor-live: registryToolBinder adapter bridging api/tools.Registry to internal ToolBinder; MCP adapter wiring
   - examples: external-tools (custom tool demo), mcp-registry (full registry lifecycle demo)

* refactor(discovery): migrate and restructure MCP discovery system

* feat(discovery): add metadata support, health checks, and passive registration

* refactor: complete service discovery implementation with tests and examples

* feat: add public API for tools, MCP, and service discovery

- api/tools: self-contained tool registry with 5 built-in tools (calculator, regex, json, web_search, file), no internal/ dependency
- api/mcp: self-contained MCP client (stdio transport, DiscoverServers), no internal/ dependency
- api/discovery: service discovery engine with pluggable providers, identity merge, health check, event system
- internal/discovery: core engine, filesystem/binary probe providers, errgroup concurrency, deep-copy store
- cmd/monitor-live: real agent monitoring demo with LLM + MCP tools + chaos engineering (kill/resume/retry/random-kill/kill-all/recover)
- examples: discovery, external-tools, custom-store demos
- tests: 51 tests across discovery packages, all lint checks passing

* feat: add public API for tools, MCP, and service discovery

- api/tools: self-contained tool registry with 5 built-in tools
  (calculator, regex, json, web_search via SearXNG, file), no internal/ dependency
- api/mcp: self-contained MCP client (stdio transport, DiscoverServers), no internal/ dependency
- api/discovery: service discovery engine with pluggable providers,
  identity merge, health check, event system
- internal/discovery: core engine, filesystem/binary probe providers,
  errgroup concurrency, deep-copy store
- cmd/monitor-live: real agent monitoring demo with LLM + MCP tools
  + chaos engineering (kill/resume/retry/random-kill/kill-all/recover)
- scripts: fix start_interview_demo.sh Docker startup with proper
  health check and error handling
- tests: 51 tests across discovery packages

* feat: add chat API support with failover and tooling

* fix: restore and improve native LLM tool calling support

* fix: restore and improve native LLM tool calling support

* fix(llm): properly handle ollama tool call arguments

* fix(llm/chat): add proper tool formatting and auto tool choice for ollama

* refactor(llm/chat): remove explicit auto tool_choice for Ollama

* refactor(llm/chat): simplify ollama chat message construction

* feat(ares_evolution): add LLM-guided DreamCycle mutation with hint provider

   - Add LLMHintProvider in mutation/llm_hint_provider.go implementing
     HintProvider interface; collects strategy outcomes, calls LLM via
     Go template prompt, and emits structured MutationHints
   - Wire LLMHintProvider into DreamCycle via WithDreamCycleHintProvider
     option; record StrategyOutcome on both success and failure paths
   - Switch DreamCycle mutator from rawMutator to genomeMut in
     buildDreamCycle so it uses ExperienceGuidedMutator when enabled
   - Add EnableLLMHints, MaxHintHistory, LLMClient fields to SystemConfig;
     auto-construct LLMHintProvider in createWiredSystem with
     llmClientAdapter bridging service/mutation LLMClient interfaces

* feat(ares_evolution): add Intelligence Layer and refactor selection system

   Add meta-evolution, knowledge distillation, LLM reflection, multi-objective
   optimization, hypothesis generation, and guided pipeline. Replace bool-based
   selection config with strategy pattern. Add Pareto front tracking, generation
   history, EvolveAfterScoring(), and DimensionScores support.

* fix(genome): harden intelligence layer after review

   - hypothesis: add clampParam with paramRanges map for all LLM params
     (temperature, topK, topP, maxTokens, memoryLimit, etc.); remove
     dead duplicate param: check; guard non-float64 params with slog.Debug
   - knowledge: fix Record confidence to use ratio-based (not hardcoded
     0.5/0.6); replace bubble sort with sort.SliceStable; move
     SuccessCount into struct literal
   - reflection: keep correct bracket-depth extractJSONBracketOuter (no
     behavior change); improve error messages
   - meta_evolution: change generation guard from
      to  to wait for meaningful metrics
     before tuning
   - multi_objective: add slog.Warn when mixed single/multi-objective
     strategies fall back to Score comparison
   - guided_pipeline: add nil pop guard; remove temperature/top_k filter
     in HintsForTask (all params now pass through); document async
     feedback design (TOCTOU caveat)
   - population: extract computeStatsLocked to eliminate duplicated
     scoring logic in Stats() and appendHistoryLocked(); add
     validSelectionStrategies whitelist; add truncation strategy option;
     export StagnantGenerations() and CurrentMutationRate() public methods
   - test: +938 lines covering ParetoRank, clampParam edge cases,
     extractJSONBracketOuter, FormatHypotheses, ApplyHypothesis,
     GuidedPipeline nil guards, DistillFromHistory, LLMReflector error
     paths, Selection strategies, and multi-objective helpers

* Refactor mutation clamping and JSON extraction functions

* refactor(evolution): improve stagnation handling, add batch scoring, and polish configs

* feat: add full experience store, scoring adapters, promotion logic and fusion plan docs

* refactor: clean up codebase, fix formatting, and remove dead code

* feat: add ToolCallCollector, OutcomeRecorder, and experience service wiring

   - Add ToolCallExperienceCollector to convert ToolCallRecord into normalized experiences
   - Add OutcomeRecorder for runtime outcome → experience bridge
   - Add LLMScorer service wiring with config types (125 lines)
   - Extend genome_wiring_system with adapter registration
   - Cleanup aggregator.go unused import

* feat: add evolution reporting and real data pipeline demo

* refactor: standardize error handling across codebase

* test: fix and improve various unit tests

* refactor: remove deprecated MustEncode/Decode from JSONCodec, add SSE transport, add spatial indexing for fitness sharing, add many tests

* chore: cleanup unused code, fix test warnings, add new test files

* feat: add extensive evolution system improvements and monitoring fixes

* feat(evolution): add agent age eviction, prompt diversity guard improvements, and diversity reporting

* fix: SSE health probe, generation logging, diversity guard config, and cross-task evidence                                                                                                              internal/ares_evolution/genome/a+192
                                                                                                                                                                                                             internal/ares_evolution/genome+96 -8
     - Implement SSE health check via ConnectSSE (replaces hardcoded assumed healthy)                                                                                                                      internal/ares_evolution/geno+178 -24
     - Remove deprecated MustEncode/MustDecode from AHP codec                                                                                                                                                internal/ares_evolution/genom+199 -7
     - Add AggregateEvidenceCrossTask helper to suppress noisy mixed-task warnings                                                                                                                           internal/ares_evolution/genome/p+625
     - Fix generation=0 in logs by using absolute Population.Generation with callback_gen                                                                                                                    internal/ares_evolution/genome/p+131
     - Invert PromptDiversityGuardEnabled to DisablePromptDiversityGuard (default enabled)                                                                                                                   internal/ares_evolution/genome/s+182
     - Fix GenerationCreated off-by-one: use Generation+1 so agents survive exactly AgentMaxAge gens                                                                                                         internal/ares_evolution/genom+532 -7
     - Exempt legacy strategies (GenerationCreated==0) from age-based eviction                                                                                                                               internal/ares_evolution/genome/s+230
     - Fix diversity seed logging to capture replaced ID before overwrite                                                                                                                                    internal/ares_evolution/genome_wir+2
     - Add t.Helper/t.Fatalf in lineage selection tests for better error reporting

* feat: complete long-term memory pipeline with reports and push service

* refactor: clean up aggregate evidence logic and add confidence calculation

* fix: clean up stale FIXME comments and fix real bugs

* chore: clean up stale FIXME comments and add test coverage

* chore: clean up docs, fix resource leaks, and improve test quality

* refactor: consolidate truncate utilities and improve resource cleanup

* perf: optimize GA diversity and fitness sharing, clean up code

* docs: update readmes and changelog for v0.2.5

* fix: data race in PluginBus between Emit send and Subscribe cleanup close

Emit previously copied the subscriber list under RLock, released the lock,
then sent to subscriber channels. Subscribe's cleanup goroutine could close
the same channel between the copy and the send, causing a data race that Go's
race detector catches even with recover().

Fix: Emit holds RLock during the entire dispatch loop. The cleanup goroutine
needs exclusive Lock (sync.RWMutex), so it blocks until Emit finishes — no
concurrent close and send possible.

CI was running the uncommitted old code, which is why it failed.

* style(internal/ares_runtime): fix indentation in bus.go

* fix(engine): add early context cancellation check in dynamic executor

v0.2.4

Toggle v0.2.4's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
0.2.4 (#35)

* feat(evolution): add genetic algorithm genome package and update docs

* feat(evolution): add full genetic algorithm evolution system

* refactor(evolution): fix multi-byte prompt crossover, add strategy persistence, and update tests

* feat(evolution): add tool mutation, improve performance and add thread safety

* feat: add autonomous evolution framework with arena scoring and genome mutation support

* refactor: add event integrity checks, tool idempotency, and improved fallback

* refactor: replace inline event emission with shared events.Emit helper

* feat(evolution): add autonomous evolution and chaos engineering features

* feat: add autonomous genetic evolution system and tooling improvements

* fix(evolution): fix score agent clone bug and add new GA features

* feat(autonomous-evolution): add full GA evolution demo with LLM scoring and fitness sharing

* feat: add prompt crossover modes, hybrid scoring, and thread safety fixes

* fix(evolution): close wired scoring loop, thread scorer, and harden core paths

   - Thread API-level scorer into wired system adapter so scheduler path
     auto-scores offspring (was nil, breaking scoring loop)
   - Add initScores(0) after RunIdleEvolution in wired Evolve path
   - Add ScoreWithContext(ctx, strategy) to LLMScorer for context propagation
   - Cap lineages at 1000 entries to prevent unbounded memory growth
   - Rename PromptPoolMutation → PromptUniform (enum, comments, wiring)
   - Wire PromptCrossoverMode into createRawComponents (non-wired path)
   - Add categorical tool diversity (Params[tools]) to paramDistance
   - Make SetActive atomic: wrap *sql.DB in a BeginTx/Rollback/Commit
   - Fix default EliteCount 2→3, BreedingPoolRatio doc 0.3→0.6
   - DRY childID generation in Crossover into generateChildID helper
   - Log warning in ParseMutationType default case for unknown strings
   - Add uint/uint64/uint32 support to toFloat64

* fix: consolidate deterministic scoring, fix deadlocks and data races across core packages

   - Centralize 3 duplicate deterministic scorer implementations into a single
     DeterministicScore in llm_scorer.go; remove 6 unused constants in service.go
   - Fix ChaosExecutor exchange disconnect deadlock: executeExchangeDisconnect
     no longer re-acquires the mutex already held by Execute (non-reentrant sync.Mutex)
   - Fix GetSurvivalStatus data race: return a deep copy of the events timeline
   - Fix DreamCycle.SetEnabled/IsEnabled data race: guard config.Enabled with mutex
   - Add DefaultChaosExecutor.injectFaults mutex guard for e.rng concurrent access
   - Fix scheduler goroutine leak with cancel-before-start lifecycle pattern
   - Remove 2 unused files (arena_adapter.go, evolution_store.go), VerifyResult,
     VerifyReport, FaultWindowUptime, Skipped field, and other dead code
   - Add runtime warnings in RunScenarioReport for unsupported config fields
   - Replace hardcoded adaptive mutation constants with named constants
   - Add RetrievalGuard.Close() to prevent circuit breaker goroutine leak
   - Map new arena action types to flight diagnostic categories

* feat: add agent resurrection & snapshot system, update migration docs

* refactor(evolution): harden GA system with diversity tracking and validation

* fix(evolution): fix unevaluated score errors in evolution runs

* refactor(genome): implement atomic EvolveAfterScoring API and overhaul fitness sharing

* fix(arena): fix multiple bugs and improve robustness

* feat(scoring,evolution): add tiered scoring system and prompt mutation improvements

* refactor(arena/evolution): implement tiered scoring, evolution reports, and guardrails

* refactor(scoring, evolution, report): clean up formatting, add history tracking, guardrails, and e2e tests

* refactor(scoring cache): replace rwlock with atomic for hit/miss counters

* feat: add full evaluation system, MCP support, observability tooling, and examples

* feat: The project was renamed ARES

* Add JSONL training data pipeline for agent strategy evolution and experience distillation

* fix: add nil validation to leader.New and NewTaskDispatcher, extract magic number constants

* feat: integrate FailoverScorer into evolution scoring pipeline

✦  -  (new) — Project-level FailoverScorer abstraction: chains primary + fallback LLM clients with automatic timeout failover. Rate-limiting on primary only.
   -  — Added Fallbacks []LLMConfig field to LLMConfig.
   -
     - LLMScoreClient now wraps *llm.FailoverScorer instead of managing []*Client directly. Simpler API: NewLLMScoreClient(scorer, heuristic).
     - runRealEvolution() reads from config.Config, builds config list from primary + fallbacks, creates FailoverScorer, and wires it into the evolution system.
     - Removed deprecated ratelimit import (moved inside internal/llm).
   -  — Added fallbacks section with sensenova-u1-fast as backup model

* Enhance agent strategy configuration and memory management

* refactor: migrate all graph builder APIs to return errors instead of panicking

* chore: improve error handling, add logging, and fix multiple issues

* fix: improve llm response parsing and score extraction

* release: prepare 0.2.3

* perf: update benchmark results with 2026-06-24 run data

- Ran all 32 core benchmarks with benchtime=3x on darwin/arm64 (M3 Max, Go 1.26.4)
- 7 hot (<1us), 22 normal (1-100us), 3 cold (>100us)
- All zero-allocation paths preserved (eval, tool exec, result creation,
  event conversion, error wrapping, conflict detection)
- Updated README.md Benchmark Highlights and benchmark_report.md
- Added BenchmarkDistillation (76.9us, end-to-end) to report

* update : readme

* rm some docs

* chore: remove finetune server config and update gitignore

* refactor(evolution): restructure mutation logic and add experience-guided evolution system

* feat: add production readiness guardrails, shadow evaluation, and feedback recording

* refactor: clean up test code, fix mutation sampling, add adaptive feedback wiring

* feat(evolution): add guided mutation, memory scoring, and guardrails

* feat: add interview demo stack with web search tool and prompt length validation

This commit adds a complete autonomous interview search agent demo:
1. Adds web_search tool using SearXNG meta search engine
2. Adds prompt length validation for LLM requests
3. Adds SearXNG Docker configuration and demo setup scripts
4. Updates configs to support max prompt length setting
5. Adds interview demo example with full agent workflow

* feat(ares-evolution): add full autonomous evolution system with metrics and storage

* docs: add module analysis reports; fix evolution bugs; add runtime event bus

* feat(runtime): add execution collector, interrupt & loop plugins; refactor workflow engine

* feat(runtime): add arena fault injection & bus defensive hardening

* refactor(runtime): consolidate and improve plugin hook handling

* feat(runtime): add plugin system, recovery, tooling, and checkpointing

* feat(runtime,examples): add plugin system support and update demos

* chore: release various fixes and example updates

* chore:updates with fixes, perf, and new features

* refactor: clean up code, add error handling, and improve type safety

* refactor: rename project from GoAgent to ARES, add LLM failover, restructure examples

* feat(evolution): add batch LLM scorer, improve failover resilience

- Add BatchScorer interface + LLMScorer.BatchScore: N→1 API calls per
  generation with automatic sub-batch splitting (maxBatchSize=10)
- Wire batch scoring into service.scoreAgents with priority over per-agent path
- Failover client: unify cooldown to 30s on all errors, add per-provider
  timeout (20s default) instead of blocking on dead providers for 60s
- Update GA blog article with new data (3ms vs 5.58s, 1860x gap)
- Refresh run.log and failover tests

* feat(evolution): add batch LLM scorer, improve failover resilience

- Add BatchScorer interface + LLMScorer.BatchScore: N→1 API calls per
  generation with automatic sub-batch splitting (maxBatchSize=10)
- Wire batch scoring into service.scoreAgents with priority over per-agent path
- Failover client: unify cooldown to 30s on all errors, add per-provider
  timeout (20s default) instead of blocking on dead providers for 60s
- Update GA blog article with new data (3ms vs 5.58s, 1860x gap)
- Refresh run.log and failover tests

* chore: bulk complete multiple planned improvements

* chore: complete all planned P0/P1 performance improvements

* perf: increase concurrent LLM scoring limits and optimize sampling

* feat: complete p2 improvements and add multiple new features

* refactor: move HITL feedback plugin to workflow engine, update docs and client

* feat(runtime,workflow): add plugin lifecycle events and dynamic graph routing

* feat(graph): add LoopPlugin support and auto RouterPlugin wiring

- Add LoopPlugin support to Graph.Execute: after each full graph execution,
  check LoopPlugin's MaxIterations and UntilCondition to decide whether
  to re-execute from the start
- Add routeFromPluginBus helper for auto-detecting RouterPlugin from
  PluginBus (fallback when no explicit NodeRouter is set)
- Add 3 tests: MaxIterations, UntilCondition, no-plugin (one-shot)
- Track graph-level iteration count via __loop_iteration state key

* feat(graph): add lifecycle events and LoopPlugin support

- Emit EventWorkflowStarted before each graph iteration
- Emit EventStepStarted before each node execution
- Emit EventStepCompleted/EventStepFailed after each node
- Emit EventWorkflowCompleted on success, EventWorkflowFailed on error/cancel
- Add lifecycle event subscription test verifying event order
- LoopPlugin: MaxIterations and UntilCondition checked between iterations

* feat(graph): checkpoint integration via PluginBus hooks

- Set StartedAt on runtime.Step before BeforeStep call (needed by CheckpointPlugin)
- Add TestGraphCheckpointPlugin verifying checkpoint round-trip with graph
- No heavy changes needed: CheckpointPlugin is a standard BeforeStep/AfterStep
  hook and already works with the graph path

* feat(graph): add ExecuteFromCheckpoint for lightweight resume

- Refactor Execute into shared execute() helper accepting initialExecuted map
- ExecuteFromCheckpoint takes []string of pre-completed node IDs;
  automatically decrements their successors' in-degree so the graph
  continues from the first unexecuted node
- First iteration seeds executed set; subsequent LoopPlugin iterations
  reset to empty (full re-execution)
- Add 3 tests: skip completed nodes, all nodes done, empty list (fresh exec)
- Lightweight design: only tracks node IDs, no large data structures

* fix(graph): replace time.Sleep with channel-based event test pattern

- TestExecuteLifecycleEvents: use cancellable subscriber context + done
  channel instead of time.Sleep(50ms) to eliminate flakiness
- LoopPlugin type assertion already uses safe pattern (loop, ok := ...) -
  no change needed

* style: fix indentation in executor_test.go

* feat(runtime): add evolution plugin and register default instance

* feat(graph): enhance evolution router tests with agent resolver scenarios

* refactor(evolution): split genome_wiring, fix guardrails, wire dream cycle

   - Extract WiredEvolutionSystem/SystemConfig to genome_wiring_system.go
   - Add integration tests in genome_wiring_integration_test.go
   - Fix guardrails: log previous_best before mutation (guardrails.go)
   - Fix guardrails: populate unevaluatedCount, generation, lineageShares (dream_cycle.go)
   - Fix scheduler: add populationSizer interface, WaitGroup, deadlock (scheduler.go)
   - Fix shadow evaluator: add context.Context to scorer signature
   - Wire ActiveStrategyManager and ShadowEvaluator into DreamCycle
   - Cleanup: remove dead routeFromPluginBus, int() cast in test

* refactor: rename package bootstrap

* refactor: rename package callbacks

* Refactor event handling to use ares_events package

- Updated imports from events to ares_events across multiple files.
- Changed event type constants to use ares_events.EventType.
- Modified ObserverPlugin to handle ares_events instead of events.
- Adjusted DynamicExecutor and related components to emit and handle ares_events.
- Updated tests to reflect changes in event handling and ensure compatibility with ares_events.

* refactor: rename 14 internal packages to ares_xxx unified naming

Rename the following internal packages to use the ares_ prefix for
consistent naming across the project:

- bootstrap → ares_bootstrap
- callbacks → ares_callbacks
- ctxutil → ares_ctxutil
- shutdown → ares_shutdown
- ratelimit → ares_ratelimit
- security → ares_security
- config → ares_config
- eval → ares_eval
- observability → ares_observability
- integration → ares_integration
- events → ares_events
- mcp → ares_mcp
- protocol → ares_protocol
- quant → ares_quant

* Refactor workflow engine to use ares_runtime package

* refactor(api): move service implementations to internal/, keep api/ as thin abstraction layer

Move all independent service implementations from api/ to internal/ packages.
The api/ layer now only contains interface definitions, error types, HTTP handlers,
router, and client SDK — no business logic.

Moved packages:
- api/service/agent → internal/agents/
- api/service/graph → internal/workflow/graphservice/
- api/service/llm → internal/llmservice/
- api/service/memory → internal/memoryservice/
- api/service/retrieval → internal/retrievalservice/
- api/ares_evolution → internal/ares_evolution/service/
- api/ares_memory → internal/ares_memory/service/
- api/ares_retrieval → internal/ares_memory/retrieval_api/
- api/ares_experience → internal/ares_experience/service/
- api/eval → internal/ares_eval/service/
- api/marketmaking → internal/ares_quant/marketmaking_api/
- api/*.go → internal/api_impl/

api/ now serves as the public contract layer:
- api/core/ — interface definitions (AgentService, LLMService, etc.)
- api/errors/ — unified error types
- api/client/ — Go client SDK
- api/handler/ — HTTP handlers (thin delegation)
- api/router/ — route registration
- api/service/runtime/ — thin wrapper
- api/service/workflow/ — thin wrapper

* feat(api/core): add Arena, Evolution, and DreamCycle interfaces

- Add Arena interface for chaos engineering (fault injection, resilience scoring)
- Add Evolution interface for genetic algorithm (evolve, best strategy, lineages)
- Add DreamCycle interface for autonomous self-evolution
- Add Runtime interface for agent lifecycle management
- Add default config factories for all new modules
- api/core/ now exposes abstract APIs for all major ARES modules

* feat: add module logging, Event.ModuleName, and bootstrap wiring

Module Logging:
- Add logger.Module() helper for module-scoped structured logging
- Create module loggers for 12 core packages (runtime, workflow, memory,
  leader, sub, llm, mcp, arena, events, dashboard, flight, mcp)
- Convert slog calls to module loggers in all core packages

Event Traceability:
- Add ModuleName field to Event struct
- Update Emit() and PluginBus.Emit() to accept moduleName parameter
- Update all callers across runtime, workflow, leader, sub, memory,
  dashboard, arena, callbacks, and examples

API Layer:
- Add Arena interface for chaos engineering (fault injection, resilience scoring)
- Add Evolution interface for genetic algorithm (evolve, best strategy, lineages)
- Add DreamCycle interface for autonomous self-evolution
- Add Runtime interface for agent lifecycle management
- Add bootstrap package for factory wiring of all modules
- Add default config factories for all new modules

* update reademe

* feat(bootstrap): add MCP, Dashboard, Flight modules and quickstart example

Bootstrap:
- Add MCP manager to ARES container
- Add Dashboard orchestrator to ARES container
- Add Flight recorder to ARES container
- Update Stop() to gracefully shutdown all modules

Examples:
- Add examples/quickstart/ demonstrating bootstrap API usage
- Shows ARES creation, evolution, and runtime stats in ~50 lines

Verified: deprecated APIs (TruncationSelection, RouletteWheelSelection,
MultiPointCrossover, CrossoverWithHalfSplit) are only used by tests,
not production code. Marked for v2 removal.

* chore: remove 10 redundant examples, fix quickstart and bootstrap

Examples removed (redundant or too niche):
- simple, simple_newapi (replaced by quickstart)
- devagent, devagent_newapi (covered by travel)
- capability-demo (covered by quickstart)
- multi-agent-dialog (covered by travel)
- openrouter (too simple)
- quant-demo (duplicate of quant-trading)
- interview-demo (too niche)
- experience-bilingual (too niche)

Fixes:
- bootstrap: handle nil Evolution config gracefully
- quickstart: disable evolution (requires base strategy)

* refactor: rename internal packages with ares_ prefix and clean up old files

* refactor: rename internal packages and update docs to ares_ prefix

* docs: add and update architecture deep dive articles

* fix: fix ci

v0.2.3

Toggle v0.2.3's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
0.2.3 (#34)

* feat(evolution): add genetic algorithm genome package and update docs

* feat(evolution): add full genetic algorithm evolution system

* refactor(evolution): fix multi-byte prompt crossover, add strategy persistence, and update tests

* feat(evolution): add tool mutation, improve performance and add thread safety

* feat: add autonomous evolution framework with arena scoring and genome mutation support

* refactor: add event integrity checks, tool idempotency, and improved fallback

* refactor: replace inline event emission with shared events.Emit helper

* feat(evolution): add autonomous evolution and chaos engineering features

* feat: add autonomous genetic evolution system and tooling improvements

* fix(evolution): fix score agent clone bug and add new GA features

* feat(autonomous-evolution): add full GA evolution demo with LLM scoring and fitness sharing

* feat: add prompt crossover modes, hybrid scoring, and thread safety fixes

* fix(evolution): close wired scoring loop, thread scorer, and harden core paths

   - Thread API-level scorer into wired system adapter so scheduler path
     auto-scores offspring (was nil, breaking scoring loop)
   - Add initScores(0) after RunIdleEvolution in wired Evolve path
   - Add ScoreWithContext(ctx, strategy) to LLMScorer for context propagation
   - Cap lineages at 1000 entries to prevent unbounded memory growth
   - Rename PromptPoolMutation → PromptUniform (enum, comments, wiring)
   - Wire PromptCrossoverMode into createRawComponents (non-wired path)
   - Add categorical tool diversity (Params[tools]) to paramDistance
   - Make SetActive atomic: wrap *sql.DB in a BeginTx/Rollback/Commit
   - Fix default EliteCount 2→3, BreedingPoolRatio doc 0.3→0.6
   - DRY childID generation in Crossover into generateChildID helper
   - Log warning in ParseMutationType default case for unknown strings
   - Add uint/uint64/uint32 support to toFloat64

* fix: consolidate deterministic scoring, fix deadlocks and data races across core packages

   - Centralize 3 duplicate deterministic scorer implementations into a single
     DeterministicScore in llm_scorer.go; remove 6 unused constants in service.go
   - Fix ChaosExecutor exchange disconnect deadlock: executeExchangeDisconnect
     no longer re-acquires the mutex already held by Execute (non-reentrant sync.Mutex)
   - Fix GetSurvivalStatus data race: return a deep copy of the events timeline
   - Fix DreamCycle.SetEnabled/IsEnabled data race: guard config.Enabled with mutex
   - Add DefaultChaosExecutor.injectFaults mutex guard for e.rng concurrent access
   - Fix scheduler goroutine leak with cancel-before-start lifecycle pattern
   - Remove 2 unused files (arena_adapter.go, evolution_store.go), VerifyResult,
     VerifyReport, FaultWindowUptime, Skipped field, and other dead code
   - Add runtime warnings in RunScenarioReport for unsupported config fields
   - Replace hardcoded adaptive mutation constants with named constants
   - Add RetrievalGuard.Close() to prevent circuit breaker goroutine leak
   - Map new arena action types to flight diagnostic categories

* feat: add agent resurrection & snapshot system, update migration docs

* refactor(evolution): harden GA system with diversity tracking and validation

* fix(evolution): fix unevaluated score errors in evolution runs

* refactor(genome): implement atomic EvolveAfterScoring API and overhaul fitness sharing

* fix(arena): fix multiple bugs and improve robustness

* feat(scoring,evolution): add tiered scoring system and prompt mutation improvements

* refactor(arena/evolution): implement tiered scoring, evolution reports, and guardrails

* refactor(scoring, evolution, report): clean up formatting, add history tracking, guardrails, and e2e tests

* refactor(scoring cache): replace rwlock with atomic for hit/miss counters

* feat: add full evaluation system, MCP support, observability tooling, and examples

* feat: The project was renamed ARES

* Add JSONL training data pipeline for agent strategy evolution and experience distillation

* fix: add nil validation to leader.New and NewTaskDispatcher, extract magic number constants

* feat: integrate FailoverScorer into evolution scoring pipeline

✦  -  (new) — Project-level FailoverScorer abstraction: chains primary + fallback LLM clients with automatic timeout failover. Rate-limiting on primary only.
   -  — Added Fallbacks []LLMConfig field to LLMConfig.
   -
     - LLMScoreClient now wraps *llm.FailoverScorer instead of managing []*Client directly. Simpler API: NewLLMScoreClient(scorer, heuristic).
     - runRealEvolution() reads from config.Config, builds config list from primary + fallbacks, creates FailoverScorer, and wires it into the evolution system.
     - Removed deprecated ratelimit import (moved inside internal/llm).
   -  — Added fallbacks section with sensenova-u1-fast as backup model

* Enhance agent strategy configuration and memory management

* refactor: migrate all graph builder APIs to return errors instead of panicking

* chore: improve error handling, add logging, and fix multiple issues

* fix: improve llm response parsing and score extraction

* release: prepare 0.2.3

* perf: update benchmark results with 2026-06-24 run data

- Ran all 32 core benchmarks with benchtime=3x on darwin/arm64 (M3 Max, Go 1.26.4)
- 7 hot (<1us), 22 normal (1-100us), 3 cold (>100us)
- All zero-allocation paths preserved (eval, tool exec, result creation,
  event conversion, error wrapping, conflict detection)
- Updated README.md Benchmark Highlights and benchmark_report.md
- Added BenchmarkDistillation (76.9us, end-to-end) to report

* update : readme

* rm some docs

* chore: remove finetune server config and update gitignore

v0.2.2

Toggle v0.2.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
0.2.2 (#31)

* upgrade PostgreSQL driver to pgx/v5 and refactor error handling

* upgrade PostgreSQL driver to pgx/v5 and refactor error handling

* improve error handling and security in LLM adapters

* update project files and fix various issues

* add third-round audit report for GoAgent project

* fix CI

* fix CI

* fix LICENSE

* fix ci

* decouple from fashion domain and add generic agent support

* efactor: generalize domain models and implement query cache

Rename domain types, upgrade default models, implement TTL query cache, fix tests, add migration guide

* fix: resolve concurrency and error handling issues across multiple components

* fix ci

* fix some codes

* add streaming output and agent loop infrastructure

* feat: implement streaming, agent loop, plugin system, and evaluation framework

- Add ProcessStream for SSE streaming support
- Implement LoopConfig and Evaluator for iterative refinement
- Create ToolFactory and PluginRegistry for dynamic tool loading
- Add evaluation framework with YAML test suites and report generation
- Fix security issues: path traversal, file permissions, context usage

🤖 Generated with CodeArts Agent

* add comprehensive benchmarking and testing infrastructure:

* escape password in DSN and add ILIKE pattern escaping

* correct semaphore available count calculation

* add package documentation and NewTestResult constructor

* update readme

* feat: add leader failover with checkpoint recovery and runtime dynamic graph engine

  Leader Failover:
  - HeartbeatMonitor: add TimeoutCallback and RegisterCallback for agent timeout notifications
  - CheckpointRepository: persist leader state (sessionID) to leader_checkpoints table for recovery
  - TaskRecovery: mark orphaned pending/running tasks as failed after leader crash
  - LeaderSupervisor: monitor leader health, trigger ColdRestartStrategy on failure, recover session
  - Leader agent: initMemoryContext attempts checkpoint recovery before creating new session

  Runtime Dynamic Graph:
  - MutableDAG: thread-safe AddNode/RemoveNode/AddEdge/RemoveEdge with incremental cycle detection
  - GraphEventHub: pub/sub for graph mutation events with non-blocking publish
  - DynamicExecutor: ExecuteDynamic with ApplyAtCheckpoint/ApplyImmediate modes, DAG version tracking

  Infrastructure:
  - Add leader_checkpoints migration with status index
  - MemoryManager: add GetLatestSessionForLeader interface method
  - Fix bare  keywords: replace with errgroup (distillEg, streamEg, stepEg)
  - Fix Stop() race: move status transitions into cleanupOnce.Do
  - Extract hardcoded default_user to config.UserID
  - Add tenant guard to GetLatestSessionForLeader
  - Add sentinel errors for checkpoint operations

* feat(v2): leader failover, dynamic graph, API abstraction, docs & benchmarks

  Leader Failover:
  - HeartbeatMonitor: add TimeoutCallback for agent timeout notifications
  - CheckpointRepository: persist leader state to leader_checkpoints table
  - TaskRecovery: mark orphaned tasks as failed after leader crash
  - LeaderSupervisor: auto-detect failure, create successor, recover session
  - Leader agent: checkpoint recovery in initMemoryContext

  Runtime Dynamic Graph:
  - MutableDAG: thread-safe AddNode/RemoveNode/AddEdge/RemoveEdge with incremental BFS cycle detection
  - DynamicExecutor: ExecuteDynamic with ApplyAtCheckpoint/ApplyImmediate modes
  - GraphEventHub: pub/sub for graph mutation events

  API Abstraction:
  - WorkflowService interface (Execute, ExecuteStream, ListWorkflows, GetWorkflow)
  - Workflow service implementation composing MutableDAG + DynamicExecutor
  - Client.Workflow() accessor

  Infrastructure:
  - Replace bare  with errgroup (distillEg, streamEg, stepEg)
  - Fix Stop() race: move status transitions into cleanupOnce.Do
  - Extract hardcoded default_user to config.UserID
  - Add tenant guard to GetLatestSessionForLeader
  - Add sentinel errors for checkpoint operations
  - Fix SA5011 nil-pointer warnings in 17 test files (28 replacements)

  Documentation:
  - Reorganize docs into en/ and zh/ directories
  - Add leader-failover, dynamic-graph, v2-architecture docs (bilingual)
  - Update framework-comparison with GoAgent positioning

  Benchmarks:
  - Run all 54 benchmarks with -count=3
  - Update benchmark report with v2 component results
  - Save raw logs to benchmarks/logs/

* feat: Refactor vector storage implementation and add in-memory support

* feat(v2): runtime layer, event sourcing, dynamic workflow, HITL, pluggable vector store

New Features:
- Runtime layer: agent lifecycle management, resurrection, event-sourced recovery
- Event Store: MemoryEventStore + PostgresEventStore with optimistic concurrency
- Dynamic Workflow: MutableDAG, DynamicExecutor, GraphEventHub
- Human-in-the-Loop: InterruptConfig, InterruptHandler, InterruptStore
- Agent Resurrection Plugin: pluggable HealthChecker, factory-based recovery
- Pluggable VectorStore: interface-based, PostgreSQL + in-memory implementations
- WorkflowService API: Execute, ExecuteStream, ListWorkflows, GetWorkflow
- StatefulAgent interface: RestoreState, ReplayEvents, Snapshot

Bug Fixes (50):
- Storage: dedup key, write buffer, transactional enqueue, FOR UPDATE SKIP LOCKED
- Workflow: panic recovery, in-degree tracking, deadlock false positive
- AHP: closed channel panic, HeartbeatSender race, error preservation
- Agent: WaitGroup panic, Start/Stop TOCTOU, Process mutual exclusion
- Runtime: nil errgroup, Stop() data race, unbounded replay

Infrastructure:
- CI/CD pipeline, integration tests, benchmarks, bilingual docs
- 6 runnable examples in examples/advanced/

Tests: 2642 pass with -race across 50 packages, 0 lint issues

* fix: lint issues, add GetAgent to Runtime, wire verifyRestoredState in example

  - Fix 32 errcheck/ineffassign/SA1012/unused lint issues across 7 test files
  - Add GetAgent(agentID) method to runtime.Manager for agent lookup
  - Wire verifyRestoredState() call in runtime_resurrection example
  - Remove ineffectual assignment in pg_store_test.go
  - Add nolint directive for intentional nil context test

* refactor: update references from goagent to GoAgentX in example files

* Add integration tests for HITL workflows and runtime resurrection

- Implement HITL workflow integration tests in hitl_workflow_test.go to validate agent execution, approval/rejection handling, and data modification during interrupts.
- Create runtime_resurrection_test.go to test the full resurrection flow of agents, including state recovery, concurrent kills, and handling of maximum restart limits.
- Introduce a new knowledge-base file for documentation purposes.
- Add a PID file for the embedding service to track the running process.

* fix : readme

* feat: add MCP client and web dashboard

Implement two major features for GoAgentX:

MCP Client (internal/mcp/):
- JSON-RPC 2.0 message types with encode/decode
- Transport interface with StdioTransport and SSETransport
- MCPClient handling initialize handshake, tool discovery, and invocation
- MCPTool bridging MCP tools to core.Tool via mcp.<server>.<tool> naming
- MCPManager orchestrating multiple server connections
- MCPToolFactory for PluginRegistry integration
- JSON Schema to ParameterSchema converter
- 42 unit tests with request-driven mock server

Web Dashboard (internal/dashboard/):
- DashboardService reading from runtime, EventStore, MemoryManager
- WebSocket Hub with channel-based pub/sub
- EventBridge forwarding EventStore events to WebSocket channels
- 14 REST endpoints (overview, agents, workflows, memory, events, MCP)
- Embedded SPA with vanilla JS (dashboard home, agent monitor, event stream)
- gorilla/websocket as the only new dependency

Integration:
- MCPConfig and DashboardAppConfig added to config package
- ListAgents() and GetAgentInfo() added to runtime.Manager
- CategoryExternal added to ToolCategory constants
- Bootstrap helpers for wiring MCP and Dashboard from config

* feat: MCP client, dashboard API v2, orchestrator, and docs

MCP Client (internal/mcp/):
- JSON-RPC 2.0 message types with encode/decode
- Transport interface with StdioTransport and SSETransport
- MCPClient: initialize handshake, tool discovery, tool invocation
- MCPTool: bridges MCP tools to core.Tool via mcp.<server>.<tool> naming
- MCPManager: multi-server lifecycle management
- MCPToolFactory: PluginRegistry integration
- JSON Schema to ParameterSchema converter
- 42 unit tests with request-driven mock server

Dashboard (internal/dashboard/):
- APIv2: unified 6-endpoint API (/agents, /mcp, /ws)
- Orchestrator: agent lifecycle (create, run, result) with atomic ID generation
- WSHub: channel-based WebSocket pub/sub with WaitGroup-managed goroutines
- EventBridge: EventStore to WebSocket forwarding
- Embedded SPA: 4-tab dashboard (Overview, Agents, MCP, Orchestrator)
- Panic recovery middleware on all routes
- 56 unit tests covering API handlers, orchestrator, hub, service

Integration:
- CategoryExternal added to ToolCategory constants
- ListAgents() and GetAgentInfo() added to runtime.Manager
- MCPConfig and DashboardAppConfig with validation in config package
- Bootstrap helpers for wiring MCP and Dashboard from config

Example:
- Standalone code review service (examples/mcp-dashboard/)
- Connects codegraph MCP + Ollama LLM
- 5 agent templates (architecture, errors, concurrency, impact, API)
- Periodic review loop with configurable interval
- Config-driven via YAML

Docs:
- English and Chinese docs with Mermaid diagrams
- Design rationale, tradeoffs, protocol flow
- API reference, agent lifecycle, frontend orchestration guide

* refactor: add callbacks system, dashboard/MCP transport enhancements, and LLM tool-call output parser

* feat(flight): add flight recorder for multi-agent runtime intelligence

* feat: prompt templates, output parsers, callbacks, function calling, and agent flight recorder

Prompt Templates (internal/llm/output/template.go):
- PromptTemplate struct with Name, Description, Template, Variables
- TemplateRegistry for storing and retrieving templates by name
- Orchestrator now uses TemplateEngine.Render instead of strings.Replace

Output Parsers (internal/llm/output/parser.go):
- ParseJSONSlice: extract JSON arrays from LLM output
- ParseStructured: unmarshal JSON into arbitrary target structs
- ParseKeyValue: parse Key: Value and Key = Value format

Callbacks (internal/callbacks/):
- Event type constants: LLM, Agent, Tool lifecycle events
- Context struct carrying metadata (AgentID, ToolName, Duration, etc.)
- Thread-safe Registry with On/Emit/Clear/Count methods
- 8 tests including concurrent safety

Function Calling (internal/llm/output/toolcall.go):
- ToolCapable optional interface with GenerateWithTools/SendToolResult
- ToolDefinition, ToolCall, ToolResult, ToolCallResponse types
- OpenAI implementation in openai.go (backward-compatible)
- 31 new tests including multi-turn tool loop

Agent Flight Recorder (internal/flight/):
- Timeline: execution time distribution (Tool/LLM/Wait percentages)
- Graph: agent call tree with Mermaid/DOT/JSON export
- DecisionLog: records why agents made specific choices
- DiagnosticsEngine: auto-classify failures + suggest fixes
- MemoryPipeline: track distillation (500 msgs → 32 experiences → 7 knowledge)
- Collector: subscribes to EventStore, populates all data structures
- ReplaySession: step-by-step task replay with --step=N jump
- FlightRecorder: unified aggregator entry point
- 59 tests with race detector clean

* feat: add chaos engineering arena and agent genealogy tracking

- Introduce the internal/arena package for chaos testing: inject faults
  (kill leader, kill agent, remove nodes/edges), define scenarios, and
  expose HTTP endpoints with auto-refreshing dashboard view.
- Add internal/flight package to track agent lineage across spawns,
  promotions, and failover resurrection via a Genealogy tree and a
  GenealogyCollector that consumes event store events.
- Overhaul the dashboard UI: new sidebar with icons and Arena section,
  dedicated Arena page (stats grid, fault injectors, history table),
  refined stat cards, badges with status dots, button styles, form
  elements, and responsive layout.
- Wire arena routes into the dashboard API and update orchestrator code.

* feat: event-driven resurrection, API abstraction, and interface improvements

Resurrection with memory:
- Agent killed mid-task → reads previous MCP data from EventStore → resumes LLM analysis
- loadPreviousData loads raw data from mcp.data.gathered events
- Resumed agents skip completed MCP steps, reuse historical data

API package (api/):
- StartService() — one-call startup (MCP + LLM + orchestrator + dashboard)
- ServiceConfig, LoadServiceConfig — YAML config
- MCPAdapter, LLMAdapter, ArenaAdapter — interface bridges
- DefaultReviewTasks + BuildAgentRequest — data-driven agent configs

Orchestrator improvements:
- SetToolAliases() — short name resolution (files → codegraph_files)
- BuildToolAliases() — auto-generate aliases from MCP tool list
- Event emission for mcp.data.gathered with raw data payload
- Resume logic skips MCP gathering when data already loaded

Example simplified to 41 lines:
- api.StartService(cfg) → svc.RunReview() → svc.Wait()

Vet fixes:
- Mock memory managers: added SetEventStore method
- Config type renamed to ServiceConfig to avoid conflict

Docs: MCP + Dashboard design doc with Mermaid diagrams
Tests: 400+ across all packages, 0 races, 0 lint issues

* feat: MCP client, dashboard, flight recorder, arena, and self-healing orchestration

* fix:some bugs

* arena: add kill_orchestrator + network_partition fault types

- Add ActionKillOrchestrator / ActionNetworkPartition constants
- Extend RuntimeProvider interface with PartitionNetwork method
- Add Injector.KillOrchestrator / Injector.NetworkPartition methods
- Wire both into Service.Execute switch and survival random selection
- Add HTTP routes (POST /arena/orchestrator/kill, POST /arena/agent/{id}/partition)
- Update ValidateAction, RoutePath, ParseActionType
- Update mockRuntime in injector_test.go
- Add frontend buttons + JS handlers in app.js

api/client: support NewMemoryManagerWithDistiller

- Add optional Embedder + ExpRepo fields to MemoryConfig
- NewClient conditionally uses NewMemoryManagerWithDistiller when Embedder set

llm: plumb RecordLLMCall for end-to-end OTel tracing

- Add Tracer field + SetTracer to llm.Client
- Generate and GenerateStream wrap calls with RecordLLMCall
- api/service/llm Config gains optional Tracer field, wired to client

* refactor: extract restore logic, expose migration DDL, add tool lifecycle hooks, and clean up validators

* refactor: prune unused components, deduplicate runtime resurrection, and improve error visibility

* feat: add new chaos fault types and enhance arena resilience system

* refactor(dashboard): streamline MCP dashboard frontend assets

* refactor: add event auto-compaction, new quant demo, and clean up code

* refactor(events): clean up code and improve error handling

* chore: remove unused files and update documentation

* release: prepare 0.2.1 changelog and documentation updates

* feat: add quant trading example with SQLite backend

* refactor: rename quant-demo to quant-trading, update configs and docs

* refactor(api): improve config safety and add chaos test suite

* quant: add investment simulator, internationalize prompts and docs, fix various issues

* feat: add portfolio simulator and research memory bridge; refactor quant trading and marketmaking API

* refactor: migrate quant-trading example to public marketmaking API; add multi-asset backtest support; enforce snapshot-only data constraint in analyst prompts; remove internal portfolio re-exports

* feat: add CoinGecko crypto feed; improve retrieval precision mode

Add internal/quant/market/coingecko.go for crypto OHLC/quote data
Refine isPrecisionMode with regex math-expression detection in both retrieval services
Support nil/empty embeddings with dynamic SQL in knowledge_repository.go
Delegate query prefix handling to EmbedWithPrefix in simple retrieval
Add fallback search layers in simple_retrieval_service.go
Use configurable TopK in search calls; remove hardcoded 5

* feat(context,memory): add context cleaning, refactor memory manager lifecycle, unify embedding workflow; remove obsolete docs and quant-trading symlink

* feat(embedding): unify embedding lifecycle across distillation, storage, and retrieval

 Introduce a canonical embedding pipeline that replaces ad-hoc EmbedWithPrefix
 calls with typed EmbeddingSpec objects, ensuring deterministic vector generation
 across all memory paths.

 Added:
 - internal/memory/embedding/spec.go — EmbeddingKind, EmbeddingSpec, canonical
   text builders (BuildMemoryQuerySpec, BuildMemoryExperienceSpec) with
   deterministic hash computation
 - internal/memory/embedding/pipeline.go — EmbeddingPipeline interface and
   implementation wrapping the existing EmbeddingService

 Integrated:
 - distillation/distiller.go — SetEmbeddingPipeline; uses BuildSpec(KindMemoryExperience)
   for conflict-detection embedding, falls back to legacy EmbedWithPrefix
 - manager_impl.go — SearchSimilarTasks uses BuildMemoryQuerySpec + pipeline.Embed
   instead of direct EmbedWithPrefix
 - production_manager.go — StoreDistilledTask writes canonical spec text and
   metadata (SpecKind, SpecPrefix, SpecHash) instead of fmt.Sprintf(%v, payload)
 - write_buffer.go — EmbeddingTask carries SpecKind/Prefix/Dim/Hash fields for
   spec-tracked content
 - embedding_queue.go — generateDedupeKey uses SpecHash when available,
   falling back to content+model+version
 - retrieval_service.go — uses pipeline.BuildSpec(KindMemoryQuery) for query
   embedding
 - simple_retrieval_service.go — uses pipeline.BuildSpec(KindMemoryQuery) for
   query embedding

* refactor(context,memory,workflow): preserve tool call causality in cleaner; emit tool lifecycle events; expand memory metadata propagation

* feat(workflow): add ReplaceNode, recovery handler, event propagation

   - MutableDAG.ReplaceNode with atomic edge migration + simulated cycle detection
   - StepRecoveryHandler interface + RecoveryReplaceNode built-in policy
   - DynamicExecutor recovery orchestration (cancel → replace → resume)
   - Full test coverage for replacement, recovery, events, and race conditions

* fix(engine): resolve data race and timing issues in dynamic executor recovery

* fix:(docs):fix docs name

* feat: expand marketmaking API, decline workflow docs, trim recovery plan, refine memory pipeline, add code review audit

- api: extend marketmaking client/paper tests and add llm/runtime service hooks
- docs: rewrite workflow-engine deep-dive; delete node-level-recovery-plan
- internal: polish memory distiller and manager implementation; update quant memory store
- internal: tweak leader supervisor and llm client behavior; fix coverage test
- examples: refresh quant result sample and devagent entrypoint
- root: add CODE_REVIEW.md with findings across 606 Go files

* refactor: extract shared truncate utilities, clean up code

* chore: update CLI tools, memory distillation pipeline, storage migration, and knowledge-base example

* update :read me

* fix : ci

v0.2.1

Toggle v0.2.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
v0.2.1

* upgrade PostgreSQL driver to pgx/v5 and refactor error handling

* upgrade PostgreSQL driver to pgx/v5 and refactor error handling

* improve error handling and security in LLM adapters

* update project files and fix various issues

* add third-round audit report for GoAgent project

* fix CI

* fix CI

* fix LICENSE

* fix ci

* decouple from fashion domain and add generic agent support

* efactor: generalize domain models and implement query cache

Rename domain types, upgrade default models, implement TTL query cache, fix tests, add migration guide

* fix: resolve concurrency and error handling issues across multiple components

* fix ci

* fix some codes

* add streaming output and agent loop infrastructure

* feat: implement streaming, agent loop, plugin system, and evaluation framework

- Add ProcessStream for SSE streaming support
- Implement LoopConfig and Evaluator for iterative refinement
- Create ToolFactory and PluginRegistry for dynamic tool loading
- Add evaluation framework with YAML test suites and report generation
- Fix security issues: path traversal, file permissions, context usage

🤖 Generated with CodeArts Agent

* add comprehensive benchmarking and testing infrastructure:

* escape password in DSN and add ILIKE pattern escaping

* correct semaphore available count calculation

* add package documentation and NewTestResult constructor

* update readme

* feat: add leader failover with checkpoint recovery and runtime dynamic graph engine

  Leader Failover:
  - HeartbeatMonitor: add TimeoutCallback and RegisterCallback for agent timeout notifications
  - CheckpointRepository: persist leader state (sessionID) to leader_checkpoints table for recovery
  - TaskRecovery: mark orphaned pending/running tasks as failed after leader crash
  - LeaderSupervisor: monitor leader health, trigger ColdRestartStrategy on failure, recover session
  - Leader agent: initMemoryContext attempts checkpoint recovery before creating new session

  Runtime Dynamic Graph:
  - MutableDAG: thread-safe AddNode/RemoveNode/AddEdge/RemoveEdge with incremental cycle detection
  - GraphEventHub: pub/sub for graph mutation events with non-blocking publish
  - DynamicExecutor: ExecuteDynamic with ApplyAtCheckpoint/ApplyImmediate modes, DAG version tracking

  Infrastructure:
  - Add leader_checkpoints migration with status index
  - MemoryManager: add GetLatestSessionForLeader interface method
  - Fix bare  keywords: replace with errgroup (distillEg, streamEg, stepEg)
  - Fix Stop() race: move status transitions into cleanupOnce.Do
  - Extract hardcoded default_user to config.UserID
  - Add tenant guard to GetLatestSessionForLeader
  - Add sentinel errors for checkpoint operations

* feat(v2): leader failover, dynamic graph, API abstraction, docs & benchmarks

  Leader Failover:
  - HeartbeatMonitor: add TimeoutCallback for agent timeout notifications
  - CheckpointRepository: persist leader state to leader_checkpoints table
  - TaskRecovery: mark orphaned tasks as failed after leader crash
  - LeaderSupervisor: auto-detect failure, create successor, recover session
  - Leader agent: checkpoint recovery in initMemoryContext

  Runtime Dynamic Graph:
  - MutableDAG: thread-safe AddNode/RemoveNode/AddEdge/RemoveEdge with incremental BFS cycle detection
  - DynamicExecutor: ExecuteDynamic with ApplyAtCheckpoint/ApplyImmediate modes
  - GraphEventHub: pub/sub for graph mutation events

  API Abstraction:
  - WorkflowService interface (Execute, ExecuteStream, ListWorkflows, GetWorkflow)
  - Workflow service implementation composing MutableDAG + DynamicExecutor
  - Client.Workflow() accessor

  Infrastructure:
  - Replace bare  with errgroup (distillEg, streamEg, stepEg)
  - Fix Stop() race: move status transitions into cleanupOnce.Do
  - Extract hardcoded default_user to config.UserID
  - Add tenant guard to GetLatestSessionForLeader
  - Add sentinel errors for checkpoint operations
  - Fix SA5011 nil-pointer warnings in 17 test files (28 replacements)

  Documentation:
  - Reorganize docs into en/ and zh/ directories
  - Add leader-failover, dynamic-graph, v2-architecture docs (bilingual)
  - Update framework-comparison with GoAgent positioning

  Benchmarks:
  - Run all 54 benchmarks with -count=3
  - Update benchmark report with v2 component results
  - Save raw logs to benchmarks/logs/

* feat: Refactor vector storage implementation and add in-memory support

* feat(v2): runtime layer, event sourcing, dynamic workflow, HITL, pluggable vector store

New Features:
- Runtime layer: agent lifecycle management, resurrection, event-sourced recovery
- Event Store: MemoryEventStore + PostgresEventStore with optimistic concurrency
- Dynamic Workflow: MutableDAG, DynamicExecutor, GraphEventHub
- Human-in-the-Loop: InterruptConfig, InterruptHandler, InterruptStore
- Agent Resurrection Plugin: pluggable HealthChecker, factory-based recovery
- Pluggable VectorStore: interface-based, PostgreSQL + in-memory implementations
- WorkflowService API: Execute, ExecuteStream, ListWorkflows, GetWorkflow
- StatefulAgent interface: RestoreState, ReplayEvents, Snapshot

Bug Fixes (50):
- Storage: dedup key, write buffer, transactional enqueue, FOR UPDATE SKIP LOCKED
- Workflow: panic recovery, in-degree tracking, deadlock false positive
- AHP: closed channel panic, HeartbeatSender race, error preservation
- Agent: WaitGroup panic, Start/Stop TOCTOU, Process mutual exclusion
- Runtime: nil errgroup, Stop() data race, unbounded replay

Infrastructure:
- CI/CD pipeline, integration tests, benchmarks, bilingual docs
- 6 runnable examples in examples/advanced/

Tests: 2642 pass with -race across 50 packages, 0 lint issues

* fix: lint issues, add GetAgent to Runtime, wire verifyRestoredState in example

  - Fix 32 errcheck/ineffassign/SA1012/unused lint issues across 7 test files
  - Add GetAgent(agentID) method to runtime.Manager for agent lookup
  - Wire verifyRestoredState() call in runtime_resurrection example
  - Remove ineffectual assignment in pg_store_test.go
  - Add nolint directive for intentional nil context test

* refactor: update references from goagent to GoAgentX in example files

* Add integration tests for HITL workflows and runtime resurrection

- Implement HITL workflow integration tests in hitl_workflow_test.go to validate agent execution, approval/rejection handling, and data modification during interrupts.
- Create runtime_resurrection_test.go to test the full resurrection flow of agents, including state recovery, concurrent kills, and handling of maximum restart limits.
- Introduce a new knowledge-base file for documentation purposes.
- Add a PID file for the embedding service to track the running process.

* fix : readme

* feat: add MCP client and web dashboard

Implement two major features for GoAgentX:

MCP Client (internal/mcp/):
- JSON-RPC 2.0 message types with encode/decode
- Transport interface with StdioTransport and SSETransport
- MCPClient handling initialize handshake, tool discovery, and invocation
- MCPTool bridging MCP tools to core.Tool via mcp.<server>.<tool> naming
- MCPManager orchestrating multiple server connections
- MCPToolFactory for PluginRegistry integration
- JSON Schema to ParameterSchema converter
- 42 unit tests with request-driven mock server

Web Dashboard (internal/dashboard/):
- DashboardService reading from runtime, EventStore, MemoryManager
- WebSocket Hub with channel-based pub/sub
- EventBridge forwarding EventStore events to WebSocket channels
- 14 REST endpoints (overview, agents, workflows, memory, events, MCP)
- Embedded SPA with vanilla JS (dashboard home, agent monitor, event stream)
- gorilla/websocket as the only new dependency

Integration:
- MCPConfig and DashboardAppConfig added to config package
- ListAgents() and GetAgentInfo() added to runtime.Manager
- CategoryExternal added to ToolCategory constants
- Bootstrap helpers for wiring MCP and Dashboard from config

* feat: MCP client, dashboard API v2, orchestrator, and docs

MCP Client (internal/mcp/):
- JSON-RPC 2.0 message types with encode/decode
- Transport interface with StdioTransport and SSETransport
- MCPClient: initialize handshake, tool discovery, tool invocation
- MCPTool: bridges MCP tools to core.Tool via mcp.<server>.<tool> naming
- MCPManager: multi-server lifecycle management
- MCPToolFactory: PluginRegistry integration
- JSON Schema to ParameterSchema converter
- 42 unit tests with request-driven mock server

Dashboard (internal/dashboard/):
- APIv2: unified 6-endpoint API (/agents, /mcp, /ws)
- Orchestrator: agent lifecycle (create, run, result) with atomic ID generation
- WSHub: channel-based WebSocket pub/sub with WaitGroup-managed goroutines
- EventBridge: EventStore to WebSocket forwarding
- Embedded SPA: 4-tab dashboard (Overview, Agents, MCP, Orchestrator)
- Panic recovery middleware on all routes
- 56 unit tests covering API handlers, orchestrator, hub, service

Integration:
- CategoryExternal added to ToolCategory constants
- ListAgents() and GetAgentInfo() added to runtime.Manager
- MCPConfig and DashboardAppConfig with validation in config package
- Bootstrap helpers for wiring MCP and Dashboard from config

Example:
- Standalone code review service (examples/mcp-dashboard/)
- Connects codegraph MCP + Ollama LLM
- 5 agent templates (architecture, errors, concurrency, impact, API)
- Periodic review loop with configurable interval
- Config-driven via YAML

Docs:
- English and Chinese docs with Mermaid diagrams
- Design rationale, tradeoffs, protocol flow
- API reference, agent lifecycle, frontend orchestration guide

* refactor: add callbacks system, dashboard/MCP transport enhancements, and LLM tool-call output parser

* feat(flight): add flight recorder for multi-agent runtime intelligence

* feat: prompt templates, output parsers, callbacks, function calling, and agent flight recorder

Prompt Templates (internal/llm/output/template.go):
- PromptTemplate struct with Name, Description, Template, Variables
- TemplateRegistry for storing and retrieving templates by name
- Orchestrator now uses TemplateEngine.Render instead of strings.Replace

Output Parsers (internal/llm/output/parser.go):
- ParseJSONSlice: extract JSON arrays from LLM output
- ParseStructured: unmarshal JSON into arbitrary target structs
- ParseKeyValue: parse Key: Value and Key = Value format

Callbacks (internal/callbacks/):
- Event type constants: LLM, Agent, Tool lifecycle events
- Context struct carrying metadata (AgentID, ToolName, Duration, etc.)
- Thread-safe Registry with On/Emit/Clear/Count methods
- 8 tests including concurrent safety

Function Calling (internal/llm/output/toolcall.go):
- ToolCapable optional interface with GenerateWithTools/SendToolResult
- ToolDefinition, ToolCall, ToolResult, ToolCallResponse types
- OpenAI implementation in openai.go (backward-compatible)
- 31 new tests including multi-turn tool loop

Agent Flight Recorder (internal/flight/):
- Timeline: execution time distribution (Tool/LLM/Wait percentages)
- Graph: agent call tree with Mermaid/DOT/JSON export
- DecisionLog: records why agents made specific choices
- DiagnosticsEngine: auto-classify failures + suggest fixes
- MemoryPipeline: track distillation (500 msgs → 32 experiences → 7 knowledge)
- Collector: subscribes to EventStore, populates all data structures
- ReplaySession: step-by-step task replay with --step=N jump
- FlightRecorder: unified aggregator entry point
- 59 tests with race detector clean

* feat: add chaos engineering arena and agent genealogy tracking

- Introduce the internal/arena package for chaos testing: inject faults
  (kill leader, kill agent, remove nodes/edges), define scenarios, and
  expose HTTP endpoints with auto-refreshing dashboard view.
- Add internal/flight package to track agent lineage across spawns,
  promotions, and failover resurrection via a Genealogy tree and a
  GenealogyCollector that consumes event store events.
- Overhaul the dashboard UI: new sidebar with icons and Arena section,
  dedicated Arena page (stats grid, fault injectors, history table),
  refined stat cards, badges with status dots, button styles, form
  elements, and responsive layout.
- Wire arena routes into the dashboard API and update orchestrator code.

* feat: event-driven resurrection, API abstraction, and interface improvements

Resurrection with memory:
- Agent killed mid-task → reads previous MCP data from EventStore → resumes LLM analysis
- loadPreviousData loads raw data from mcp.data.gathered events
- Resumed agents skip completed MCP steps, reuse historical data

API package (api/):
- StartService() — one-call startup (MCP + LLM + orchestrator + dashboard)
- ServiceConfig, LoadServiceConfig — YAML config
- MCPAdapter, LLMAdapter, ArenaAdapter — interface bridges
- DefaultReviewTasks + BuildAgentRequest — data-driven agent configs

Orchestrator improvements:
- SetToolAliases() — short name resolution (files → codegraph_files)
- BuildToolAliases() — auto-generate aliases from MCP tool list
- Event emission for mcp.data.gathered with raw data payload
- Resume logic skips MCP gathering when data already loaded

Example simplified to 41 lines:
- api.StartService(cfg) → svc.RunReview() → svc.Wait()

Vet fixes:
- Mock memory managers: added SetEventStore method
- Config type renamed to ServiceConfig to avoid conflict

Docs: MCP + Dashboard design doc with Mermaid diagrams
Tests: 400+ across all packages, 0 races, 0 lint issues

* feat: MCP client, dashboard, flight recorder, arena, and self-healing orchestration

* fix:some bugs

* arena: add kill_orchestrator + network_partition fault types

- Add ActionKillOrchestrator / ActionNetworkPartition constants
- Extend RuntimeProvider interface with PartitionNetwork method
- Add Injector.KillOrchestrator / Injector.NetworkPartition methods
- Wire both into Service.Execute switch and survival random selection
- Add HTTP routes (POST /arena/orchestrator/kill, POST /arena/agent/{id}/partition)
- Update ValidateAction, RoutePath, ParseActionType
- Update mockRuntime in injector_test.go
- Add frontend buttons + JS handlers in app.js

api/client: support NewMemoryManagerWithDistiller

- Add optional Embedder + ExpRepo fields to MemoryConfig
- NewClient conditionally uses NewMemoryManagerWithDistiller when Embedder set

llm: plumb RecordLLMCall for end-to-end OTel tracing

- Add Tracer field + SetTracer to llm.Client
- Generate and GenerateStream wrap calls with RecordLLMCall
- api/service/llm Config gains optional Tracer field, wired to client

* refactor: extract restore logic, expose migration DDL, add tool lifecycle hooks, and clean up validators

* refactor: prune unused components, deduplicate runtime resurrection, and improve error visibility

* feat: add new chaos fault types and enhance arena resilience system

* refactor(dashboard): streamline MCP dashboard frontend assets

* refactor: add event auto-compaction, new quant demo, and clean up code

* refactor(events): clean up code and improve error handling

* chore: remove unused files and update documentation

* release: prepare 0.2.1 changelog and documentation updates

v0.2.0

Toggle v0.2.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
v0.2.0 (#26)

* upgrade PostgreSQL driver to pgx/v5 and refactor error handling

* upgrade PostgreSQL driver to pgx/v5 and refactor error handling

* improve error handling and security in LLM adapters

* update project files and fix various issues

* add third-round audit report for GoAgent project

* fix CI

* fix CI

* fix LICENSE

* fix ci

* decouple from fashion domain and add generic agent support

* efactor: generalize domain models and implement query cache

Rename domain types, upgrade default models, implement TTL query cache, fix tests, add migration guide

* fix: resolve concurrency and error handling issues across multiple components

* fix ci

* fix some codes

* add streaming output and agent loop infrastructure

* feat: implement streaming, agent loop, plugin system, and evaluation framework

- Add ProcessStream for SSE streaming support
- Implement LoopConfig and Evaluator for iterative refinement
- Create ToolFactory and PluginRegistry for dynamic tool loading
- Add evaluation framework with YAML test suites and report generation
- Fix security issues: path traversal, file permissions, context usage

🤖 Generated with CodeArts Agent

* add comprehensive benchmarking and testing infrastructure:

* escape password in DSN and add ILIKE pattern escaping

* correct semaphore available count calculation

* add package documentation and NewTestResult constructor

* update readme

* feat: add leader failover with checkpoint recovery and runtime dynamic graph engine

  Leader Failover:
  - HeartbeatMonitor: add TimeoutCallback and RegisterCallback for agent timeout notifications
  - CheckpointRepository: persist leader state (sessionID) to leader_checkpoints table for recovery
  - TaskRecovery: mark orphaned pending/running tasks as failed after leader crash
  - LeaderSupervisor: monitor leader health, trigger ColdRestartStrategy on failure, recover session
  - Leader agent: initMemoryContext attempts checkpoint recovery before creating new session

  Runtime Dynamic Graph:
  - MutableDAG: thread-safe AddNode/RemoveNode/AddEdge/RemoveEdge with incremental cycle detection
  - GraphEventHub: pub/sub for graph mutation events with non-blocking publish
  - DynamicExecutor: ExecuteDynamic with ApplyAtCheckpoint/ApplyImmediate modes, DAG version tracking

  Infrastructure:
  - Add leader_checkpoints migration with status index
  - MemoryManager: add GetLatestSessionForLeader interface method
  - Fix bare  keywords: replace with errgroup (distillEg, streamEg, stepEg)
  - Fix Stop() race: move status transitions into cleanupOnce.Do
  - Extract hardcoded default_user to config.UserID
  - Add tenant guard to GetLatestSessionForLeader
  - Add sentinel errors for checkpoint operations

* feat(v2): leader failover, dynamic graph, API abstraction, docs & benchmarks

  Leader Failover:
  - HeartbeatMonitor: add TimeoutCallback for agent timeout notifications
  - CheckpointRepository: persist leader state to leader_checkpoints table
  - TaskRecovery: mark orphaned tasks as failed after leader crash
  - LeaderSupervisor: auto-detect failure, create successor, recover session
  - Leader agent: checkpoint recovery in initMemoryContext

  Runtime Dynamic Graph:
  - MutableDAG: thread-safe AddNode/RemoveNode/AddEdge/RemoveEdge with incremental BFS cycle detection
  - DynamicExecutor: ExecuteDynamic with ApplyAtCheckpoint/ApplyImmediate modes
  - GraphEventHub: pub/sub for graph mutation events

  API Abstraction:
  - WorkflowService interface (Execute, ExecuteStream, ListWorkflows, GetWorkflow)
  - Workflow service implementation composing MutableDAG + DynamicExecutor
  - Client.Workflow() accessor

  Infrastructure:
  - Replace bare  with errgroup (distillEg, streamEg, stepEg)
  - Fix Stop() race: move status transitions into cleanupOnce.Do
  - Extract hardcoded default_user to config.UserID
  - Add tenant guard to GetLatestSessionForLeader
  - Add sentinel errors for checkpoint operations
  - Fix SA5011 nil-pointer warnings in 17 test files (28 replacements)

  Documentation:
  - Reorganize docs into en/ and zh/ directories
  - Add leader-failover, dynamic-graph, v2-architecture docs (bilingual)
  - Update framework-comparison with GoAgent positioning

  Benchmarks:
  - Run all 54 benchmarks with -count=3
  - Update benchmark report with v2 component results
  - Save raw logs to benchmarks/logs/

* feat: Refactor vector storage implementation and add in-memory support

* feat(v2): runtime layer, event sourcing, dynamic workflow, HITL, pluggable vector store

New Features:
- Runtime layer: agent lifecycle management, resurrection, event-sourced recovery
- Event Store: MemoryEventStore + PostgresEventStore with optimistic concurrency
- Dynamic Workflow: MutableDAG, DynamicExecutor, GraphEventHub
- Human-in-the-Loop: InterruptConfig, InterruptHandler, InterruptStore
- Agent Resurrection Plugin: pluggable HealthChecker, factory-based recovery
- Pluggable VectorStore: interface-based, PostgreSQL + in-memory implementations
- WorkflowService API: Execute, ExecuteStream, ListWorkflows, GetWorkflow
- StatefulAgent interface: RestoreState, ReplayEvents, Snapshot

Bug Fixes (50):
- Storage: dedup key, write buffer, transactional enqueue, FOR UPDATE SKIP LOCKED
- Workflow: panic recovery, in-degree tracking, deadlock false positive
- AHP: closed channel panic, HeartbeatSender race, error preservation
- Agent: WaitGroup panic, Start/Stop TOCTOU, Process mutual exclusion
- Runtime: nil errgroup, Stop() data race, unbounded replay

Infrastructure:
- CI/CD pipeline, integration tests, benchmarks, bilingual docs
- 6 runnable examples in examples/advanced/

Tests: 2642 pass with -race across 50 packages, 0 lint issues

* fix: lint issues, add GetAgent to Runtime, wire verifyRestoredState in example

  - Fix 32 errcheck/ineffassign/SA1012/unused lint issues across 7 test files
  - Add GetAgent(agentID) method to runtime.Manager for agent lookup
  - Wire verifyRestoredState() call in runtime_resurrection example
  - Remove ineffectual assignment in pg_store_test.go
  - Add nolint directive for intentional nil context test

* refactor: update references from goagent to GoAgentX in example files

* Add integration tests for HITL workflows and runtime resurrection

- Implement HITL workflow integration tests in hitl_workflow_test.go to validate agent execution, approval/rejection handling, and data modification during interrupts.
- Create runtime_resurrection_test.go to test the full resurrection flow of agents, including state recovery, concurrent kills, and handling of maximum restart limits.
- Introduce a new knowledge-base file for documentation purposes.
- Add a PID file for the embedding service to track the running process.

* fix : readme