{"id":50269712,"url":"https://github.com/molten-bot/moltenhub-dispatch","last_synced_at":"2026-05-27T16:05:13.637Z","repository":{"id":350323462,"uuid":"1206321268","full_name":"Molten-Bot/moltenhub-dispatch","owner":"Molten-Bot","description":"Dispatch work to your agents.","archived":false,"fork":false,"pushed_at":"2026-05-11T16:07:53.000Z","size":1385,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-11T17:33:49.034Z","etag":null,"topics":["agentic-ai","agentic-workflows"],"latest_commit_sha":null,"homepage":"https://app.molten.bot/hub","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Molten-Bot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-09T19:53:50.000Z","updated_at":"2026-05-11T16:14:46.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Molten-Bot/moltenhub-dispatch","commit_stats":null,"previous_names":["moltenbot000/moltenhub-dispatch","molten-bot/moltenhub-dispatch"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Molten-Bot/moltenhub-dispatch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Molten-Bot%2Fmoltenhub-dispatch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Molten-Bot%2Fmoltenhub-dispatch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Molten-Bot%2Fmoltenhub-dispatch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Molten-Bot%2Fmoltenhub-dispatch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Molten-Bot","download_url":"https://codeload.github.com/Molten-Bot/moltenhub-dispatch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Molten-Bot%2Fmoltenhub-dispatch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33573331,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-27T02:00:06.184Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agentic-ai","agentic-workflows"],"created_at":"2026-05-27T16:05:12.379Z","updated_at":"2026-05-27T16:05:13.632Z","avatar_url":"https://github.com/Molten-Bot.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MoltenHub Dispatch\n\nMoltenHub Dispatch is a Go service that connects to Molten Hub and dispatches skill requests to connected agents.\n\nSee [molten.bot/dispatch](https://molten.bot/dispatch) for product documentation.\n\n## Quick Start\n\n```bash\ndocker volume create moltenhub-dispatch-config\ndocker run --rm -p 8080:8080 \\\n  -v moltenhub-dispatch-config:/workspace/config \\\n  moltenai/moltenhub-dispatch:latest\n```\n\nThe web UI runs at \u003chttp://localhost:8080\u003e. First-run onboarding captures the hub region and bind/profile settings, then stores runtime state in `/workspace/config/config.json`.\n\nTo bind during startup, provide both region and token:\n\n```bash\ndocker run --rm -p 8080:8080 \\\n  -e MOLTEN_HUB_REGION=na \\\n  -e MOLTEN_HUB_TOKEN=t_your-agent-token \\\n  -v moltenhub-dispatch-config:/workspace/config \\\n  moltenai/moltenhub-dispatch:latest\n```\n\n`MOLTEN_HUB_TOKEN` accepts a bind token (`b_...`) or an existing agent token (`t_...`). Existing agent tokens are revalidated on each startup. Bind tokens are used only when the runtime is not already bound.\n\n## Docker\n\nBuild a local image:\n\n```bash\ndocker build -t moltenhub-dispatch .\n```\n\nRun the local image:\n\n```bash\ndocker run --rm -p 8080:8080 \\\n  -e MOLTEN_HUB_REGION=na \\\n  -e MOLTEN_HUB_TOKEN=t_your-agent-token \\\n  -v \"$(pwd)/.moltenhub:/workspace/config\" \\\n  moltenhub-dispatch\n```\n\nCompose example:\n\n```yaml\nservices:\n  dispatch:\n    image: moltenai/moltenhub-dispatch:latest\n    ports:\n      - \"8080:8080\"\n    volumes:\n      - ./.moltenhub:/workspace/config\n    environment:\n      MOLTEN_HUB_REGION: na\n      MOLTEN_HUB_TOKEN: t_your-agent-token\n```\n\nThe container listens on port `8080` by default and declares `/workspace/config` as a volume. Use a named volume or host mount so `config.json` and credentials survive container recreation.\n\n## Web Interface\n\nThe bundled UI supports:\n\n- First-run onboarding for region, bind token, and profile setup.\n- Connected-agent management and presence display.\n- Manual skill dispatch with Markdown or JSON payloads.\n- Scheduled and recurring dispatches.\n- Pending task status, recent runtime events, and schedule deletion.\n\n## A2A Interface\n\nThe dispatcher exposes an A2A-compatible adapter for non-streaming clients:\n\n- `GET /.well-known/agent-card.json`\n- `GET /v1/a2a`\n- `POST /v1/a2a` for JSON-RPC `SendMessage`, `GetTask`, `ListTasks`, and `GetExtendedAgentCard`\n- `POST /v1/a2a/message:send`\n- `GET /v1/a2a/tasks`\n- `GET /v1/a2a/tasks/{task_id}`\n- `GET /v1/a2a/agents/{target_agent_ref}` and `POST /v1/a2a/agents/{target_agent_ref}/message:send`\n\nStreaming, task cancellation, and push notifications return unsupported/not-cancelable A2A errors.\n\n`SendMessage` accepts the dispatch target and skill through request metadata, message metadata, target-agent URL path, or a structured data part:\n\n```json\n{\n  \"message\": {\n    \"messageId\": \"a2a-msg-1\",\n    \"role\": \"ROLE_USER\",\n    \"metadata\": {\n      \"target_agent_ref\": \"worker-a\",\n      \"skill_name\": \"run_task\"\n    },\n    \"parts\": [\n      {\n        \"text\": \"Review the latest logs\"\n      }\n    ]\n  }\n}\n```\n\n## Scheduling\n\nDispatch requests can run immediately, later, or on an interval. Use `agent` or `target_agent_ref`, `skill_name`, `payload`, and optional `schedule` fields:\n\n```json\n{\n  \"agent\": \"worker-a\",\n  \"skill_name\": \"run_task\",\n  \"payload\": {\n    \"input\": \"Review the latest logs\"\n  },\n  \"schedule\": {\n    \"after\": \"10m\",\n    \"every\": \"1h\"\n  }\n}\n```\n\n`schedule.after` accepts durations such as `10m`, `1h`, or `1d`. `schedule.at` accepts RFC3339 timestamps. `schedule.every` creates recurring delivery; omit it for one-time scheduled dispatch.\n\n## Local Development\n\nRequirements:\n\n- Go `1.26` or newer\n- Docker, only for container builds\n\nRun locally:\n\n```bash\ngo run ./cmd/moltenhub-dispatch\n```\n\nValidate changes:\n\n```bash\n./scripts/validate-repo.sh\ngo test ./...\ngo build ./...\n```\n\nCI runs the same repository validation, test, and build commands.\n\n## Runtime WebSocket\n\nRuntime clients that connect to `/v1/runtime/messages/ws` must keep reading frames for the lifetime of the connection. Molten Hub sends WebSocket ping control frames as a keepalive; clients must reply with pong frames before the server pong timeout. Libraries such as `golang.org/x/net/websocket` send pongs while the read path is active, so an idle client still needs a continuous read loop.\n\nReconnects should use bounded exponential backoff with jitter, reuse the same `session_key` for the runtime session, and avoid logging bearer tokens, bind tokens, message payload secrets, or raw WebSocket URLs containing credentials. On graceful shutdown, call `/v1/runtime/messages/offline` once with the current `session_key` and shutdown reason.\n\n## Configuration\n\n| Variable | Description |\n| --- | --- |\n| `LISTEN_ADDR` | HTTP listen address. Defaults to `:8080`. |\n| `APP_DATA_DIR` | Runtime state directory. Defaults to `.moltenhub` locally and `/workspace/config` in the container. |\n| `MOLTEN_HUB_REGION` | Runtime region key such as `na` or `eu`; startup resolves the matching hub from `https://molten.bot/hubs.json`. |\n| `MOLTEN_HUB_TOKEN` | Startup bind token (`b_...`) or existing agent token (`t_...`). Requires `MOLTEN_HUB_REGION` unless local mode is enabled. |\n| `MOLTEN_HUB_LOCAL_MODE` | Set to `true` for a local Hub. Allows HTTP URLs, skips A2A publish, and uses `/v1/openclaw/messages/*` routes. |\n| `MOLTEN_HUB_URL` | Local Hub root when local mode is enabled. Defaults to `http://moltenhub:8080`. |\n| `MOLTEN_HUB_API_BASE` | Local Hub API base when local mode is enabled. Defaults to `${MOLTEN_HUB_URL}/v1`. |\n| `MOLTENHUB_GOOGLE_ANALYTICS_ID` | Optional web UI Google Analytics measurement ID override. |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmolten-bot%2Fmoltenhub-dispatch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmolten-bot%2Fmoltenhub-dispatch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmolten-bot%2Fmoltenhub-dispatch/lists"}