Skip to content

Commit 30e028d

Browse files
committed
Add brikie sandbox image
brikie is a modular agent harness where every capability is an optional, hot-swappable Brick. The sandbox installs brikie from PyPI on top of the community base image and ships a policy.yaml permitting the common model-provider APIs, the brikie.co brick registry, the GitHub REST API (read-only), and PyPI. brikie reads provider credentials from the environment and honors ANTHROPIC_BASE_URL / OPENAI_BASE_URL, so OpenShell's managed credential injection and inference rerouting work without extra configuration. Tested locally: image builds cleanly against the base, brikie launches as the sandbox user, and policy.yaml lands at /etc/openshell/policy.yaml. Signed-off-by: VeelaCleave <veelacleave@gmail.com>
1 parent fffb6b2 commit 30e028d

3 files changed

Lines changed: 185 additions & 0 deletions

File tree

sandboxes/brikie/Dockerfile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# syntax=docker/dockerfile:1.4
2+
3+
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 brikie contributors. All rights reserved.
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
# brikie sandbox image for OpenShell
7+
#
8+
# Builds on the community base sandbox and adds brikie — a modular agent
9+
# harness where every capability is an optional, hot-swappable Brick.
10+
# Build: docker build -t openshell-brikie --build-arg BASE_IMAGE=openshell-base .
11+
# Run: openshell sandbox create --from brikie
12+
13+
ARG BASE_IMAGE=ghcr.io/nvidia/openshell-community/sandboxes/base:latest
14+
FROM ${BASE_IMAGE}
15+
16+
USER root
17+
18+
# Install brikie from PyPI.
19+
RUN pip install --no-cache-dir --break-system-packages brikie
20+
21+
# Copy sandbox policy
22+
COPY policy.yaml /etc/openshell/policy.yaml
23+
24+
USER sandbox
25+
26+
ENTRYPOINT ["brikie"]

sandboxes/brikie/README.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# brikie Sandbox
2+
3+
OpenShell sandbox image pre-configured with
4+
[brikie](https://github.com/VeelaCleave/brikie) — a modular agent
5+
harness where every capability is an optional, hot-swappable Brick.
6+
7+
## What's Included
8+
9+
- **brikie** (from PyPI)
10+
- Everything from the [base sandbox](../base/README.md)
11+
12+
## Build
13+
14+
```bash
15+
docker build -t openshell-brikie .
16+
```
17+
18+
To build against a specific base image:
19+
20+
```bash
21+
docker build -t openshell-brikie --build-arg BASE_IMAGE=ghcr.io/nvidia/openshell-community/sandboxes/base:latest .
22+
```
23+
24+
## Usage
25+
26+
### Create a sandbox
27+
28+
```bash
29+
openshell sandbox create --from brikie
30+
```
31+
32+
### Pick your provider
33+
34+
brikie reads provider credentials from the environment, so OpenShell's
35+
managed inference works out of the box. Choose a provider preset at
36+
launch:
37+
38+
```bash
39+
openshell sandbox create --from brikie -- --preset anthropic # ANTHROPIC_API_KEY
40+
openshell sandbox create --from brikie -- --preset openai # OPENAI_API_KEY
41+
openshell sandbox create --from brikie -- --preset openrouter # OPENROUTER_API_KEY
42+
openshell sandbox create --from brikie -- --preset groq # GROQ_API_KEY
43+
```
44+
45+
brikie also honors `ANTHROPIC_BASE_URL` / `OPENAI_BASE_URL`, so
46+
`openshell inference set` rerouting applies with no extra configuration.
47+
48+
### Choose your bricks
49+
50+
By default brikie boots a full stack (file tools, memory, logging,
51+
security, and the AFK orchestration souls). To run a leaner set:
52+
53+
```bash
54+
openshell sandbox create --from brikie -- --set minimal --preset anthropic
55+
```
56+
57+
Compose a custom Build Set at [brikie.co](https://brikie.co).
58+
59+
## Network Policy
60+
61+
The bundled `policy.yaml` allows brikie to reach:
62+
63+
- model provider APIs (Anthropic, OpenAI, OpenRouter, Groq, DeepSeek,
64+
Mistral, Cerebras, xAI, Together, Fireworks, Hugging Face, Vercel AI
65+
Gateway, Google, and NVIDIA-hosted inference)
66+
- the brikie.co brick registry (search / install / publish)
67+
- the GitHub REST API, read-only (the optional issue-reading brick)
68+
- PyPI (installing additional bricks at runtime)
69+
70+
Everything else is denied by default.

sandboxes/brikie/policy.yaml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 brikie contributors. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
version: 1
5+
6+
# --- Sandbox setup configuration (queried once at startup) ---
7+
8+
filesystem_policy:
9+
include_workdir: true
10+
read_only:
11+
- /usr
12+
- /lib
13+
- /proc
14+
- /dev/urandom
15+
- /app
16+
- /etc
17+
- /var/log
18+
read_write:
19+
- /sandbox
20+
- /tmp
21+
- /dev/null
22+
23+
landlock:
24+
compatibility: best_effort
25+
26+
process:
27+
run_as_user: sandbox
28+
run_as_group: sandbox
29+
30+
# --- Network policies (queried per-CONNECT request) ---
31+
32+
network_policies:
33+
brikie:
34+
name: brikie
35+
endpoints:
36+
# API-key model providers. brikie's HTTPProvider speaks both the
37+
# OpenAI and Anthropic wire formats, so any OpenAI-compatible host
38+
# works once allowed here.
39+
- { host: api.anthropic.com, port: 443 }
40+
- { host: api.openai.com, port: 443 }
41+
- { host: openrouter.ai, port: 443 }
42+
- { host: api.groq.com, port: 443 }
43+
- { host: api.deepseek.com, port: 443 }
44+
- { host: api.mistral.ai, port: 443 }
45+
- { host: api.cerebras.ai, port: 443 }
46+
- { host: api.x.ai, port: 443 }
47+
- { host: api.together.ai, port: 443 }
48+
- { host: api.fireworks.ai, port: 443 }
49+
- { host: router.huggingface.co, port: 443 }
50+
- { host: ai-gateway.vercel.sh, port: 443 }
51+
- { host: generativelanguage.googleapis.com, port: 443 }
52+
# NVIDIA-hosted inference
53+
- { host: integrate.api.nvidia.com, port: 443 }
54+
# The brikie.co brick registry: search / install / publish bricks
55+
- { host: brikie.co, port: 443 }
56+
binaries:
57+
- { path: /usr/local/bin/brikie }
58+
- { path: /usr/bin/brikie }
59+
- { path: /usr/local/bin/python }
60+
- { path: /usr/local/bin/python3 }
61+
- { path: /usr/bin/python3 }
62+
63+
# --- GitHub REST API (read-only) ---
64+
# brikie's optional GitHub brick (BRK-430) reads repository issues to
65+
# feed the Dreamer triaged community requests.
66+
github_rest_api:
67+
name: github-rest-api
68+
endpoints:
69+
- host: api.github.com
70+
port: 443
71+
protocol: rest
72+
tls: terminate
73+
enforcement: enforce
74+
access: read-only
75+
binaries:
76+
- { path: /usr/local/bin/python }
77+
- { path: /usr/local/bin/python3 }
78+
- { path: /usr/bin/python3 }
79+
80+
pypi:
81+
name: pypi
82+
endpoints:
83+
- { host: pypi.org, port: 443 }
84+
- { host: files.pythonhosted.org, port: 443 }
85+
binaries:
86+
- { path: /usr/local/bin/pip }
87+
- { path: /usr/local/bin/python }
88+
- { path: /usr/local/bin/python3 }
89+
- { path: /usr/bin/python3 }

0 commit comments

Comments
 (0)