If I wasn’t at Anthropic, I would be making agents using the Claude Code SDK.
But doing > talking. So I’m building in public and open sourcing a local email agent.
This is part one on agentic search.
First, why the Claude Code SDK?
Whenever I’ve built an agent in the past I ended up hand rolling the same patterns that are now just way easier to use the Claude Code SDK.
In this example I’m using it for subagents, context management, the file system & code generation.
Building Context
Email has a ton of context on me. My ideal agent should be able to (with permission):
- Know info about me like my address, phone number, etc
- Write intros based on the context I have with contacts
- Find all relevant emails to draft a response
Previous generation LLMs would use RAG to find relevant emails to put into context.
RAG is fast, but noisy and hard to maintain. In this case, I would have to index my entire inbox and keep it up to date with each email.
imo this is why a lot of lastgen AI email didn't work
With the Claude Code SDK you can use Agentic Search.
Instead of passing it in a fixed context, you let it search your inbox like a human would (e.g. by email addresses and text) to find and build its context
I have a search subagent that can search my inbox, but here’s the twist-
Instead of the tool call returning an array of emails, it writes it to a log file and then it uses grep to search across these files.
This performed way better and is super easy with the SDK.
What does this mean? I can get my agent to build a profile for me from scratch just by agentically searching my inbox.
This is what that looks like right now, it honestly surprised me by how much it was able to find.
Open source repo coming soon!
• • •
Missing some Tweet in this thread? You can try to
force a refresh
Believe it or not, every video you see below was vibe coded by Claude Code.
🧵 here’s how you can do it too:
The UI videos are all powered by Remotion ()- a library for creating videos using React.
And Claude Code is great at writing code for Remotion! remotion.dev
Just take your UI library components, pop them into your remotion codebase and ask Claude Code to make compositions that use them.
An additional benefit of making videos with Remotion is that they can easily be scaled to different screen sizes, copy can be changed and internationalized quickly.
I'm excited to share LatentLit, the result of my applied AI research fellowship with @GoodfireAI
Mechanistic interpretability isn’t just important for AI safety, it also gives us new ways to steer and interact with LLMs.
In LatentLit, you write stories by like a DJ might make music, adjusting knobs and dials using steering and seeing what effect they have. You might call it Vibe Writing.