今日已更新 228 条资讯 | 累计 30272 条内容
关于我们

标签:#ha

找到 11527 篇相关文章

AI 资讯

Show HN: Agent in 9 Lines Python

I asked myself: what would a minimal implementation of an agent look like? Something that works out of the box, is a real agent with tool calling, but without 1000s of lines of code, without dozens or hundreds of npm or pypi dependencies. Something with just a few 'essential' features (not a whole kitchen sink that most agent harnesses come with nowadays). An implementation close to pseudocode that you can look at in one page, everything there at a glance, no scrolling. This is the agent.py I en

2026-07-22 原文 →
开发者

I almost forgot Samsung’s Z Flip 8 was a foldable

Samsung's new Galaxy Z Flip 8 feels more like a regular phone than ever. It's thinner, lighter, and has a front screen you can do just about anything on. Whether that's a good or bad thing, I'm not quite sure yet. I spent three hours with Samsung's newest flip phone last week, and it doesn't […]

2026-07-22 原文 →
AI 资讯

Samsung’s Galaxy Watch 9 and Ultra 2 bet big on battery

It's a year of refinement for the Galaxy Watch. With the new Galaxy Watch 9 and Galaxy Watch Ultra 2, which are being announced today, Samsung is more or less taking what people like about its watches and tweaking those elements to be better. The company has been doing this for the past few generations […]

2026-07-22 原文 →
AI 资讯

Samsung’s wider Z Fold 8 feels just right

A year after overhauling its Z Fold phone with a radically thinner design, Samsung has changed things up again, this time altering the shape entirely. The Z Fold 8 is wider than any of Samsung's previous foldables, and shorter too, a size and shape somewhere between Samsung's traditional Flip and Fold models. In photos, I […]

2026-07-22 原文 →
AI 资讯

Samsung’s newest foldable finally feels Ultra

While we wait for Apple's rumored foldable iPhone, Samsung is polishing a design it already has on the market. I just spent three hours with my hands on the new Z Fold 8 Ultra, and all I can think about is how Samsung finally made the crease invisible. Samsung says it achieved this thanks to […]

2026-07-22 原文 →
AI 资讯

Understanding Middleware in Deep Agents (With Runnable Examples)

If you've built even a simple AI agent, you've probably noticed that the "agent loop" itself is deceptively simple: the model gets a message, decides whether to call a tool, gets the result back, and repeats until it has an answer. But real-world agents need a lot more than that bare loop to actually work well. What happens when a conversation gets so long it blows past the model's context window? What if a tool call gets interrupted halfway through and leaves your message history in a broken state? What if you want the agent to keep a running todo list of what it's working on, or delegate parts of a task to a specialized sub-agent, or read and write files as part of its job? You could bolt all of this onto your agent manually. Or, if you're using Deep Agents, you get most of it for free through something called middleware . This post walks through what middleware actually is, why Deep Agents ships with a default stack of it, and how each piece behaves, with runnable code for each one so you can see it working instead of just reading about it. So What Is Middleware, Really? If you've done any web development, the term "middleware" probably already rings a bell. It's the same idea here. Middleware is code that sits around the core agent loop and gets a chance to run before or after certain things happen, like before a tool call executes, after the model responds, or right before messages are sent to the model. Instead of writing all of this logic directly inside your agent, you attach separate, independent pieces of middleware that each handle one specific concern. This matters for two reasons: You don't have to build common behaviors from scratch. Things like managing a todo list, summarizing long conversations, or handling file access are problems almost every non-trivial agent runs into. Deep Agents ships default middleware for these so you don't reinvent them every time. You can customize behavior without touching the agent's core logic. Need a custom summarizati

2026-07-22 原文 →