clawdi
AGENTS.md102 starsChanged 58 days agoMITView on GitHub
The best home for all your AI agents. Run them in the cloud or connect your own—with their context and tools in one place. This repository contains the CLI, FastAPI backend, TanStack dashboard, shared types, agent adapters, channels, and sync. Maintain agent-facing repository docs with docs/agent-docs-guide.md. Hosted infrastructure is owned outside this repo by first-party hosted control planes. Do not add hosted service runbooks, private addresses, or internal deployment details here. For architecture and ownership, read docs/architecture.md. Install dependencies once:
- Reads credentials
- Sends data out
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
The file
We split this AGENTS.md into the rules it gives an agent
6 rules. About 0 are common, 0 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 102
Use the printed clawdi_...
- Very specific: line 121
Use docker compose down -v only when intentionally wiping the local database.
- Very specific: line 198
Do not bulk-rewrite /api strings.
- Very specific: line 200
Never hand-edit packages/shared/src/api/api.generated.ts.
- Very specific: line 217
Keep UI primitives under apps/web/src/components/ui/.
- Very specific: line 218
Keep shared public types under packages/shared/src/types/.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Clawdi
The best home for all your AI agents. Run them in the cloud or connect your own—with their context and tools in one place. This repository contains the CLI, FastAPI backend, TanStack dashboard, shared types, agent adapters, channels, and sync.
Maintain agent-facing repository docs with
docs/agent-docs-guide.md.
OSS Boundary
Hosted infrastructure is owned outside this repo by first-party hosted control planes. Do not add hosted service runbooks, private addresses, or internal deployment details here.
Repository Map
apps/web/ TanStack Start dashboard
backend/ FastAPI backend, async PostgreSQL, Alembic
packages/cli/ TypeScript/Bun CLI, adapters, MCP stdio server
packages/shared/ Shared types, constants, generated API client
packages/whatsapp-baileys-sidecar/ WhatsApp Baileys sidecar package
docs/ Contributor docs, ADRs, plans, scenariosFor architecture and ownership, read docs/architecture.md.
Local End-to-End
Install dependencies once:
bun installTerminal 1, backend:
docker compose up -d postgres
cd backend
cp .env.example .env
uv sync
python3 - <<'PY'
import secrets
for name in ("VAULT_ENCRYPTION_KEY", "ENCRYPTION_KEY", "ADMIN_API_KEY"):
print(f"{name}={secrets.token_hex(32)}")
PYSet those three generated values in backend/.env. Also set:
DEV_AUTH_BYPASS=true
DEV_AUTH_TOKEN=dev-bypassRun backend:
pdm migrate
pdm devDone: curl -sS http://localhost:8000/health returns {"status":"ok"}.
Terminal 2, web:
cd apps/web
cp .env.example .env.localSet:
VITE_CLAWDI_API_URL=http://localhost:8000
VITE_DEV_AUTH_BYPASS=true
VITE_DEV_AUTH_TOKEN=dev-bypassRun:
bun run devDone: http://localhost:3000 opens the dashboard without Clerk login.
Terminal 3, CLI:
export ADMIN_API_KEY="<value-from-backend-env>"
curl -sS -X POST http://localhost:8000/v1/admin/auth/keys \
-H "X-Admin-Key: ${ADMIN_API_KEY}" \
-H "Content-Type: application/json" \
-d '{"target_clerk_id":"dev_browser","label":"local-cli"}' \
| jq -r .raw_keyUse the printed clawdi_... key:
bun run packages/cli/src/index.ts config set apiUrl http://localhost:8000
bun run packages/cli/src/index.ts auth login --manual
bun run packages/cli/src/index.ts setup
bun run packages/cli/src/index.ts doctorDone: doctor shows green Auth, API reachability, Environments, Vault
metadata, and Clawdi MCP; unavailable local agents may show not
installed.
Cleanup:
docker compose downUse docker compose down -v only when intentionally wiping the local database.
Verification
Workspace checks:
bun run typecheck
bun run test # Docker-backed clean runner
bun run checkDone: all three commands exit 0 and do not modify the worktree. bun run test
copies the repo into an isolated container workspace with a fake HOME; use
bun run test:local only for opt-in host-local development loops.
Backend checks:
cd backend
uv run ruff check .
uv run ruff format --check .
uv run python -m compileall app scripts tests alembicBackend pytest needs a migrated throwaway PostgreSQL. Use
docs/backend-development.md#verification.
Done: uv run pytest -q exits 0 against that database.
Frontend checks:
bun run --cwd apps/web typecheck
bun run --cwd apps/web test src/hosted/oss-clean.test.ts
bunx biome check apps/web/src
bun run --cwd apps/web build:ossDone: all web commands exit 0. See
docs/frontend-development.md#verification.
CLI checks:
bun run --cwd packages/cli typecheck
bun run --cwd packages/cli test
bun run --cwd packages/shared test
bun run --cwd packages/whatsapp-baileys-sidecar typecheck
bun run --cwd packages/whatsapp-baileys-sidecar testPackage test commands use the Docker-backed clean runner. test:internal is
reserved for that runner and CI; use test:local only for an explicit
host-local workspace loop. Done: command output reports passing tests/typechecks.
Owner Docs
- Agent documentation:
docs/agent-docs-guide.md - Backend:
docs/backend-development.md - Frontend:
docs/frontend-development.md - CLI:
docs/cli-development.md - API compatibility:
docs/api-compatibility.md - Architecture:
docs/architecture.md - Agent identity ADR:
docs/adr/0001-agent-identity-is-the-stable-domain-object.md - AI Providers:
docs/ai-providers.md - Managed runtime:
docs/managed-runtime.md - Daemon testing:
docs/clawdi-daemon-test-guide.md - Releases:
docs/runbooks/release.md - Managed WhatsApp sidecars:
docs/runbooks/whatsapp-baileys-sidecars.md
Compatibility Rules
/v1/agentsis canonical for Agent identity./v1/environmentsand hidden/api/*routes are compatibility aliases.- Session payloads still use
environment_idas the legacy wire name for the stable agent id. - API compatibility is additive-only for released surfaces.
- Do not bulk-rewrite
/apistrings; many belong to external protocols or fixtures. Followdocs/api-compatibility.md. - Never hand-edit
packages/shared/src/api/api.generated.ts; regenerate it with the backend workflow.
Done: compatibility changes include focused backend tests for canonical and legacy paths.
Toolchain
- JavaScript and TypeScript commands use the root
packageManagertoolchain (bun@1.4.2). - JavaScript and TypeScript formatting and linting use Biome.
- Backend dependency management uses
uv; operational commands use the PDM scripts inbackend/pyproject.toml. - Python formatting and linting use Ruff.
Directory Ownership
- Keep UI primitives under
apps/web/src/components/ui/. - Keep shared public types under
packages/shared/src/types/.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

