# Letta Code Action - YouTube Video Script **Target Length**: 6-8 minutes **Style**: Talking points (not word-for-word) --- ## HOOK (0:00 - 0:30) **Key points:** - AI coding assistants today are stateless - they forget everything - Imagine an AI that actually remembers your past conversations - That's what Letta Code Action does - persistent AI agents in GitHub **Suggested opener:** > "What if your GitHub issues had an AI that remembered everything you ever talked about?" --- ## THE PROBLEM (0:30 - 1:30) **Points to hit:** - Every time you use Copilot in issues, it starts fresh - You waste time re-explaining context constantly - "Remember when we discussed the auth system?" "No, what auth system?" - Traditional bots are stateless by design **Visual:** Show a generic AI response that clearly doesn't know context --- ## INTRODUCING LETTA CODE ACTION (1:30 - 2:30) **Key points:** - Open source GitHub Action - Mention `@letta-code` in any issue or PR - **THE MAGIC**: Same agent resumes across conversations - Agent ID stored in comment metadata - it knows who it is **Visual:** - Show the repo briefly (github.com/letta-ai/letta-code-action) - Point out the agent link in a comment footer --- ## DEMO PART 1: First Contact (2:30 - 3:30) **What to do:** 1. Show this demo repo (demo-todo-api) 2. Quick tour: "Simple Todo API, Express, TypeScript" 3. Create a new issue 4. Type: `@letta-code can you explain how the authentication middleware works in this API?` 5. Wait for response (or use pre-recorded) **Points to make:** - Agent explores the codebase autonomously - Gives a real answer based on the actual code - Notice the agent link in the footer --- ## DEMO PART 2: The Memory Test (3:30 - 4:30) **What to do:** 1. In the SAME issue, add a new comment 2. Type: `@letta-code I think there's a bug in there. Can you find it?` 3. Show the response **Points to make:** - Notice: "I didn't say WHAT or WHERE" - Agent remembers we were talking about auth middleware - It finds the case-sensitivity bug - This is the persistence in action --- ## DEMO PART 3: Building on Context (4:30 - 5:30) **What to do:** 1. Still in the same issue 2. Type: `@letta-code now can you add input validation to the POST endpoint?` 3. Show the agent's response/PR creation **Points to make:** - Agent knows the full context now - Doesn't need re-explanation of the codebase - Can create PRs directly with fixes - Memory compounds over time --- ## HOW IT WORKS (5:30 - 6:15) **Quick technical overview:** - Agent ID embedded in HTML comment (show example) - When you mention again, it extracts the ID - Resumes the same agent with full memory - Built on Letta's stateful agent framework **Keep it brief** - don't go too deep, link to docs --- ## SETUP (6:15 - 6:45) **Show the workflow file:** ```yaml - uses: letta-ai/letta-code-action@main with: letta_api_key: ${{ secrets.LETTA_API_KEY }} ``` **Points:** - That's basically it - Get API key from Letta - Add to repo secrets - Works on issues and PRs --- ## CLOSING (6:45 - 7:15) **Key takeaways:** - Persistent AI agents that remember context - Open source - see exactly how it works - This is what agentic AI actually looks like **CTA:** - Link in description - Star the repo - Try it on your own projects - Subscribe for more AI coding tool breakdowns --- ## B-ROLL SUGGESTIONS - GitHub issues interface - Code scrolling (auth.ts, todos.ts) - Terminal running the API - Letta logo/branding - Agent link in comment footer --- ## PREPARED COMMENTS FOR DEMO Copy-paste these during recording: **Comment 1:** ``` @letta-code can you explain how the authentication middleware works in this API? ``` **Comment 2:** ``` @letta-code I think there might be a bug in the auth middleware. Can you review it and find any issues? ``` **Comment 3:** ``` @letta-code nice find! Can you also check if there are any input validation issues in the routes? ``` **Comment 4 (optional - PR creation):** ``` @letta-code can you create a PR that fixes the auth bug and adds input validation? ``` --- ## KNOWN "BUGS" FOR DEMO The agent should find these: 1. **Auth middleware** (`src/middleware/auth.ts`): - Case-sensitive token comparison - Should use `.toLowerCase()` for comparison 2. **Todo routes** (`src/routes/todos.ts`): - No input validation on POST /todos - Title could be empty, undefined, or wrong type - No try/catch error handling --- ## TIMING CHECKLIST - [ ] Hook grabs attention in first 10 seconds - [ ] Problem explanation under 1 minute - [ ] Demo is the meat (3+ minutes) - [ ] Setup section is quick (<30 seconds) - [ ] Total runtime: 6-8 minutes