Skip to content

Commit 6eb6530

Browse files
committed
sbx: add factory-ai (droid) agent
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
1 parent fd27751 commit 6eb6530

File tree

7 files changed

+130
-2
lines changed

7 files changed

+130
-2
lines changed

content/manuals/ai/sandboxes/agents/_index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Docker Sandboxes runs the following agents out of the box:
1212
- [Claude Code](claude-code/)
1313
- [Codex](codex/)
1414
- [Copilot](copilot/)
15+
- [Factory](factory/)
1516
- [Gemini](gemini/)
1617
- [Kiro](kiro/)
1718
- [OpenCode](opencode/)

content/manuals/ai/sandboxes/agents/custom-environments.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ CLI, and common development tools like Node.js, Python, Go, and Java.
7979
| `codex` | [OpenAI Codex](https://github.com/openai/codex) |
8080
| `copilot` | [GitHub Copilot](https://github.com/github/copilot-cli) |
8181
| `docker-agent` | [Docker Agent](https://github.com/docker/docker-agent) |
82+
| `factory-ai` | [Factory](https://www.factory.ai) |
8283
| `gemini` | [Gemini CLI](https://github.com/google-gemini/gemini-cli) |
8384
| `kiro` | [Kiro](https://kiro.dev) |
8485
| `opencode` | [OpenCode](https://opencode.ai) |
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
---
2+
title: Factory
3+
weight: 35
4+
description: |
5+
Use Factory (droid) in Docker Sandboxes with API key or OAuth authentication.
6+
---
7+
8+
{{< summary-bar feature_name="Docker Sandboxes sbx" >}}
9+
10+
This guide covers authentication, configuration, and usage of Factory in a
11+
sandboxed environment. Factory runs using the `droid` CLI.
12+
13+
Official documentation: [Factory](https://docs.factory.ai/)
14+
15+
## Quick start
16+
17+
Create a sandbox and run Factory for a project directory:
18+
19+
```console
20+
$ sbx run factory-ai ~/my-project
21+
```
22+
23+
The workspace parameter is optional and defaults to the current directory:
24+
25+
```console
26+
$ cd ~/my-project
27+
$ sbx run factory-ai
28+
```
29+
30+
## Authentication
31+
32+
Factory supports two authentication methods: an API key or OAuth.
33+
34+
**API key**: Store your Factory API key using
35+
[stored secrets](../security/credentials.md#stored-secrets):
36+
37+
```console
38+
$ sbx secret set -g factory
39+
```
40+
41+
Alternatively, export the `FACTORY_API_KEY` environment variable in your shell
42+
before running the sandbox. See
43+
[Credentials](../security/credentials.md) for details on both methods.
44+
45+
**OAuth**: If no API key is set, Factory prompts you to authenticate
46+
interactively on first run. The proxy handles the OAuth flow, so credentials
47+
aren't stored inside the sandbox.
48+
49+
## Configuration
50+
51+
Sandboxes don't pick up user-level configuration from your host. Only
52+
project-level configuration in the working directory is available inside the
53+
sandbox. See
54+
[Why doesn't the sandbox use my user-level agent configuration?](../faq.md#why-doesnt-the-sandbox-use-my-user-level-agent-configuration)
55+
for workarounds.
56+
57+
The sandbox runs Factory without approval prompts by default. Pass additional
58+
`droid` CLI options after `--`:
59+
60+
```console
61+
$ sbx run factory-ai --name <sandbox-name> -- <droid-options>
62+
```
63+
64+
## Base image
65+
66+
Template: `docker/sandbox-templates:factory-ai-docker`
67+
68+
Preconfigured to run without approval prompts. Authentication state is
69+
persisted across sandbox restarts.
70+
71+
See [Custom environments](custom-environments.md) to pre-install tools or
72+
customize this environment.

data/sbx_cli/sbx_create.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ see_also:
5454
- sbx create codex - Create a sandbox for codex
5555
- sbx create copilot - Create a sandbox for copilot
5656
- sbx create docker-agent - Create a sandbox for docker-agent
57+
- sbx create factory-ai - Create a sandbox for factory-ai
5758
- sbx create gemini - Create a sandbox for gemini
5859
- sbx create kiro - Create a sandbox for kiro
5960
- sbx create opencode - Create a sandbox for opencode
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: sbx create factory-ai
2+
synopsis: Create a sandbox for factory-ai
3+
description: |-
4+
Create a sandbox with access to a host workspace for factory-ai.
5+
6+
The workspace path is required and will be mounted inside the sandbox at the
7+
same path as on the host. Additional workspaces can be provided as extra
8+
arguments. Append ":ro" to mount them read-only.
9+
10+
Use "sbx run SANDBOX" to attach to the agent after creation.
11+
usage: sbx create factory-ai PATH [PATH...] [flags]
12+
options:
13+
- name: help
14+
shorthand: h
15+
default_value: "false"
16+
usage: help for factory-ai
17+
inherited_options:
18+
- name: branch
19+
usage: Create a Git worktree on the given branch
20+
- name: cpus
21+
default_value: "0"
22+
usage: |
23+
Number of CPUs to allocate to the sandbox (0 = auto: N-1 host CPUs, min 1)
24+
- name: debug
25+
shorthand: D
26+
default_value: "false"
27+
usage: Enable debug logging
28+
- name: memory
29+
shorthand: m
30+
usage: |
31+
Memory limit in binary units (e.g., 1024m, 8g). Default: 50% of host memory, max 32 GiB
32+
- name: name
33+
usage: |
34+
Name for the sandbox (default: <agent>-<workdir>, letters, numbers, hyphens, periods, plus signs and minus signs only)
35+
- name: quiet
36+
shorthand: q
37+
default_value: "false"
38+
usage: Suppress verbose output
39+
- name: template
40+
shorthand: t
41+
usage: |
42+
Container image to use for the sandbox (default: agent-specific image)
43+
example: |4-
44+
# Create in the current directory
45+
sbx create factory-ai .
46+
47+
# Create with a specific path
48+
sbx create factory-ai /path/to/project
49+
50+
# Create with additional read-only workspaces
51+
sbx create factory-ai . /path/to/docs:ro
52+
see_also:
53+
- sbx create - Create a sandbox for an agent

data/sbx_cli/sbx_run.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ description: |-
88
99
To create a sandbox without attaching, use "sbx create" instead.
1010
11-
Available agents: claude, codex, copilot, docker-agent, gemini, kiro, opencode, shell
11+
Available agents: claude, codex, copilot, docker-agent, factory-ai, gemini, kiro, opencode, shell
1212
usage: sbx run [flags] SANDBOX | AGENT [PATH...] [-- AGENT_ARGS...]
1313
options:
1414
- name: branch

data/sbx_cli/sbx_secret_set.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ synopsis: Create or update a secret
33
description: |-
44
Create or update a secret for a service.
55
6-
Available services: anthropic, aws, github, google, groq, mistral, nebius, openai, xai
6+
Available services: anthropic, aws, factory, github, google, groq, mistral, nebius, openai, xai
77
88
When no arguments are provided, an interactive prompt guides you through
99
scope and service selection.

0 commit comments

Comments
 (0)