Konrad Kowalski (rootsher)Principal Platform & Reliability Architect011100110111101100110101001011011110110011100001

Runtime, state and memory

date
category
AI Agents
reading
2 min / 354 words

The Implementer Agent now runs the full flow:

text
ticket
|
v
clone repo
|
v
RAG
|
v
implementation
|
v
tools
|
v
tests

If everything finishes within one short session, things are simple.

But a real task can look like this:

text
implementation
|
v
tests fail
|
v
fix
|
v
needs approval
|
v
wait
|
v
continue

The agent has to keep continuity.

Managed runtime

The runtime is responsible for where and how the agent runs:

  • endpoint,
  • process/container,
  • scaling,
  • identity,
  • sessions,
  • basic tracing.

Examples:

State

State describes the current task.

Example:

json
{
  "issue": "PAY-123",
  "repository": "payments-service",
  "branch": "agent/PAY-123",
  "step": "waiting_for_approval",
  "testsPassed": true
}

This is what lets work resume.

Memory

Memory is information that is useful later too.

For example:

text
team payments requires contract-test before every PR

That is not the state of one task.

It is information that can be reused in later tasks.

Where we define what to store

Agent repo

Decides:

  • which data makes up state,
  • when to checkpoint,
  • what is worth keeping as memory.

Platform

Provides the storage mechanism.

Tools on the market

SolutionCloudRole
Foundry Agent Service state / memory capabilitiesAzuresessions and managed agent state
Azure Cosmos DBAzuredurable state, memory and semantic recall under your own control
Bedrock AgentCore MemoryAWSshort-term and long-term memory
Vertex AI Sessions / Memory BankGCPsession state and long-term memory
your own layeranymore control at the cost of more code

When you do not need an extra database

Not every agent needs Cosmos DB or a separate memory store.

If:

  • the task is short,
  • it does not come back hours later,
  • it does not need memory across sessions,

the runtime's session state may be enough.

A separate layer only shows up when we really need durability beyond a single session.

Materials

top