Skip to content

Context Engineering#

Agent Status Bar: Fresh State Before Every Decision

Your agent sees the conversation. An Agent Status Bar gives it a concise view of the current state before it decides what to do next.

Consider an assistant following up on a refund with Xfinity. The user allows three phone attempts; if nobody answers, the assistant should prepare an email for review. Between attempts, it may search for contact details, read the results, and answer the user. The conversation keeps growing. Before making another call, the model needs to recover a small fact from that growing history: how many attempts remain?

AG2 lets your application compute that fact and put it directly into the next model request:

Calls: 2/3. Attempts remaining: 1.

After the tool makes another call, the next request gets a fresh observation:

Calls: 3/3. Attempts remaining: 0.

The model now has an explicit reason to suggest another channel, such as email. The application still enforces the call limit.