---
title: "Behavioral memory for AI agents | Snowplow Signals"
description: "Give your agent behavioral memory. Signals hands it what this customer did this session, as JSON or narrative, over an API or MCP, before its first reply."
source: https://signals.snowplow.io/use-cases/customer-aware-agents
---

[Solutions](https://signals.snowplow.io/solutions) / Use case 

# Your agent remembers what the customer did, as well as what they said.

An agent that opens with a profile from before this session is guessing. Signals hands it what this customer has been doing, as JSON or narrative a model reads without a parser, before the first reply.

[Start free](https://signals.snowplow.io/start) [Talk to an engineer](https://signals.snowplow.io/start?intent=engineer) 

The real engine · no card · no sales call

![A close-up of an OUTPOST support agent's opening message, Pickup slots ran out at your store. Want next-day delivery instead?, with two reply chips below and a Signals note reading support_session, read before reply, above it.](https://signals.snowplow.io/images/products/hero-customer-aware-agents.webp)

Behavioral memory, before the first reply. the model decides what to do with it

The agent below is reading your session. 

## An agent is talking to you 

connecting 

**Agent, with Signals** reading your session 

reading your session 

Send

Show me what it read

Keyed on an anonymous session id. The agent sees this visit and nothing else. 

Why it usually fails

## The agent learns what happened from the customer. 

The CRM profile trails the session, and raw events mean nothing to a model. So the agent opens by asking what went wrong.

**Memory holds the chat**What they did before they opened it is not there.

**Raw events are not context**Thousands of rows a session, mostly noise to a model.

What you build with it

## Agents that start from what the customer just did. 

Each of these reads the session before the agent speaks, so the customer does not have to retell it.

Support 

### Shorter handle time

A customer who writes in has to explain from the start. Signals gives your agent the page they were stuck on and the error they hit, so it skips the first questions.

Shopping and booking assistants 

### Higher assisted conversion

The assistant answers from the catalog. Signals gives it what this customer compared and dropped in this visit, so it answers about those.

Proactive help 

### Fewer exits after a failed search

Help waits to be asked. A rule fires after the third failed search and opens your agent with the session in hand.

Escalation 

### Higher CSAT

Frustration shows in the chat after it has built up. Signals counts the errors this session, so your rule hands the customer to a person sooner.

What you build

## One call returns what the customer has been doing, in words or JSON. 

01 · Collect 

### Add a Snowplow SDK

Web, mobile or server. Events start flowing, validated against your schemas. No event stream to build first.

02 · Define 

### Choose what the agent should know

An agentic context holds the recent events you pick, such as pages, searches and errors. Attributes hold the counts your rules check.

03 · Read 

### Call it from your agent, or over MCP

Works with the agent you already run, on any framework that can call an API. Signals supplies the context; the model decides.

![An OUTPOST support chat opened from the delivery page, where the agent reads the support_session agentic context as narrative, a summary line and an event table showing two delivery options selected and a pickup error, and opens its first reply on next-day delivery versus store pickup.](https://signals.snowplow.io/images/products/usecase-customer-aware-agents.webp)

Step by step: [Give an AI agent session context →](https://docs.snowplow.io/tutorials/signals-ai-agent-context/introduction/) The background: [AI agents and memory, explained →](https://signals.snowplow.io/learning/ai-agents-and-memory) 

Works with 
* Claude
* LangChain
* LangGraph
* LlamaIndex
* CrewAI
* OpenAI Agents SDK
* Vercel AI SDK
* Mastra
* Pydantic AI
* Google ADK
* CopilotKit
* Amazon Bedrock
* Vertex AI

The code

## The session, in the prompt, before the first reply. 

Your backend reads the agentic context as narrative for the prompt, and the service for the counts your own rules check. The model sees what happened; your code keeps the thresholds.

First, give your agent the Signals skills 

$ `npx plugins add snowplow/skills` Copy Copied 

Write it yourself

```
import { Signals } from "@snowplow/signals-node";

const signals = new Signals({
  baseUrl, apiKey, apiKeyId, organizationId,
});

// What they did this session, as text the model reads as is.
const activity = await signals.getAgenticContext({
  name: "support_session",
  identifier: sessionId,
  format: "narrative",
});

const counts = await signals.getServiceAttributes({
  name: "support_agent",
  attribute_key: "domain_sessionid",
  identifier: sessionId,
});

const system = [supportPrompt, "What this customer did before the chat:", activity].join("\n\n");
if (counts.errors_this_session >= 3) handOffToPerson(sessionId);
```

Or hand your agent this prompt

Add Snowplow Signals to this support agent so it knows what the customer did before the chat opened. Add the Node SDK, define an agentic context named support_session over page views, searches and errors, read it with getAgenticContext in narrative format, and add it to the system prompt before the first model call. Leave the agent's instructions and tools as they are, so the only thing that changes is what it knows.

An agentic context covers one session, up to the number of events or the age you set. For what a customer did in earlier visits, add attributes keyed on the user.

The feature: [Agentic context →](https://signals.snowplow.io/products/agentic-context) Full reference: [Defining agentic contexts →](https://docs.snowplow.io/docs/signals/agentic-contexts/) 

What changes

## The first reply knows what happened. 

6ms 

Read before the first reply, p50 in-region

2 shapes 

JSON for tools, narrative for prompts

1 definition 

Shared by the agent and the site it is helping with

Questions

## Before you give it to your agent

### Is this a memory framework?

No. Memory frameworks such as mem0, Zep and Letta recall what the customer said. Signals holds what the customer did, such as pages, searches, errors and time on step. They sit side by side, one for recall, one for behavior.

### Does Signals decide what the agent says?

No. Signals hands the agent what the customer is doing. What it says, and when it hands off, is your model's call and your code's.

### Which agents does it work with?

Any agent that can call an API or an MCP server. Agentic context comes back as JSON or narrative over the REST API, the Node.js or Python SDK, or the MCP server.

### How far back does it go?

An agentic context covers the current session, up to the number of events or the age you set. Attributes keyed on the user carry what happened in earlier visits.

### Do I need an event stream already?

No. Collection is part of Signals. Add a Snowplow SDK and events start flowing. If you already run Snowplow, Signals reads the pipeline you have.

### Where does it run?

Managed SaaS, or a private deployment in your own AWS or GCP account. Same architecture either way.

### Related use cases

[In-session personalizationRank against what this customer is doing in this visit, while they are still on the page.](https://signals.snowplow.io/use-cases/in-session-personalization) [Act on live behavior the moment it happensA rule that fires the moment a customer does something, or stops doing it.](https://signals.snowplow.io/use-cases/act-in-the-moment) [State for System One modelsA typed decision is only as good as the state you send it.](https://signals.snowplow.io/use-cases/system-one-models) 

## Give your agent this session before its first reply. 

Add the SDK, define an agentic context for your support surface, and read it from your agent, the same way the agent above read your visit. The free tier runs on the real engine: no card, no sales call.

[Start free](https://signals.snowplow.io/start) [Talk to an engineer](https://signals.snowplow.io/start?intent=engineer) 

Evaluating? [Build vs buy →](https://signals.snowplow.io/evaluate/build-vs-buy)
