Skip to content

Latest commit

 

History

17 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

1Claw Agent Templates

Public template registry for 1claw spawn — framework-specific Docker agents pre-wired with 1Claw MCP and Shroud.

Each template includes a Dockerfile, starter agent code, and an entrypoint that mounts the host daemon socket. A shared browser chat UI on port 3000 lets you test any template immediately after 1claw spawn — messages route to the framework agent (port 3001) or Shroud via the daemon when no LLM is wired in the agent. The container never sees raw API keys; credentials are injected at runtime by the 1Claw daemon on the host.

Full contributor guide (docs): docs.1claw.co — Add an agent template


Use a template

Install the CLI, then spawn:

npm install -g @1claw/cli   # or: brew install 1clawAI/tap/oneclaw

1claw spawn langchain --agent-key ocv_YOUR_KEY
1claw spawn --list
1claw spawn --refresh     # pull latest templates from this repo

See the CLI guide for LLM options (BYOK, Token Billing, offline mode).

v0.56 platform features (configure on agents)

Spawned agents use the 1Claw API. Enable on agent records via dashboard or CLI:

  • Graduated HITL — Transactions, sign intents, execution bindings may require human approval.
  • Human Factor Auth — Treasury send/swap passkey step-up (human wallets; @1claw/wallet-react).
  • Guardrail governance — Shadow/enforce execution guardrails, revision history, replay dry-runs.
  • Safe foundation — Counterfactual Gnosis Safe accounts (1claw agent accounts migrate).
  • Multichain signing — Unchanged deps in Vault/Shroud: rust-bitcoin, solana-sdk v4, xrpl-rust 1.1.0.

v0.42 features available in all templates

All Python templates now include the oneclaw SDK (v0.42+), giving spawned agents access to:

  • Agent Memoryclient.memory.store() / client.memory.search() for persistent vector memory across sessions
  • Automationsclient.automations.create() for cron-based scheduled tasks (secret rotation, health checks)
  • Runtimesclient.runtimes.create() for managed deployment with auto-scaling
  • Discoveryclient.discovery.publish() to list your agent in the 1Claw directory

These complement the MCP-based secret fetching and Shroud LLM proxy already wired in each template.

Shipped templates

Python:

Template Framework Status
langchain LangChain / LangGraph
crewai CrewAI
openai-agents OpenAI Agents SDK
agentkit Coinbase AgentKit
smolagents HuggingFace smolagents
llamaindex LlamaIndex
pydantic-ai Pydantic AI
agno Agno
coder Coder

TypeScript:

Template Framework Status
typescript-sdk @1claw/sdk + AI SDK
mastra Mastra
elizaos ElizaOS

Contribute a template

We welcome community PRs for new frameworks and improvements to existing templates.

Before you start

  • Pick a unique directory name (lowercase, hyphens): e.g. pydantic-ai, my-framework.
  • Copy an existing template as a starting point:
    • Python: templates/langchain/
    • TypeScript: templates/typescript-sdk/ or templates/mastra/
  • Read the docs contributor guide for the full walkthrough.

Step-by-step

  1. Fork 1clawAI/agent-templates and clone your fork.

  2. Create templates/<name>/ with these files:

    File Required
    template.yaml Manifest (name must match directory)
    Dockerfile Builds a runnable image
    entrypoint.sh Starts MCP + agent; wires Shroud when enabled
    Starter code e.g. agent.py or agent.ts
    README.md Framework-specific notes
    requirements.txt Python deps (Python templates)
    package.json Node deps (TypeScript templates)
  3. Register the template in registry.yaml:

    - name: my-framework          # must match templates/my-framework/
      display_name: "My Framework"
      version: 1.0.0
      language: python             # python | node
      description: "One-line summary for 1claw spawn --list"
  4. Test locally (build from repo root so shared/ is in the Docker context):

    docker build -f templates/my-framework/Dockerfile -t test-my-framework .
    docker run --rm -p 3000:3000 test-my-framework
    open http://localhost:3000    # interactive chat UI
    curl http://localhost:3000/health

    Optionally test end-to-end with the CLI (from a monorepo checkout with this repo at packages/agent-templates):

    1claw spawn my-framework --agent-key ocv_YOUR_KEY
  5. Open a pull request against main. CI will:

    • Validate template.yaml (required fields, name match, language)
    • Confirm the template is listed in registry.yaml
    • Scan for accidental secrets (sk-…, ocv_…, etc.)
    • Run docker build smoke tests (see validate.yml)
  6. After merge, templates appear for everyone via 1claw spawn --refresh (or on the next CLI release that bundles this repo).

Rules (must follow)

  • No secrets in the repo. Never commit API keys, agent keys, or real vault IDs.
  • Daemon socket, not env secrets. Templates must work with ONECLAW_DAEMON_SOCKET=/run/1claw/daemon.sock; do not ENV or COPY credentials.
  • Health endpoint. Expose /health on port 3000 via the shared spawn chat UI (shared/start-with-chat-ui.sh).
  • LLM via Shroud. Route provider calls through Shroud when ONECLAW_LLM_VIA_SHROUD=true (see entrypoint.sh in existing templates). Use the daemon /proxy path in the shared chat UI fallback — never put real keys in the container.

Deep reference

Questions?

Open a GitHub Discussion or issue. For security concerns, email ops@1claw.co.


Repository layout

agent-templates/
├── registry.yaml           # Index consumed by 1claw spawn --list
├── shared/                 # Spawn chat UI (browser test harness for all templates)
│   ├── spawn_chat_ui.py
│   ├── index.html
│   └── start-with-chat-ui.sh
├── templates/
│   ├── langchain/          # One directory per framework
│   │   ├── template.yaml
│   │   ├── Dockerfile
│   │   ├── entrypoint.sh
│   │   └── ...
│   └── ...
├── CONTRIBUTING.md         # Technical schema & patterns
└── .github/workflows/      # CI validation

License

MIT — see LICENSE.

About

Framework agent templates for 1claw spawn — community PRs welcome

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages