Skip to content

jsclaw integration — agent containers on Solid pods #199

Open

Description

@melvincarvalho

Summary

jsclaw is a pure JavaScript ESM library for running Claude agents in isolated Docker containers with streaming output, filesystem IPC, and built-in MCP tools. Zero dependencies, no build step — same philosophy as JSS.

Why it fits

  • Same stack — both are pure ESM JavaScript, zero dependencies, no transpilation
  • Container isolation — each agent runs sandboxed but can authenticate to the pod via NIP-98
  • Filesystem IPC — agents co-located with a pod can coordinate without network overhead
  • MCP tools — jsclaw's built-in MCP server can expose pod operations as agent tools
  • Concurrency control — per-group queuing means multiple agents can share a pod safely

Integration concept

A JSS pod + jsclaw = self-hosted data and self-hosted agents:

  1. Pod provides data storage, auth, and API endpoints
  2. jsclaw spins up agent containers with nostr keypairs
  3. Agents authenticate via NIP-98 and interact with pod REST endpoints
  4. Filesystem IPC for fast local coordination when co-located

Possible MCP tools for pod access

  • pod-read / pod-write — CRUD on pod resources
  • pod-inbox — check and respond to messages
  • pod-pay — interact with payment endpoints
  • pod-query — search/filter pod data

References

Activity

  1. added
    nostr
    on May 9, 2026
  2. added
    agentic
    on May 19, 2026
  3. melvincarvalho commented on Jun 11, 2026

    @melvincarvalho
    ContributorAuthor

    Update 2026-06-11 — jsclaw moved a lot today; the integration is now substantially easier than when this was filed, and some terminology above is stale.

    What changed in jsclaw since March

    Concrete integration sketch

    JSS depends on jsclaw (git URL; npm registry is intentionally stale) and adds one adapter module:

    1. Pod as workspace — the agent's agents/<id>/ folder lives inside (or is mounted from) the pod storage: SOUL.md, memory/*.md, sessions are just pod resources, readable/writable over Solid like everything else. Identity files become documents the owner can edit from any Solid app.
    2. Inbox as Channel — jsclaw has a formal Channel interface + ChannelManager; an LdpInboxChannel receives POSTs to the pod inbox and routes them to the agent, replies go back as inbox responses. Per-agent bindings (channel/peer → agent) already exist in jsclaw.
    3. Auth — JSS's WebID/Nostr (NIP-98) auth replaces jsclaw's gateway token for the chat/WS surface. jsclaw's startGateway(deps, config, {port, token}) currently owns its own http.createServer; either run it on a loopback port behind a JSS route, or (cleaner, needs a small jsclaw PR) accept an existing server/upgrade hook so it mounts into fastify via @fastify/websocket.
    4. Pod tools via MCP passthrough — jsclaw forwards mcp.servers config into agents; JSS's MCP tooling (cf. feat(mcp): read_acl / write_acl convenience tools #496) gives agents pod-read/pod-write/pod-inbox without new tool plumbing in jsclaw.
    5. Sandbox posture per trust level — sandboxMode: "non-main": the pod owner's main agent on the host, visitor/automation agents in containers.

    Suggested first milestone

    Smallest demonstrable slice: JSS route POST /agents/<id>/chat → jsclaw runContainerAgent with the pod folder as workspace, agent-micro as runner, sandboxMode: off. One file, no gateway embedding, proves the pod-as-workspace model end-to-end.

  4. added
    plugin
    on Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agenticnostrplugin

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions