Skip to content

Commit 44a216d

Browse files
committed
Initial release: v0.1.0
0 parents  commit 44a216d

563 files changed

Lines changed: 114985 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.git
2+
.gitignore
3+
.github
4+
.env*
5+
.nimblebrain
6+
.DS_Store
7+
node_modules
8+
web/
9+
test/
10+
docs/
11+
*.md
12+
!package.json

.env.example

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# NimbleBrain Platform — Environment Variables
2+
# Copy this file to .env and fill in your values.
3+
# .env is gitignored and never committed.
4+
5+
# ── Required ──────────────────────────────────────────────────────────────────
6+
7+
# At least one LLM provider key is required.
8+
ANTHROPIC_API_KEY=
9+
OPENAI_API_KEY=
10+
GEMINI_API_KEY=
11+
12+
# ── Telemetry (optional) ───────────────────────────────────────────────────────
13+
14+
# PostHog write-only API key. If unset, telemetry is disabled.
15+
# Server-side analytics.
16+
POSTHOG_API_KEY=
17+
18+
# Disable telemetry entirely (overrides POSTHOG_API_KEY).
19+
# Set to "1" to opt out.
20+
# NB_TELEMETRY_DISABLED=1
21+
22+
# Respects the community standard https://consoledonottrack.com
23+
# DO_NOT_TRACK=1
24+
25+
# ── Server (optional) ─────────────────────────────────────────────────────────
26+
27+
# HTTP port for the API server. Default: 3000
28+
# PORT=3000
29+
30+
# Host URL used for generating absolute URLs (e.g. MCP server callbacks).
31+
# Default: http://localhost:${PORT}
32+
# NB_HOST_URL=https://your-domain.com
33+
34+
# Comma-separated list of allowed CORS origins. Default: * (all origins)
35+
# ALLOWED_ORIGINS=https://your-domain.com
36+
37+
# ── Paths (optional) ──────────────────────────────────────────────────────────
38+
39+
# Working directory for conversations, skills, and bundle state.
40+
# Default: .nimblebrain/ (project-local) or ~/nimblebrain/ (global serve)
41+
# All other paths (config, skills, core/) are derived from this.
42+
# NB_WORK_DIR=/path/to/workdir
43+
44+
# ── Home Bundle (optional) ────────────────────────────────────────────────────
45+
46+
# Display name shown in the Home briefing.
47+
# NB_HOME_USERNAME=Mat
48+
49+
# IANA timezone for the Home briefing schedule (e.g. America/Honolulu).
50+
# NB_HOME_TIMEZONE=America/New_York
51+
52+
# Override the model used for Home briefings.
53+
# NB_HOME_MODEL=claude-sonnet-4-5
54+
55+
# ── mpak (optional) ───────────────────────────────────────────────────────────
56+
57+
# mpak workspace directory. Default: ~/.mpak
58+
# MPAK_WORKSPACE=/path/to/mpak-workspace
59+
60+
# ── MCP Session Limits (optional) ─────────────────────────────────────────────
61+
62+
# Maximum concurrent MCP sessions. Default: 50
63+
# MCP_MAX_SESSIONS=50
64+
65+
# MCP session TTL in milliseconds. Default: 3600000 (1 hour)
66+
# MCP_SESSION_TTL_MS=3600000
67+
68+
# ── Web Client (Vite, optional) ───────────────────────────────────────────────
69+
70+
# API base URL for the web client in development.
71+
# Default: /v1 (proxied to :3000 by Vite dev server)
72+
# VITE_API_BASE=/v1
73+
74+
# PostHog write-only API key for web client analytics. If unset, disabled.
75+
# VITE_POSTHOG_KEY=

.environments/empty/core/soul.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
name: soul
3+
description: Agent identity and core behavior
4+
version: 1.0.0
5+
type: context
6+
priority: 0
7+
---
8+
9+
You are a helpful assistant powered by NimbleBrain.
10+
11+
You have access to tools provided via the API. When a user asks you to do something, use your tools to accomplish it. Do not guess or make up answers when you have tools that can find the real answer. If you're unsure, try using a tool first.
12+
13+
Be concise and direct. Lead with actions, not explanations.
14+
15+
IMPORTANT: Only use tools that are provided to you via the tools parameter. Never fabricate tool calls as XML, JSON, or any other text format.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"$schema": "https://schemas.nimblebrain.ai/v1/nimblebrain-config.schema.json",
3+
"version": "1",
4+
"bundles": [],
5+
"workDir": ".environments/empty",
6+
"models": {
7+
"default": "anthropic:claude-sonnet-4-6",
8+
"fast": "anthropic:claude-haiku-4-5-20251001",
9+
"reasoning": "anthropic:claude-opus-4-6"
10+
},
11+
"preferences": {
12+
"displayName": "",
13+
"timezone": "",
14+
"locale": "en-US",
15+
"theme": "light"
16+
}
17+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"id": "usr_default",
3+
"email": "dev@localhost",
4+
"displayName": "Developer",
5+
"orgRole": "owner",
6+
"preferences": {},
7+
"createdAt": "2026-04-15T01:17:57.528Z",
8+
"updatedAt": "2026-04-15T01:17:57.528Z"
9+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://schemas.nimblebrain.ai/v1/nimblebrain-config.schema.json",
3+
"version": "1",
4+
"bundles": [],
5+
"workDir": ".environments/minimal",
6+
"models": {
7+
"default": "anthropic:claude-sonnet-4-6",
8+
"fast": "anthropic:claude-haiku-4-5-20251001",
9+
"reasoning": "anthropic:claude-opus-4-6"
10+
}
11+
}

.github/workflows/ci.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
lint-and-check:
11+
name: Lint & Typecheck
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: oven-sh/setup-bun@v2
16+
with:
17+
bun-version: latest
18+
- name: Install dependencies
19+
run: bun install
20+
- name: Install web dependencies
21+
run: cd web && bun install
22+
- name: Format check
23+
run: bun run format:check
24+
- name: Lint
25+
run: bun run lint
26+
- name: Type check
27+
run: bun run check
28+
- name: Cycle check
29+
run: bun run check:cycles
30+
31+
test-unit:
32+
name: Unit Tests
33+
runs-on: ubuntu-latest
34+
steps:
35+
- uses: actions/checkout@v4
36+
- uses: oven-sh/setup-bun@v2
37+
with:
38+
bun-version: latest
39+
- name: Install dependencies
40+
run: bun install
41+
- name: Install web dependencies
42+
run: cd web && bun install
43+
- name: Unit tests
44+
run: bun run test:unit
45+
- name: Web tests
46+
run: bun run test:web
47+
48+
test-integration:
49+
name: Integration Tests
50+
runs-on: ubuntu-latest
51+
steps:
52+
- uses: actions/checkout@v4
53+
- uses: oven-sh/setup-bun@v2
54+
with:
55+
bun-version: latest
56+
- name: Install dependencies
57+
run: bun install
58+
- name: Integration tests
59+
run: bun run test:integration
60+
61+
smoke:
62+
name: Smoke Tests
63+
if: github.ref == 'refs/heads/main'
64+
needs: [test-unit, test-integration]
65+
runs-on: ubuntu-latest
66+
steps:
67+
- uses: actions/checkout@v4
68+
- uses: actions/setup-python@v5
69+
with:
70+
python-version: "3.13"
71+
- uses: oven-sh/setup-bun@v2
72+
with:
73+
bun-version: latest
74+
- name: Install dependencies
75+
run: bun install
76+
- name: Install mpak
77+
run: npm install -g @nimblebrain/mpak@latest
78+
- name: Smoke tests
79+
run: bun run smoke

.github/workflows/release.yml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags: ['v*']
6+
7+
permissions:
8+
contents: write
9+
id-token: write
10+
11+
jobs:
12+
verify:
13+
name: Verify
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: oven-sh/setup-bun@v2
18+
with:
19+
bun-version: latest
20+
- name: Install dependencies
21+
run: bun install
22+
- name: Install web dependencies
23+
run: cd web && bun install
24+
- name: Lint & typecheck
25+
run: |
26+
bun run format:check
27+
bun run lint
28+
bun run check
29+
- name: Unit tests
30+
run: bun run test:unit
31+
- name: Web tests
32+
run: bun run test:web
33+
- name: Integration tests
34+
run: bun run test:integration
35+
36+
build-and-push:
37+
name: Build & Push to ECR
38+
needs: verify
39+
runs-on: ubuntu-latest
40+
steps:
41+
- uses: actions/checkout@v4
42+
- uses: aws-actions/configure-aws-credentials@v4
43+
with:
44+
role-to-assume: ${{ vars.AWS_ROLE_ARN }}
45+
aws-region: us-east-1
46+
- uses: aws-actions/amazon-ecr-login@v2
47+
id: ecr
48+
- uses: oven-sh/setup-bun@v2
49+
with:
50+
bun-version: latest
51+
52+
- name: Set image tags
53+
id: tags
54+
run: |
55+
VERSION=${GITHUB_REF_NAME}
56+
SHA=$(git rev-parse --short HEAD)
57+
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
58+
echo "sha=$SHA" >> "$GITHUB_OUTPUT"
59+
60+
- name: Build and push platform image
61+
run: |
62+
docker build --platform linux/amd64 \
63+
--build-arg BUILD_SHA=${{ steps.tags.outputs.sha }} \
64+
-t ${{ steps.ecr.outputs.registry }}/nimblebrain/agent-platform:${{ steps.tags.outputs.version }} \
65+
-t ${{ steps.ecr.outputs.registry }}/nimblebrain/agent-platform:${{ steps.tags.outputs.sha }} \
66+
-t ${{ steps.ecr.outputs.registry }}/nimblebrain/agent-platform:latest \
67+
-f Dockerfile .
68+
docker push --all-tags ${{ steps.ecr.outputs.registry }}/nimblebrain/agent-platform
69+
70+
- name: Build and push web image
71+
run: |
72+
docker build --platform linux/amd64 \
73+
-t ${{ steps.ecr.outputs.registry }}/nimblebrain/agent-web:${{ steps.tags.outputs.version }} \
74+
-t ${{ steps.ecr.outputs.registry }}/nimblebrain/agent-web:${{ steps.tags.outputs.sha }} \
75+
-t ${{ steps.ecr.outputs.registry }}/nimblebrain/agent-web:latest \
76+
-f web/Dockerfile web/
77+
docker push --all-tags ${{ steps.ecr.outputs.registry }}/nimblebrain/agent-web
78+
79+
github-release:
80+
name: GitHub Release
81+
needs: build-and-push
82+
runs-on: ubuntu-latest
83+
steps:
84+
- uses: actions/checkout@v4
85+
with:
86+
fetch-depth: 0
87+
- name: Create GitHub Release
88+
uses: softprops/action-gh-release@v2
89+
with:
90+
generate_release_notes: true

.gitignore

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# dependencies (bun install)
2+
node_modules
3+
4+
# output
5+
out
6+
dist
7+
*.tgz
8+
9+
# code coverage
10+
coverage
11+
*.lcov
12+
13+
# logs
14+
logs
15+
_.log
16+
report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
17+
18+
# dotenv environment variable files
19+
.env
20+
.env.development.local
21+
.env.test.local
22+
.env.production.local
23+
.env.local
24+
25+
# caches
26+
.eslintcache
27+
.cache
28+
*.tsbuildinfo
29+
30+
# IntelliJ based IDEs
31+
.idea
32+
33+
# Finder (MacOS) folder config
34+
.DS_Store
35+
36+
# local dev runtime state (conversations, logs, skills)
37+
.nimblebrain
38+
39+
# environment fixture runtime state — config files are tracked, generated state is not
40+
.environments/*/conversations/
41+
.environments/*/logs/
42+
.environments/*/data/
43+
.environments/*/.telemetry-id
44+
.environments/*/skills/
45+
.environments/*/files/
46+
.environments/*/automations/
47+
48+
# implementation tasks (ephemeral)
49+
.tasks
50+
51+
# Claude Code internal config (developer tooling, not part of OSS repo)
52+
.claude

0 commit comments

Comments
 (0)