Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
773 lines (758 loc) · 47.8 KB
/
Copy pathdocker-compose.yml
File metadata and controls
773 lines (758 loc) · 47.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
# The server applies its own migrations when it starts and does the scheduled work itself (firing
# routines, cleaning up unsent attachments, suspending idle computers), so nothing in this release
# starts the `worker` or `migrate` service below. OpenBot Desktop, scripts/start.sh and the updater
# read this one line to tell this file from an earlier release's, where both are in use. Compose
# ignores a top-level `x-` field.
x-openbot-scheduled-work: server
services:
postgres:
image: pgvector/pgvector:pg17
# Off the network the Bots are on, because a Bot's computer is on it and a Bot has a shell.
#
# With no `networks:` anywhere, Compose puts every service on one network with DNS by service
# name, so `agent-computer` could open `postgres:5432` and the credentials three lines below are
# in this file. That is the audit trail, the policy store and the agent tables, reachable from
# the one container whose whole job is to run what a Bot asks for. `agent-computer/src/shell.ts`
# says it plainly: isolation is the container's job, a shell can reach whatever the container
# can reach.
#
# `server` reaches this by name, and it is what belongs here: it applies its own migrations
# when it starts and does its scheduled work itself. (`migrate` and `worker` are here too, for
# this one release, and nothing starts them: see each.) Anything on the host connects through
# the published port below.
environment:
POSTGRES_DB: openbot
POSTGRES_USER: openbot
POSTGRES_PASSWORD: openbot
ports:
# Loopback, like every other port in this file, and for the reason the network split above
# exists. Published on every interface, this is reachable from the Bot's computer at the
# container's default gateway, which is the host: taking `postgres` off that network removes
# the name and leaves the address. Proven from inside `agent-computer`, where the gateway on
# :5432 answered and began authenticating as `openbot` on `openbot`, with the password in
# this file. The server on the host still reaches it, because that is what loopback is.
# Both loopback addresses, because `localhost` is not one address.
#
# It resolves to ::1 and 127.0.0.1 in an order the platform decides, and a client that gets
# ::1 first does not fall back: Bun and Node both fail the connection outright rather than
# trying the other. Publishing on one of them makes `localhost` work on some machines and not
# others, for a reason nothing in the error mentions. Publishing on both is still loopback,
# so nothing here is reachable from another host.
- "127.0.0.1:${POSTGRES_PORT:-5432}:5432"
- "[::1]:${POSTGRES_PORT:-5432}:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U openbot -d openbot"]
interval: 5s
timeout: 5s
retries: 10
networks:
- data
# OpenBot itself, the API and the app it serves, as an installed OpenBot runs it.
#
# BEHIND A PROFILE, so a plain `docker compose up -d` starts only what it always did. Naming
# `server` on the command line still starts it, profile or not, which is how `scripts/start.sh`
# and an installed OpenBot ask for it.
#
# One image and one process: the API, the built app at `APP_DIST_DIR`, the database migrations,
# which it applies when it starts, and the scheduled work (firing routines, cleaning up unsent
# attachments, suspending idle computers). A machine with that image needs Docker and nothing
# else, which is the point.
server:
profiles: ["openbot"]
# ONE IMAGE, AND A COMMAND FOR EACH ROLE. The OpenBot image runs this server and every Bot's
# computer. Started with no command it is the whole of OpenBot in one container, so each service
# here names the part it is: this one the server, `agent-computer` below the computer.
#
# PULLED, NEVER BUILT HERE. This image and the supervisor's below are the published OpenBot
# images, both at one tag: OPENBOT_BACKEND_TAG, set in backend-images.env.
# scripts/start.sh, CI and Desktop's local build read that file and hand the tag to Compose
# here. SERVER_IMAGE still wins over it, which is how OpenBot Desktop pins a
# release's digest.
#
# A Compose run by hand without the tag still reads this file, so `ps`, `logs` and `down` work as
# they always did. Only a pull fails, and the tag it fails on says where the real one is. Pass
# backend-images.env to it (`docker compose --env-file backend-images.env --env-file .env ...`).
#
# `missing` rather than `always`: a `sha-` tag names one build and never moves, so an image this
# machine already has is the right one. OpenBot Desktop sets `missing` too.
image: &server-image ${SERVER_IMAGE:-ghcr.io/copilotkit/openbot:${OPENBOT_BACKEND_TAG:-see-backend-images.env}}
pull_policy: ${IMAGE_PULL_POLICY:-missing}
# The server, and nothing else in the image: the executable and its command, from the directory
# the server reads its migrations from. Naming the entrypoint drops the image's own, and with it
# everything else the image would have started.
entrypoint: ["/app/bin/openbot", "server"]
working_dir: /app/server
# The deployment's settings, `.env`. Optional, because `docker compose config` and a first start
# both come before anything wrote it. `scripts/start.sh` names a file of its own instead, `.env`
# with its run's environment on top (scripts/server-env.ts), removed once the container exists.
#
# Everything in `environment:` below wins over this file. That is what lets the addresses there
# name services on this network: the file says `127.0.0.1`, which inside this container is the
# container.
env_file:
- path: ${OPENBOT_SERVER_ENV_FILE:-./.env}
required: false
environment:
# Both names, because `.env` carries `SERVER_PORT` for the host port, and the server refuses to
# start when the two disagree (`serverPort` in server/src/config.ts). Inside this container it
# is always 3001; the host port is the mapping's business, below.
PORT: "3001"
SERVER_PORT: "3001"
# Not production, as a host server is not. The image says production, and in production the
# server refuses `AGENT_COMPUTER_ALLOW_PRIVATE_HOSTS`, which a local OpenBot needs: its
# supervisor, computers and Bots are all at private addresses, on purpose. Empty rather than
# `development`, because unset is what a host server has, and libraries that look at this
# treat the two alike.
NODE_ENV: ""
# Every address below names a service on this network rather than the loopback port the host
# server reaches it on.
DATABASE_URL: postgres://openbot:openbot@postgres:5432/openbot
AGENT_COMPUTER_URL: http://agent-computer:4100
# Per-Bot computers too, which is not automatic: the supervisor publishes each on a loopback
# port unless `COMPUTER_NETWORK` names this project's `default` network, and a loopback port on
# the host is not one this container can open. Whoever starts this service sets that as well.
#
# `-` and not `:-`: unset is the supervisor, as it always was, and set empty is no supervisor,
# which is how OpenBot Desktop runs the personal edition on its one computer.
COMPUTER_SUPERVISOR_URL: ${COMPUTER_SUPERVISOR_CONTAINER_URL-http://supervisor:4300}
# The managed Bot by name, when the deployment has one. `:+` keeps an empty setting empty, which
# is how a deployment without that Bot says so: the package drops its row while this is blank.
MANAGED_AGENT_AG_UI_URL: ${MANAGED_AGENT_AG_UI_URL:+http://agent-langgraph-agui:4206/}
# The TypeScript LangGraph engine by name, which new Bots run on, when the deployment runs it.
# `:+` for the same reason as the managed Bot's: empty says it does not. A deployment whose
# picked harness is that engine (OpenBot Desktop's) needs neither: the server finds it at
# PICKED_HARNESS_URL.
LANGGRAPH_TS_AG_UI_URL: ${LANGGRAPH_TS_AG_UI_URL:+http://agent-langgraph-ts:4215/}
# Where a ChatGPT plan's model calls go: the LangGraph harness that holds the plan's token
# store, by name. Empty on every other sign-in. The token falls back to MANAGED_AGENT_TOKEN.
CHATGPT_PLAN_HARNESS_URL: ${CHATGPT_PLAN_HARNESS_URL:-}
CHATGPT_PLAN_HARNESS_TOKEN: ${CHATGPT_PLAN_HARNESS_TOKEN:-}
# These three have a container address only the deployment knows, so they take the shape
# `OPENAI_CONTAINER_BASE_URL` already has on the Bots below: the container's own address when
# one is given, and otherwise the deployment's, which for anything not on this machine is
# already right. The picked harness's path, a model endpoint on the host, and Intelligence.
PICKED_HARNESS_URL: ${PICKED_HARNESS_CONTAINER_URL:-${PICKED_HARNESS_URL:-}}
OPENAI_BASE_URL: ${OPENAI_CONTAINER_BASE_URL:-${OPENAI_BASE_URL:-}}
INTELLIGENCE_API_URL: ${INTELLIGENCE_CONTAINER_API_URL:-${INTELLIGENCE_API_URL:-}}
INTELLIGENCE_GATEWAY_WS_URL: ${INTELLIGENCE_CONTAINER_GATEWAY_WS_URL:-${INTELLIGENCE_GATEWAY_WS_URL:-}}
# ONE ADDRESS. The browser opens the gateway's socket too, at the address the server gives it,
# and with Intelligence on this machine that address is OpenBot's own: the server carries the
# socket at `/api/intelligence/client`, so the app, the Recorder and every other client are
# given the address they already reached OpenBot at and never the gateway's own port. On
# when the gateway has a container address, which is what an Intelligence on this machine is
# given (OpenBot Desktop and `scripts/start.sh` both write it for a loopback address). An
# Intelligence somewhere else, managed Intelligence among them, has a host of its own that
# the browser reaches itself, as before.
#
# Whoever starts this service may say otherwise with OPENBOT_GATEWAY_PROXY, set empty for
# off, and then names the browser's own way to the gateway in
# OPENBOT_BROWSER_GATEWAY_WS_URL. `scripts/start.sh` does, for a checkout with no
# OPENBOT_PUBLIC_URL: the Recorder is not on the page and needs a whole address, which the
# server can only write on a public URL, so there the browser and the Recorder keep the
# gateway's own port. OpenBot Desktop always writes the public URL and sets neither.
INTELLIGENCE_GATEWAY_PROXY: ${OPENBOT_GATEWAY_PROXY-${INTELLIGENCE_CONTAINER_GATEWAY_WS_URL:+on}}
INTELLIGENCE_BROWSER_GATEWAY_WS_URL: ${OPENBOT_BROWSER_GATEWAY_WS_URL:-}
# The person's own browser, where a host-side computer runs it (scripts/start.sh's personal
# edition), listening on the host's loopback, and its container address when one is given.
# Unset, the person's browser runs on the computers the Bots run on and shows in the page.
OPENBOT_BROWSER_URL: ${OPENBOT_BROWSER_CONTAINER_URL:-${OPENBOT_BROWSER_URL:-}}
# The name this container reaches the person's machine by, which OpenBot Desktop writes. With
# it, an agent a person registers on their own loopback (`http://127.0.0.1:8765/ag-ui`) is
# dialled there rather than at this container. A container name only, so a host server reading
# the same `.env` never translates its own loopback.
OPENBOT_THIS_MACHINE_HOST: ${OPENBOT_THIS_MACHINE_CONTAINER_HOST:-}
# The deployment's secrets, from the environment Compose runs in and then from `.env`, which
# Compose reads for these `${...}` and the host server reads for itself. OpenBot Desktop keeps
# them out of that file and hands them to Compose in its environment, so they reach this
# container only by being named here. The defaults are the ones every other service in this
# file and `scripts/start.sh` agree on.
AGENT_TOOL_TOKEN: ${AGENT_TOOL_TOKEN:-}
COMPUTER_TOKEN: ${COMPUTER_TOKEN:-openbot-dev-computer-token}
KEY_ENCRYPTION_KEY: ${KEY_ENCRYPTION_KEY:-}
MANAGED_AGENT_TOKEN: ${MANAGED_AGENT_TOKEN:-}
SUPERVISOR_TOKEN: ${SUPERVISOR_TOKEN:-openbot-dev-supervisor-token}
INTELLIGENCE_API_KEY: ${INTELLIGENCE_API_KEY:-}
OPENAI_API_KEY: ${OPENAI_API_KEY:-}
ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY:-}
CLAUDE_CODE_OAUTH_TOKEN: ${CLAUDE_CODE_OAUTH_TOKEN:-}
# The desktop's host-access broker proves itself with this. Minted per start and given to the
# server alone, so it is named here and nowhere else in this file.
OPENBOT_DESKTOP_HOST_TOKEN: ${OPENBOT_DESKTOP_HOST_TOKEN:-}
# The install's own token: the personal edition only admits requests carrying it. OpenBot
# Desktop mints it once per installation, keeps it out of `.env` and hands it to Compose in
# its environment; `scripts/start.sh` mints it into `.env`. Given to the server alone.
OPENBOT_INSTALL_TOKEN: ${OPENBOT_INSTALL_TOKEN:-}
# The app broker's settings. A Composio key the desktop provisioned at CopilotKit sign-in lives
# in its protected store, never in `.env`, so it reaches this container only by being named
# here. A key the person put in `.env` wins and arrives the same way.
COMPOSIO_API_KEY: ${COMPOSIO_API_KEY:-}
ARCADE_API_KEY: ${ARCADE_API_KEY:-}
OPENBOT_BROKER_PROVIDER: ${OPENBOT_BROKER_PROVIDER:-}
# A Google or xAI sign-in, which the server reads and renews itself. The file is on the host,
# at `.openbot/model-oauth.json` beside this one, and reaches the container through the mount
# below, so a host path here becomes the mount's. Empty stays empty: no sign-in, no file.
OPENBOT_MODEL_OAUTH_FILE: ${OPENBOT_MODEL_OAUTH_FILE:+/openbot/model-oauth.json}
# The secret local Intelligence's Learning agent sends when it asks the person's Claude or
# ChatGPT plan for a step (server/src/learning/model-endpoint.ts). OpenBot Desktop mints it
# once per installation and gives it to this service and that agent alone.
OPENBOT_LEARNING_MODEL_TOKEN: ${LEARNING_MODEL_TOKEN:-}
# The AI connection, which the person changes inside the app with no restart. The server keeps
# it and serves every engine's model calls through its model gateway, adding the live key per
# request. This token is how an engine proves itself there; OpenBot Desktop mints it once per
# installation and gives it to this service and the engines below, never to a Bot's computer.
MODEL_GATEWAY_TOKEN: ${MODEL_GATEWAY_TOKEN:-}
# The Claude plan's engine below, by name on this network, for the moment it is started; the
# ChatGPT plan's is CHATGPT_PLAN_HARNESS_URL above. OpenBot Desktop sets both whether or not
# one runs, so a plan picked in the app reaches its engine with no restart.
CLAUDE_PLAN_HARNESS_URL: ${CLAUDE_PLAN_HARNESS_URL:-}
# Which connection the setup window chose (`{"provider":"anthropic","login":"plan"}`, never a
# key) and when, so the server imports a newer choice made there and otherwise keeps the one
# changed in the app. Neither is a secret.
OPENBOT_AI_CONNECTION: ${OPENBOT_AI_CONNECTION:-}
OPENBOT_AI_CONNECTION_CHOSEN_AT: ${OPENBOT_AI_CONNECTION_CHOSEN_AT:-}
# The picked harness, read per run from a file in the sign-in folder mounted below, so OpenBot
# Desktop can point it at another engine without restarting the server. A host path here
# becomes the mount's; empty stays empty, and the PICKED_HARNESS_* settings apply.
OPENBOT_PICKED_HARNESS_FILE: ${OPENBOT_PICKED_HARNESS_FILE:+/openbot/picked-harness.json}
# Where the server writes the sentence it refused to start with, as it exits 78: on the host at
# `.openbot/refusal`, through the mount below. OpenBot Desktop reads it there, which does not
# depend on catching the container stopped between the engine's restarts.
OPENBOT_REFUSAL_FILE: /openbot/refusal
# Who the server runs as. The image's own user by default. On Linux the desktop names the host's,
# because the sign-in file below is the host user's and readable by nobody else, and a bind mount
# there keeps the host's numbers; Docker Desktop's file sharing on macOS and Windows does not.
# Under rootless Podman on Linux it names container root, which that user namespace maps to the
# host user; any other uid there is one of their subordinate ids and cannot read the file.
user: "${OPENBOT_SERVER_USER:-1001:1001}"
volumes:
# The directory, not the file: the server renews the token by writing a sibling and renaming it
# over the original, which a single-file mount cannot take. Not created here, because Docker
# would create it as root on Linux and the desktop could then not write its sign-in into it;
# whoever starts this service makes it first.
- type: bind
source: ./.openbot
target: /openbot
bind:
create_host_path: false
ports:
# Two host ports, one process. The app's is the address a window is given: the server serves
# the built app itself, so that one port reaches both halves on one origin. The server's is
# where everything else on the host already calls it, OpenBot Desktop's host-access broker
# among them. Loopback, for the reason every other port here is.
#
# SERVER_APP_PORT set empty publishes the app's copy on no fixed port, which is how
# `scripts/start.sh` leaves APP_PORT to the checkout's own app, served by Vite. `-`, not `:-`,
# so empty is not the same as unset.
- "127.0.0.1:${SERVER_APP_PORT-${APP_PORT:-3010}}:3001"
- "[::1]:${SERVER_APP_PORT-${APP_PORT:-3010}}:3001"
- "127.0.0.1:${SERVER_PORT:-3001}:3001"
- "[::1]:${SERVER_PORT:-3001}:3001"
# For whatever stays on the host and is addressed as such: a model endpoint on this machine, and
# anything else the Bots below already reach the same way. OpenBot Desktop sets
# `OPENBOT_HOST_GATEWAY` under rootless Podman on Linux, where `host-gateway` is not this
# machine's loopback and the address it gives is.
extra_hosts:
- "host.docker.internal:${OPENBOT_HOST_GATEWAY:-host-gateway}"
# The database, ready to answer, because the server applies its migrations before it listens.
depends_on:
postgres:
condition: service_healthy
# A server that refuses to start exits 78 (EX_CONFIG). Docker restarts it like any other exit,
# but OpenBot Desktop stops waiting for it at once and shows the sentence it printed.
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "bun -e \"const r = await fetch('http://127.0.0.1:3001/health'); process.exit(r.ok ? 0 : 1)\""]
interval: 10s
timeout: 5s
retries: 5
# Both: `data` for the database, `default` for the Bots, the computers and the supervisor. This is
# the one service the note on `networks:` at the end of this file says may sit on both.
networks:
- data
- default
# DEFINED FOR THIS ONE RELEASE, AND STARTED BY NOTHING IN IT. An OpenBot Desktop app from the
# release before reads a Compose file as current only when it defines `worker`, and starts the
# service by name. The server does the scheduled work itself now, so started that way this says
# so and waits. Nothing depends on it. It goes in the next release.
worker:
profiles: ["openbot"]
image: *server-image
pull_policy: ${IMAGE_PULL_POLICY:-missing}
# The executable and the command, in full, as `server` above: nothing else in the image starts.
entrypoint: ["/app/bin/openbot"]
command: ["worker"]
working_dir: /app/server
# No health check. The image's own asks after a server on its port, which this container does
# not run, so it would be reported unhealthy for ever, and an app that starts its services with
# `up --wait` would be told the start failed.
healthcheck:
disable: true
restart: unless-stopped
networks:
- data
# DEFINED FOR THIS ONE RELEASE, AND STARTED BY NOTHING IN IT. An OpenBot Desktop app from the
# release before asks for this service's image by name. The server applies its own migrations
# when it starts, so run by hand this finds nothing left to do and exits. Nothing depends on it.
# It goes in the next release.
migrate:
profiles: ["openbot"]
image: *server-image
pull_policy: ${IMAGE_PULL_POLICY:-missing}
entrypoint: ["/app/bin/openbot"]
command: ["migrate"]
working_dir: /app/server
# No health check, as `worker` above: this runs to its end and is never a server.
healthcheck:
disable: true
environment:
DATABASE_URL: postgres://openbot:openbot@postgres:5432/openbot
depends_on:
postgres:
condition: service_healthy
restart: "no"
networks:
- data
# KEPT FOR ONE RELEASE, and started by nothing. Defined only so an app from the release before
# (1.0.2 or 1.0.3) can merge its own port settings onto this file: on a Mac with Podman it names
# this service in an overlay, and Compose refuses an overlay that names a service this file does
# not define. Behind a profile nothing turns on, on the server image, so nothing more is pulled.
# Dropped in the next release.
agent-bot:
profiles: ["for-older-apps"]
image: *server-image
pull_policy: never
restart: "no"
# KEPT FOR ONE RELEASE, and started by nothing, for the same reason as `agent-bot` above: an app
# from the release before names this service in its port overlay. Dropped in the next release.
agent-langgraph:
profiles: ["for-older-apps"]
image: *server-image
pull_policy: never
restart: "no"
# The Bot's computer is long-lived so browser sessions remain signed in across turns.
agent-computer:
# The OpenBot image again, the one `server` runs, started as a computer. Named rather than
# Compose-derived, because the supervisor starts one computer per Bot from this image by name.
# COMPUTER_IMAGE is still a setting of its own: an OpenBot Desktop app pins it from a release's
# image list, where it names the same image as SERVER_IMAGE.
image: &computer-image ${COMPUTER_IMAGE:-ghcr.io/copilotkit/openbot:${OPENBOT_BACKEND_TAG:-see-backend-images.env}}
pull_policy: ${IMAGE_PULL_POLICY:-missing}
# THE COMPUTER, AND NOTHING ELSE IN THE IMAGE. A container of its own, so what a Bot's shell can
# read is what this service is given below and not one setting of the server's: no database
# address, no keys, no licence. The server's executable is in the image, and from here it has
# none of those either, so it does not start.
entrypoint: ["/app/bin/openbot-computer"]
# A Bot's shell runs `ping`, which needs raw ICMP sockets. Docker grants NET_RAW by default and
# Podman does not, so without this ping fails with "Operation not permitted" on Podman (the
# Desktop's engine on Windows), even as root. Asked for here so both engines give the same.
cap_add:
- NET_RAW
ports:
# Loopback only. This process drives a browser holding real logins; COMPUTER_TOKEN is the
# request control, and loopback keeps the surface off routed networks.
- "127.0.0.1:${COMPUTER_PORT:-4100}:4100"
- "[::1]:${COMPUTER_PORT:-4100}:4100"
# Per-Bot egress, in a file of its own because the names are not knowable here.
#
# `EGRESS_PROXY_<BOT>` is derived from the Bot's id, so there is no fixed list to write out the
# way COMPUTER_TOKEN is. Not `.env`: that holds the deployment's secrets, and this container
# drives a browser and runs a Bot's shell, so it is given what it needs and not the rest.
# Optional, because going out directly is the ordinary case and must still start.
env_file:
- path: ./egress.env
required: false
environment:
# The secret every caller must present. The container refuses to start without it.
#
# The default matches the one scripts/start.sh applies when .env leaves this blank, which
# .env.example does. Without it the two paths disagree: the script exports a value and brings
# the stack up working, while a plain `docker compose up -d` -- which this project's own
# shutdown notes tell you to use -- hands the container an empty string instead. Reaches only
# a loopback-bound port; a deployment sets a real value in .env.
COMPUTER_TOKEN: ${COMPUTER_TOKEN:-openbot-dev-computer-token}
# Where the computer listens. Said here because the image's own PORT is the server's.
PORT: "4100"
# Headed by default: full Chromium on the container's own X server, behind the same streamed
# screen, which bot checks such as Cloudflare's challenge far less than headless. `headless`
# still chooses headless, for a smaller footprint where the sites a Bot uses do not mind.
COMPUTER_BROWSER_MODE: ${COMPUTER_BROWSER_MODE:-headed}
# How many Bots may hold a running browser at once, and how long an untouched one is kept.
# A few hundred MB each, so on a deployment with many Bots these are the difference between
# a container that holds steady and one that is killed for memory. Defaults are 8 and 30
# minutes; closing a browser costs only a relaunch, because the profile is on the volume below.
COMPUTER_MAX_BROWSERS: ${COMPUTER_MAX_BROWSERS:-}
COMPUTER_BROWSER_IDLE_MS: ${COMPUTER_BROWSER_IDLE_MS:-}
# At what share of the container's memory it starts closing browsers nobody is using, least
# recently used first, down to ten points under (default 85), and how long a Bot's background
# tab may sit untouched (default ten minutes). A container with no --memory is measured against
# the machine's memory. 0 switches either off.
COMPUTER_MEMORY_HIGH_PERCENT: ${COMPUTER_MEMORY_HIGH_PERCENT:-}
COMPUTER_TAB_IDLE_MS: ${COMPUTER_TAB_IDLE_MS:-}
# Every Bot without a computer of its own reaches this one, so each gets its own folder of
# files and its shell starts there. The supervisor's per-Bot computers do not need it.
COMPUTER_SEPARATE_WORKSPACES: "on"
# Set by scripts/start.sh in the personal edition, where every Bot on this computer is the one
# person's: it is theirs, so Record runs in their Bots' browsers here (person-access.ts). Empty
# everywhere else, where the Bots here may be anybody's and Record is refused.
COMPUTER_PERSON_ID: ${COMPUTER_PERSON_ID:-}
# The edition, read beside it: the personal edition's one computer also runs the person's own
# browser, shown in the page, because every Bot here is theirs (person-access.ts). A team's
# person's computer never does.
OPENBOT_EDITION: ${OPENBOT_EDITION:-}
# The laptop's loopback addresses a browser here is handed, as this container reaches them
# (`<port>=<host>:<port>`, comma-separated). The Recorder reaches OpenBot only at https or at
# loopback, so on a laptop it is given `http://127.0.0.1:<port>`, which in here is this
# container. OpenBot Desktop and scripts/start.sh set it; unset, nothing is relayed
# (loopback-relay.ts).
COMPUTER_LOOPBACK_RELAYS: ${COMPUTER_LOOPBACK_RELAYS:-}
# Where a relay above sends a local Intelligence gateway: this machine. As for the server.
extra_hosts:
- "host.docker.internal:${OPENBOT_HOST_GATEWAY:-host-gateway}"
volumes:
- agent-workspace:/workspace
# Chromium's user-data directory is volume-backed so logins survive container restarts.
- agent-profiles:/profiles
# Gives Chromium time to flush its profile after SIGTERM before Docker sends SIGKILL.
stop_grace_period: 30s
healthcheck:
test: ["CMD-SHELL", "bun -e \"await fetch('http://localhost:4100/health')\""]
interval: 10s
timeout: 5s
retries: 5
# One computer per Bot.
#
# Each Bot gets a container with its own files, browser session and processes. The Docker socket is
# root-equivalent on the host, so only the supervisor holds it and only exposes Bot-level verbs.
supervisor:
# Pulled like the server's; see server above.
image: ${SUPERVISOR_IMAGE:-ghcr.io/copilotkit/openbot-supervisor:${OPENBOT_BACKEND_TAG:-see-backend-images.env}}
pull_policy: ${IMAGE_PULL_POLICY:-missing}
# The same file, because this process does not read these itself: it forwards every EGRESS_PROXY
# key out of its own environment into each computer it creates, so it has to be given them first.
env_file:
- path: ./egress.env
required: false
environment:
PORT: "4300"
# Shared with the API server. The Bot-level verb set is the boundary; this token keeps other
# services on the network from calling those verbs.
# Defaulted for the same reason as agent-computer's above: so `docker compose up -d` by hand
# configures the same stack scripts/start.sh does, rather than a silently unauthenticated one.
SUPERVISOR_TOKEN: ${SUPERVISOR_TOKEN:-openbot-dev-supervisor-token}
# Never handed to a computer as it is. Each computer this creates is given a token of its own,
# derived from this and whose computer it is, and the server derives the same one to call it
# (shared/computer-token.ts), so a Bot that reads its own computer's token opens no other.
COMPUTER_TOKEN: ${COMPUTER_TOKEN:-openbot-dev-computer-token}
# Forwarded into every per-Bot computer the supervisor creates. Headed, as above.
COMPUTER_BROWSER_MODE: ${COMPUTER_BROWSER_MODE:-headed}
# The same image the shared computer above runs. The supervisor starts each computer it makes
# from it with the computer's command.
COMPUTER_IMAGE: *computer-image
# Which deployment the computers it creates belong to, so two stacks on one Docker host never
# derive the same container and volume names for the same Bot.
COMPUTER_NAMESPACE: ${COMPUTER_NAMESPACE:-openbot}
# Empty by default because the API server runs on the host in local development and reaches
# computers by published loopback ports. Deployments running the server inside this network set
# the network name so computers publish no host ports.
COMPUTER_NETWORK: ${COMPUTER_NETWORK:-}
# Set to runsc to run every computer under gVisor, when the host has it. Left unset each
# computer is an ordinary container and shares the host kernel.
COMPUTER_RUNTIME: ${COMPUTER_RUNTIME:-}
# Forwarded into every computer the supervisor creates, as agent-computer is given it above:
# Record in a Bot's browser there reaches OpenBot at this machine's loopback address too.
COMPUTER_LOOPBACK_RELAYS: ${COMPUTER_LOOPBACK_RELAYS:-}
ports:
# For the server on the host to ask for a Bot's computer.
#
# Loopback only, like the computer's own port and for a stronger version of the same reason.
# This process holds the Docker socket, so reaching it is root on the host through four verbs,
# and SUPERVISOR_TOKEN is a shared secret rather than a network boundary. Published without an
# interface in front of it this answered every address the host has.
#
# A deployment running the server inside this network does not use this mapping at all: it sets
# COMPUTER_NETWORK and reaches the supervisor as `supervisor:4300`, which is unaffected because
# the process still listens on every interface inside its own container.
- "127.0.0.1:${SUPERVISOR_PORT:-4500}:4300"
- "[::1]:${SUPERVISOR_PORT:-4500}:4300"
volumes:
# Read-only because this service only ever needs to ask; it is still root-equivalent, which is
# the whole reason nothing else here gets it.
#
# The source is a setting because the default is wrong on one of the engines this runs on.
# Docker puts its socket at this path, and so does Podman on macOS, where `podman machine`
# symlinks it to the rootless socket inside the virtual machine. Rootless Podman on Linux does
# not: the path is either absent or, with podman-docker installed, a symlink to
# /run/podman/podman.sock, which is the *rootful* socket and is not the one running. The
# supervisor then holds a dead socket and reports that it cannot reach Docker. Point
# ENGINE_SOCKET at $XDG_RUNTIME_DIR/podman/podman.sock there.
- ${ENGINE_SOCKET:-/var/run/docker.sock}:/var/run/docker.sock:ro
security_opt:
# The engine socket carries an SELinux label this container is not allowed to read.
- label=disable
healthcheck:
test: ["CMD-SHELL", "bun -e \"await fetch('http://localhost:4300/health')\""]
interval: 10s
timeout: 5s
retries: 5
# The harness somebody picked during setup, whichever one it is.
#
# ONE SERVICE RATHER THAN TWELVE, because a picked harness is a choice and not twelve branches in
# this file. The image and the port come from `.env`, which the shell writes from the pick, and
# both are facts about the image: each harness fixes its own port in its own Dockerfile.
#
# Behind a profile so a deployment that has picked nothing does not try to start it.
#
# The image still needs a value when nothing is picked. Older Compose (v2.24.5, as
# shipped with Docker Desktop in early 2024) checks every service before it looks at profiles,
# and a blank image there fails `compose config` for the whole project with "has neither
# an image nor a build context specified". The stand-in is busybox: it is never pulled or started
# while the profile is off, and the desktop shell only turns the profile on after writing the
# picked image to `.env`.
#
# No `build:`, so `pull_policy` cannot be `build` here as it is elsewhere: this image is only ever
# published, never built from this tree.
agent-harness:
profiles: ["harness"]
image: ${PICKED_HARNESS_IMAGE:-busybox:1.37}
pull_policy: missing
ports:
# Loopback, and on the image's own port on both sides. The server is a host process, so it
# reaches this the same way it reaches the managed Bot: over the published port, not the
# compose network.
- "127.0.0.1:${PICKED_HARNESS_PORT:-4202}:${PICKED_HARNESS_PORT:-4202}"
- "[::1]:${PICKED_HARNESS_PORT:-4202}:${PICKED_HARNESS_PORT:-4202}"
environment:
# Every harness refuses without this; it is what makes the endpoint the server's alone.
MANAGED_AGENT_TOKEN: ${MANAGED_AGENT_TOKEN:-}
# Deployment-owned tools use the same signed callback as the managed Bot.
OPENBOT_TOOL_URL: ${OPENBOT_TOOL_URL:-http://host.docker.internal:3001/api/agent-tools/call}
AGENT_TOOL_TOKEN: ${AGENT_TOOL_TOKEN:-}
# THE MODEL GATEWAY, NOT A PROVIDER KEY. With MODEL_GATEWAY_TOKEN set (OpenBot Desktop mints
# one), the harness reaches every model through the server's gateway with that token, and the
# gateway adds the organisation's live key per request. So a key changed in the app reaches
# this Bot on its next request, and no provider key is in this container. A deployment
# without the token gives the harness its keys, as before.
#
# The addresses are the gateway's OpenAI and Anthropic wires, written by whoever sets the
# token: `MODEL_GATEWAY_OPENAI_URL` is `<gateway>/v1`, `MODEL_GATEWAY_ANTHROPIC_URL` is
# `<gateway>/anthropic`.
OPENBOT_MODEL_GATEWAY_URL: ${OPENBOT_MODEL_GATEWAY_URL:-}
OPENAI_API_KEY: ${MODEL_GATEWAY_TOKEN:-${OPENAI_API_KEY:-}}
OPENAI_BASE_URL: ${MODEL_GATEWAY_OPENAI_URL:-${OPENAI_CONTAINER_BASE_URL:-${OPENAI_BASE_URL:-}}}
ANTHROPIC_API_KEY: ${MODEL_GATEWAY_TOKEN:-${ANTHROPIC_API_KEY:-}}
ANTHROPIC_BASE_URL: ${MODEL_GATEWAY_ANTHROPIC_URL:-${ANTHROPIC_BASE_URL:-}}
GOOGLE_API_KEY: ${GOOGLE_API_KEY:-}
GOOGLE_GENERATIVE_AI_BASE_URL: ${GOOGLE_GENERATIVE_AI_BASE_URL:-}
# Which wire the harness speaks, for one that fixes it at start. OpenBot Desktop rewrites this
# and restarts this container alone when the connection moves to the other family.
BOT_PROVIDER: ${BOT_PROVIDER:-openai}
# The two plan engines, for a harness that sends its model calls to them per run (LangGraph
# TypeScript). NO PLAN TOKEN OR PLAN STORE HERE: each plan runs on an engine of its own below.
CLAUDE_PLAN_HARNESS_URL: ${CLAUDE_PLAN_HARNESS_URL:-}
CHATGPT_PLAN_HARNESS_URL: ${CHATGPT_PLAN_HARNESS_URL:-}
CHATGPT_PLAN_HARNESS_TOKEN: ${CHATGPT_PLAN_HARNESS_TOKEN:-}
# Claude Code's tool search, on the Claude Agent SDK harness. Empty leaves it on, which is
# what a Bot holding many app tools needs. `false` is for a gateway at ANTHROPIC_BASE_URL
# that cannot pass the search on: every tool then goes with every request.
ENABLE_TOOL_SEARCH: ${ENABLE_TOOL_SEARCH:-}
# Empty when nobody named one, never a stand-in that looks like a choice. The server sends the
# model on every run (`forwardedProps.openbotModel`): the one named here when the credential
# lists it, otherwise the middle of the provider's line. A stand-in here was how a ChatGPT
# plan ran gpt-5.5, which it refuses.
BOT_MODEL: ${BOT_MODEL:-}
extra_hosts:
- "host.docker.internal:${OPENBOT_HOST_GATEWAY:-host-gateway}"
# A CLAUDE PLAN'S ENGINE: the Claude Agent SDK harness, holding the plan token and nothing else.
#
# Its own service, behind its own profile, so OpenBot Desktop starts it alone the moment somebody
# signs in to a Claude plan in the app, while the server, the database and every other Bot keep
# running (`docker compose --profile claude-plan up -d --no-deps agent-claude-plan`). The server
# reaches it by name (CLAUDE_PLAN_HARNESS_URL): built-in Bots and LangGraph TypeScript Bots send
# their model calls to its `/model`, and a picked Claude Agent SDK Bot is this engine.
#
# Busybox when nothing is set, as for `agent-harness`: never pulled or started while the profile is
# off, and the desktop writes the image before it turns the profile on.
#
# Behind `harness` too, the profile of the Bots OpenBot Desktop starts on demand, so the Stop that
# names it (`compose --profile harness ... down`) takes this down with them. Naming `harness` on
# `up` still starts only the services named.
agent-claude-plan:
profiles: ["claude-plan", "harness"]
image: ${CLAUDE_PLAN_IMAGE:-busybox:1.37}
pull_policy: missing
environment:
MANAGED_AGENT_TOKEN: ${MANAGED_AGENT_TOKEN:-}
OPENBOT_TOOL_URL: ${OPENBOT_TOOL_URL:-http://host.docker.internal:3001/api/agent-tools/call}
AGENT_TOOL_TOKEN: ${AGENT_TOOL_TOKEN:-}
CLAUDE_CODE_OAUTH_TOKEN: ${CLAUDE_CODE_OAUTH_TOKEN:-}
# The server's model gateway, as every engine is told it. The plan's own calls go to Anthropic
# with the plan token, never through it.
OPENBOT_MODEL_GATEWAY_URL: ${OPENBOT_MODEL_GATEWAY_URL:-}
# Empty, and said so. The SDK prefers a key over the plan token, so a key here would quietly
# bill a person who signed in to a plan they already pay for; the harness refuses both.
ANTHROPIC_API_KEY: ""
ANTHROPIC_BASE_URL: ""
BOT_PROVIDER: anthropic
ENABLE_TOOL_SEARCH: ${ENABLE_TOOL_SEARCH:-}
extra_hosts:
- "host.docker.internal:${OPENBOT_HOST_GATEWAY:-host-gateway}"
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:4212/health')"]
interval: 5s
timeout: 5s
retries: 24
# A CHATGPT PLAN'S ENGINE: the LangGraph harness, reading the plan's token store. Started alone,
# as `agent-claude-plan` above. The server reaches it by name (CHATGPT_PLAN_HARNESS_URL).
agent-chatgpt-plan:
profiles: ["chatgpt-plan", "harness"]
image: ${CHATGPT_PLAN_IMAGE:-busybox:1.37}
pull_policy: missing
environment:
MANAGED_AGENT_TOKEN: ${MANAGED_AGENT_TOKEN:-}
OPENBOT_TOOL_URL: ${OPENBOT_TOOL_URL:-http://host.docker.internal:3001/api/agent-tools/call}
AGENT_TOOL_TOKEN: ${AGENT_TOOL_TOKEN:-}
# The store's path inside the mount below. The harness picks the plan's model from it.
CHATGPT_AUTH_FILE: /root/.langchain/chatgpt-auth.json
BOT_PROVIDER: openai
# The server's model gateway, as every engine is told it. The plan's own calls go to OpenAI
# with the plan's store, never through it.
OPENBOT_MODEL_GATEWAY_URL: ${OPENBOT_MODEL_GATEWAY_URL:-}
extra_hosts:
- "host.docker.internal:${OPENBOT_HOST_GATEWAY:-host-gateway}"
volumes:
# A bind mount, not a named volume, and read-write on purpose. The signed-in plan's access
# token expires within the hour and the harness renews it, so the renewal has to land back on
# this machine or every restart would replay a refresh token that had already been spent.
#
# The provider writes by atomically replacing the file with a sibling temporary file, so the
# mount has to be the containing directory rather than the file mount point.
- ./.langchain:/root/.langchain
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:4206/health')"]
interval: 5s
timeout: 5s
retries: 24
# The managed Bot: the one the deployment runs for itself, registered the way a customer's own Bot
# is, as an AG-UI endpoint in the registry (the tenant package names it by MANAGED_AGENT_AG_UI_URL).
# It is the LangGraph harness, the same image a person can pick in setup.
agent-langgraph-agui:
build:
context: .
dockerfile: agent-langgraph-agui/Dockerfile
# Built from this checkout. A release publishes it too, and IMAGE_PULL_POLICY=missing pulls that
# instead, as OpenBot Desktop does.
#
# The built image's tag carries the stack's project name, as the tag Compose gives a built
# service with no `image:` does. A tag is one name on the whole machine, so with one fixed tag a
# second stack's start moved it and the first stack's Bot was no longer the image it was built as.
image: ${LANGGRAPH_IMAGE:-${COMPOSE_PROJECT_NAME:-openbot}-agent-langgraph-agui:latest}
pull_policy: ${IMAGE_PULL_POLICY:-build}
ports:
# Loopback, not every interface. The token is the boundary; this means an attacker needs to be
# on the machine before they can even try it. Nothing legitimate reaches a Bot from another
# host: the server calls it over loopback, and other containers use the compose network.
#
# LANGGRAPH_PORT on the host and the image's own 4206 inside, so a picked harness that is this
# same image keeps 4206 on the host to itself.
- "127.0.0.1:${LANGGRAPH_PORT:-4201}:4206"
- "[::1]:${LANGGRAPH_PORT:-4201}:4206"
environment:
# The selected provider reads its own key.
BOT_PROVIDER: ${BOT_PROVIDER:-openai}
# The server sends this on every call to the managed Bot, which refuses every call without it.
MANAGED_AGENT_TOKEN: ${MANAGED_AGENT_TOKEN:-}
# The model gateway with its token where one is set, and the deployment's keys otherwise:
# see `agent-harness` above.
OPENBOT_MODEL_GATEWAY_URL: ${OPENBOT_MODEL_GATEWAY_URL:-}
OPENAI_API_KEY: ${MODEL_GATEWAY_TOKEN:-${OPENAI_API_KEY:-}}
OPENAI_BASE_URL: ${MODEL_GATEWAY_OPENAI_URL:-${OPENAI_CONTAINER_BASE_URL:-${OPENAI_BASE_URL:-}}}
ANTHROPIC_API_KEY: ${MODEL_GATEWAY_TOKEN:-${ANTHROPIC_API_KEY:-}}
ANTHROPIC_BASE_URL: ${MODEL_GATEWAY_ANTHROPIC_URL:-${ANTHROPIC_BASE_URL:-}}
GOOGLE_API_KEY: ${GOOGLE_API_KEY:-}
GOOGLE_GENERATIVE_AI_BASE_URL: ${GOOGLE_GENERATIVE_AI_BASE_URL:-}
# Empty when nobody named one: the server sends the model on every run.
BOT_MODEL: ${BOT_MODEL:-}
# Where this Bot runs a tool: back through the deployment that granted it, never at the vendor.
# `host.docker.internal` because the API server runs on the host, not in this network.
#
# Left as the default even though `server` above is now in this file, because the default is
# what `scripts/start.sh` relies on and that server is on the host. A deployment that starts
# `server` sets this to `http://server:3001/api/agent-tools/call`, for every Bot at once.
OPENBOT_TOOL_URL: ${OPENBOT_TOOL_URL:-http://host.docker.internal:3001/api/agent-tools/call}
AGENT_TOOL_TOKEN: ${AGENT_TOOL_TOKEN:-}
# A signed-in ChatGPT plan. LangChain's ChatGPT plan model is Python only, so on a plan this
# service holds it for the TypeScript engine and the server's own Bots, which reach it at
# CHATGPT_PLAN_HARNESS_URL. OpenBot Desktop starts it only then. Set only on a plan.
CHATGPT_AUTH_FILE: ${CHATGPT_AUTH_FILE:-}
extra_hosts:
- "host.docker.internal:${OPENBOT_HOST_GATEWAY:-host-gateway}"
volumes:
# The plan's token store, as the folder that holds it, read-write: the plan's access token is
# renewed in place, by writing a sibling and renaming it over the original. See the same mount
# on `agent-harness`.
- ./.langchain:/root/.langchain
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:4206/health')"]
interval: 10s
timeout: 5s
retries: 5
# The TypeScript LangGraph engine: the default engine for new Bots. LangGraph.js behind AG-UI, with
# the same harness contract as the Python one above (the model per run, deployment and browser
# tools, a provider's refusal in its own words).
agent-langgraph-ts:
build:
context: .
dockerfile: agent-langgraph-ts/Dockerfile
# Built from this checkout, tagged by the stack's project for the reason the managed Bot's is. A
# release publishes it too, and IMAGE_PULL_POLICY=missing pulls that instead.
image: ${LANGGRAPH_TS_IMAGE:-${COMPOSE_PROJECT_NAME:-openbot}-agent-langgraph-ts:latest}
pull_policy: ${IMAGE_PULL_POLICY:-build}
ports:
# Loopback only, for the managed Bot's reasons: the token is the boundary, and the server and
# the other containers reach it over loopback or the compose network.
- "127.0.0.1:${LANGGRAPH_TS_PORT:-4215}:4215"
- "[::1]:${LANGGRAPH_TS_PORT:-4215}:4215"
environment:
# The server sends this on every call, and the engine refuses every call without it.
MANAGED_AGENT_TOKEN: ${MANAGED_AGENT_TOKEN:-}
BOT_PROVIDER: ${BOT_PROVIDER:-openai}
# The model gateway with its token where one is set, and the deployment's keys otherwise:
# see `agent-harness` above. The server names the route per run.
OPENBOT_MODEL_GATEWAY_URL: ${OPENBOT_MODEL_GATEWAY_URL:-}
OPENAI_API_KEY: ${MODEL_GATEWAY_TOKEN:-${OPENAI_API_KEY:-}}
OPENAI_BASE_URL: ${MODEL_GATEWAY_OPENAI_URL:-${OPENAI_CONTAINER_BASE_URL:-${OPENAI_BASE_URL:-}}}
ANTHROPIC_API_KEY: ${MODEL_GATEWAY_TOKEN:-${ANTHROPIC_API_KEY:-}}
ANTHROPIC_BASE_URL: ${MODEL_GATEWAY_ANTHROPIC_URL:-${ANTHROPIC_BASE_URL:-}}
GOOGLE_API_KEY: ${GOOGLE_API_KEY:-}
GOOGLE_GENERATIVE_AI_BASE_URL: ${GOOGLE_GENERATIVE_AI_BASE_URL:-}
# Empty when nobody named one: the server sends the model on every run.
BOT_MODEL: ${BOT_MODEL:-}
# Where a plan's model calls go: the Claude plan's engine and the ChatGPT plan's. Empty where
# the deployment runs neither.
CLAUDE_PLAN_HARNESS_URL: ${CLAUDE_PLAN_HARNESS_URL:-}
CHATGPT_PLAN_HARNESS_URL: ${CHATGPT_PLAN_HARNESS_URL:-}
CHATGPT_PLAN_HARNESS_TOKEN: ${CHATGPT_PLAN_HARNESS_TOKEN:-}
# Where this Bot runs a tool: back through the deployment that granted it. See the managed Bot.
OPENBOT_TOOL_URL: ${OPENBOT_TOOL_URL:-http://host.docker.internal:3001/api/agent-tools/call}
AGENT_TOOL_TOKEN: ${AGENT_TOOL_TOKEN:-}
extra_hosts:
- "host.docker.internal:${OPENBOT_HOST_GATEWAY:-host-gateway}"
healthcheck:
test: ["CMD", "node", "-e", "fetch('http://127.0.0.1:4215/health').then((r) => process.exit(r.ok ? 0 : 1), () => process.exit(1))"]
interval: 10s
timeout: 5s
retries: 5
networks:
# The database and the services that reach it by name. Nothing a Bot can reach is on it.
#
# `server` is on both this and `default`, which is the one place the two are meant to meet.
data:
# Everything else, which is where `default` already put it. Named here only so that adding a
# service without a `networks:` key keeps landing beside the Bots rather than beside the database.
default:
volumes:
postgres-data:
agent-workspace:
agent-profiles: