Commit graph

6 commits

Author SHA1 Message Date
Danieldd28
acac61ac2f feat: enable dynamic swarm event relaying to original channels (Telegram/Discord) 2026-02-11 02:26:50 +07:00
Danieldd28
6bdf30a777 feat: stabilize swarm engine and enhance observability
Summary of changes:
1. Hard-coded Limits (Fixed): Added SummarizeThreshold and connected limits to config.
2. Silent Database Failures (Fixed): Enhanced error handling and logging for SQLite and NodeActor transitions.
3. "Zombie" Agents (Fixed): Implemented StopAll/Stop methods for graceful shutdown and linked to AgentLoop.
4. Memory ID Corruption (Verified): Ensured valid float formatting and added timestamps for uniqueness.
5. Code Quality: Corrected typos in system prompts and improved /swarm command error reporting.
2026-02-11 01:05:55 +07:00
Danieldd28
52e3470e06 feat: implement swarm agents with hierarchical collaboration and vector memory
This commit introduces a multi-agent Swarm Engine to PicoClaw,
enabling complex task orchestration through autonomous collaboration and long-term
semantic memory.

Key Features:
- Actor Model Architecture: Every agent (node) runs in an isolated goroutine,
  communicating via a lightweight internal Event Bus.
- Hierarchical Delegation: Manager nodes can dynamically spawn specialized
  worker nodes (Researchers, Analysts, etc.) to perform sub-tasks in parallel.
- Hybrid Memory System: Combined SQLite for state persistence and Chromem-go
  for a persistent, cross-swarm Vector Knowledge Base.
- Progressive Summarization: Implemented an intelligent memory pruning mechanism
  that summarizes older context before truncation to preserve findings without
  exceeding token limits.
- Role-Based Access Control (RBAC): Configurable tool policies per role
  (e.g., Researchers can browse but not execute shell commands).

Performance & Scaling:
- Low Footprint: Idle memory usage is ~7-8 MB RSS.
- Efficient Scaling: During a stress test with 10 concurrent agents performing
  intensive research, memory usage peaked at only 27 MB.
- Per-Node Cost: Each active agent consumes approximately 0.6 MB to 2 MB of
  physical RAM depending on conversation length and summarization state.
- Stability: Successfully handled 10 parallel LLM requests with zero race
  conditions, showcasing the robustness of the Go-based Actor model.

Integration:
- Native CLI Support: Added /swarm spawn, /swarm list, and /swarm status commands.
- Mermaid Visualization: Support for /swarm viz <id> to generate organizational
  charts of active agent hierarchies.
- Configurable: Roles, models, and security policies are fully customizable
  via config.json.
2026-02-10 21:53:43 +07:00
Danieldd28
2df60b2fa3 feat: make context compression dynamic and add thinking animation
- Implement dynamic context window awareness for compression thresholds
- Add 'Thinking' animation for Telegram channel with auto-edit response
- Refactor summarization to handle multi-part batches and oversized messages
2026-02-10 02:00:57 +07:00
Danieldd28
07e624c8da feat: implement dynamic context compression for efficient memory usage
- Added Summary field to Session struct
- Implemented background summarization when history > 20 messages
- Included conversation summary in system prompt for long-term context
- Added thread-safety for concurrent summarization per session
2026-02-10 01:25:46 +07:00
lxowalle
e17693b17c * First commit 2026-02-09 19:20:19 +08:00