Skip to content

Commit 85049a9

Browse files
Merge pull request #131 from depot/docs-sync-updates
Update content from depot/app
2 parents d8b68a7 + aca5149 commit 85049a9

File tree

5 files changed

+356
-9
lines changed

5 files changed

+356
-9
lines changed
Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
---
2+
title: Quickstart for remote Claude Code agents on Depot
3+
ogTitle: Getting started with remote Claude Code agents on Depot
4+
description: Step by step guide on how to get up and running with remote Claude Code agents on Depot.
5+
---
6+
7+
import {CheckCircleIcon} from '~/components/icons'
8+
import {DocsCTA} from '~/components/blog/CTA'
9+
10+
This guide will help you get started with Depot's remote agent sandboxes for running Claude Code agents. With Depot, you can run your coding agents in a secure, isolated environment in the cloud, allowing you to move your coding sessions off of your local machine and into fast remote environments where you can easily launch, resume, and share coding sessions.
11+
12+
## 1. Install the `depot` CLI
13+
14+
Before you can start running remote agents, you need to install the Depot CLI. The CLI is available for Mac and Linux.
15+
16+
**Note:** Remote agent sandboxes are only available on `depot` CLI version 2.96.2 or later.
17+
18+
For Mac, you can install the CLI with Homebrew:
19+
20+
```shell
21+
brew install depot/tap/depot
22+
```
23+
24+
For Linux, you can install the CLI with [our installation script](https://depot.dev/install-cli.sh):
25+
26+
```shell
27+
# Install the latest version
28+
curl -L https://depot.dev/install-cli.sh | sh
29+
30+
# Install a specific version
31+
curl -L https://depot.dev/install-cli.sh | sh -s 2.96.2
32+
```
33+
34+
For all other platforms, you can download the binary directly from [the latest release](https://github.com/depot/cli/releases).
35+
36+
## 2. Creating a Depot organization
37+
38+
Claude Code agent sandboxes and sandbox secrets live under a Depot organization. So before you can launch your first agent sandbox, you need to create a Depot organization.
39+
40+
![Create a Depot organization](/images/docs/depot-create-organization.webp)
41+
42+
1. Login to your Depot account to get to your [list of organizations](/orgs)
43+
2. Click on the `Create Organization` button
44+
3. Enter an organization name
45+
4. Click `Create organization`
46+
47+
## 3. Get your Anthropic credentials
48+
49+
Today Depot only supports bringing your own Anthropic subscription or API key. We do not provide our own Anthropic API key for use with Depot's remote agent sandboxes.
50+
51+
There are two options for configuring your Anthropic credentials to use with Depot's remote agent sandboxes.
52+
53+
### Claude Code token for Max plan
54+
55+
**This is our recommended method for using Claude Code with Depot's remote agent sandboxes.**
56+
57+
If you're on the **Max plan** from Anthropic, you need to get your Claude Code OAuth token to use with Depot's remote agent sandboxes.
58+
59+
First, using the `claude` CLI, you can generate a new OAuth token:
60+
61+
```shell
62+
claude setup-token
63+
```
64+
65+
This will output a token that you can copy and use in the next step.
66+
67+
![Claude Code OAuth token](/images/docs/claude-code-setup-token.webp)
68+
69+
### Anthropic API key
70+
71+
Alternatively, you can generate an Anthropic API key by following their [Developer Platform](https://docs.anthropic.com/en/api/overview) documentation.
72+
73+
## 4. Set your Anthropic credentials
74+
75+
For Depot to use your Anthropic credentials for remote Claude Code agents, you need to configure a secret in your Depot organization for your Anthropic API key or OAuth token.
76+
77+
### Max plan subscribers (OAuth token)
78+
79+
If you generated a Claude Code OAuth token, you can set it as a secret in your Depot organization:
80+
81+
```shell
82+
depot claude secrets add CLAUDE_CODE_OAUTH_TOKEN --value <your-token-from-step-3>
83+
```
84+
85+
### Anthropic API key
86+
87+
If you generated an Anthropic API key, you can set it as a secret in your Depot organization:
88+
89+
```shell
90+
depot claude secrets add ANTHROPIC_API_KEY --value <your-anthropic-api-key-from-step-3>
91+
```
92+
93+
## 5. Access your git repositories
94+
95+
You can work with public and private git repositories in your remote agent sandboxes. If you want to use private git repositories, you need to either install the `Depot Code` app into your GitHub organization, or set your Git credentials as secrets in your Depot organization.
96+
97+
### Install the Depot Code app into your GitHub organization
98+
99+
To grant remote agent sandboxes access to your private GitHub repositories, you can install the `Depot Code` app into your GitHub organization. This will allow you to clone and push changes to your private repositories from within your remote agent sandboxes.
100+
101+
![Install Depot Code app](/images/docs/depot-code-github-app.webp)
102+
103+
1. Login to your Depot account and [select your organization](/orgs)
104+
2. Click on the `Settings` tab in the sidebar
105+
3. Scroll down to the `GitHub Code Access` section
106+
4. Click `Connect to GitHub`
107+
108+
### Granting access outside of GitHub
109+
110+
If you prefer not to use the Depot Code app, you can set your Git credentials as secrets in your Depot organization. This allows you to clone and push changes to your private repositories using your Git credentials.
111+
112+
To set your Git credentials as secrets, run the following commands:
113+
114+
```shell
115+
depot claude secrets add GIT_CREDENTIALS --value <your-key>
116+
```
117+
118+
## 6. Launch your first remote agent sandbox
119+
120+
Once you've configured your Anthropic credentials and Git access, you can launch your first remote agent sandbox using the `depot claude` command.
121+
122+
```shell
123+
depot claude
124+
--session-id feature-auth \
125+
--repository https://github.com/foo/bar \
126+
--branch main \
127+
"Give me a general summary of this repository"
128+
129+
✓ Claude sandbox started!
130+
Session ID: 557737f9-6274-4df0-ac78-fda2122b6180
131+
Link: https://depot.dev/orgs/12293423849/claude/9842347238947
132+
```
133+
134+
This command immediately tells the Depot control plane to start a new agent sandbox for Claude Code. Returning a url to the session inside of Depot where you can follow the output.
135+
136+
![Remote Claude Code session inside of Depot](/images/docs/remote-claude-code-session-ui.webp)
137+
138+
And that's it! You now have your Depot organization set up to make use of Depot agent sandboxes for Claude Code. You can pass different git repositories that your git credentials or Depot Code app have access to, you can specify different branches, you can resume a session using the `--resume` flag, and you can fork new sessions from an existing file systems using the `--session-id` flag and `--resume` flag at the same time.

content/agents/overview.mdx

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
---
2+
title: Remote Agents
3+
ogTitle: Overview of Depot remote agents
4+
description: Learn how to use move your coding agents off of your local machine and onto Depot's remote agents platform
5+
---
6+
7+
import {CheckCircleIcon} from '~/components/icons'
8+
import {DocsCTA, DocsCTASecondary} from '~/components/blog/CTA'
9+
10+
Depot's remote agent sandboxes provide a secure, isolated environment for running AI coding agents like Claude Code in the cloud. Allowing you to move your agent coding sessions off of your local machine and into fast remote environments where you can easily launch, resume, and share sessions.
11+
12+
Current agent sandboxes support Claude Code, with more agents coming soon. By default, running `depot claude` will start a new session in a remote sandbox.
13+
14+
<DocsCTASecondary>
15+
<a
16+
href="/docs/agents/claude-code/quickstart"
17+
data-ph-capture-attribute-button-id="agents-docs-cta-to-quickstart"
18+
className="text-radix-mauve12 font-semibold"
19+
>
20+
To dive into using remote agents on Depot, check out our Claude Code quickstart guide &rarr;
21+
</a>
22+
</DocsCTASecondary>
23+
24+
## Key features
25+
26+
### Isolated environments
27+
28+
Each agent session runs in its own isolated container, providing a clean and secure environment for your development work. Sessions are completely isolated from each other, ensuring your work remains private and secure.
29+
30+
### Persistent file system
31+
32+
Agent sandboxes work directly with your git repositories and persists files automatically across agents sessions. Allowing you to resume your work exactly where you left off, whether you're picking up a session from last week, sharing with a teammate, or starting a new session from an existing sandbox.
33+
34+
### Pre-configured development tools
35+
36+
Agent sandboxes come pre-installed with popular programming languages, package managers, and development tools.
37+
38+
### Session management
39+
40+
Every agent sandbox not only persists your filesystem, but also the entire context and conversation you have built up with your coding agent in the remote sandbox.
41+
42+
### Git integration
43+
44+
Work directly with Git repositories in your sandbox. Clone public or private repositories (using secrets for authentication), make changes, and push updates - all within the isolated environment.
45+
46+
### High performance
47+
48+
Agent sandboxes run on Depot's optimized infrastructure with plans to provide automatic integrations with our existing Depot services like accelerated container builds, Depot Cache, and more. Every sandbox launches with **2 vCPUs and 4 GB RAM** by default, providing ample resources for most development tasks.
49+
50+
### Web UI for sessions
51+
52+
Easily manage your agent sessions through the Depot web UI. Start, resume, and share sessions with just a few clicks. The web interface provides a simple way to monitor your active sessions and access session logs.
53+
54+
## How it works
55+
56+
To demonstrate how remote agents work in Depot, we will use the `depot claude` command to demonstrate how remote Claude Code agents are launched in Depot.
57+
58+
**Note:** To run the command below, you should complete the [Quickstart guide for Claude Code](/docs/agents/claude-code/quickstart) first.
59+
60+
```shell
61+
depot claude \
62+
--session-id feature-auth \
63+
--repository https://github.com/user/repo.git \
64+
--branch main \
65+
"Implement authentication flow"
66+
```
67+
68+
This command will fire a request to the Depot control plane to start a new remote agent sandbox and return a url to the web UI where that Claude Code session can be monitored and managed.
69+
70+
Behind the scenes, Depot will do all of the following:
71+
72+
1. **Session creation**: A new isolated container is provisioned for your session, named after the `--session-id` you provided or generate a session ID if not specified
73+
2. **Environment setup**: The sandbox comes pre-configured with development tools, languages, and libraries
74+
3. **Load filesystem**: The sandbox can be prepopulated with a filesystem from a previous session via the `--resume` flag. If no previous session is passed in, a brand new file system is provisioned for the session.
75+
4. **Git repository cloning**: If you specified a `--repository`, Depot will clone the repository into the sandbox and checkout the specified branch (if no branch is specified, it defaults to `main`)
76+
5. **Session saving**: When Claude Code has finished it's work and exits, the session state is preserved for later resumption
77+
6. **Easy resumption**: Use `--resume <session-id>` to continue from any environment
78+
79+
Here is an example workflow where we start a new session with one prompt, then resume it later to continue working:
80+
81+
```shell
82+
# Start a new session with a custom ID
83+
depot claude \
84+
--session-id feature-auth \
85+
--repository https://github.com/user/repo.git \
86+
"Create a new branch called `feature-auth` and lets implement authentication flow for this new feature. Once you're happy with the initial implementation, commit your changes and push the branch to the remote repository."
87+
88+
# Later, resume the session to continue working
89+
depot claude --resume feature-auth "This looks good, but we need to add the concept of a user profile now."
90+
```
91+
92+
## Pricing
93+
94+
Depot remote agent sandboxes are available on **all plans** and are billed at a usage rate of **$0.01/minute** with no included usage for remote agents.
95+
96+
<DocsCTA>
97+
<a href="/sign-up" data-ph-capture-attribute-button-id="agents-docs-cta" className="text-radix-grass12 font-semibold">
98+
Start your 7-day free trial to try remote agents on Depot &rarr;
99+
</a>
100+
</DocsCTA>

content/cache/authentication.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ ogTitle: Authentication for Depot remote caching
44
description: Learn how to authenticate with Depot remote caching
55
---
66

7-
Depot Cache supports authenticating with user tokens and organization tokens. Additionally, [Depot-managed GitHub Actions runners](/docs/github-actions/overview) are pre-configured with single-use job tokens.
7+
Depot Cache supports authenticating with **user** tokens and **organization** tokens. Additionally, [Depot-managed GitHub Actions runners](/docs/github-actions/overview) are pre-configured with single-use job tokens.
8+
9+
Project tokens are **not** supported for Depot cache.
810

911
## Token types
1012

0 commit comments

Comments
 (0)