正在加载视频...

视频加载失败

🧵 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 次观看 • 11 个月前 •via X (Twitter)

19 条评论

Thariq 的头像
Thariq11 个月前

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:

Thariq 的头像
Thariq11 个月前

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.

Thariq 的头像
Thariq11 个月前

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.

Thariq 的头像
Thariq11 个月前

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:

Farouq Aldori 的头像
Farouq Aldori11 个月前

This is so good!

NA 的头像
NA11 个月前

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

Yum⋆₊˚ 的头像
Yum⋆₊˚11 个月前

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

Thread Reader App 的头像
Thread Reader App11 个月前

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

Cat Wearing a Hat 的头像
Cat Wearing a Hat11 个月前

"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.

Jidé ✨ 的头像
Jidé ✨11 个月前

Very cool approach

Vishal Dubey 的头像
Vishal Dubey11 个月前

Thank you for sharing!

Jason Kneen 的头像
Jason Kneen11 个月前

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

Karan Jagtiani 的头像
Karan Jagtiani11 个月前

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

chaodoze 的头像
chaodoze11 个月前

@threadreaderapp unroll please

Shreyas Shinde 的头像
Shreyas Shinde11 个月前

People are getting worthwhile emails!?

Kieran Klaassen 的头像
Kieran Klaassen11 个月前

love these demos!

smol compute 的头像
smol compute11 个月前

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

take a puff dawg 的头像
take a puff dawg11 个月前

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

けーやん 的头像
けーやん11 个月前

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

相关视频

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 次观看 • 1 年前