Shared memory for Pydantic Graph
Pydantic Graph lets you define agent and workflow logic as typed nodes connected into a graph, with state passed between nodes as strongly typed Python objects. The type safety is a real advantage: your graph's state is validated, predictable, and easy to reason about within a run. But that state is run-local. The durable facts your graphs should accumulate across executions, what a node learned about an entity, a decision a branch made, a result worth remembering, are not part of the typed state machine, and nothing one graph learns is visible to another. Glen, shared memory for AI agents, gives your Pydantic Graph workflows that long-term shared layer as a single MCP tool.
Expose Glen over MCP and any node in a Pydantic Graph can call one tool that retrieves relevant long-term context and records new facts in a single round trip, sitting alongside the typed state that flows between your nodes. The typed state captures the shape of the current run; Glen captures the durable knowledge that should outlive it and be shared with every other graph. A node can read what the organization already knows before it decides which edge to follow, and a later node can write back what the run concluded, so you get persistent memory without hand-building a store, an embedding pipeline, and a write path beside your graph.
Because Glen is org-scoped, that memory spans every Pydantic Graph workflow, every deployment, and every other agent in your organization, rather than living and dying with a single typed state object. One graph learns a durable fact; another graph, or an agent built on a different framework, reads it the next time it runs. That cross-run, cross-agent persistence is the piece a typed-but-run-local state machine does not provide. And because Glen is a standard MCP server, the memory your Pydantic Graph workflows write is readable from Claude Code, Cursor, or any other MCP client, so your typed Python graphs and the rest of your stack share one knowledge base. Connect it once over OAuth or an API key and let the memory compound.
FAQ
- How is Glen different from the typed state in my graph?
- Pydantic Graph's typed state is run-local: it describes the current execution. Glen is durable, org-shared memory that persists across runs and graphs, holding facts your agents accumulate over time.
- How do I call Glen from a node?
- Connect Glen as an MCP tool and invoke it from any node. The node reads relevant context before choosing an edge and records what it learned, all in one round trip.