xonecas.io
60255
Zn

Zoea-Nova / commit 14d36b4

docs: add swarm activity report and update known issues

xonecas2026-02-04 14d36b4a5f0179f5019008128b209b1d1b9e209f parent 8b1a7b8

6 files changed

.opencode/agents/db-tester.md+0−22
@@ -1,22 +0,0 @@
1----
2-description: Runs a 3-minute database snapshot test and reports on agent behavior and tool usage.
3-mode: subagent
4-model: opencode/gemini-3-flash
5-tools:
6- bash: true
7- read: true
8----
9-The app is running. Please run a over time test where you take periodic snapshots of the db. Report back on the behaviour and tool usage of the agents. Let's run the test for 3 minutes. Make sure you also check the log file.
10-
11-You have access to:
12-- Database: ~/.zoea-nova/zoea.db
13-- Log file: ~/.zoea-nova/zoea.log
14-
15-Instructions:
16-1. Start a 3-minute timer.
17-2. Periodically (e.g., every 30 seconds) take a snapshot of the database state (e.g., count of memories, active agents).
18-3. Monitor the log file for tool usage and agent activities.
19-4. After 3 minutes, provide a detailed report on:
20- - Agent behavior (which agents were active, what they were doing).
21- - Tool usage (which tools were called, frequency, success/failure).
22- - Any interesting patterns or issues observed in the logs or database.
.opencode/agents/zoea-analyser.md+51−0
@@ -0,0 +1,51 @@
1+---
2+description: Agent with data access for a analysis.
3+agent: general
4+model: opencode/gemini-3-flash
5+---
6+
7+You have access to the production database and log files for Zoea Nova, as well as the underlying LLM provider logs:
8+
9+- **Database**: `~/.zoea-nova/zoea.db`
10+- **Log file**: `~/.zoea-nova/zoea.log`
11+- **Ollama Logs**: via `journalctl -u ollama`
12+
13+Use these files to perform snapshot analyses of the swarm's state, performance, and health.
14+
15+## Analysis Capabilities
16+
17+### Database Analysis
18+
19+You can query the SQLite database using the `sqlite3` command via the `Bash` tool. The schema includes:
20+
21+- `agents`: Agent metadata, providers, models, and current states (`idle`, `thinking`, `executing`).
22+- `memories`: Historical conversation records, including role (system/user/assistant/tool) and source (direct/broadcast/system).
23+
24+**Example Queries:**
25+
26+- List all agents: `sqlite3 ~/.zoea-nova/zoea.db "SELECT * FROM agents;"`
27+- Count memories per agent: `sqlite3 ~/.zoea-nova/zoea.db "SELECT agent_id, COUNT(*) FROM memories GROUP BY agent_id;"`
28+- Recent system logs in memory: `sqlite3 ~/.zoea-nova/zoea.db "SELECT content FROM memories WHERE source = 'system' ORDER BY created_at DESC LIMIT 10;"`
29+
30+### Log Analysis
31+
32+The application logs to `~/.zoea-nova/zoea.log` using `zerolog` (JSON format).
33+
34+- Use `tail -n 100 ~/.zoea-nova/zoea.log` for recent activity.
35+- Use `grep "error" ~/.zoea-nova/zoea.log` to identify failures.
36+- Look for `agent_id`, `event`, and `level` fields in the JSON logs.
37+
38+Ollama server logs (for LLM provider issues):
39+
40+- Use `journalctl -u ollama --no-pager -n 100` to check for model loading errors, GPU issues, or request timeouts.
41+
42+## Reporting Requirements
43+
44+When asked for an analysis, provide a structured report covering:
45+
46+1. **Swarm Status**: Number of active agents, their states, and configured providers.
47+2. **Activity Summary**: Recent broadcast activity and agent-specific conversation volume.
48+3. **Health Check**: Any errors found in the logs or anomalous agent behaviors.
49+4. **Insights**: Trends in agent interactions or performance bottlenecks.
50+
51+Keep your analysis concise and data-driven. Always provide the raw data or query results if they support your conclusions.
.opencode/commands/agent-behaviour-check.md+26−0
@@ -0,0 +1,26 @@
1+---
2+description: Runs a database snapshot analysis and reports on agent behavior and tool usage.
3+agent: analyser
4+model: opencode/gemini-3-flash
5+---
6+
7+Instructions:
8+
9+Analyze the last 5 minutes of activity from the database, application logs, and Ollama server logs, using 30-second intervals for the snapshot analysis.
10+
11+1. **Baseline**: Establish the system state as it was 5 minutes ago (active agents, memory counts) to use as a reference point.
12+2. **Investigation**: For each 30-second interval within the 5-minute window:
13+ - Query the `agents` and `memories` tables for state changes and new messages.
14+ - Examine `zoea.log` for application events, tool calls, or errors.
15+ - Review `journalctl -u ollama` for provider performance or issues.
16+3. **Analyze**: Aggregate the findings from the entire 5-minute window.
17+4. **Report**: Provide a detailed report on:
18+ - **Agent Activity**: Active agents and their state transitions during the period.
19+ - **Tool Efficacy**: Tools called, their frequency, and success/failure rates.
20+ - **Observed Patterns**: Recurring issues, performance bottlenecks, repetitive or anomalous behaviors.
21+
22+**IMPORTANT**:
23+
24+- Do not create any files.
25+- Do not modify any data in the database.
26+- Ensure your report is data-driven, referencing specific log entries or query results.
AGENTS.md+1−0
@@ -19,6 +19,7 @@ Guidelines for AI agents working on the Zoea Nova codebase—a TUI-based swarm c
1919 - Keep the TUI responsive. All LLM/network calls must be non-blocking (goroutines + channels).
2020 - Follow the Bubble Tea Elm Architecture: Model → Update → View.
2121 - No "nice to haves." This is an MVP. Keep scope minimal. MVP is not an escuse for lack of testing or code quality.
22+- Keep track of known issues in `documentation/KNOWN_ISSUES.md` and ensure the list is up-do-date and correct.
2223
2324 ## TUI Testing:
2425
documentation/KNOWN_ISSUES.md+21−0
@@ -0,0 +1,21 @@
1+# KNOWN ISSUES:
2+
3+These are the currently know issues to investigate:
4+
5+- [ ] Agents terminology: Agents is too generic of a name for the swarm members.
6+ **BUG**: We need to generate a unique name from the project zoea thematic.
7+
8+- [ ] Opencode Zen as a provider: This is completly untested. Compile a list of the free models, and create a report in `documentation` named `OPENCODE_ZEN_MODELS.md`. Only use free models in your report.
9+ **BUG**: each individual agent should be able to be configured with different provider/model choice. Currently all use the same model and provider. Keep a sensible default in `config.toml`. We need to also add per model temperature values.
10+
11+- [ ] Captain's Log Bug: There is a consistent pattern of agents failing to use captains_log_add. They appear to be trying to "remember" their registration password but are encountering an empty_entry error from the MCP server. This suggests the LLM might be misformatting the arguments for this specific tool.
12+ **BUG**: Agents find each other's passwords and fail to login. Agents are do not have a reliable way to re-use usernames they created in the past.
13+
14+- [ ] Travel Duration: The travel to the asteroid belt is a long-duration task (30k+ ticks). The agents correctly entered a "waiting" mode, showing they can manage long-term state without wasting tokens on redundant actions.
15+ **BUG**: Agent's should continue to act on his tick during travel. They can still use other actions when traveling. Like chatting, or other non traveling actions in the game. Currently the agent looses his ticks waiting when he could be using the turns to explore the game api and interacting with the swarm.
16+
17+- [ ] TUI usability issues: Swarm messages list isnot kept up to date. Sending a broadcast doesn't update the list of swarm messages.
18+ **BUG**: Breaking change from the spec, the TUI should be high performance and in sync with the data at all times.
19+
20+- [ ] Cognitive Looping and Prompt Inefficiency: Agents can get stuck in "cooldown" loops or redundant "waiting" states, consuming tokens every 30 seconds without operational progress.
21+ **BUG**: The system prompts agents every tick regardless of their state. Agents may hallucinate non-existent cooldowns or fail to use non-traveling actions during long journeys.
documentation/SWARM_ANALYSIS_2026-02-04.md+48−0
@@ -0,0 +1,48 @@
1+# Swarm Snapshot Analysis: 2026-02-04 14:45
2+
3+**Date:** 2026-02-04
4+**Analysis Period:** 14:40:46 to 14:45:46 UTC (5 Minutes)
5+**Interval Granularity:** 30 Seconds
6+
7+## 1. Swarm Status & Baseline
8+* **Active Agents:** 2
9+ * `overnight1` (c277e1a0...): State `running`, 202 memories.
10+ * `overnight2` (7ebc6c53...): State `running`, 237 memories.
11+* **Provider:** Ollama (local) running `qwen3:4b`.
12+* **Health:** System stable, no application-level errors or panics detected in `zoea.log`.
13+
14+## 2. Activity Summary (Interval Analysis)
15+
16+The system exhibited a highly repetitive pattern during the 5-minute window, with both agents effectively "stuck" in wait states despite the system prompting for moves every 30 seconds.
17+
18+| Interval (Start) | `overnight1` (overnight1) | `overnight2` (overnight2) | System Activity |
19+| :--- | :--- | :--- | :--- |
20+| **14:41:00** | Waiting for "7s cooldown" | Waiting for travel (30k+ ticks) | 4 memories created |
21+| **14:41:30** | Waiting for "7s cooldown" | Waiting for travel (30k+ ticks) | 4 memories created |
22+| **14:42:00** | Waiting for "7s cooldown" | Waiting for travel (30k+ ticks) | 4 memories created |
23+| **14:42:30** | Waiting for "7s cooldown" | Waiting for travel (30k+ ticks) | 4 memories created |
24+| **14:43:00** | Waiting for "7s cooldown" | Waiting for travel (30k+ ticks) | 4 memories created |
25+| **14:43:30** | Waiting for "7s cooldown" | Waiting for travel (30k+ ticks) | 4 memories created |
26+| **14:44:00** | Waiting for "7s cooldown" | Waiting for travel (30k+ ticks) | 4 memories created |
27+| **14:44:30** | Waiting for "7s cooldown" | Waiting for travel (30k+ ticks) | 4 memories created |
28+| **14:45:00** | Waiting for "7s cooldown" | Waiting for travel (30k+ ticks) | 4 memories created |
29+| **14:45:30** | Waiting for "7s cooldown" | Waiting for travel (30k+ ticks) | 4 memories created |
30+
31+## 3. Tool Efficacy
32+No tools were successfully executed within the strictly defined 5-minute window. However, activity surged immediately following the period (14:46:00 - 14:47:15):
33+* `sell`: 1 failed (Invalid payload), 1 succeeded (8 Iron Ore for 32 credits).
34+* `get_ship`: 1 successful call to verify cargo.
35+* `captains_log_add`: 1 successful entry added.
36+* `mine`: 1 successful call initiated.
37+* **Success Rate:** 80% (relative to post-window attempts).
38+
39+## 4. Observed Patterns & Bottlenecks
40+* **Cognitive Looping (overnight1):** The agent spent the entire 5-minute window claiming to be in a "7-second cooldown." Since the system prompted it 10 times, the agent was stuck in a hallucinated or non-expiring cooldown state for ~300 seconds.
41+* **Long-Duration Tasks (overnight2):** Performing long-distance travel (remaining duration ~30,260 ticks). It predictably responds with "Waiting for travel..." every 30 seconds.
42+* **LLM Latency:** Ollama logs show significant response times. At **14:43:22**, a request took **21.43 seconds**. Average latency: 8-12 seconds.
43+* **Prompt Inefficiency:** The system prompts agents for a move every 30 seconds even when they are in long-term states (travel/cooldown), leading to high LLM token consumption for zero operational progress.
44+
45+## 5. Raw Data Evidence
46+* **Latency Entry:** `fev 04 14:43:22 hulk ollama[40671]: [GIN] 2026/02/04 - 14:43:22 | 200 | 21.426448033s`
47+* **Loop Entry (overnight1):** `2026-02-04 14:41:10|c277e1a0...|The system is currently in a 7-second cooldown...`
48+* **Tool Recovery:** `2026-02-04 14:46:50|c277e1a0...|call_dt0geyis:sell:{"item_id":"ore_iron","quantity":8}`