npx skills add https://github.com/crinkj/common-claude-setting --skill hosted-agents托管代理在远程沙盒环境中运行,而非本地机器。设计良好时,它们能提供无限并发、一致的执行环境以及多人协作。关键洞察在于:会话速度应仅受限于模型提供商的首个令牌生成时间,所有基础设施设置应在用户开始会话前完成。
在以下场景启用此技能:
托管代理解决了本地代理执行的根本限制:资源争用、环境不一致和单用户约束。通过将代理执行移至远程沙盒环境,团队可获得无限并发、可复现的环境和协作工作流。
该架构包含三层:用于隔离执行的沙盒基础设施、用于状态管理和客户端协调的 API 层,以及用于跨平台用户交互的客户端接口。每一层都有特定的设计要求,使系统能够扩展。
核心挑战 快速启动完整的开发环境是主要技术挑战。用户期望近乎即时的会话启动,但开发环境需要克隆仓库、安装依赖项并运行构建步骤。
镜像注册表模式 定期预构建环境镜像(每 30 分钟效果良好)。每个镜像包含:
启动会话时,从最新的镜像启动沙盒。仓库最多滞后 30 分钟,与最新代码的同步速度更快。
快照与恢复 在关键点进行文件系统快照:
这支持即时恢复以处理后续提示,无需重新运行设置。
后台代理的 Git 配置 由于镜像构建期间的 git 操作不绑定到特定用户:
user.name 和 广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
user.email预热池策略 为高流量仓库维护一个预热的沙盒池:
服务器优先架构 选择以服务器为首要结构的代理框架,TUI 和桌面应用作为客户端。这支持:
代码作为单一事实来源 选择代理可读取自身源代码以理解行为的框架。这在 AI 开发中被低估:将代码作为单一事实来源可防止对代理自身能力的幻觉。
插件系统要求 框架应支持以下插件:
tool.execute.before)预测性预热 用户开始输入提示时立即预热沙盒:
并行文件读取 允许代理立即开始读取文件,即使与最新基础分支的同步尚未完成:
最大化构建时工作 尽可能将所有工作移至镜像构建步骤:
代理生成的会话 创建允许代理生成新会话的工具:
前沿模型能够自我约束。工具应:
自我生成的提示工程 设计提示以指导代理何时生成子会话:
每会话状态隔离 每个会话需要其自身的隔离状态存储:
实时流式传输 代理工作涉及高频更新:
具有休眠 API 的 WebSocket 连接可在空闲期间降低计算成本,同时保持连接开放。
跨客户端同步 构建单一状态系统,跨以下平台同步:
所有更改同步到会话状态,实现无缝客户端切换。
多人协作的重要性 多人协作支持:
实现要求
通过适当的同步架构,添加多人支持几乎无需额外成本。
基于用户的提交 使用 GitHub 认证以:
沙盒到 API 流程
Slack 集成 内部采用最有效的分发渠道:
构建分类器以确定在哪个仓库工作:
Web 界面 核心功能:
统计页面显示:
Chrome 扩展 针对非工程用户:
决定如何处理执行期间发送的消息:
队列方法更易于管理,允许用户在代理工作时发送关于下一步的想法。构建机制以在需要时停止代理执行。
跟踪指示真实价值的指标:
有效的内部采用模式:
此技能建立在用于代理协调的 multi-agent-patterns 和用于代理工具接口的 tool-design 之上。它连接到:
内部参考:
本集合中的相关技能:
外部资源:
创建时间 : 2026-01-12 最后更新 : 2026-01-12 作者 : Agent Skills for Context Engineering Contributors 版本 : 1.0.0
每周安装次数
1
仓库
首次出现
今天
安全审计
已安装于
zencoder1
amp1
cline1
openclaw1
opencode1
cursor1
Hosted agents run in remote sandboxed environments rather than on local machines. When designed well, they provide unlimited concurrency, consistent execution environments, and multiplayer collaboration. The critical insight is that session speed should be limited only by model provider time-to-first-token, with all infrastructure setup completed before the user starts their session.
Activate this skill when:
Hosted agents address the fundamental limitation of local agent execution: resource contention, environment inconsistency, and single-user constraints. By moving agent execution to remote sandboxed environments, teams gain unlimited concurrency, reproducible environments, and collaborative workflows.
The architecture consists of three layers: sandbox infrastructure for isolated execution, API layer for state management and client coordination, and client interfaces for user interaction across platforms. Each layer has specific design requirements that enable the system to scale.
The Core Challenge Spinning up full development environments quickly is the primary technical challenge. Users expect near-instant session starts, but development environments require cloning repositories, installing dependencies, and running build steps.
Image Registry Pattern Pre-build environment images on a regular cadence (every 30 minutes works well). Each image contains:
When starting a session, spin up a sandbox from the most recent image. The repository is at most 30 minutes out of date, making synchronization with the latest code much faster.
Snapshot and Restore Take filesystem snapshots at key points:
This enables instant restoration for follow-up prompts without re-running setup.
Git Configuration for Background Agents Since git operations are not tied to a specific user during image builds:
user.name and user.email when committing and pushing changesWarm Pool Strategy Maintain a pool of pre-warmed sandboxes for high-volume repositories:
Server-First Architecture Choose an agent framework structured as a server first, with TUI and desktop apps as clients. This enables:
Code as Source of Truth Select frameworks where the agent can read its own source code to understand behavior. This is underrated in AI development: having the code as source of truth prevents hallucination about the agent's own capabilities.
Plugin System Requirements The framework should support plugins that:
tool.execute.before)Predictive Warm-Up Start warming the sandbox as soon as a user begins typing their prompt:
Parallel File Reading Allow the agent to start reading files immediately, even if sync from latest base branch is not complete:
Maximize Build-Time Work Move everything possible to the image build step:
Agent-Spawned Sessions Create tools that allow agents to spawn new sessions:
Frontier models are capable of containing themselves. The tools should:
Prompt Engineering for Self-Spawning Engineer prompts to guide when agents spawn sub-sessions:
Per-Session State Isolation Each session requires its own isolated state storage:
Real-Time Streaming Agent work involves high-frequency updates:
WebSocket connections with hibernation APIs reduce compute costs during idle periods while maintaining open connections.
Synchronization Across Clients Build a single state system that synchronizes across:
All changes sync to the session state, enabling seamless client switching.
Why Multiplayer Matters Multiplayer enables:
Implementation Requirements
With proper synchronization architecture, multiplayer support is nearly free to add.
User-Based Commits Use GitHub authentication to:
Sandbox-to-API Flow
Slack Integration The most effective distribution channel for internal adoption:
Build a classifier to determine which repository to work in:
Web Interface Core features:
Statistics page showing:
Chrome Extension For non-engineering users:
Decide how to handle messages sent during execution:
Queueing is simpler to manage and lets users send thoughts on next steps while agent works. Build mechanism to stop agent mid-execution when needed.
Track metrics that indicate real value:
Internal adoption patterns that work:
This skill builds on multi-agent-patterns for agent coordination and tool-design for agent-tool interfaces. It connects to:
Internal reference:
Related skills in this collection:
External resources:
Created : 2026-01-12 Last Updated : 2026-01-12 Author : Agent Skills for Context Engineering Contributors Version : 1.0.0
Weekly Installs
1
Repository
First Seen
Today
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
zencoder1
amp1
cline1
openclaw1
opencode1
cursor1
AI Elements:基于shadcn/ui的AI原生应用组件库,快速构建对话界面
60,400 周安装