跳到正文
Skillpedia
部署与云(DevOps)18k · #10644

hosted-agents

它能做什么

这个技能涵盖设计在远程服务器沙箱中运行的 AI 智能体,使它们无需依赖笔记本电脑即可工作,并能同时运行许多个。适合构建后台编码智能体或共享智能体会话的团队。

适用场景

  • ✓当你希望 AI 智能体不依赖你的设备,在后台持续工作时。
  • ✓当你需要多个智能体会话在相互隔离的沙箱中同时运行时。
  • ✓当多人必须共享同一个具有相同状态的智能体会话时。

技能链接

https://github.com/muratcankoylan/Agent-Skills-for-Context-Engineering/blob/main/skills/hosted-agents/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/muratcankoylan/Agent-Skills-for-Context-Engineering/blob/main/skills/hosted-agents/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请帮我设计一套云端方案:编码智能体在沙箱中运行,并在我合上笔记本电脑之后仍保持其会话。”

每周 5 个新技能,1 分钟读完。

工作原理

该技能说明如何在会话开始之前准备好环境,使用户主要等待的只是 AI 模型的首次响应。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Hosted Agent Infrastructure

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.

When to Activate

Activate this skill when:

  • Building background coding agents that run independently of user devices
  • Designing sandboxed execution environments for agent workloads
  • Implementing multiplayer agent sessions with shared state
  • Creating multi-client agent interfaces (Slack, Web, Chrome extensions)
  • Scaling agent infrastructure beyond local machine constraints
  • Building systems where agents spawn sub-agents for parallel work

Do not activate this skill for adjacent work owned by other skills:

  • Designing the autonomous research loop, novelty gates, rollback policy, or merge boundaries: harness-engineering.
  • Choosing supervisor, swarm, or handoff topology without hosted infrastructure concerns: multi-agent-patterns.
  • Designing the tools used by a hosted agent, such as spawn/status tools or PR tools: tool-design.
  • Managing file-backed state inside a session rather than the hosted runtime itself: filesystem-context.

Core Concepts

Move agent execution to remote sandboxed environments to eliminate the fundamental limits of local execution: resource contention, environment inconsistency, and single-user constraints. Remote sandboxes unlock unlimited concurrency, reproducible environments, and collaborative workflows because each session gets its own isolated compute with a known-good environment image.

Design the architecture in three layers because each layer scales independently. Build sandbox infrastructure for isolated execution, an API layer for state management and client coordination, and client interfaces for user interaction across platforms. Keep these layers cleanly separated so sandbox changes do not ripple into clients.

Detailed Topics

Sandbox Infrastructure

The Core Challenge Eliminate sandbox spin-up latency because users perceive anything over a few seconds as broken. Development environments require cloning repositories, installing dependencies, and running build steps -- do all of this before the user ever submits a prompt.

Image Registry Pattern Pre-build environment images on a regular cadence (every 30 minutes works well) because this makes synchronization with the latest code a fast delta rather than a full clone. Include in each image:

  • Cloned repository at a known commit
  • All runtime dependencies installed
  • Initial setup and build commands completed
  • Cached files from running app and test suite once

When starting a session, spin up a sandbox from the most recent image. The repository is at most 30 minutes out of date, making the remaining git sync fast.

Snapshot and Restore Take filesystem snapshots at key points to enable instant restoration for follow-up prompts without re-running setup:

  • After initial image build (base snapshot)
  • When agent finishes making changes (session snapshot)
  • Before sandbox exit for potential follow-up

Git Configuration for Background Agents Configure git identity explicitly in every sandbox because background agents are not tied to a specific user during image builds:

  • Generate GitHub app installation tokens for repository access during clone
  • Set git config user.name and user.email when committing and pushing changes
  • Use the prompting user's identity for commits, not the app identity

Warm Pool Strategy Maintain a pool of pre-warmed sandboxes for high-volume repositories because cold starts are the primary source of user frustration:

  • Keep sandboxes ready before users start sessions
  • Expire and recreate pool entries as new image builds complete
  • Start warming a sandbox as soon as a user begins typing (predictive warm-up)

Agent Framework Selection

Server-First Architecture Structure the agent framework as a server first, with TUI and desktop apps as thin clients, because this prevents duplicating agent logic across surfaces:

  • Multiple custom clients share one agent backend
  • Consistent behavior across all interaction surfaces
  • Plugin systems extend functionality without client changes
  • Event-driven architectures deliver real-time updates to any connected cli
常见问题

什么是沙箱?

沙箱是一个相互隔离的环境,智能体可以在其中运行代码而不影响其他系统。

为什么要在会话开始之前做好准备?

提前完成设置会让会话感觉很快,因此速度主要受模型响应时间的限制。

它涵盖智能体的工具吗?

工具设计是另一个主题,而此技能关注的是托管的基础设施。

详情

作者的原始描述

This skill should be used when designing hosted or background agent infrastructure: sandboxed execution, remote coding environments, warm pools, session persistence, multiplayer collaboration, self-spawning agents, or Modal-style sandboxes.

repo: muratcankoylan/Agent-Skills-for-Context-Engineering

热度

GitHub 星标
18k
排名
#10644
许可证
MIT
更新时间
2026/10/11

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能