What a human must do (an agent cannot): give AWS credentials, receive the invitation e-mail and sign in, and run the agent-side commands on the machine that hosts the agent (or approve them).
Everything here is per stack: one stack = one briefling instance (app, hub, users, data) in one AWS account. The
stacks are listed in infra/stacks.ts. Read the known obstacles section
before starting: a fresh install still needs a few workarounds.
0. Prerequisites
| What | Why | Check |
|---|---|---|
| An AWS account and credentials with administrator rights, as a named profile | CDK creates IAM roles, Cognito, CloudFront... | aws sts get-caller-identity --profile <profile> --query Account --output text prints the 12-digit account |
| Region eu-west-3 | The only region that works today (obstacle 2) | |
| AWS CLI v2 | Checks below | aws --version |
| Node.js 24 or later, npm | Scripts are .ts files run directly by Node |
node --version ≥ v24 |
| git, and a clone of the repository (not an archive) | The deploy guard runs git fetch and compares commits |
git status works, git remote -v lists a remote |
| For the first agent: a Hermes install on the agent's machine | The agent connects through the briefling plugin | hermes --version on that machine |
| Optional: a GitHub App | Board, issues from threads; also needed for a full e2e run (obstacle 7) |
In the commands below, set these once in your shell:
export AWS_PROFILE=<profile> # credentials of the target account
export BRIEFLING_STACK=<stack-name> # the stack you add in step 2
BRIEFLING_STACK is read by infra/app.ts and by every script. If it is not set, they target the default stack of
infra/stacks.ts (DEFAULT_STACK), which is not yours: cdk then refuses because the account does not match, and
scripts read the wrong stack's outputs.
1. Install the dependencies
git clone <repository URL> briefling && cd briefling
npm ci
npm run typecheck && npm test
Check: both commands exit 0; npm test ends with # fail 0.
2. Describe your stack
Add an entry to STACKS in infra/stacks.ts. Keep the existing entries: scripts/test/stacks.test.ts checks them.
'<stack-name>': { account: '<12-digit account>', region: 'eu-west-3', stage: 'dev', owner: '<owner tag>', prod: false },
- Stack name: lower-case letters, digits and hyphens, short (20 characters is safe). It names the table, the
CloudFront comment, the Lambdas (
<stack-name>-<function>), the files bucket<stack-name>-files-<account>and the Cognito domain prefix<stack-name>-<account>. Both of the last two must fit in 63 characters. Cognito also rejects a domain prefix containingaws,amazonorcognito(AWS rule, not checked by the code). prod: truekeeps the table, the user pool and the files bucket if the stack is deleted, and turns on point-in-time recovery, deletion protection and stack termination protection. Use it for real data.prod: falsemakes everything disposable.domain: leave it out for now. The app is served on its CloudFront URL (step 10 for a custom domain).
Commit the change: the deploy guard refuses a working tree with uncommitted or untracked files.
git checkout -b <stack-name>
git commit -am "infra: <stack-name> stack"
Check:
node -e "import('./infra/stacks.ts').then(m => console.log(m.stackConfig()))"
prints your entry with name: '<stack-name>', and its account equals the output of aws sts get-caller-identity --query Account --output text. npm test still passes.
3. Prepare the AWS account
CDK needs its bootstrap stack once per account and region:
npx cdk bootstrap aws://<account>/eu-west-3
New accounts often have a low Lambda concurrency quota. The hub runs several Lambdas at once per connection, and the
e2e test fails with TooManyRequestsException in the Message Lambda logs when the quota is too low.
aws lambda get-account-settings --region eu-west-3 --query AccountLimit.ConcurrentExecutions
If it prints less than 1000, request the default (Service Quotas console, AWS Lambda, "Concurrent executions"). The app works meanwhile, but expect throttling under load and in the e2e test.
Check: aws cloudformation describe-stacks --stack-name CDKToolkit --region eu-west-3 --query 'Stacks[0].StackStatus'
prints "CREATE_COMPLETE" (or UPDATE_COMPLETE).
4. Deploy
npm run deploy
This runs scripts/deploy.ts: git fetch, the deploy guard (first deploy: no live commit yet, allowed), the client
build (scripts/build-client.ts, see below), then cdk deploy <stack-name>. The first deploy creates two CloudFront
distributions and takes 10 to 20 minutes: if your tool limits the duration of a command, run it in the background
and wait for the exit code. Never run a bare cdk deploy: it skips the guard.
What the stack creates, all pay per use: the app (S3 bucket + CloudFront), the hub (API Gateway WebSocket, Lambdas, one DynamoDB table on demand, a files bucket, SQS queues, a 5-minute EventBridge rule for GitHub), Cognito (users and one machine client per agent), and for the agent preview (an agent shows a web page it serves on its own machine):
- a second preview origin: its own S3 bucket and CloudFront distribution (output
PreviewUrl), so a previewed page never shares the app's origin, storage or tokens. It only serves the viewer files (sw.js,/__viewer/*) and aconfig.jsonlisting the app URLs allowed to frame it; the app's CSP allows framing that origin only; - one Kinesis Video Streams signaling channel, used only to get short-lived TURN servers (
GetIceServerConfig), so the preview passes NATs. The hub relays the signaling itself; only the Message Lambda may call that channel.
The client build (npm run build:client) writes client/dist (app, service worker, static files and version.json,
whose build id lets open tabs offer « New version available · Reload ») and client/dist-preview (the preview origin's
files). The deploy runs it for you.
Check: read the stack outputs.
aws cloudformation describe-stacks --stack-name "$BRIEFLING_STACK" --region eu-west-3 \
--query 'Stacks[0].Outputs[].[OutputKey,OutputValue]' --output text
Expected keys: AppUrl, PreviewUrl, WsUrl, TableName, UserPoolId, WebClientId, InstanceClientId,
the dedicated agent client of known obstacle 5, TokenUrl, DeployedCommit. DeployedCommit equals git rev-parse HEAD. Then, with APP =
AppUrl and PREVIEW = PreviewUrl, both without a trailing /:
curl -s -o /dev/null -w '%{http_code}\n' "$APP/" # 200
curl -s "$APP/config.json" # {"clientId":...,"authDomain":...,"idpUrl":...,"wsUrl":"wss://...","previewUrl":"https://..."}
curl -s "$APP/version.json" # {"build":"<12 hex characters>"}
curl -s "$APP/agent.md" | head -1 # # Join briefling
curl -s -o /dev/null -w '%{http_code}\n' "$PREVIEW/__viewer/index.html" # 200
curl -s "$PREVIEW/config.json" # {"parents":["<AppUrl without trailing />"]}, plus the raw CloudFront URL once a custom domain is on
5. Seed the bootstrap data
node scripts/seed.ts
It creates, in this stack only: two test users (names in USERS in scripts/seed.ts; random passwords stored in SSM
SecureString /<stack-name>/<user>-password, never printed), a space e2e, and a fictitious agent testbot served by
the static instance client InstanceClientId. The e2e test uses them, and the next steps use them to get past the
empty-table deadlock (obstacle 3).
Check: the script prints seed ok: e2e space (1 trusted member, 1 guest), test instance (testbot), and
TABLE=$(aws cloudformation describe-stacks --stack-name "$BRIEFLING_STACK" --region eu-west-3 --query "Stacks[0].Outputs[?OutputKey=='TableName'].OutputValue" --output text)
aws dynamodb get-item --region eu-west-3 --table-name "$TABLE" --key '{"pk":{"S":"SPACE#e2e"},"sk":{"S":"META"}}' --query 'Item.name.S'
prints "e2e".
6. Test the hub end to end
node test/e2e.ts
It connects as the two test users and as testbot, and exercises threads, the Lounge, questions, permissions, files,
search, admin settings, invitations of agents, parallel work and more against the live hub. It only uses test spaces
and cleans up what it creates. It prints one ok <step> line per step and e2e: all green at the end.
Check: e2e: all green. Without a GitHub App (step 9), the run stops at the step
GitHub: Project of an organization without the App: everything before it passed, the rest did not run
(obstacle 7). On TooManyRequestsException or nothing received in time, see step 3 (Lambda quota) first.
7. Create the first admin
The admin role is global and only written by a script, never through the app. The admin must also be a member of an
existing space, otherwise the hub refuses the first space they create (obstacle 3): the e2e space serves for that.
node scripts/add-user.ts <username> <email> e2e --trusted
node scripts/bootstrap-spaces.ts <username>
add-user.tscreates the Cognito account: Cognito e-mails a temporary password (valid 7 days) to<email>. The person signs in with<username>, not the address (user names are case-sensitive).--trustedmakes them a Lead of the space (stored astrusted).bootstrap-spaces.tsadds the person to the admins and rebuilds the space and instance indexes (idempotent).
Check:
POOL=$(aws cloudformation describe-stacks --stack-name "$BRIEFLING_STACK" --region eu-west-3 --query "Stacks[0].Outputs[?OutputKey=='UserPoolId'].OutputValue" --output text)
aws cognito-idp admin-get-user --region eu-west-3 --user-pool-id "$POOL" --username <username> --query UserStatus # "FORCE_CHANGE_PASSWORD"
aws dynamodb get-item --region eu-west-3 --table-name "$TABLE" --key '{"pk":{"S":"INDEX"},"sk":{"S":"ADMINS"}}' --query 'Item.users.SS' # contains the user's sub
bootstrap-spaces.ts prints index: N spaces (...), M instances; admin: <username>.
Human step: open AppUrl, sign in with <username> and the temporary password, choose a password (16 characters
minimum). Check: the app loads, the sidebar shows the e2e space and a + next to "Spaces" (admins only).
After this the admin-get-user status above reads "CONFIRMED".
8. Create the first space and invite the first agent
In the app, as the admin:
- Click + next to "Spaces". Name, brief (what the agent should know about the project). Members: you, role
Lead. Agent:
testbotis the only one offered (a space needs an agent that an instance already serves, obstacle 3); keep it for now. Save. - Open the new space's settings (gear on the space row), tab Agents. Under Invite an agent, type the agent's
name (lower case, e.g.
ada), click Invite, then Copy the link<AppUrl>/agent.md?code=.... It is shown once, works once and expires after 24 hours.
Give every person who should talk to the agent their role (Lead or Contributor, tab Members) before the
agent joins: the plugin's allowlist (BRIEFLING_ALLOWED_USERS) is filled with the space's leads and contributors at
join time. For people given a role later, either the agent's operator adds them to its .env, or the host follows
the hub (BRIEFLING_ALLOWED_FROM=hub, obstacle 11).
On the agent's machine (add -p <profile> to every hermes command for a named profile):
hermes plugins install briefling/hermes-plugin --enable
hermes briefling join "<the link>"
hermes gateway restart
The install asks for four BRIEFLING_* values: press Enter to skip each one, join writes them (obstacle 9). join
writes the agent's own credentials into the profile's .env (mode 600) and never prints them. The page at the link
explains the same steps to the agent, so you can also just give the link to the agent and approve its commands.
Advised setting: prompt cache. Hermes keeps the prompt cache 5 minutes by default, so after a longer pause the whole conversation is cached again at full price;
autokeeps it 1 hour for conversations with a person and 5 minutes for crons and subagents. On the agent's machine:hermes [-p <profile>] config set prompt_caching.cache_ttl auto hermes gateway restartThe restart is required: a running gateway keeps its agents built with the old value. The agent row in the space settings shows
cache 5 min · advised: autowhile the default is in place. ACP agents: depends on the agent.
Check:
hermes briefling joinends without error (onalready used,expiredorrevoked: invite again).- In the space settings, the invitation shows Connected and the agent row shows its plugin version
(
vX.Y.Z · up to date). - In the space settings, mark the new agent In charge and save, then click Remove on
testbot(the static test instance keeps serving thee2espace). - In the space's Bar (the Lounge, « Comptoir » in French), write
@<agent> hello: briefling opens a topic from that message and the agent's reply appears there. If the message shows "<agent> is not connected, message not delivered", the plugin is not subscribed: check the profile's gateway log forconnected to hub, subscribing to.
An agent that does not run Hermes (Claude Code, Codex, Kiro CLI or another ACP
agent): it connects through the ACP bridge in acp-bridge/ instead of the plugin; same invitation link, same rule
(roles given before the join). On a Mac or Linux machine, one line does it all; the space settings show it ready to
copy under the link:
curl -fsSL <AppUrl>/install.sh | sh -s -- '<the link>'
It installs uv, Node.js if the agent needs it and the bridge at the release the hub announces (the bridge then updates
itself), checks that the agent is signed in, joins and starts a user service (launchd or systemd). Options after the
link: --agent <id>, --dir <folder>, --no-service. No root needed. Other systems or a manual setup: see
the ACP bridge README.
The install is done: app URL, an admin, a space, an agent. Invite people from the space settings (Invite by email); see the user guide.
9. Optional: GitHub
Needed for the Board, issues from threads, and the complete e2e run.
- Create a GitHub App with no webhook. Permissions:
metadata: read,issues: write,organization_projects: write(Board, issues, labels), pluscontents: writeandpull_requests: writeif you want the Merge button of board-driven spaces, pluschecks: readandstatuses: readfor the CI follow-up. The Radar's bug and security detectors read issues and lockfiles withcontents: read+issues: read(already covered by the write permissions above) and check the pins on OSV.dev (outbound HTTPS from the GitHub Lambda, no key). Install it on the organizations whose Projects or repos you will attach. - Set its App id in
cdk.json(context.githubAppId; obstacle 6), commit,npm run deploy. - Store its private key:
scripts/put-github-key.sh <path to .pem>(SSM SecureString/<stack-name>/github-app-key; among the stack's roles only the two GitHub Lambdas may read it), then delete the.pem. - Link a space to a Project: the space Settings, Work tab, GitHub Project (its URL, checked on GitHub by the hub),
or by script
node scripts/attach-github.ts <space> <org> <project number> <org/repo>[,<org/repo>...]. Repos alone (CI follow-up, no Board): the space Settings, GitHub section.
Check: invoke the poller and read its log.
aws lambda invoke --region eu-west-3 --function-name "$BRIEFLING_STACK-githubpoll" --log-type Tail /dev/null \
--query LogResult --output text | base64 -d | grep github_
Keep the app open on that space while you run it: the poll skips spaces nobody is connected to. Expected
github_poll <space> updated (or same), and no github_not_configured nor github_poll_failed. The space shows a
Board entry.
9b. Optional: Web Push
Push notifications when the app is closed (phones included) need a VAPID key pair:
node scripts/put-vapid-key.ts
It stores /<stack-name>/vapid-public (String) and /<stack-name>/vapid-private (SecureString; among the stack's
roles only the Push Lambda may read it) and refuses to replace an existing pair (--rotate to do it on purpose:
devices re-subscribe by themselves). No redeploy needed. Without the pair, alerts stay limited to open tabs.
Check: node test/e2e.ts runs its Web Push step instead of printing skipped: no VAPID key; in the app, turn the
bell on, the tooltip mentions notifications when briefling is closed.
10. Optional: custom domain, Bedrock summaries
- Custom domain: request an ACM certificate in us-east-1 for the name, add
domain: { name, certificateArn, enabled: true }to your stack entry, deploy, then create a CNAME from the name to the CloudFront distribution. The CloudFront URL keeps working for sign-in and uploads. - Custom domain for the preview origin: same recipe with
previewDomain: { name, certificateArn, enabled: true }and a CNAME to the preview distribution (PreviewUrl). It must be a different name from the app's: the preview needs its own origin. Without it, the preview runs on its raw CloudFront URL, which works the same. - Summaries of threads are written by the agent itself when it ends a turn (
turn_outcomewith a summary); nothing to set up. The older Bedrock path (SQS queue + Summary Lambda, Nova Lite through theeu.*inference profile) is still in the stack but dormant:BEDROCK_SUMMARIES = falseininfra/app.ts, so the hub queues nothing. To turn it back on, set it totrue, enable model access for Nova Lite in the account and deploy.
Operating
- Redeploy after pulling changes:
git pull,npm ci,npm test,npm run deploy. The deploy guard refuses a dirty tree and a HEAD that does not contain the commit already live (DeployedCommit): rebase on what runs, never deploy beside it. It also refuses while the stack is being updated (*_IN_PROGRESS: another deploy is running).-- --override-live-checkexists for a deliberate rollback only. - New admin:
node scripts/bootstrap-spaces.ts <username>(they must have an account and be in a space). - Resend an expired invitation:
aws cognito-idp admin-create-user --user-pool-id <pool> --username <address> --message-action RESEND. - Remove a stack:
npx cdk destroy "$BRIEFLING_STACK". Withprod: falseeverything goes. Withprod: true, turn off termination protection first, and the table, user pool and files bucket stay (delete them by hand if you mean it).
Maintainers: releasing the agent side
Only for those who maintain the public plugin and bridge repos; an install uses the published versions.
- Hermes plugin (
hermes-plugin/→ public repo, defaultbriefling/hermes-plugin):node scripts/publish-plugin.ts patchis a dry run (bumps the version in a throwaway clone, runs the plugin tests, scans for private content, prints what would be pushed; needsHERMES_PYandHERMES_SRClikescripts/e2e-plugin.sh).--pushpublishes the tag and commits here the bumped release (protocol/plugin-release.ts); push this repo andnpm run deployso the app andagent.mdoffer it. - ACP bridge (
acp-bridge/→ public repo, defaultbriefling/acp-bridge):node scripts/publish-acp-bridge.ts(dry run: copy with symlinks dereferenced, bridge tests, private-content scan;ACP_PY= a Python withaiohttp,pytest,pytest-asyncio), then--push(creates the repo, public, if missing, and pushesmain+ tagv<pyproject version>). Bumpacp-bridge/pyproject.tomlfirst. Live check:scripts/e2e-acp.sh. - Secret test vector:
node scripts/secret-vector.tsrewriteshermes-plugin/tests/secret-vector.json(a secret encrypted by the browser code, decrypted by the plugin's tests). Run it only when the scheme inprotocol/secret.tschanges. - Both publish scripts push over HTTPS with git credentials allowed to push to the target repo; the bridge's also uses
gh(to check and create its repo).
Known obstacles
Found by reading the code for this guide (not by a fresh install), rechecked against the current code: unit tests, a
cdk synth of a placeholder stack entry (outputs and resources above) and the step 4 checks on a running stack. They
are listed here and not fixed yet.
| # | Obstacle | Effect | Workaround today | Source |
|---|---|---|---|---|
| 1 | infra/stacks.ts holds the maintainers' stacks with their accounts; DEFAULT_STACK points at one of them; scripts/test/stacks.test.ts asserts those entries |
Forgetting BRIEFLING_STACK targets someone else's stack; removing their entries breaks npm test |
Add your entry next to them, always export BRIEFLING_STACK |
verified (code) |
| 2 | Region eu-west-3 hard-coded: CSP connect-src in infra/app.ts; scripts/add-user.ts, scripts/bootstrap-spaces.ts, scripts/test-tokens.ts, test/e2e.ts, scripts/e2e-plugin.sh, scripts/e2e-acp.sh; summaries use the eu.* Bedrock profile |
In another region the browser cannot open the WebSocket, and the scripts talk to the wrong region | Install in eu-west-3 | verified (code) |
| 3 | Empty-table deadlock: creating a space requires its members to be in an existing space (unknown_member) and its agents to be served by an instance (unknown_agent); an agent can only be invited into an existing space; the admin role is only written by bootstrap-spaces.ts |
A fresh admin cannot create the first space from the app | Steps 5, 7 and 8: seed.ts (space e2e, agent testbot), add-user.ts into e2e, then testbot as placeholder agent |
verified (code: space.save in hub/src/router.ts) |
| 4 | Bootstrap data are test fixtures: the test users have fixed names (USERS in seed.ts), the admin stays a member of the e2e test space, which e2e runs fill with test threads |
Noise in the admin's sidebar | Leave the e2e space once the first real space exists (keep it for e2e runs) |
verified (code) |
| 5 | Static instance clients in infra/app.ts: InstanceMini (used by the tests) and a second one dedicated to a specific agent (construct and output named after that agent) are created in every stack and accepted by the authorizer |
One unused M2M client per stack | None needed; delete the second one from infra/app.ts in a fork |
verified (code) |
| 6 | The GitHub App id lives in cdk.json (context.githubAppId), shared by every stack, and npm run deploy passes no -c option |
All stacks of a checkout share one App id; the default value is another installation's App | Edit cdk.json in your checkout |
verified (code) |
| 7 | test/e2e.ts expects a configured GitHub App (it asserts a github_poll line from the poll Lambda) |
Without GitHub, e2e stops at that step; the steps after it do not run | Configure step 9 before relying on a full e2e run | deduced (code: poll logs github_not_configured) |
| 8 | The deploy guard needs a git checkout with a clean tree and runs git fetch |
Uncommitted stack entry refused; a checkout without a remote not tested | Commit your stack entry; deploy from a clone | clean tree verified (code); no-remote case not verified |
| 9 | plugin.yaml declares the four BRIEFLING_* connection values as requires_env |
hermes plugins install prompts for them before join can write them |
Press Enter to skip each prompt | verified (code), noted in project-status.md § 7 |
| 10 | Invitation mails use Cognito's default sender | 50 mails a day, sender no-reply@verificationemail.com, may land in spam |
Configure SES on the pool (not supported by the CDK app yet) | verified (code + project-status.md) |
| 11 | The plugin allowlist BRIEFLING_ALLOWED_USERS is written once, at join (the space's leads and contributors) |
People given a role later cannot drive that agent until its operator edits the .env |
Give roles before inviting the agent, or set BRIEFLING_ALLOWED_FROM=hub on the agent host and empty BRIEFLING_ALLOWED_USERS and GATEWAY_ALLOWED_USERS (the host then follows each space's leads and contributors, live) |
verified (code: join.py, adapter.py) |
| 12 | No CI | Deploys run from a workstation or an agent with credentials | — | verified (no CI config in the repo) |