How to use Runtime to build a team AI programming Agent collaboration environment: a 30-minute complete tutorial
From zero configuration to team launch, products/design/operations can also safely use Claude Code and Codex
Beginner · 30 min · May 22, 2026
Tutorial Objectives
In 30-45 minutes, use Runtime to set up a team-level AI coding Agent collaboration environment. Your product, design, and operations colleagues can directly talk to agents such as Claude Code and Codex to complete tasks, instead of having to be accompanied by engineers every time.
What will you build?
- Sandboxed Agent Environment: Each team has an independent coding Agent, with its own project context and tool chain, ready to use at boot.
- Slack/Linar integration: Directly summon Agents to complete tasks in the team's daily collaboration channels
- Safety Guardrails: Cost limit, command whitelist, network export control, Agent will not touch the production environment
Preparation list
- GitHub account (Runtime uses GitHub OAuth to log in)
- Slack workspace (optional, recommended) - facilitates scheduling Agents directly in messages
- Your own AI API Key (Claude Code / OpenAI / Gemini are all acceptable)
Overall architecture
Runtime provides an "Agent infrastructure layer": you configure the project environment once and take a snapshot, and then when anyone triggers the Agent, it will run in an environment where everything has been configured.
| Module | Input | Output | Estimated time |
|---|---|---|---|
| Registration and project creation | GitHub account | Sandbox environment | 5 minutes |
| Configure project context | System commands + skill files | Reusable configuration | 10 minutes |
| Set up security guardrails | Command whitelist/network policy | Security policy | 5 minutes |
| Integrated collaboration channels | Slack / Linear | Agent touch portal | 5 minutes |
| Team hands-on verification | Real tasks | Final PR | 5-10 minutes |
Step 1: Register and create your first sandbox
Open app.runtm.com and log in with your GitHub account. The runtime reads the list of repositories you own through GitHub OAuth.
# 或者用 CLI 安装
brew install runtmdotcom/tap/runtm
runtm login登录后,点击 Create Sandbox,选择你要接入的项目仓库。Runtime 会自动检测项目的 Docker Compose、package.json 等配置文件,推断环境需求。
提示:如果你有多个微服务仓库,可以在同一个沙箱里配置多仓库上下文。Runtime 支持在一个 Session 中加载
docker-compose.yml定义的完整服务栈。
第 2 步:配置项目上下文与技能
这一步是最重要的"一次配置,全员受益"环节。你需要定义三样东西:
| 配置项 | 值示例 | 说明 |
|---|---|---|
| 系统指令 | "你是项目的 DevOps 助手,遵循 .cursorrules 约定" | Agent 的行为准则 |
| 技能文件 | .runtm/skills/deploy.md | 可复用的操作模板 |
| 环境快照 | 安装起的服务状态 | 秒级启动的运行时 |
在项目根目录创建 .runtm/instructions.md:
# Runtime Agent Instructions
## Code Style
- 遵循项目现有的 ESLint + Prettier 配置
- 提交前运行 `npm run test`
- PR 描述按 Conventional Commits 格式
## Permissions
- 允许读取 `.env.example`(不接触真实密钥)
- 允许在 `preview/` 目录创建文件
- 禁止修改 `production/` 目录然后在 Runtime 控制台设置 Guardrails:
| 护栏 | 配置 |
|---|---|
| 命令白名单 | git, npm, docker, curl |
| 网络出口 | 仅允许 api. github.com 和 registry.npmjs.org |
| 成本限额 | 每次 Session 上限 $2 |
第 3 步:集成 Slack 和 Linear
Runtime 的杀手特性:非工程师也能安全使用编码 Agent。团队成员在 Slack 中 @ 一下 Agent 即可。
在 Runtime Dashboard 进入 Integrations → Slack:
- 点击 "Add to Slack",授权 Runtime 加入你的工作区
- 创建一个专用频道
#ai-agents - 在频道中选中你的 Agent 并 @mention
# ai-agents 频道
@runtime-eng 请解决 API 返回 504 的问题,查看 Sentry 错误日志,找出根因并开一个 PR
@runtime-eng 已检查日志,发现 upstream Postgres 连接池耗尽。
PR: https://github.com/org/repo/pull/452(含单元测试)Runtime 会自动把结果发回频道,附带成本和执行时间。
第 4 步:设定自动化 Agent(Background Agent)
你还可以设定后台自动运行的 Agent。比如一个告警检修 Agent:
| 触发器 | 动作 | 输出 |
|---|---|---|
| PagerDuty 告警 | 拉 Sentry 错误 → 读代码 → 定位根因 | PR + 单元测试 |
| Stripe 结算异常 | 查 Snowflake → 对比账期 | 报表 + Slack 通知 |
| GitHub PR 合并 | 自动部署 preview 环境 | 验证 URL |
配置非常简单——点一个 Agent,选触发器源,写一段自然语言指令就行了。Runtime 负责轮询、调度和重试。
第 5 步:团队协作与审批流程
最后,确保你的团队知道怎么用。Runtime 让非工程师也能参与:
- 产品经理:在 Slack 中说 "把首页 Hero 文案改成企业版风格" → Agent 在沙箱中修改 → 生成预览 URL → PM 确认后直接合入
- 设计师:说 "在底部加一个客户案例展示区" → Agent 写代码 → 设计师在预览链接上看效果
- 运维:说 "检查所有 API 端点的响应时间" → Agent 跑测试 → 输出报告
每个 Session 都可以实时协作:多人在浏览器中看到 Agent 的输出,在侧边栏聊天,就像 Google Docs 一样。
推荐使用 Runtime 来管理你的团队 Agent 环境,它免费版已经支持 3 个沙箱,完全够小团队试用。
常见问题排查(FAQ)
Q1:Runtime 和直接用 Claude Code 有什么区别?
Claude Code 是单个 Agent 终端工具。Runtime 是一个基础设施层:帮你管理沙箱、护栏、密钥注入、成本跟踪、Slack 集成。团队里有 5 个人同时用 Claude Code,每人各自配一次环境,不如配好 Runtime 让所有人共享一套上下文。
Q2:Agent 会不会暴露密钥或改生产数据?
不会。Runtime 通过代理注入密钥,Agent 的终端里看不到原始 API Key。网络出口白名单控制 Agent 能访问哪些服务。命令黑名单防止 Agent 执行危险操作。你也可以为每个操作设审批门,Agent 合入 PR 前必须有人确认。
SEO+GEO:FAQ 结构满足 GEO 提取偏好,同时覆盖长尾搜索词
工具词条
正文中自然出现的工具名,平台侧会匹配已维护 tools 库生成 hover-card:OpenAI、ChatGPT、Claude、Claude Code、Codex、Gemini、n8n.
Reference video/material
Internal link guidance
- Someone built SaaS from scratch using Claude Code in 48 hours, earning $9,000 per month: Claude Code 48 小时创业案例
- Paired with tutorials that can save 90% of API fees: 用 DeepSeek V4 替代 Claude Code 省 90% API 费用
Related tutorials
AI Coding Agents Complete Guide: Setup, Security, Workflow & Case Studies
If you are researching AI coding agents and want to know which one to use, how to set it up safely, and what real developers are building with them — this hub organizes every tutorial, case study, and comparison we have published. Start with the decision guide below to find the right path for your skill level and goals.
AI Micro SaaS FAQ: 25 Common Questions Answered (2026)
Everything you need to know about building and profiting from AI Micro SaaS products. This FAQ covers idea generation, tech stack choices, pricing strategy, marketing on a $0 budget, legal considerations, and scaling from $100 to $10K MRR. Based on real case studies and data from successful solo builders using Claude Code, Cursor, and other AI coding tools.
Topic hub
AI Coding Tools Hub (2026)
From Copilot pricing changes to Claude Code + DeepSeek cost-saving setups—one place to compare tools, read explainers, and follow tutorials.
Explore AI Coding Tools Hub (2026) →Monetization angle
How can you make money from this trend?
WayToClawEarn focuses on verified earn playbooks—not just news. Start from these cases.
DeepSeek + Claude Code Micro SaaS
Run multiple small products on cheap inference
Claude Code bug bounty
Productize agent skills into security services