Skip to content

Examples

The examples folder shows practical ways to use TekMemo packages in real projects.

Start here

GoalExamplePackage
Use local .tekmemo/ memoryLocal onlytekmemo, @tekmemo/fs
Use graph memoryGraph memory@tekmemo/graph
Call TekMemo CloudCloud client@tekmemo/cloud-client
Use shell/agent commandsCLI@tekmemo/cli
Expose memory to coding agentsMCP@tekmemo/mcp-server
Add memory to AI SDK toolsAI SDK@tekmemo/adapters/ai-sdk

Framework integrations

TekMemo Cloud works with any JavaScript server runtime. The pattern is the same across frameworks:

  1. Install @tekmemo/cloud-client
  2. Create the client with server-side environment variables
  3. Use memory composables in route handlers, loaders, or server actions
FrameworkEnvironmentKey constraint
Next.jsRoute handlers, server actionsNever expose TEKMEMO_API_KEY to browser bundles
React RouterLoaders, actionsServer-only exports
ExpressRoute handlersStandard Node.js middleware
HonoRoute handlersWorks on Node, Deno, Bun, Cloudflare Workers
FastifyRoute handlersStandard Node.js backend
NestJSServices, controllersInject via providers
Cloudflare WorkersFetch handlersUse env bindings for secrets
Node HTTPServer handlersNative node:http
TanStack RouterServer functionsSSR-only execution
AstroAPI routes, server islandsServer-side endpoints
SvelteKit+server.ts, +page.server.tsServer-only modules
Nuxtserver/api/, server routesNitro server handlers
Vite ReactBackend API serverSeparate backend from SPA

Important

TEKMEMO_API_KEY is a server-side secret. Use it in route handlers, loaders, workers, CLI tools, MCP runtimes, and backend services. Do not put it in browser-side code.

Released under the MIT License.