Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

🧵 Making Proactive Agents with Code Generation Last week we shared about how you can use code generation to compose tools. But code generation can also give your agents new capabilities- like proactively acting on your behalf.

35,797 Aufrufe • vor 11 Monaten •via X (Twitter)

19 Kommentare

Profilbild von Thariq
Thariqvor 11 Monaten

In this case, I want to make an email agent that processes my emails. Running an agent on every email I receive would be slow & unpredictable, so instead I'm allowing the user to generate callbacks that are called when I get an email. Here's an example generated function:

Profilbild von Thariq
Thariqvor 11 Monaten

When doing code generation, I like to think in terms of files that execute, instead of evaluating code in a repl. Files allow Claude to verify its work, create helper scripts, etc. In my email agent, listeners are scripts in a folder that store logs as well.

Profilbild von Thariq
Thariqvor 11 Monaten

This code is all run in a sandbox. So when the user makes a request that suggests a new listener, the AI writes a listener file, the backend detects it, updates and sends over an event. Everything looks seamless to the user.

Profilbild von Thariq
Thariqvor 11 Monaten

Code generation in a sandbox powered by an agent is one of the most powerful tools for creating radically new user experiences. Look out for more content here, my next post will be about UI generation. You can see my code for the email agent here:

Profilbild von Farouq Aldori
Farouq Aldorivor 11 Monaten

This is so good!

Profilbild von NA
NAvor 11 Monaten

your tweets are the best, fascinating seeing different use cases I’ve gone through docs + repo + your tweets what’s the next best resource you recommend? who are you following/learning from? I’m interested in learning from people building with the sdk

Profilbild von Yum⋆₊˚
Yum⋆₊˚vor 11 Monaten

Really looking forward to more of your reflections on product design details, CC tools mode is really surprising

Profilbild von Thread Reader App
Thread Reader Appvor 11 Monaten

Your thread is going viral! #TopUnroll 🙏🏼@chaodoze for 🥇unroll

Profilbild von Cat Wearing a Hat
Cat Wearing a Hatvor 11 Monaten

"But code generation can also give your agents new capabilities- like proactively acting on your behalf." I am genuinely having trouble understanding how these correlate.

Profilbild von Jidé ✨
Jidé ✨vor 11 Monaten

Very cool approach

Profilbild von Vishal Dubey
Vishal Dubeyvor 11 Monaten

Thank you for sharing!

Profilbild von Jason Kneen
Jason Kneenvor 11 Monaten

Man, are you guys just using everything from my MCP Summit talk on servlets and the work I've been doing on this publically for last 5 months with and speaking on spaces, posts, code etc? The thing is you still haven't caught on to the real trick you can do which turns this up past 11....

Profilbild von Karan Jagtiani
Karan Jagtianivor 11 Monaten

Curious how you handle versioning and rollback of listener scripts in the sandbox environment?

Profilbild von chaodoze
chaodozevor 11 Monaten

@threadreaderapp unroll please

Profilbild von Shreyas Shinde
Shreyas Shindevor 11 Monaten

People are getting worthwhile emails!?

Profilbild von Kieran Klaassen
Kieran Klaassenvor 11 Monaten

love these demos!

Profilbild von smol compute
smol computevor 11 Monaten

Could you make tutorials so less technical people can try it too?

Profilbild von take a puff dawg
take a puff dawgvor 11 Monaten

Anthropic Cookbook from an year ago was goated Not these slops from recently, damn I miss the cookbook team

Profilbild von けーやん
けーやんvor 11 Monaten

シェアありがとうございます!新しい能力の可能性に驚いています。 皆さんはどんな経験がありますか? 共有しましょう!

Ähnliche Videos

New short course: Building Code Agents with Hugging Face smolagents! Learn how to build code agents in this course, created in collaboration with Hugging Face, and taught by Thomas Wolf, its co-founder and CSO, and m_ric, Hugging Face’s Project Lead on Agents. Tool-calling agents use LLMs to generate multiple function calls sequentially to complete a complex sequence of tasks. They generate one function call, execute it, observe, reason, and decide what to do next. Code agents take a different approach. They consolidate all these calls into a single block of code, letting the LLM lay out an entire action plan at once, which can be executed efficiently to provide more reliable results. You’ll learn how to code agents using smolagents, a lightweight agentic framework from Hugging Face. Along the way, you’ll learn how to run LLM-generated code safely and develop an evaluation system to optimize your code agent for production. In detail, you’ll learn: - How agentic systems have evolved, gaining greater levels of agency over time—and why code agents are a next step. - How code agents write their actions in code. - When code agents outperform function-calling agents. - How to run code agents safely in your system using a constrained Python interpreter and sandboxing using E2B. - To trace, debug, and assess the code agent to optimize its behaviours for complex requests. - How to build a research multi-agent system that can find information online and organize it into an interactive report. By the end of this course, you’ll know how to build and run code agents using smolagents, and deploy them safely with a structured evaluation system in your projects. Please sign up here!

Andrew Ng

127,724 Aufrufe • vor 1 Jahr