Building a Memory System for No-Code Agent Development

langchain · Tech · 2026 · source Agentic: yes · promotional bias: med · source-backed · extracted with prompt 0.5.4 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: No-code agent memory

LangChain needed LangSmith Agent Builder agents to improve across repeated task sessions without requiring citizen developers to manually edit complex agent configuration or repeat preferences every time.

Constraints:

Architecture

LangSmith Agent Builder represents agent memory as files exposed through a virtual filesystem. Procedural memory lives in AGENTS.md and tools.json, semantic memory lives in agent skills and other knowledge files, and subagents follow a Claude Code-like convention. The files are stored in Postgres but exposed to the agent as a filesystem because models work well with files. Deep Agents supplies the harness for planning, summarization, and tool-output offloading. Memory edits happen in the hot path, pass schema validation where needed, and require explicit human approval unless users enable a riskier yolo mode.

Diagram confidence: explicit (topology described by the source).

flowchart LR
  langsmith-agent-builder[LangSmith Agent Builder] --> deep-agents-harness[Deep Agents harness]
  deep-agents-harness --> agent-runtime[Agent runtime]
  agent-runtime --> virtual-filesystem-memory[Virtual filesystem memory]
  postgres-storage[Postgres storage] --> virtual-filesystem-memory
  virtual-filesystem-memory --> agents-md[AGENTS.md]
  virtual-filesystem-memory --> tools-json[tools.json]
  virtual-filesystem-memory --> agent-skills[Agent skills]
  virtual-filesystem-memory --> subagent-files[Subagent files]
  virtual-filesystem-memory --> knowledge-files[Knowledge files]
  agent-runtime --> validation-step[Validation step]
  tools-json --> validation-step
  agent-skills --> validation-step
  validation-step --> human-approval-gate[Human approval gate]
  human-approval-gate --> virtual-filesystem-memory
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
LangSmith Agent Builder Hosted no-code interface for building task-specific agents. Deep Agents harness, Virtual filesystem memory
Deep Agents harness Generic agent runtime that handles context engineering, summarization, tool-result offloading, planning, and virtual filesystem support. LangSmith Agent Builder, Virtual filesystem memory, Agent runtime
Agent runtime Executes the configured agent, reads memory files, and proposes memory edits during work. Deep Agents harness, Virtual filesystem memory, Validation step, Human approval gate
Virtual filesystem memory Filesystem-shaped memory exposed to the agent while stored in database infrastructure. Postgres storage, AGENTS.md, tools.json, Agent skills, Subagent files, Knowledge files
Postgres storage Database-backed storage layer for memory files. Virtual filesystem memory
AGENTS.md Procedural memory for core agent instructions and accumulated behavior preferences. Virtual filesystem memory, Agent runtime
tools.json Custom MCP tool-access file that can expose only a subset of server tools to reduce context overflow. Virtual filesystem memory, Agent runtime, Validation step
Agent skills Specialized semantic-memory instructions for task-specific behaviors. Virtual filesystem memory, Agent runtime, Validation step
Subagent files Claude-Code-like subagent definitions for delegated workers. Virtual filesystem memory, Agent runtime
Knowledge files Arbitrary domain knowledge files that the agent can reference and update. Virtual filesystem memory, Agent runtime
Validation step Checks schemas for files like tools.json and skills before memory changes are committed. Agent runtime, tools.json, Agent skills, Human approval gate
Human approval gate Requires explicit user approval before memory edits are applied, with an optional yolo mode. Agent runtime, Validation step, Virtual filesystem memory

Data flow

A builder creates an agent through LangSmith Agent Builder. The agent runs on the Deep Agents harness and reads its virtual filesystem memory: AGENTS.md for core instructions, tools.json for selected MCP tools, skills and knowledge files for semantic context, and optional subagent files. During work, the agent proposes edits to those files based on user corrections or task discoveries. Custom file shapes are validated; failures are returned to the LLM rather than committed. Approved edits update Postgres-backed memory and affect future sessions.

4 supporting quotes
“We represent memory in Agent Builder as a set of files. This is an intentional choice to take advantage of the fact that models are good at using filesystems.”article, stated
“Rather, we store them in Postgres and expose them to the agent in the shape of a filesystem. We do this because LLMs are great at working with filesystems, but from an infrastructure perspective it is easier and more efficient to use a database.”article, stated
“The agent would edit these files as it’s working, “in the hot path”.”article, stated
“We added a step to explicitly validate these custom shapes, and, if validation failed, throw any errors back to the LLM instead of committing the file.”article, stated

Why this architecture

LangChain chose file-shaped memory because LLMs are good at using filesystems and no-code builders can understand Markdown/JSON better than a custom DSL. Storing those files in Postgres gives infrastructure efficiency while preserving an agent-friendly interface. Human approval and validation control the risks of invalid memory and prompt injection.

3 supporting quotes
“This is an intentional choice to take advantage of the fact that models are good at using filesystems.”article, stated
“LLMs are great at working with filesystems, but from an infrastructure perspective it is easier and more efficient to use a database.”article, stated
“By representing the agent as markdown and json files, the agent is now in a format that (a) is familiar to most technically-lite people, (b) more scalable.”article, stated

Models used: Deep Agents · LangSmith Agent Builder agents · LLMs capable of filesystem-style context editing

Scale

Alternatives considered (roads not taken)

Launch without memory

Rejected because: Task-specific agents repeat the same workflow often, so users would otherwise need to repeat preferences across sessions.

“This was not an obvious choice – most AI products launch initially without any form of memory, and even adding it in hasn’t yet transformed products like some may expect.”article, stated
“it would be a bad user experience if memory is not present – that would mean you would have to repeat yourself over and over to the agent in different sessions.”article, stated

Use a real filesystem as the storage layer

Rejected because: The team wanted the model-facing shape of a filesystem but the operational efficiency and pluggability of database storage.

“We actually do not use a real filesystem to store these files. Rather, we store them in Postgres and expose them to the agent in the shape of a filesystem.”article, stated

Expose full MCP server configuration through mcp.json

Rejected because: A full MCP server can expose too many tools, so Agent Builder uses tools.json to give only a subset of tools and avoid context overflow.

“The reason we use a custom tools.json file and not the standard mcp.json is that we want to allow users to give the agent only a subset of the tools in an MCP server to avoid context overflow.”article, stated

Commit generated memory files directly

Rejected because: Agents sometimes generated invalid custom files, so invalid files are returned to the LLM instead of committed.

“We saw that Agent Builder sometimes forgot this, and as a result generated invalid files. We added a step to explicitly validate these custom shapes, and, if validation failed, throw any errors back to the LLM instead of committing the file.”article, stated
“We added a step to explicitly validate these custom shapes, and, if validation failed, throw any errors back to the LLM instead of committing the file.”article, stated

Let memory update automatically by default

Rejected because: Prompt injection risk made explicit human approval the safer default, with yolo mode reserved for lower-risk cases.

“We made all edits to memory human-in-the-loop – that is, we require explicit human approval before updating. This was largely done to minimize the potential attack vector of prompt injection.”article, stated
“This was largely done to minimize the potential attack vector of prompt injection. We do expose a way for users to turn this off (”yolo mode”) in cases where they aren’t as worried about this.”article, stated

Patterns

agent-memory (agent_architecture)

Agent Builder stores procedural and semantic memory as editable files that the agent reads and updates across repeated workflow sessions.

“We represent memory in Agent Builder as a set of files.”article, stated
“Procedural memory – what drives the core agent directive – is AGENTS.md and tools.json.”article, stated

context-compaction (context_management)

Deep Agents abstracts summarization and tool-result offloading, and the memory lessons explicitly identify compaction as a needed behavior.

“Deep Agents abstracts away a lot of complex context engineering”article, stated
“Agents were editing their memory as they worked. They were pretty good at adding specific things to files. One thing they were not good at, however, was realizing when to compact learnings.”article, stated

structured-output-contract (validation)

Custom memory files have expected schemas or frontmatter, and Agent Builder validates them before committing edits.

“Several files have specific schemas they need to abide by (tools.json needs to have valid MCP servers, skills needs to have proper frontmatter, etc).”article, stated
“We added a step to explicitly validate these custom shapes”article, stated

human-in-the-loop-gate (control)

Every memory edit requires explicit human approval by default to reduce prompt-injection risk.

“We made all edits to memory human-in-the-loop – that is, we require explicit human approval before updating.”article, stated
“This was largely done to minimize the potential attack vector of prompt injection.”article, stated

tool-use-orchestration (agent_architecture)

tools.json scopes MCP tool access, and Deep Agents provides the runtime for tool use without a custom no-code DSL.

“For MCP access, we use a custom tools.json file.”article, stated
“The reason it is possible to build complicated agents without any code or any domain specific language (DSL) is that we use a generic agent harness like Deep Agents under the hood.”article, stated

prompt-versioning (prompt_operations)

AGENTS.md accumulates user corrections into durable instruction files, turning iterative natural-language feedback into updated agent specification.

“The AGENTS.md built itself through corrections, not through upfront documentation.”article, stated
“The hardest part of building an agent that could remember things is prompting.”article, stated

Tradeoffs

Prioritize memory in the first Agent Builder experience

Chose Cross-session file-based memory over Launching initially without memory.

Rationale: Task-specific agents repeat the same work, so preferences learned in one session are much more likely to apply to the next.

“Early on we made a conscious choice to prioritize memory as a part of the platform.”article, stated
“When a LangSmith Agent is doing a task, it is doing the same task over and over again. Lessons from one session translate to the next at a much higher rate.”article, stated

Expose database-backed memory as files

Chose Postgres-backed virtual filesystem over A real filesystem or specialized memory API.

Rationale: LLMs work well with filesystem metaphors, while database storage is easier and more efficient operationally.

“We actually do not use a real filesystem to store these files. Rather, we store them in Postgres and expose them to the agent in the shape of a filesystem.”article, stated
“LLMs are great at working with filesystems, but from an infrastructure perspective it is easier and more efficient to use a database.”article, stated

Leave episodic memory out of the initial launch

Chose Procedural and semantic memory first over Adding episodic memory before launch.

Rationale: The team judged episodic memory less important for these task-specific agents and deferred it to future work.

“The only type of memory missing is episodic memory, which we didn’t think was as important for these types of agents as the other two.”article, stated
“The one COALA memory type Agent Builder is missing is episodic memory: sequences of the agent’s past behavior.”article, stated

Require human approval for memory edits

Chose Human-in-the-loop memory updates over Automatic memory writes by default.

Rationale: The safer default reduces prompt-injection risk, while yolo mode lets lower-risk users opt out.

“We made all edits to memory human-in-the-loop – that is, we require explicit human approval before updating.”article, stated
“We do expose a way for users to turn this off (”yolo mode”) in cases where they aren’t as worried about this.”article, stated

Gotchas (what bit them)

Prompting memory behavior was the hardest part.

Root cause: The agent needed nuanced rules for when to remember, where to write memory, and how to format specialized files.

Resolution: Invest dedicated prompting effort and refine prompts for remembering, not remembering, AGENTS.md usage, and skills-file formatting.

“The hardest part of building an agent that could remember things is prompting.”article, stated
“We had one person working full time on prompting for memory (which was a large percentage of the team).”article, stated

Agents generated invalid memory files.

Root cause: Files like tools.json and skills require schemas or frontmatter that the agent sometimes forgot.

Resolution: Validate custom file shapes and return validation errors to the LLM before committing.

“Agent Builder sometimes forgot this, and as a result generated invalid files.”article, stated
“if validation failed, throw any errors back to the LLM instead of committing the file.”article, stated

Agents over-add specific memories instead of compacting them.

Root cause: The agent was better at appending concrete cases than generalizing them into broader rules.

Resolution: Prompt users or future background processes to reflect, compact, and generalize memory.

“Agents were editing their memory as they worked. They were pretty good at adding specific things to files. One thing they were not good at, however, was realizing when to compact learnings.”article, stated
“it useful to prompt the agent explicitly to manage its memory. One such case was at the end of its work to reflect on the conversation and update its memory”article, stated

Full MCP server exposure can overflow context.

Root cause: An MCP server may expose more tools than the agent needs for a workflow.

Resolution: Use a custom tools.json to expose only selected tools.

“we want to allow users to give the agent only a subset of the tools in an MCP server to avoid context overflow.”article, stated

Automatic memory editing expands prompt-injection risk.

Root cause: Memory updates can persist malicious or unwanted instructions if accepted blindly.

Resolution: Require explicit human approval for all memory edits by default.

“We made all edits to memory human-in-the-loop – that is, we require explicit human approval before updating.”article, stated
“This was largely done to minimize the potential attack vector of prompt injection.”article, stated

Evaluation

The article reports qualitative development evaluation through prompt debugging, schema validation, user corrections, and observed failure modes rather than a numeric benchmark suite.

Metrics: whether the agent remembers when it should · whether the agent avoids remembering when it should not · whether AGENTS.md, skills, and tools.json are edited in the right formats · validation pass/fail for custom memory files · human approval of proposed memory edits

4 supporting quotes
“Examples of issues that were solved this way:”article, stated
“The agent was not remembering when it should”article, stated
“The agent did not know the right format for skills files”article, stated
“We added a step to explicitly validate these custom shapes”article, stated

Outcomes

The source provides product and example scale rather than deployment counts: a LinkedIn recruiter subagent sources about 50 candidates, an example memory folder has three job-description files, and one team member worked full time on memory prompting.

3 supporting quotes
“you can just give feedback in natural language and it will update itself.”article, stated
“By representing the agent as markdown and json files, the agent is now in a format that (a) is familiar to most technically-lite people, (b) more scalable.”article, stated
“Files are very portable! This allows you to easily to port agents built in agent builder to other harnesses”article, stated