What follows is a rundown on different ways to run and develop Obot, its UI and its tools locally.
The easiest way to run Obot locally is to run make dev. This will launch three processes: the API server, admin UI, and user UI. Opening http://localhost:8080/admin/ will launch the admin UI. Changing the UI code will update the UI automatically. Changing any of the Go code requires restarting the server.
Obot is ultimately packaged into an image for distribution. You can build said image with docker build -t my-obot ., and then run the image via docker run -p 8080:8080 my-obot.
It is possible to run the server and/or UIs in and IDE for debugging purposes. These steps layout what is necessary for JetBrains IDEs, but an equivalent process can be used with VSCode-based editors.
To run the server in GoLand:
- Create a new "Go Build" configuration.
- In the "Program Arguments" section, enter
server --dev-mode.
Then you're ready to run or debug this target.
To run the User UI in GoLand or WebStorm:
- Create a new "npm" build.
- In the "package.json" dropdown, select the
package.jsonfile in theui/userdirectory. - In the "Command" dropdown, select
run. - In the "Scripts" dropdown, select
dev. - In the "Environment" section, enter
VITE_API_IN_BROWSER=true.
Then you're ready to run or debug this target.
Obot has a set of providers. These are in the repo github.com/obot-platform/providers. By default, Obot will pull the providers' configuration from this repo. However, when developing tools in this repo, you can follow these steps to use a local copy.
- Clone
github.com/obot-platform/providersto your local machine. - In the root directory of the tools repo on your local machine, run
make build-images. - Run the Obot server, either with
make devor in your IDE, with theOBOT_SERVER_PROVIDER_REGISTRIESenvironment variable set to<local-tools-fork-root-directory>; e.g. If you cloned the tools repo to the directory "above" the Obot repo, you'd useOBOT_SERVER_PROVIDER_REGISTRIES='../providers' make dev.
Now, any time one of these tools is run, your local copy will be used.
Important
Any time you change a Go based tool in your local repo, you must run make build in the tools repo for the changes to take effect with Obot.
Note
Provider definitions and metadata are only synced to Obot every hour. Therefore, if you make a change to the provider on your local machine, it may not reflect immediately in Obot.
In the description above for running the server in an IDE, the --dev-mode flag is used. This flag is also used when running the server with make dev. This does a few things, the most helpful of which is to give you access to the database via kubectl. The kubeconfig is located at tools/devmode-kubeconfig.
For example, from the root directory of the obot repo, you can list all agents in your setup with kubectl --kubeconfig tools/devmode-kubeconfig get agents.
Obot already supports standard OpenTelemetry exporters. For local tracing with Jaeger:
- Start Jaeger:
make otel-jaeger-up- Point Obot at Jaeger before running
make devor starting the server in your IDE:
export OTEL_TRACES_EXPORTER=otlp
export OTEL_METRICS_EXPORTER=none
export OTEL_LOGS_EXPORTER=none
export OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318
export OTEL_SERVICE_NAME=obot
export OTEL_TRACES_SAMPLER=always_on- Open Jaeger at
http://localhost:16686.
Jaeger also exposes OTLP gRPC on localhost:4317 and OTLP HTTP on localhost:4318, so Nanobot can be pointed at the same local instance.
Useful commands:
make otel-jaeger-up
make otel-jaeger-logs
make otel-jaeger-downThere may be times when you want to completely wipe your setup and start fresh. The location of data and caches is dependent on your system. For Mac or Linux, you can run the respective command in the root of the obot repo on your local machine.
On Mac:
rm -rf ~/Library/Application\ Support/obot &&
rm -rf ~/Library/Caches/obot &&
rm obot.dbOn Linux:
rm -rf ~/.local/share/obot &&
rm -rf ~/.cache/obot &&
rm obot.dbThe documentation for Obot is in the main repo. You can serve the documentation from your local machine by running make serve-docs in the root of the obot repo.
Obot is configured via environment variables. You can see the relevant environment variables by building the binary (as above) and running ./bin/obot server --help. There is also documentation available. You can serve the documentation locally as above.
Nanobot agent containers run in Kubernetes and need to reach your local Obot process. This requires Telepresence to bridge the network between your Mac and the cluster.
- Rancher Desktop (or another local Kubernetes setup)
- Telepresence v2.x
- Local images loaded into containerd (see below)
Rancher Desktop uses containerd, not Docker's image store. Load any locally built images with:
docker save nanobot:local | nerdctl --address /var/run/docker/containerd/containerd.sock load
docker save nanobot-agent:local | nerdctl --address /var/run/docker/containerd/containerd.sock loadThe obot-mcp namespace is where MCP server pods run. It must exist with PSA set to privileged (required for Telepresence's network init container):
kubectl create namespace obot-mcp --dry-run=client -o yaml | kubectl apply -f -
kubectl label namespace obot-mcp \
pod-security.kubernetes.io/enforce=privileged \
pod-security.kubernetes.io/audit=restricted \
pod-security.kubernetes.io/warn=restricted \
--overwriteThe default namespace also needs PSA set to privileged for Telepresence:
kubectl label namespace default \
pod-security.kubernetes.io/enforce=privileged \
pod-security.kubernetes.io/audit=restricted \
pod-security.kubernetes.io/warn=restricted \
--overwriteUse the Makefile target to create/update the intercept target, reconnect Telepresence, restart the target deployment, and create the intercept in one step:
make telepresence-setupThis target runs:
kubectl create deployment obot-upstream --image=alpine --dry-run=client -o yaml -- sleep infinity | kubectl apply -f -
kubectl create service clusterip obot-upstream --tcp=8080:8080 --dry-run=client -o yaml | kubectl apply -f -
kubectl patch svc obot-upstream --type='json' -p='[{"op":"replace","path":"/spec/ports/0/name","value":"http"}]'
kubectl apply -f tools/obot-proxy.yaml
telepresence quit -s
telepresence connect
kubectl rollout restart deployment/obot-upstream
telepresence intercept obot-upstream -p 8080:8080obot-upstream is the Telepresence intercept target — traffic to it routes to your local port 8080. tools/obot-proxy.yaml deploys an nginx pod as the obot Service (port 80). Pods reach Obot at http://obot.default.svc.cluster.local → nginx → obot-upstream (Telepresence) → your local process. nginx rewrites http://localhost:8080 → http://obot.default.svc.cluster.local in response bodies so that OAuth metadata URLs are correct for pods, while your browser continues to use http://localhost:8080 directly.
Verify the intercept is ACTIVE with telepresence list.
export OBOT_SERVER_MCPRUNTIME_BACKEND='k8s'
export OBOT_SERVER_SERVICE_NAME=obot
export OBOT_SERVER_SERVICE_NAMESPACE=default
# optional if using locally-built Nanobot images
export OBOT_SERVER_NANOBOT_AGENT_IMAGE='nanobot-agent:local'ImagePullBackOff: Image isn't in containerd — re-runnerdctl load.timed out waiting for MCP server to be ready: <url>: The URL in the error shows what Obot is trying to reach. If it's*.svc.kubernetesinstead of*.svc.cluster.local, checkOBOT_SERVER_MCPCLUSTER_DOMAIN.- Telepresence
NO_AGENT: Pod was created before intercept — runkubectl rollout restart deployment/obot-upstream. - PSA violations on
tel-agent-init: Namespace enforce level must beprivileged(step 2 above). - Stale intercept conflict (
conflict with intercept ... on port 8080): A previous intercept is stuck in the Traffic Manager. Reset it with:kubectl delete pod -n ambassador -l app=traffic-manager kubectl rollout restart deployment/obot-upstream telepresence connect --namespace default telepresence intercept obot-upstream -p 8080:8080