Building a Single-Machine Super Agent: Less Window Switching, More Focus

    Running multiple AI chat windows at once quickly drains your attention: you repeat context, check progress, and fix drift in every window. This article explains a "super agent" architecture where a central coordinator manages multiple sub-agents so you only interact with one entry point, and shows how to implement it on a single machine using local files and SQLite, including core design principles, memory systems, guard rules, backups, and common troubleshooting tips.

    When several AI conversation windows are open at the same time, fatigue sets in fast. Each window needs its background re-explained, its progress checked, and its deviations corrected—your brain keeps switching contexts. A common idea discussed in the industry is the “super agent”: one coordinator orchestrates multiple sub-agents, and humans only talk to the coordinator. This article does not cite a specific official document; instead, it summarizes this type of architecture and explains how to implement it in a single-machine environment.

    1. The Problem: Why Attention Runs Out

    Multi-window collaboration has three main pain points. First, context is isolated across windows, so you manually copy information between them. Second, when a sub-task stalls or drifts, it usually waits for you to notice before anything happens. Third, if you shut down mid-task, resuming is difficult. Together, these three issues are what continuously drain your attention.

    A super agent aims to remove exactly this coordination work. It does not try to make agents smarter; instead, it hands scheduling, queuing, and progress tracking over to the system.

    2. Five Core Principles and Their Limits

    1. A resident coordinator. A long-running main scheduling agent sits in the system. It writes no code and no prose; it only breaks down requirements, assigns tasks, and collects results—much like an operating system scheduler. When it helps: with many tasks and dependencies between sub-tasks, the coordinator clearly pays off. With just two or three simple tasks, it only adds latency.

    2. Members work independently. Each sub-agent executes its assigned task with its own context. This enables parallelism and prevents temporary information from one task polluting another. The cost: every sub-agent needs sufficient background information, or it will repeatedly ask questions or head in the wrong direction.

    3. One door to reach you. Sub-agents never contact the user directly. Questions requiring user confirmation go to the coordinator, which prioritizes them and pushes them through a single entry point. This rule is the key to reducing attention overhead. Limitation: even urgent issues must pass through the coordinator, so its prioritization logic needs to be reliable.

    4. Scheduled health checks. The coordinator periodically checks each sub-agent’s heartbeat and progress. If a sub-agent goes quiet for too long, the coordinator triggers a retry or raises an alert. Poll frequency requires trade-offs: too frequent wastes resources, too sparse leaves stuck tasks unattended for a long time.

    5. Persisted state, pausable. The coordinator’s scheduling logs and sub-agents’ intermediate results must be serializable. Tasks can pause at any time, resume from a checkpoint after interruption, and recover after a machine restart. Limitation: saved data needs periodic validation, otherwise recovery may read incomplete data.

    3. Single-Machine Implementation: Trade-offs and Comparison

    Large cloud architectures typically separate storage and compute: state lives in object storage while inference runs on elastic compute. A single machine with one developer cannot afford the full set of cloud dependencies, so this approach uses local files plus SQLite for state.

    Key differences between the two approaches:

    Dimension Cloud version Single-machine version
    State storage Object storage + database Local files + SQLite
    Scheduling Event-driven combined with polling Primarily timed polling
    Scalability Horizontally scalable Limited by CPU, memory, and disk
    Failure recovery Multiple replicas, automatic failover Local backups, manual recovery
    Operational cost Higher Lower

    The single-machine version skips three advanced features for now: event triggering, direct topic routing, and background self-repair. Three reasons. Single-machine concurrency is limited, so polling is sufficient. Topic routing lets sub-tasks communicate bypassing the coordinator, which breaks the “one door” rule and easily causes state confusion. Self-repair requires reliable exception classification—low payoff on a single machine, not worth the investment yet.

    One clarification: the single-machine version targets recoverability and pauseability, not high availability. High availability usually means multiple replicas with automatic failover, which a single machine cannot provide.

    4. Four Extension Modules and a Minimal Working Checklist

    On top of the five core principles, the single-machine version adds four modules: acceptance gates, context briefing, member handbooks, and a guard mechanism. Below is a starter configuration. These values are only a starting point—adjust them to your tasks.

    Directory structure:

    1. agent-hub/
    2. config/
    3. guard_whitelist.yaml # Guard whitelist
    4. member_manual/
    5. coder.md # Behavior spec for coding sub-agents
    6. writer.md # Behavior spec for writing sub-agents
    7. data/
    8. memory.db # SQLite database, stores the decision log
    9. logs/work_log.jsonl # Work log, one event per line
    10. index/catalog.json # Catalog index
    11. workspace/ # Working area for sub-agents
    12. backups/ # Daily backups

    Health check parameters: Set the heartbeat interval to 30 seconds. After 3 consecutive missed heartbeats, the sub-agent is declared stuck. It is automatically retried once; a second failure raises an alert.

    Example acceptance rules:

    • Code output: zero syntax check errors, and unit test commands exit with code 0.
    • Document output: Markdown format check passes, and required section headings are present.
    • Optional dynamic scoring: another model scores the output; below 7 (out of 10), it is sent back for rewriting, with a maximum of 2 retries.

    Example guard whitelist:

    • Read/write allowed: files under workspace/.
    • Read-only allowed: config/.
    • Forbidden: deleting any file, accessing paths outside workspace/, modifying files under config/.
    • When a forbidden rule is hit, the guard blocks the operation, writes the event to the work log, and notifies the coordinator.

    False guard blocks are common. A newly added legitimate operation may get blocked at first; check whether whitelist paths were written as absolute paths rather than immediately loosening the rules.

    5. Memory System: Logs, Catalog, and Decision Log

    The memory system has three components that together keep sub-agent behavior consistent.

    The work log is append-only: any state change adds a new line, never modifying old ones. It supports post-hoc auditing and serves as the basis for health checks and checkpoint resumption.

    The catalog records files in the workspace, their purposes, and last-modified times. Sub-agents query the catalog before reading files, avoiding a full disk scan.

    The decision log records key technical decisions. When a sub-agent faces an uncertain design branch, it checks the decision log first. Here is a simplified record:

    1. {
    2. "schema_version": 1,
    3. "decision_id": "DEC-20261125-001",
    4. "topic": "Data caching strategy",
    5. "context": "Frequently read user configuration data",
    6. "resolution": "Use a local LRU cache, max 1000 entries, 5-minute TTL",
    7. "impact_files": ["src/utils/cache.js"],
    8. "timestamp": "2026-11-25T08:00:00Z"
    9. }

    Field notes:

    • schema_version tracks the data structure version. When the structure changes, use it to decide how to migrate old data.
    • decision_id must be unique. A “date plus sequence number” format is recommended.
    • impact_files uses paths relative to the project root, so they do not break when the project moves to another machine.
    • timestamp uses UTC, formatted per ISO 8601.

    Concurrency considerations: only the coordinator writes to the decision log; sub-agents are read-only. Enable WAL mode on SQLite to reduce read/write blocking. Wrap every write in a transaction and roll back entirely on failure, avoiding half-written records.

    6. Common Errors and Troubleshooting

    • Polling too frequent: CPU usage stays high and log volume grows fast. Increase the heartbeat interval from 30 seconds and observe.
    • Acceptance rules too strict: Sub-agents get repeatedly rejected and tasks stall. Check whether rules exceed the task’s actual requirements; relax them one by one and record why.
    • Guard false blocks: Legitimate operations get blocked. Check that whitelist paths match the actual workspace.
    • Inconsistent state after recovery: Usually caused by incorrect write ordering between the work log and decision log. Check whether the catalog index was updated before the transaction committed.

    7. Data Safety: Backups and Risks

    Local files and SQLite can both be corrupted by power loss, disk failure, or human error. Backups are mandatory, not optional.

    Run a daily backup using SQLite’s built-in backup command rather than copying a database file while it is being written:

    1. sqlite3 data/memory.db ".backup backups/memory-2026-11-25.db"

    Keeping the latest 7 backup files is sufficient. Back up the work log and catalog index as well. Periodically, perform a restore drill in a separate directory to confirm the backup files open correctly. An unverified backup cannot be considered a reliable backup.

    The guard mechanism carries risk too. A misconfigured whitelist may allow operations that should be blocked, so validate the rules in a test directory before going live.

    8. Conclusion

    The core value of a super agent is moving coordination work from humans to the coordinator. The single-machine version reduces window-switching overhead through scheduled health checks, a unified entry point, and persisted state. Whether it genuinely lightens your load depends on task complexity, model stability, and the quality of your whitelist and acceptance rules. Start with one or two real tasks as a trial run—track health check counts, false block counts, and recovery time—before expanding its use.