Context got noisy, tokens bloated, iteration slowed.
So I built Anytool: a single meta‑tool your agent calls to generate exactly the tool it needs, on demand.
First run generates + caches the code; subsequent runs are instant.
Each tool comes with its own isolated sandbox, ephemeral filesystem, per‑tool KV state, dedicated SQLite DB, per‑user env (USER_), full npm in a Bun container, and outbound fetch for APIs.
How I built it:
- Frontend: SvelteKit (Svelte 5)
- Backend: Cloudflare Workers + Durable Objects
- Execution: Bun container, full npm, auto‑install + global cache, no bundling
- Storage: R2 for code/metadata (hash‑based), per‑tool KV + SQLite for state
- Auth: Better Auth; per‑user encrypted env injected at runtime as USER_*
- API: Hono + Zod OpenAPI + Scalar docs; MCP‑native surface
- AI: Effect‑TS retries/self‑healing; version‑pinned imports for determinism
What it does: - Natural‑language → real npm tool, executed in isolation
- Hash caching: first run (AI + first install); next runs reuse cache
- Per‑tool state (KV + SQLite) for workflows, history
- Credentials: OPENROUTER_APIKEY and other secrets injected as env.USER_*
- Retrieval/Augmentation (how it “learns”):
- Full NPM accesss; indexes package README + types into R2 libraries/; generation retrieves these for better code and fewer tokens.
- Per‑user similarity: LLM ranks your existing tools for semantic similarity and suggests modify vs create to avoid duplicates. Improves as your library grows.
- MCP surface (simple on purpose):
`search_user_tools` — semantic search in your library
`create_tool` — generate and store new tool
`execute_tool` — run a tool with input
Try it: AnytoolHQ.com — 1,000 free runs/month. Bring your OpenRouter key (OPENROUTER_APIKEY).
- Works with AI SDK/LangChain/MCP.
- One tool → infinite capabilities.
Privacy/Safety: - Per‑user encrypted env; no secrets in code
- Isolated execution; audit/run history
- Explicit versioned imports; reproducible runs
Would love feedback on: - The “one meta‑tool” DX (AI SDK/LangChain/MCP)
- First‑run latency + cache behavior
- Env/credential ergonomics (USER_ injection)
- Templates you want first (QR, CSV, validators, API clients, etc.)
Happy to answer questions.. cheers!- Jordan Coeyman (x.com/acoyfellow)
SamTinnerholm•1h ago
Quick comment: the code on the website isn't using any sort of intellisense or highlighting
SamTinnerholm•1h ago
acoyfellow•47m ago
edit: problem found, fixed, and tested.. let me know if you have a chance to try again
SamTinnerholm•4m ago
acoyfellow•45m ago
I plan on adding it soon, after smoothing out the internals.