Workspaces
Run multiple gateways on the same machine for isolation between contexts (work vs personal, project A vs project B). Each gets its own port, agents dir, config, and PID file.
Why?
- Separate sessions, memory, tasks per workspace
- Different default agents, OAuth tokens, standing orders
- Independent gateway lifecycle โ restart one without touching others
Creating
curl -X POST http://127.0.0.1:18789/workspaces \
-d '{"name": "personal"}'
# {
# "name": "personal",
# "port": 18790,
# "agentsDir": "~/.openvesper/workspaces/personal/agents",
# "configDir": "~/.openvesper/workspaces/personal",
# "pidFile": "~/.openvesper/workspaces/personal/gateway.pid"
# }Each new workspace gets the next free port starting from 18789.
Starting a gateway for a workspace
curl http://127.0.0.1:18789/workspaces/personal/env
# Returns env vars to use:
# {
# "OPENVESPER_GATEWAY_PORT": "18790",
# "OPENVESPER_AGENTS_DIR": "...",
# "OPENVESPER_CONFIG_DIR": "...",
# "OPENVESPER_PID_FILE": "..."
# }
# Then start gateway with those env vars
OPENVESPER_GATEWAY_PORT=18790 \
OPENVESPER_AGENTS_DIR=~/.openvesper/workspaces/personal/agents \
vesper gateway start --detachListing & removing
curl http://127.0.0.1:18789/workspaces
curl -X DELETE http://127.0.0.1:18789/workspaces/personalStorage
Workspace registry: ~/.openvesper/workspaces.json (mode 0600).
Per-workspace data: ~/.openvesper/workspaces/<name>/
Source
Implementation: apps/gateway/src/workspaces.ts