AI Agent Retries: Why Tool Calls Loop Forever
AI agent retries: In the ReAct loop the model can call the same failing tool again and again, and every call resends the whole conversation. You decide the limit: 3, 5 or 10 calls.
266 stories
AI agent retries: In the ReAct loop the model can call the same failing tool again and again, and every call resends the whole conversation. You decide the limit: 3, 5 or 10 calls.
LangChain middleware: ToolNode only turns argument validation errors into a message the model can fix. City not found, timeouts and crashes still propagate, and that is what middleware is for.
AI agent failures: Wrong address, traffic jam, demolished house, gated community, circling the block, dispatcher down: six agent failures and who fixes each one, the model, your retry code, or nobody.
AI agent security: With a plain read-file tool and an email tool, the agent read a secret file and emailed the key. Resolving the path and refusing anything outside the workspace folder stops it: path escapes workspace, nothing sent.
prompt injection in AI agents: Indirect prompt injection: a note the agent reads with cat contains instructions to delete itself. GPT-4o ignored it this time, but models sometimes obey, so the real protection is that rm is not on the allowlist.
AI agent security: A shell tool with no limits lets the agent run rm and delete a file, as the LangSmith trace shows. An allowlist of trusted commands (pwd, date, ls, cat) blocks everything else, so the same request leaves the file alone.
AI agent sandboxing: The LLM picks the tool, but your code runs it on your laptop, so one cat on a secrets file sends your passwords to the model. Sandboxing gives the agent a box it cannot leave, like a child told never to cross into the highway.
AI agent duplicate emails: A live demo: a 'send a backup copy' prompt makes the agent email twice. With an idempotent send_email tool, the second call returns skipped_duplicate from the ledger.
AI agent idempotency: Hash the fields that make a task unique (to + body for an email, order ID + date + price + status for a refund), keep a ledger, and skip anything already done. Deterministic code controls a probabilistic LLM.
Ten small cases that run fine as Python (nine break after PyInstaller, one is a control that does not), each built onedir and onefile and launched from an empty directory: missing data files, the --add-data separator and folder trap, dynamic imports, package metadata, the wrong build environment,…
AI agent idempotency: Calling a search tool five times is harmless; calling a refund tool twice costs real money. Tool idempotency means the same task never runs twice, and you decide which tools need it.
AI agent latency: LangSmith traces show where the time goes: in one run the LLM took 2.78 s and the tool 0.14 s; in another, the web search tool was the 2.77 s bottleneck.
A step-by-step guide to transition matrices, the Chapman–Kolmogorov equation, and stationary distributions, built around a three-state writing example. The post How to Build a Markov Chain in Python With NumPy appeared first on Towards Data Science.
What a production support agent teaches about where the LLM should stopContinue reading on Towards AI »
TL;DR: a benchmark that finishes in 0.2 minutes did not run. Mine reprinted four-day-old numbers from a capture file committed to git, and I published them three times as a design trade-off.
Vercel Labs released Vercel UI SDK, an Apache-2.0 beta library of 50+ UI behaviors. Coding agents compose them into accessible components for React, Vue, Svelte, Solid and Web Components, with a bridge for direct UI control.
LangSmith tracing: Printing tokens, cost and latency by hand doesn't scale. Set LANGSMITH_TRACING=true and LangChain traces every agent.invoke in LangSmith, with no code changes.
Are we underestimating local AI models? Every time a new AI model launches, the conversation is mostly about the big hosted models. But what about the models we can run locally? Models like Qwen and Gemma are worth paying attention to.
Showing 18 of 266 stories
Load more storiesGet the top AI news and tools straight to your inbox every week.
Weekly · AI news
Join 15,000+ AI enthusiasts