文章摘要
本文解读了两类下一代智能代理架构:DeepSeek推出的超级代理架构可破解多任务注意力瓶颈,处理效率较单会话代理大幅提升;Anthropic的轻量持久化架构可实现代理常在线运行。文章还介绍了结合二者核心思路在本地编码代理工具的落地实践,新增多渠道智能通知功能,总结了四点实践经验,相关工具已开源。

Advanced Agent Systems: Design Insights and Practical Implementation

Recent exploration into next-generation agent systems has yielded two key research works that inspired a practical tool upgrade. One focuses on overcoming human attention limits for multi-agent tasks, while the other addresses the challenge of keeping agents active without constant prompting. This article synthesizes their core findings and shares how they were applied to a coding agent tool.

Addressing the Attention Bottleneck: DeepSeek’s Super-agent Concept

Current agent systems operate in isolated sessions, forcing users to switch between multiple workflows manually. Research shows most people can only actively manage 3 to 5 concurrent sessions at a time, as multi-tasking relies on limited human attention. Existing local agents also fail to maintain continuity when devices are idle, leading to interrupted work.

To solve this, the research team proposed a Super-agent with four core objectives: it should feel continuous (as if always present), efficient (able to handle multiple tasks without waiting), proactive (identify work without being explicitly asked), and persistent (stay online and recover from issues). Five modular components support these goals:

  • Two-tier architecture: A central routing layer handles user interaction and task distribution, while independent worker sessions each focus on a single task, keeping their own context and tools.
  • Event-driven operation: Instead of only responding to user prompts, the agent acts on environmental events like chat messages, code reviews, or system updates, filtering out noise with predefined rules before using models to act.
  • Channel-specific interaction: For instant messaging platforms, the agent limits responses to under 100 words to match user attention spans.
  • Separation of compute, state, and environment: The agent runs on cloud infrastructure, with session data stored in databases, while local files and tools remain on the user’s machine, connected via a lightweight daemon.
  • Watchdog: An independent background process checks for errors and verifies worker progress to prevent off-track work.

Initial experiments using synthetic message streams showed the Super-agent completed tasks in a median of 12.4 minutes, with 95% of requests done in under 15.7 minutes—far faster than a baseline single-session agent that took 29.5 minutes for 95% of tasks. The tradeoff was higher token usage, though the research noted the results were preliminary and based on simulated data.

Always-On Agents: Anthropic’s Lightweight Persistence Model

Another research work addresses the gap where most agents only run when users send prompts. The adoption of persistent agents has grown due to improved model judgment and lower costs for long-running tasks. Users now want agents that can work autonomously, and the research explains this requires a layered architecture beyond the agent’s core logic.

A key insight here is that "always-on" agents don’t stay active continuously—they mostly sleep, consuming no computational resources, and only wake to process events, store state, and return to sleep. The architecture relies on five components:

  • Event inbox: All triggers (user messages, system notifications, scheduled tasks) are queued here, processed one at a time to avoid spamming.
  • Timer: For follow-up tasks (like checking test results) or recurring updates (daily summaries), scheduled events are added to the inbox.
  • Memory: Stores unique information the agent can’t retrieve elsewhere, plus records of past communications to avoid repeating updates.
  • Permissions: A critical security layer: agent actions are restricted to read-only when not supervised, with dangerous actions blocked, and approval required for high-risk operations.
  • Outbox: Controls message frequency to avoid annoying users—starting quiet and gradually expanding updates, with limits on message volume and timing.

Combining Insights for Practical Use

Both research works share core principles: minimizing unnecessary actions to respect user attention, and separating core agent logic from surrounding infrastructure. The Super-agent’s compute-environment separation aligns with the always-on model’s lightweight persistence, so the author chose to implement the Anthropic-inspired framework in their coding agent tool.

Implementing Always-On Features in a Local Agent Tool

The existing tool already supported remote control of coding agents and prevented interruptions when devices were closed. The upgrade added features to notify users on mobile when the agent needs input or has results, using WeChat and Feishu as channels. Key additions include:

  • Mobile notifications when the agent waits for user input after 10 minutes of inactivity, only alerting if the task is still relevant.
  • A command to trigger notifications directly from the terminal.
  • Support for both WeChat and Feishu for alerts.
  • No notifications when the user is actively at their computer.

The implementation maps directly to the five Anthropic components: event inbox, timers, memory/permissions, and outbox, adapted to local operation. The tool doesn’t use cloud infrastructure or multi-user access, so it’s a lightweight version suitable for personal use.

Practical Lessons Learned

During implementation, four key lessons emerged that can be applied even without the full tool:

  1. Restrict idle agent capabilities: When the agent wakes without user input, limit it to reading files and searching, not modifying files or running commands. It must request user approval before taking action. For tools like Claude Code, this can be done via a command that restricts access to read-only tools:
    claude -p "……" --tools Read,Grep,Glob --strict-mcp-config
  2. Detect user presence instead of guessing: Don’t ask the agent to guess if the user is away—instead, track keyboard/mouse activity. Only send alerts when the user is not active, and batch messages during off-hours.
  3. Control cost of agent wake-ups: Each time the agent runs, it consumes resources. Add limits like minimum time between wake-ups and daily maximum to avoid exceeding subscription quotas.
  4. Poll for external events: Not all events reach the agent automatically—for tools like GitHub or document updates, set up periodic checks to detect new activity.

Final Thoughts

The author chose not to implement a cloud-based agent, preferring to keep the agent local where context is more reliable. The current setup works well for personal use, with plans to expand support for more communication channels and better user presence detection. The tool is open-source, and others using multiple coding agents can try it for the always-on notification features.

以上内容不代表本平台立场,仅供读者参考