16 Commits

Author SHA1 Message Date
c827d341ab Overhaul agent quality — prompts, tools, config, compression
- Rewrite system prompt: structured sections, explicit tool descriptions
  with full SKILL.md descriptions, multi-agent awareness
- Add write_file skill for creating/modifying workspace files
- Per-template config passthrough: temperature, num_predict, context_size,
  compress settings, max_tool_rounds, max_response_lines
- Bump defaults: 1024 output tokens (was 512), 500-char deque (was 200),
  250-token summaries (was 150), compress threshold 16 (was 12), keep 8 (was 4)
- Cache compression by content hash — no redundant summarization
- Update all 5 templates with tuned settings per role
2026-04-08 18:28:26 +00:00
5b312e34de Add read_file skill, session persistence, and update script
- New read_file skill: paginated file reading with line ranges,
  path restricted to /workspace, binary detection, directory listing
- Session persistence via SQLite + FTS5: conversation history survives
  agent restarts, last N messages restored into deque on boot,
  auto-prune to 1000 messages
- Update truncation hint to reference read_file instead of run_command
- New scripts/update.sh for patching rootfs + rebuilding snapshot

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 14:49:54 +00:00
ca224a0ae9 Slim down agent.py — uses skills.py and tools.py modules 2026-04-08 01:58:06 +00:00
383113126f Extract skills.py and tools.py from agent.py 2026-04-08 01:58:06 +00:00
2d371ceb86 Harden SKILL.md parser — error logging, flexible indent, CRLF support, type validation 2026-04-08 01:51:34 +00:00
d838fe08cf Fix thread safety on cooldown lock, IRC line split to 380 chars 2026-04-08 01:50:03 +00:00
fe162d11f7 Fix memory reload after save_memory — reload all memory files 2026-04-08 01:36:01 +00:00
185cda575e Add file logging to agent — writes to /workspace/agent.log 2026-04-07 21:01:39 +00:00
3083b5d9d7 Add large output handling and iteration budget to agent
- Tool outputs >2K chars saved to workspace/tool_outputs/ with preview
- Agent gets first 1500 chars + file path to read the rest
- Iteration budget bumped to 10 rounds (configurable per template)
- Warning injected when 2 rounds remaining to help model wrap up
2026-04-07 20:53:51 +00:00
2d42d498b3 Refactor agent.py to use discoverable skill system 2026-04-07 20:35:56 +00:00
d3ed3619c2 Add fetch_url tool to agent 2026-04-07 17:43:39 +00:00
5cc6a38c96 Add !status command and web search tool
- !status: shows agent count, load, RAM, disk, uptime, Ollama model loaded
- web_search tool: agents can search via SearXNG (searx.mymx.me)
  Works in both structured and text-based tool call paths

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 14:36:27 +00:00
7ead9c86c5 Fix agents.json race condition on concurrent starts
Re-read agents.json immediately before writing in startAgent to avoid
one start overwriting another's entry. Also clean stale sockets before
starting new agents.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 13:54:54 +00:00
36af68da90 Fix trigger matching and add network policies
- Trigger only matches when nick is at start of message, not mid-text
  Fixes: "coder: say hi to worker" no longer triggers worker
- Network policies per agent: "full" (default), "local" (LAN only), "none" (IRC+Ollama only)
  Configured via template "network" field, applied as iptables rules per agent IP

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 13:45:05 +00:00
6fc6e89917 Add thread safety and agent health checks
- IRC socket writes protected by threading.Lock in agent.py
- Overseer runs periodic health check (30s interval)
- Detects dead agent processes, cleans up resources, announces in #agents

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 13:41:50 +00:00
ff694d12f6 Initial commit — fireclaw multi-agent system
Firecracker microVM-based multi-agent system with IRC orchestration and local LLMs.

Features:
- Ephemeral command runner with VM snapshots (~1.1s)
- Multi-agent orchestration via overseer IRC bot
- 5 agent templates (worker, coder, researcher, quick, creative)
- Tool access (shell + podman containers inside VMs)
- Persistent workspace + memory system (MEMORY.md pattern)
- Agent hot-reload (model/persona swap via SSH + SIGHUP)
- Non-root agents, graceful shutdown, crash recovery
- Agent-to-agent communication via IRC
- DM support, /invite support
- Systemd service, 20 regression tests

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 13:28:29 +00:00