Required for every automation
The Dashboard / HUB API is a required integration, in addition to the Bambou AI API. Your site automation is not finished until it is connected and verified in the HUB.
The HUB coordinates worker health, start/stop/restart, configuration and proxies, statistics, telemetry, and backups. It does not implement your site's automation, AI generation, or captcha solving.
Agent API base:
https://bamboubot.duckdns.org/api/agentUse the public HTTPS origin, not localhost. Set HUB_URL to the origin only — the client adds /api/agent. The full written reference is published below; the backend does not expose Swagger/OpenAPI documentation.
Setup and starter downloads
- Ask BIPRO/Bambou to create or assign your site in the dashboard and provide its one-time site-scoped agent token. Each site has a different token. Rotation invalidates the previous token immediately.
- Download the documentation + VPS starter package. It includes the Python, Node.js, and Go starters, shared Python
agent/modules, and systemd service examples. Choose one implementation; these are infrastructure starters, not completed site automations. - Follow the common starter instructions and your language's README: Python, Node.js, or Go. Preserve the package directory layout, especially for Python's shared imports.
- Implement your worker hooks and real measurement/reporting. The sample hooks do not perform site automation or invent task/statistics activity.
- Configure the private environment below, select the locally installed worker command or hook, and run the supervisor as a persistent systemd service. See the included service example. Keep runtime/state directories private and persistent across restarts.
- In the dashboard, configure the AI key, preset, worker count, proxies, and assigned backup destination. Press Start; verify the acceptance checks below before handoff.
HUB_URL=https://bamboubot.duckdns.org
HUB_AGENT_TOKEN=replace-with-your-site-scoped-agent-token
HUB_RUNTIME_DIR=/opt/your-script/runtime
HUB_STATE_DIR=/var/lib/your-script-hub
HUB_BACKUP_DIR=/opt/your-script
These are example paths and a placeholder token, not credentials. Ask for the real token privately. Python loads its adjacent .env; Node requires node --env-file=.env main.mjs; Go uses shell or service exports. Follow the language README for requirements and exact commands.
Run only one supervisor per site token. Do not run a template and a separate direct integration for the same pool: heartbeats replace the whole site's worker snapshot. Use separate sites/tokens for independent pools.
What you must wire up
- Health and worker inventory: send one complete site snapshot every 15 seconds with stable UUID worker IDs, real status, CPU/memory where supported, and actual completed-task counts. A site becomes offline after 60 seconds without a heartbeat.
- Lifecycle controls: poll every 5 seconds, apply only locally defined start/stop/restart actions, persist command IDs/results, then acknowledge. Retry acknowledgements without repeating the action; hooks must tolerate the documented crash/replay window.
- Configuration and proxy synchronization: refresh every 30 seconds and on start/restart. One-time revision-checked enrollment imports existing local settings only while the dashboard site is pristine. After enrollment the HUB is authoritative; cleared keys/deleted proxies must stay cleared. Preserve unrelated local settings. Restart workers to apply changed process environments.
- Errors and logs: send short, sanitized events with appropriate worker/proxy IDs and explicit proxy codes when known. Do not send raw response bodies, credentials, or chat content.
- Site statistics: publish actual absolute whole-site
links_sent_successfullyandaverage_messages_per_chatsnapshots from one aggregator. Reposting replaces values; do not send per-worker increments or fabricated defaults. - Telemetry: explicitly connect real chat-completion summaries, proxy health events, and AI-usage batches. Starter helpers are opt-in; they do not automatically instrument your automation. Persist one UUID and unchanged payload per chat/AI event across retries. AI key identifiers are nonsecret aliases, never keys or key fragments.
- Backups: configure the source directory locally and coordinate cloud destinations with BIPRO/Bambou. Support scheduled and on-demand backups. Upload acceptance is not cloud completion: verify all selected transfers reach Completed.
Read custom integration, local-sync contract, statistics, telemetry, and backups for the complete semantics.
Agent API quick reference
All paths below are relative to https://bamboubot.duckdns.org. Authenticate with Authorization: Bearer <site-agent-token>. Do not use the administrator password/token for agent routes.
| Method / path | Purpose |
|---|---|
GET /api/agent/config | Load runtime settings, secrets, proxy pool, revision, and enrollment state. |
POST /api/agent/local-sync | Revision-checked first enrollment; HUB becomes authoritative afterward. |
POST /api/agent/heartbeat | Complete worker snapshot every 15 seconds. |
GET /api/agent/commands | Poll pending/delivered lifecycle commands every 5 seconds. |
POST /api/agent/commands/{id}/ack | Acknowledge completed/failed local action. |
POST /api/agent/errors | Sanitized error/status event; optional worker/proxy attribution. |
POST /api/agent/statistics | Absolute whole-site statistics snapshot. |
POST /api/agent/chats | Measured chat-completion summary, no transcripts. |
POST /api/agent/ai-usage | Measured AI usage batch with nonsecret key alias. |
GET /api/agent/backup-config | Read backup schedule/destination IDs. |
POST /api/agent/backup-status | Report backup capability/next scheduled time. |
GET /api/agent/backup-requests | Poll pending/delivered on-demand backup requests. |
POST /api/agent/backup-requests/{id}/ack | Acknowledge a definite backup failure; upload marks success automatically. |
POST /api/agent/backups/upload | Stream raw bytes as application/octet-stream; not multipart. |
Public connectivity check (no credentials):
curl --fail https://bamboubot.duckdns.org/api/health
# Expected: {"status":"ok"}
Full payloads, responses, administrator endpoints, and limits: API contract, backend reference, and backup contract.
Verify before handoff
- The agent service starts on boot and reconnects after a restart; its state and worker IDs follow the selected starter's documented persistence rules.
- The dashboard shows the site's current worker count and health, with real metrics rather than placeholder activity.
- Start, Stop, and Restart are applied and acknowledged. Failed/retried requests do not blindly repeat lifecycle actions.
- Dashboard configuration changes reach local runtime files. AI key clearing and proxy deletion are reflected; workers use refreshed configuration after restart.
- Real whole-site statistics appear in the Statistics tab. Opt-in telemetry calls are wired to actual events; they do not automatically update Statistics cards or task counters.
- A sanitized test error is visible without leaking secrets or chat data.
- An on-demand backup reaches Completed for every assigned destination; scheduled backups work when enabled. Coordinate recovery verification with BIPRO/Bambou.
- Token rotation, network loss, and service restart are handled. A dashboard Stop cannot reach an offline VPS; keep direct VPS access available.
Credentials, retries, and limits
Keep tokens in private environment/service files (mode 0600) and runtime directories private. Never commit tokens, print config responses, or expose HUB credentials to worker processes. Keep TLS verification enabled and avoid redirects carrying credentials.
Lifecycle delivery is at least once, not exactly once. Preserve state, implement idempotent hooks, and acknowledge superseded commands correctly. Heartbeats allow up to 100 unique workers. Retry network/5xx errors with bounded backoff; fix 401 enrollment failures rather than substituting an admin credential.
Chat/AI event receipts have a bounded deduplication window (seven days by default). Reuse event IDs/payloads and stop retrying before their receipt expires. Storage limits may return 429; follow the documented retry policy. Error events are not idempotent.
Report counts and pseudonymous internal IDs, never transcripts, prompts, AI replies, participant identifiers, actual links, or secrets. Backups are separate from telemetry: whole-codebase archives may contain .env and other private files. Keep secret environment files outside the backup source or protect/encrypt backups. Cloud credentials belong only on the HUB.
Complete documentation library
These are published copies of all 19 Markdown documents in HubDashboard/, plus the shared-agent and language starters in the download. Production HUB origin examples use https://bamboubot.duckdns.org. Local-development server/bind instructions in the reference documents are not the production API address.
Download docs + all three starters (.zip) ↓
Getting started
- Bambou Automation HubREADME.md
- Integrating an existing automation scriptdocs/AGENT_API.md
- VPS automation starterstemplates/README.md
Language starters
- Python VPS startertemplates/python/README.md
- Node.js VPS startertemplates/node/README.md
- Go VPS startertemplates/go/README.md
- Optional supervisor telemetrytemplates/TELEMETRY.md
API and synchronization contracts
- Hub Dashboard implementation contractCONTRACT.md
- VPS starter contract (Python / Node.js / Go)docs/VPS_TEMPLATE_CONTRACT.md
- Per-site statistics telemetrydocs/STATISTICS_CONTRACT.md
- Backup implementation contractdocs/BACKUP_CONTRACT.md
Reporting, proxies, and backups
- Site statisticsdocs/STATISTICS.md
- Automation telemetrydocs/TELEMETRY.md
- Proxy entry and file importdocs/PROXY_IMPORT.md
- Script → Hub → Cloud backupsdocs/BACKUPS.md
Architecture and operator reference
- Architecture and operational modeldocs/ARCHITECTURE.md
- Dashboard backendbackend/README.md
- Bambou Automation Hub frontendfrontend/README.md
- Public hub deployment (Docker Compose + Caddy)deploy/README.md
Source snapshot: d7e9d4da17f8 · 19 documents · Download includes 81 allowlisted source files. No production credentials or runtime data.