ADK Claw is a personal AI assistant CLI tool with persistent memory, Telegram integration, and extensible skills. Built on top of @iqai/adk.
- Runtime: Node.js with ES Modules (
"type": "module") - Language: TypeScript
- Package Manager: pnpm
- Build: tsc + cp (copies templates to dist)
- Linting: Biome
- Core Dependencies: @iqai/adk, @clack/prompts, @openrouter/ai-sdk-provider
adk-claw/
├── src/
│ ├── cli/ # CLI commands (init, start, etc.)
│ │ ├── index.ts # CLI router
│ │ └── init.ts # Init command - creates config and workspace
│ ├── agents/ # Agent definitions
│ ├── config/ # Configuration loading
│ ├── lib/ # Shared utilities
│ ├── memory/ # Memory system
│ ├── services/ # External services (Telegram, etc.)
│ ├── skills/ # Extensible skills system
│ ├── tools/ # Agent tools
│ ├── types/ # TypeScript types
│ └── index.ts # Main entry point
├── templates/
│ └── workspace/ # Templates copied during init
│ ├── AGENTS.md # Agent configuration template
│ ├── SOUL.md # Agent personality template
│ ├── USER.md # User profile template
│ └── .gitignore
├── dist/ # Compiled output (includes templates after build)
└── .adk-claw/ # User's local config (created by init, gitignored)
├── config.json # User configuration (API keys, etc.)
└── workspace/ # User's workspace with personalized templates
pnpm dev:cli # Run CLI in dev mode (tsx)
pnpm build # Build (tsc + copy templates to dist)
pnpm start # Run built CLI
pnpm lint:fix # Fix linting issues- User runs
adk-claw initorpnpm dev:cli(defaults to init) - Prompts collect: agent name, model, OpenRouter API key, Telegram bot token
- Creates
.adk-claw/config.jsonwith all settings - Copies templates from
templates/workspace/to.adk-claw/workspace/:- AGENTS.md, SOUL.md, USER.md (with placeholder replacement)
- Creates empty
memory/andskills/directories (ADK MemoryService creates memory files automatically)
- Initializes git in workspace
- User runs
adk-claw startto launch the agent
Templates use these placeholders that get replaced during init:
{{AGENT_NAME}}- User's chosen agent name{{USER_NAME}}- Defaults to "default"{{CREATED_DATE}}- ISO date string
Templates must be found in both dev and built modes:
- Dev mode (
tsx src/cli/index.ts): Templates at project roottemplates/ - Built mode (
node dist/cli/index.ts): Templates atdist/templates/
The code checks which path exists and uses the appropriate one.
The build script (package.json):
"build": "tsc && cp -r templates dist/"This copies templates to dist/templates/ so the built CLI can find them.
Problem: Running adk-claw init created the workspace directory structure but no .md files (AGENTS.md, SOUL.md, USER.md, memory files).
Root Cause: Two issues:
- Build script used
cpxto copy templates, butcpxwasn't installed as a dependency - Template path resolution only worked in built mode, not dev mode
Fix:
- Changed build script from
cpx "templates/**/*" dist/templatestocp -r templates dist/ - Updated
TEMPLATES_DIRresolution insrc/cli/init.tsto check both paths:- First tries
../templates(built mode: dist/cli -> dist/templates) - Falls back to
../../templates(dev mode: src/cli -> templates)
- First tries
- The
@iqai/adkpackage may show warnings about missing CLI files (can be ignored)
- Always run
pnpm buildafter making changes to test the built version - Templates are at project root
templates/, NOT insrc/ - User config/workspace is in
.adk-claw/(gitignored, contains secrets) - Test both
pnpm dev:cliANDpnpm build && pnpm clito ensure both modes work