Files
deepagentsjs/examples/memory
Christian Bromann c648cd67b5 feat(deepagents): add MemoryMiddleware for AGENTS.md support (#123)
* feat(deepagents): add MemoryMiddleware for AGENTS.md support

Port of langchain-ai/deepagents#646 to TypeScript.

Adds MemoryMiddleware that loads persistent context from AGENTS.md files
following the agents.md specification. Unlike skills (which are on-demand),
memory is always loaded at agent startup and injected into the system prompt.

Changes:
- Add createMemoryMiddleware in middleware/memory.ts
- Add `memory` parameter to createDeepAgent for automatic middleware setup
- Export MemoryMiddleware from package index
- Add unit tests for memory loading and prompt injection

Usage:
const agent = createDeepAgent({
  memory: [
    "~/.deepagents/AGENTS.md",
    "./.deepagents/AGENTS.md",
  ],
});

* add example
2026-01-16 10:53:39 -08:00
..