View memory

Instructions for AI Assistants

Current state: Memory loaded
Next action: Read the memory content above. To search more, fetch /recall.
Fetch this URL: /memory/9416e886-ea49-4b2c-be74-cf462a563f82

Memory

## Amy v1 - Detailed Implementation Plan ### Project Structure ``` amy/ ├── worker/ # Cloudflare Worker (Backend) │ ├── src/ │ │ ├── agents/ │ │ │ ├── assistant.ts # Personal Assistant Think agent │ │ │ ├── coding.ts # Coding Coordinator Think agent │ │ │ ├── research.ts # Research Agent Think agent │ │ │ └── business.ts # Business Agent Think agent │ │ ├── tools/ │ │ │ ├── todomator.ts # Todomator MCP client tools │ │ │ ├── openfiles.ts # OpenFiles MCP client tools │ │ │ └── second-brain.ts # Second-Brain memory tools │ │ ├── index.ts # Worker entry + routing │ │ └── types.ts # Shared types │ ├── wrangler.jsonc # Worker config │ ├── package.json │ └── tsconfig.json ├── frontend/ # assistant-ui Frontend │ ├── src/ │ │ ├── app/ │ │ │ ├── layout.tsx # Root layout with dark mode │ │ │ └── page.tsx # Main page │ │ ├── components/ │ │ │ ├── workspace/ │ │ │ │ ├── workspace-switcher.tsx # Workspace selector │ │ │ │ └── workspace-layout.tsx # Thread list + chat │ │ │ ├── assistant-ui/ │ │ │ │ ├── thread.tsx │ │ │ │ ├── thread-list.tsx │ │ │ │ ├── composer.tsx │ │ │ │ └──... │ │ │ └── voice/ │ │ │ └── voice-panel.tsx # Voice mode UI │ │ ├── lib/ │ │ │ ├── agents.ts # Agent definitions │ │ │ └── runtime.ts # Runtime configuration │ │ └── styles/ │ │ └── globals.css # Dark mode theme │ ├── package.json │ └── next.config.js └── README.md ``` ### Dependencies #### Worker ```json { "dependencies": { "agents": "0.12.4", "@cloudflare/ai-chat": "0.7.0", "@cloudflare/think": "latest", "@cloudflare/voice": "latest", "ai": "latest", "workers-ai-provider": "latest", "zod": "latest", "mcp-client": "latest" } } ``` #### Frontend ```json { "dependencies": { "@assistant-ui/react": "latest", "@assistant-ui/react-ai-sdk": "latest", "@assistant-ui/react-markdown": "latest", "@cloudflare/ai-chat": "0.7.4", "@cloudflare/voice/react": "latest", "agents": "0.12.4", "next": "latest", "react": "latest", "react-dom": "latest" } } ``` ### Agent Configurations #### 1. Personal Assistant (assistant.ts) ```typescript export class Assistant extends Think<Env> { getModel() { return createWorkersAI({ binding: this.env.AI })("@cf/meta/llama-4-scout-17b-16e-instruct"); } getSystemPrompt() { return `You are Amy, Mike's personal AI assistant. You help with: - General conversation and questions - Task management via Todomator - Memory recall via Second-Brain - Voice conversations You have access to: - Todomator: Create, update, list tasks - Second-Brain: Store and recall memories - Workspace tools: File operations Be helpful, concise, and proactive. Use the Second-Brain to remember important context.`; } getTools() { return { // Todomator tools create_task: todCreateTask, list_tasks: todListTasks, update_task: todUpdateTask, // Second-Brain tools remember: sbRemember, recall: sbRecall, // Built-in Think workspace tools }; } } ``` #### 2. Coding Coordinator (coding.ts) ```typescript export class CodingCoordinator extends Think<Env> { getModel() { return createWorkersAI({ binding: this.env.AI })("@cf/meta/llama-4-scout-17b-16e-instruct"); } getSystemPrompt() { return `You are Amy's Coding Coordinator. You help Mike: - Plan coding tasks and break them into subtasks - Create Cloudflare Workers - Coordinate with other coding agents via Todomator - Manage code repositories and files You have access to: - Todomator: Create coding tasks, assign to agents - OpenFiles: Read/write code files - Cloudflare Workers API: Create and deploy workers - Second-Brain: Store coding decisions and patterns When given a coding request: 1. Break it into smaller tasks 2. Create Todomator tickets for each subtask 3. If it's a Cloudflare Worker, help scaffold and deploy it 4. Store important decisions in Second-Brain`; } getTools() { return { // Todomator tools create_task: todCreateTask, list_tasks: todListTasks, update_task: todUpdateTask, assign_task: todAssignTask, // OpenFiles tools read_file: ofReadFile, write_file: ofWriteFile, list_files: ofListFiles, // Second-Brain tools remember: sbRemember, recall: sbRecall, }; } } ``` #### 3. Research Agent (research.ts) ```typescript export class ResearchAgent extends Think<Env> { getModel() { return createWorkersAI({ binding: this.env.AI })("@cf/meta/llama-4-scout-17b-16e-instruct"); } getSystemPrompt() { return `You are Amy's Research Agent. You help Mike: - Research topics using web search and document analysis - Crawl websites and extract content - Analyze documents and create summaries - Store research findings in Second-Brain You have access to: - Web search and crawling tools - Document intelligence tools - Second-Brain: Store and recall research - Todomator: Track research tasks When researching: 1. Use web search to find relevant information 2. Crawl key pages for detailed content 3. Analyze and summarize findings 4. Store important findings in Second-Brain 5. Create a Todomator task for follow-up if needed`; } getTools() { return { // Web/crawling tools (to be added) search_web: webSearch, crawl_page: webCrawl, // Second-Brain tools remember: sbRemember, recall: sbRecall, // Todomator tools create_task: todCreateTask, }; } } ``` #### 4. Business Agent (business.ts) ```typescript export class BusinessAgent extends Think<Env> { getModel() { return createWorkersAI({ binding: this.env.AI })("@cf/meta/llama-4-scout-17b-16e-instruct"); } getSystemPrompt() { return `You are Amy's Business Agent. You help Mike: - Strategic planning and business analysis - Track business metrics and goals - Manage business tasks and follow-ups - Store business decisions in Second-Brain You have access to: - Todomator: Business task management - Second-Brain: Store business knowledge - Workspace tools: Create documents and plans When helping with business: 1. Understand the business context 2. Break down strategic goals into actionable tasks 3. Track progress via Todomator 4. Store important decisions in Second-Brain 5. Provide analysis and recommendations`; } getTools() { return { // Todomator tools create_task: todCreateTask, list_tasks: todListTasks, update_task: todUpdateTask, // Second-Brain tools remember: sbRemember, recall: sbRecall, // Workspace tools for documents }; } } ``` ### Wrangler Configuration ```jsonc { "name": "amy-worker", "main": "src/index.ts", "compatibility_date": "2026-01-01", "compatibility_flags": ["nodejs_compat", "experimental"], "ai": { "binding": "AI" }, "durable_objects": { "bindings": [ { "name": "Assistant", "class_name": "Assistant" }, { "name": "CodingCoordinator", "class_name": "CodingCoordinator" }, { "name": "ResearchAgent", "class_name": "ResearchAgent" }, { "name": "BusinessAgent", "class_name": "BusinessAgent" } ] }, "migrations": [ { "tag": "v1", "new_sqlite_classes": [ "Assistant", "CodingCoordinator", "ResearchAgent", "BusinessAgent" ] } ] } ``` ### Frontend Components #### Workspace Switcher ```tsx "use client"; import { useState } from "react"; const workspaces = [ { id: "assistant", name: "Personal Assistant", icon: "🤖" }, { id: "coding", name: "Coding Coordinator", icon: "💻" }, { id: "research", name: "Research Agent", icon: "🔬" }, { id: "business", name: "Business Agent", icon: "📊" }, ]; export function WorkspaceSwitcher({ active, onChange }) { return ( <div className="flex gap-2 p-2 bg-gray-900"> {workspaces.map((ws) => ( <button key={ws.id} onClick={() => onChange(ws.id)} className={`px-4 py-2 rounded ${ active === ws.id ? "bg-blue-600" : "bg-gray-700" }`} > {ws.icon} {ws.name} </button> ))} </div> ); } ``` #### Agent Runtime Hook ```tsx "use client"; import { useAgent } from "agents/react"; import { useAgentChat } from "@cloudflare/ai-chat/react"; import { useAISDKRuntime } from "@assistant-ui/react-ai-sdk"; const agentMap = { assistant: "Assistant", coding: "CodingCoordinator", research: "ResearchAgent", business: "BusinessAgent", }; export function useAgentRuntime(workspaceId: string, threadId: string) { const agent = useAgent({ agent: agentMap[workspaceId], name: threadId, host: process.env.NEXT_PUBLIC_AGENT_HOST!, }); const chat = useAgentChat({ agent }); const runtime = useAISDKRuntime( chat as Parameters<typeof useAISDKRuntime>[0] ); return { runtime, agent, chat }; } ``` ### Voice Integration ```typescript // In assistant agent import { withVoice, WorkersAITTS, WorkersAINova3STT } from "@cloudflare/voice"; export class Assistant extends withVoice(Think)<Env> { transcriber = new WorkersAINova3STT(this); tts = new WorkersAITTS(this); async onTurn(transcript: string, context: VoiceTurnContext) { // Handle voice input through the same Think agent logic const result = await this.handleMessage(transcript); for await (const chunk of result.textStream) { if (context.signal.aborted) break; context.speak(chunk); } } } ``` ### MCP Server Setup (Todomator) ```typescript // worker/src/mcp/todomator-server.ts import { McpAgent } from "agents/mcp"; export class TodomatorMCP extends McpAgent { server = new Server({ name: "todomator", version: "1.0.0", }, { capabilities: { tools: {} } }); async init() { this.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [ { name: "create_task", description: "Create a new task in Todomator", inputSchema: { type: "object", properties: { name: { type: "string" }, folderid: { type: "string" }, statusid: { type: "string", default: "pending" }, tags: { type: "array", items: { type: "string" } }, }, required: ["name"], }, }, // ... more tools ], })); } } ``` ### Build Phases #### Phase 1: Core (Week 1-2) 1. Scaffold Worker + Frontend projects 2. Implement 4 Think agents with basic system prompts 3. Set up multi-workspace UI with workspace switcher 4. Dark mode theming 5. Basic thread management (create, switch) #### Phase 2: Tools (Week 3-4) 1. Todomator MCP server + client tools 2. OpenFiles MCP server + client tools 3. Second-Brain integration 4. Tool UI components (generative) #### Phase 3: Voice (Week 5-6) 1. Voice mode UI panel 2. STT/TTS integration with @cloudflare/voice 3. Voice input/output for all agents #### Phase 4: Polish (Week 7-8) 1. Thread persistence and management 2. Error handling and edge cases 3. Performance optimization 4. Documentation ### Environment Variables ```sh # Worker (.dev.vars) OPENAI_API_KEY=sk-... TODOMATOR_API_URL=https://todomator.example.com TODOMATOR_API_KEY=... OPENFILES_API_URL=https://openfiles.example.com OPENFILES_API_KEY=... SECONDBRAIN_API_URL=https://secondbrain.example.com SECONDBRAIN_API_KEY=... # Frontend (.env.local) NEXT_PUBLIC_AGENT_HOST=http://localhost:8787 ```

Tags: project-amy, implementation-plan, detailed, v1, project:amy, kind:semantic — Source: claude — 2026-07-04 11:48:59 UTC

Connected memories

What would you like to do next?