What are Claude Managed Agents?
Claude Managed Agents is Anthropic's hosted platform for running autonomous AI agents. Launched in April 2026, it lets you define agents with custom tools, instructions, and MCP servers — then run them via API without managing infrastructure.
But Managed Agents start every session from scratch. They don't remember past conversations, user preferences, or lessons learned. That's where Mengram comes in.
Why agents need memory
Without memory, your agent:
- Asks the same onboarding questions every session
- Repeats mistakes it already solved
- Can't personalize responses based on past interactions
- Loses context between runs — each session is isolated
With Mengram, your agent gets 3 types of memory:
- Semantic — facts, preferences, knowledge ("uses Python, deploys to Railway")
- Episodic — events and outcomes ("deployment crashed on March 5, fixed by adding migrations")
- Procedural — workflows that evolve from failures ("deploy v3: build → migrate → check memory → push")
Connect Mengram to Managed Agents
Managed Agents support remote MCP servers via HTTP transport. Mengram's cloud MCP endpoint works out of the box.
Step 1: Get a Mengram API key
Sign up at mengram.io — it's free. You'll get an API key starting with om-.
Step 2: Add Mengram as an MCP server
In your Managed Agent definition, add Mengram's MCP endpoint:
{{
"name": "my-agent",
"model": "claude-sonnet-4-6",
"instructions": "You are a helpful assistant with persistent memory.",
"mcp_servers": [
{{
"type": "url",
"name": "mengram",
"url": "https://mengram.io/mcp/sse"
}}
],
"tools": [
{{"type": "agent_toolset_20260401"}},
{{"type": "mcp_toolset", "mcp_server_name": "mengram"}}
]
}}
Step 3: Store your API key in a vault
Managed Agents use vaults for secrets. Create a vault, add your Mengram API key as a static_bearer credential, then reference the vault when creating a session:
import anthropic
client = anthropic.Anthropic()
# Create a vault for this user
vault = client.beta.vaults.create(display_name="My User")
# Add Mengram API key as a credential
client.beta.vaults.credentials.create(
vault_id=vault.id,
display_name="Mengram Memory",
auth={{
"type": "static_bearer",
"mcp_server_url": "https://mengram.io/mcp/sse",
"token": "om-your-mengram-api-key",
}},
)
# Create a session — Anthropic injects the token automatically
session = client.beta.sessions.create(
agent=agent.id,
vault_ids=[vault.id],
)
What your agent gets
Once connected, your Managed Agent has access to 29 memory tools:
| Tool | What it does |
|---|---|
remember | Save conversation to memory — auto-extracts facts, events, procedures |
recall | Semantic search through past memories |
search_all | Unified search across all 3 memory types |
context_for | Get relevant context pack for a specific task |
list_procedures | Retrieve learned workflows with success/failure tracking |
procedure_feedback | Report outcomes — procedures evolve automatically on failure |
reflect | Trigger AI reflection to find patterns across memories |
Plus 22 more — entity management, knowledge graph, triggers, dedup, import/export, and more. Full tool reference.
Mengram vs Anthropic's Memory Stores
Managed Agents have built-in Memory Stores (research preview). Here's how they compare:
| Feature | Mengram | Memory Stores |
|---|---|---|
| Memory types | 3 (semantic + episodic + procedural) | 1 (text documents) |
| Auto-extraction from conversations | ✅ | ❌ (manual text) |
| Procedural learning (evolving workflows) | ✅ | ❌ |
| Cognitive Profile | ✅ | ❌ |
| Knowledge graph | ✅ | ❌ |
| Semantic search | ✅ | ✅ |
| Multi-user isolation | ✅ | Per-agent only |
| Works beyond Anthropic | ✅ (any LLM) | ❌ (Managed Agents only) |
| Status | Production | Research preview |
Memory Stores are simple text documents — you manually write and retrieve text. Mengram automatically extracts structured knowledge from conversations and builds a knowledge graph, cognitive profiles, and self-improving procedures.
Example: Support agent with memory
import anthropic
client = anthropic.Anthropic()
# Create an agent with Mengram memory
agent = client.agents.create(
name="support-agent",
model="claude-sonnet-4-6",
instructions="You are a customer support agent with persistent memory. "
"At the start of each conversation: "
"1) Use recall() to search for the customer's past interactions. "
"2) Use context_for() to get relevant procedures and knowledge. "
"After resolving issues: "
"1) Use remember() to save the conversation. "
"2) Use procedure_feedback() to report success/failure. "
"This way you learn from every interaction and never ask the same question twice.",
mcp_servers=[
{{
"type": "url",
"name": "mengram",
"url": "https://mengram.io/mcp/sse"
}}
],
tools=[
{{"type": "agent_toolset_20260401"}},
{{"type": "mcp_toolset", "mcp_server_name": "mengram"}}
]
)
# Store Mengram API key in a vault
vault = client.beta.vaults.create(display_name="Customer")
client.beta.vaults.credentials.create(
vault_id=vault.id,
display_name="Mengram Memory",
auth={{
"type": "static_bearer",
"mcp_server_url": "https://mengram.io/mcp/sse",
"token": "om-your-mengram-api-key",
}},
)
# Run a session — vault injects the API key automatically
session = client.beta.sessions.create(
agent=agent.id,
vault_ids=[vault.id],
)
# Send a message
turn = client.beta.turns.create(
agent_id=agent.id,
session_id=session.id,
messages=[{{
"role": "user",
"content": "I'm having trouble with my deployment again"
}}]
)
# Agent automatically recalls past deployment issues from Mengram
# and uses learned procedures to help
Pricing
Mengram's free tier includes 30 memory adds and 100 searches per month — enough to prototype and test. Paid plans start at $5/month (Starter) with 100 adds and 500 searches. See all plans.
Get started
- Get a free API key at mengram.io
- Add the MCP config to your Managed Agent definition
- Store your API key in a vault
- Your agent now has persistent memory across sessions
Full documentation: Managed Agents integration guide · MCP server reference · Agent memory concepts