Thariq Profile picture
Sep 17 7 tweets 3 min read Read on X
Making an Email Agent using the Claude Code SDK

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 Image
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 Image
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.Image
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! Image

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Thariq

Thariq Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @trq212

Aug 7
It's maddening that we're creating real time AI game engines, but there aren't any actual AI games.

🧵 here's my take as an ex-gaming founder on why
People don't want generative slop.

The edge that games have over other media is achievement.

As Tiktok increasingly offers the best ratio of effort to dopamine, games need to lean into achievement and mastery.

In an infinitely generated world, where do you find the mastery?
Creation is Fun

Is Claude Code an AI video game? I've had several people make that claim to me.

It's easy to learn and hard to master. It rewards you with joyful output.

It feels more like riding a horse than turning on an oven.
Read 6 tweets
Jul 22
Use Claude Code as your Video Editor

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.
Image
Read 6 tweets
Jul 14
Claude Code is All You Need

When I first joined Anthropic I was surprised to learn that lots of the team used Claude Code as a general agent, not just for code.

I’ve since become a convert! I use Claude Code to help me with almost all the work I do now, here’s how:
Why?

In Claude Code Everything is a File, and it knows how to use your computer like you do.

Name your files well, and CC will be able to search them like you would.

This lets you make custom setups for memory, todos, journals, screenshots and more.
Here’s, my setup:

I use Mac OSX and run Claude Code in my home directory (~).

I have a that tells it how to access important directories in my folder.

I have different folders for memory, journals, ideas, code, to dos, memes, and scripts. Claude.MDImage
Read 8 tweets
Mar 13
✨ New AI Interfaces powered by Interpretability

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.

Try it out here!

latentlit.goodfire.aiImage
Our neural map highlights features like "Supernatural Discovery" and connects them to specific text passages they influence.

Each colored bubble in the neural map represents a feature the model activates. The bigger the bubble, the stronger the influence.

Hovering over these features will highlight where in the text this feature was activated most strongly.
Read 4 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(