AWS

Organization profile

AWS

Articles written by current and past AWS Developer Advocates to help people interested in building on AWS. Opinions are each author's own.

Articles by @aws

Browse the latest writing surfaced through DevArt.

Self-Improving AI Agents: Turn Repeated Reasoning Into Tools the Agent Writes Itself
#ai#programming#tutorial#python

Self-Improving AI Agents: Turn Repeated Reasoning Into Tools the Agent Writes Itself

A static AI agent re-reasons the same kind of task from scratch every time, burning tokens and sometimes getting it wrong differently on each run. A self-improving agent solves it once, writes a small verified tool, and reuses that tool exactly from then on. The catch worth knowing up front: writing the tool costs more tokens than one-off reasoning. The payoff is correctness and reuse, not a smaller bill.

5 reactions0 commentsRead full article
How to Stop Prompt Injection in AI Agents That Read Untrusted Content
#ai#programming#tutorial#python

How to Stop Prompt Injection in AI Agents That Read Untrusted Content

When an AI agent reads untrusted content (a web page, a document, an email), a hidden instruction can ride in, get stored in the agent's own memory, and fire in a later session to exfiltrate data. This persistent form of prompt injection is called memory poisoning, and a better prompt won't stop it. The reliable defense is a deterministic gate on the dangerous action, at the tool boundary.

14 reactions0 commentsRead full article
Stop AI Agent Hallucinations: Validate Before the Agent Writes to Memory
#ai#programming#tutorial#python

Stop AI Agent Hallucinations: Validate Before the Agent Writes to Memory

When an AI agent hallucinates a fact, the real damage starts when it writes that fact to memory and re-reads it as trusted context every session after, compounding the error and the token cost. Stopping it isn't a prompting problem. It's a deterministic check that validates what the agent is about to write, so a bad fact never becomes a permanent memory.

11 reactions0 commentsRead full article
AWS developer articles | DevArt