{"_id":"@agent-dispatch/worker-agentcore","_rev":"2-d6f9cc3c918a622853d94031d9310796","name":"@agent-dispatch/worker-agentcore","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@agent-dispatch/worker-agentcore","version":"0.1.0","license":"Apache-2.0","_id":"@agent-dispatch/worker-agentcore@0.1.0","maintainers":[{"name":"vamgan","email":"vamilg@gmail.com"}],"homepage":"https://github.com/agent-dispatch/worker-agentcore#readme","bugs":{"url":"https://github.com/agent-dispatch/worker-agentcore/issues"},"dist":{"shasum":"c07ed6b22b2e5058533eb96efec9f76aba079190","tarball":"https://registry.npmjs.org/@agent-dispatch/worker-agentcore/-/worker-agentcore-0.1.0.tgz","fileCount":9,"integrity":"sha512-HWQeVETE+/r9tcj4gP9dLHOKjinQTNfx3DICbCd3AieRKOj/juRC0E+0jqIC2U3D7wxgdnCYKGzhqbDlD1LdSA==","signatures":[{"sig":"MEQCIHIeNibr5J9zesK38LSWumYcijnuoE3/k+Te4b0MOtbjAiBSEe/PwQlDE4663SZjl8wQDrXqw36I241W/T7fBjdLsQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12641},"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"03db338d0de65a3f00d4d7825a2916492fd4551c","scripts":{"test":"vitest run","build":"tsup src/index.ts src/server.ts --format esm --dts --clean","typecheck":"tsc --noEmit","image:push:ecr":"bash scripts/build-and-push-ecr.sh"},"_npmUser":{"name":"vamgan","email":"vamilg@gmail.com"},"repository":{"url":"git+https://github.com/agent-dispatch/worker-agentcore.git","type":"git"},"_npmVersion":"10.9.4","description":"Standard AgentCore worker contract for AgentDispatch long-running tasks.","directories":{},"_nodeVersion":"22.22.0","dependencies":{"@agent-dispatch/core":"^0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.5","vitest":"^2.1.8","typescript":"^5.7.3","@types/node":"^22.10.2"},"_npmOperationalInternal":{"tmp":"tmp/worker-agentcore_0.1.0_1778458549179_0.9325544971265134","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@agent-dispatch/worker-agentcore","version":"0.1.1","description":"Standard AgentCore worker contract for AgentDispatch long-running tasks.","keywords":["agentdispatch","aws","bedrock-agentcore","agentcore","worker","a2a","cloud-agents","subagents"],"type":"module","license":"Apache-2.0","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"build":"tsup src/index.ts src/server.ts --format esm --dts --clean","image:push:ecr":"bash scripts/build-and-push-ecr.sh","start":"node dist/server.js","test":"vitest run","typecheck":"tsc --noEmit"},"dependencies":{"@agent-dispatch/core":"^0.1.0"},"devDependencies":{"@types/node":"^22.10.2","tsup":"^8.3.5","typescript":"^5.7.3","vitest":"^4.1.7"},"repository":{"type":"git","url":"git+https://github.com/agent-dispatch/worker-agentcore.git"},"bugs":{"url":"https://github.com/agent-dispatch/worker-agentcore/issues"},"homepage":"https://github.com/agent-dispatch/worker-agentcore#readme","publishConfig":{"access":"public"},"engines":{"node":">=20.19"},"gitHead":"4b356ed68fc96234069fe6f76d403e50fafc7660","_id":"@agent-dispatch/worker-agentcore@0.1.1","_nodeVersion":"24.16.0","_npmVersion":"11.13.0","dist":{"integrity":"sha512-7XR+1xNFWulZgH/Aoz3lpZRHZMhhXTW2/B+yy6M+MB+OVUzYbH8U5ArKlLChphf1XbL9xCvOp2D1cmFCKcia0g==","shasum":"913cf2b118a3dfeaa9b964b5ffa2839e3089a02b","tarball":"https://registry.npmjs.org/@agent-dispatch/worker-agentcore/-/worker-agentcore-0.1.1.tgz","fileCount":10,"unpackedSize":28740,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@agent-dispatch%2fworker-agentcore@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHv8JugWFNnIjSfiU9nhmTWt3Wc6zgGz0WvFhvTsfNSsAiEAwPxwzCDBtpO1WSTl9l1Cmj0lf0m+jQ0g7lDhIp8YDHI="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:965b9263-7c3b-446a-b57d-fe609c5fb203"}},"directories":{},"maintainers":[{"name":"vamgan","email":"vamilg@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/worker-agentcore_0.1.1_1780205566685_0.7359379826425663"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-11T00:15:49.084Z","modified":"2026-05-31T05:32:47.077Z","0.1.0":"2026-05-11T00:15:49.334Z","0.1.1":"2026-05-31T05:32:46.820Z"},"bugs":{"url":"https://github.com/agent-dispatch/worker-agentcore/issues"},"license":"Apache-2.0","homepage":"https://github.com/agent-dispatch/worker-agentcore#readme","repository":{"type":"git","url":"git+https://github.com/agent-dispatch/worker-agentcore.git"},"description":"Standard AgentCore worker contract for AgentDispatch long-running tasks.","maintainers":[{"name":"vamgan","email":"vamilg@gmail.com"}],"readme":"# @agent-dispatch/worker-agentcore\n\n[![npm](https://img.shields.io/npm/v/@agent-dispatch/worker-agentcore.svg)](https://www.npmjs.com/package/@agent-dispatch/worker-agentcore)\n[![CI](https://github.com/agent-dispatch/worker-agentcore/actions/workflows/ci.yml/badge.svg)](https://github.com/agent-dispatch/worker-agentcore/actions/workflows/ci.yml)\n[![license](https://img.shields.io/npm/l/@agent-dispatch/worker-agentcore.svg)](https://www.npmjs.com/package/@agent-dispatch/worker-agentcore)\n\nReference AWS AgentCore worker runtime for AgentDispatch.\n\nThis package is the cloud-side process you can package into an ECR image and run through AWS AgentCore. It receives tasks from `@agent-dispatch/adapter-aws-agentcore`, executes them with your chosen agent framework, and exposes protocol endpoints that let the lead agent continue interaction after spawn.\n\n## What it provides\n\n- HTTP task endpoint for `agent.run` and `command.run` payloads.\n- A2A-compatible JSON-RPC `message/send` endpoint.\n- Agent Card discovery at `/.well-known/agent-card.json`.\n- Health endpoint for runtime checks.\n- Pluggable execution boundary for OpenClaw, Hermes Agent, LangChain, Strands, custom scripts, or direct model calls.\n\n## Runtime contract\n\nEndpoint | Purpose\n--- | ---\n`GET /ping` | AgentCore health check. Returns `{\"status\":\"Healthy\"}`.\n`GET /health` | Local liveness alias.\n`GET /.well-known/agent-card.json` | Returns A2A agent metadata and supported skills.\n`POST /` | Accepts A2A JSON-RPC `message/send` messages.\n`POST /invocations` | Accepts the AgentDispatch HTTP task envelope.\n\nThe default image is optimized for AgentCore A2A runtimes. It listens on port `9000` unless you override `PORT`, matching the AgentCore A2A service contract. For HTTP envelope mode, run with `AGENTDISPATCH_WORKER_PROTOCOL=http PORT=8080`.\n\nThe default worker is intentionally small. It proves the AgentCore runtime path and gives teams a place to wire their real subagent implementation.\n\n## Run locally\n\n```bash\nnpm install\nnpm run build\nAGENTDISPATCH_WORKER_PROTOCOL=a2a npm start\n```\n\nSend an A2A-style message:\n\n```bash\ncurl -X POST http://localhost:9000/ \\\n  -H \"content-type: application/json\" \\\n  -d '{\n    \"jsonrpc\": \"2.0\",\n    \"id\": \"1\",\n    \"method\": \"message/send\",\n    \"params\": {\n      \"message\": {\n        \"role\": \"user\",\n        \"parts\": [{ \"kind\": \"text\", \"text\": \"Run the background task.\" }]\n      }\n    }\n  }'\n```\n\n## Build a runtime image\n\n```bash\ndocker build -t agentdispatch-worker-agentcore .\ndocker tag agentdispatch-worker-agentcore:latest 123456789012.dkr.ecr.us-west-2.amazonaws.com/agentdispatch-worker:latest\ndocker push 123456789012.dkr.ecr.us-west-2.amazonaws.com/agentdispatch-worker:latest\n```\n\nUse the pushed image in `@agent-dispatch/adapter-aws-agentcore` runtime mode with `ecrImageUri` and `executionRoleArn`.\n\nThe AWS adapter automatically sets `AGENTDISPATCH_WORKER_PROTOCOL` on runtime-mode deployments to match the requested AgentCore protocol. You can override or add environment variables with `target.details.environmentVariables`.\n\n## Customizing the worker\n\nThe default executor is `echo`, which is only a smoke-test implementation. For a real cloud subagent, configure a command-backed framework adapter in the runtime environment:\n\n```bash\nAGENTDISPATCH_AGENT_FRAMEWORK=openclaw\nAGENTDISPATCH_FRAMEWORK_COMMAND_OPENCLAW=\"openclaw run --stdin-json\"\n```\n\nOr configure multiple frameworks at once:\n\n```bash\nAGENTDISPATCH_FRAMEWORK_COMMANDS='{\n  \"openclaw\": \"openclaw run --stdin-json\",\n  \"hermes\": {\n    \"command\": \"hermes-agent run --stdin-json\",\n    \"timeoutSeconds\": 1800,\n    \"env\": {\n      \"HERMES_MODE\": \"subagent\"\n    }\n  }\n}'\n```\n\nWhen `input.framework` is `openclaw`, the worker launches the configured command without a shell, sends this JSON envelope to `stdin`, and maps the command response back into AgentDispatch events and results:\n\n```json\n{\n  \"taskType\": \"agent.run\",\n  \"framework\": \"openclaw\",\n  \"instruction\": \"Run the background task\",\n  \"context\": {},\n  \"input\": {},\n  \"metadata\": {}\n}\n```\n\nFramework commands can return either plain text or structured JSON:\n\n```json\n{\n  \"output\": \"Task completed.\",\n  \"result\": {\n    \"summary\": \"Task completed.\"\n  },\n  \"events\": [\n    {\n      \"type\": \"task.progress\",\n      \"message\": \"Repository scan complete.\"\n    }\n  ],\n  \"artifacts\": [\n    {\n      \"uri\": \"s3://bucket/task/result.json\",\n      \"kind\": \"json\",\n      \"contentType\": \"application/json\"\n    }\n  ]\n}\n```\n\nThis makes the package usable with:\n\n- OpenClaw or Hermes Agent for native subagent execution.\n- LangChain, Strands, or custom orchestrators for tool-heavy workflows.\n- Direct model calls for simple long-running analysis.\n- Internal tools exposed by the runtime container or cloud environment.\n\nThe important boundary is the protocol contract: accept an AgentDispatch task or A2A message, run the subagent, emit structured results, and keep cloud credentials inside the runtime environment.\n\n## Development\n\n```bash\nnpm install\nnpm run typecheck\nnpm test\nnpm run build\n```\n\nSee the [release workflow](https://github.com/agent-dispatch/worker-agentcore/blob/main/docs/release.md) for npm Trusted Publisher setup, provenance publishing, and upstream package order.\n","readmeFilename":"README.md","keywords":["agentdispatch","aws","bedrock-agentcore","agentcore","worker","a2a","cloud-agents","subagents"]}