[PR #89] [MERGED] feat: add SDK Skills + Memory System #108

Closed
opened 2026-02-16 06:17:10 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/deepagentsjs/pull/89
Author: @christian-bromann
Created: 1/3/2026
Status: Merged
Merged: 1/8/2026
Merged by: @christian-bromann

Base: mainHead: cb/vivek-skills-memory


📝 Commits (6)

📊 Changes

23 files changed (+3647 additions, -19 deletions)

View changed files

📝 .gitignore (+1 -1)
examples/skills-memory/skills-memory-agent.ts (+156 -0)
examples/skills/arxiv-search/SKILL.md (+84 -0)
examples/skills/arxiv-search/arxiv_search.ts (+103 -0)
examples/skills/langgraph-docs/SKILL.md (+36 -0)
examples/skills/skill-creator/SKILL.md (+100 -0)
examples/skills/skill-creator/scripts/init_skill.ts (+174 -0)
examples/skills/skill-creator/scripts/quick_validate.ts (+185 -0)
examples/skills/web-research/SKILL.md (+109 -0)
📝 package.json (+3 -2)
📝 pnpm-lock.yaml (+20 -9)
src/config.ts (+222 -0)
📝 src/index.ts (+31 -0)
src/middleware/agent-memory.ts (+267 -0)
src/middleware/skills.ts (+244 -0)
src/skills/index.ts (+19 -0)
src/skills/loader.ts (+390 -0)
📝 tests/integration/hitl.test.ts (+0 -7)
tests/integration/skills.test.ts (+279 -0)
tests/unit/config.test.ts (+259 -0)

...and 3 more files

📄 Description

This PR ports the SDK Skills + Memory System from Python PR #646 to TypeScript, enabling agents to discover and use specialized skills and maintain long-term memory across sessions.

What's New

🧠 Agent Memory

Agents can now persist and recall information through agent.md files:

  • User-level memory (~/.deepagents/{agent}/agent.md) - Personal preferences across all projects
  • Project-level memory ({project}/.deepagents/agent.md) - Project-specific instructions and context

🛠️ Skills System

Agents can discover and use modular skill packages defined in SKILL.md files:

  • Progressive disclosure - Agents see skill names/descriptions upfront, read full instructions on-demand
  • Two-tier hierarchy - User skills provide a foundation, project skills can override
  • YAML frontmatter - Standard format with name, description, and optional metadata

📁 Project Detection

Automatic detection of project root via .git directory, enabling project-scoped skills and memory.

Usage

import {
  createDeepAgent,
  createSettings,
  createSkillsMiddleware,
  createAgentMemoryMiddleware,
} from "deepagents";

const settings = createSettings();

const agent = await createDeepAgent({
  model: "gpt-4",
  middleware: [
    createSkillsMiddleware({
      skillsDir: settings.getUserSkillsDir("my-agent"),
      assistantId: "my-agent",
      projectSkillsDir: settings.getProjectSkillsDir(),
    }),
    createAgentMemoryMiddleware({
      settings,
      assistantId: "my-agent",
    }),
  ],
});

Example Skills Included

Skill Description
web-research Structured approach to web research using subagents
langgraph-docs Access LangGraph documentation for accurate guidance
skill-creator Guide for creating new skills with helper scripts

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/deepagentsjs/pull/89 **Author:** [@christian-bromann](https://github.com/christian-bromann) **Created:** 1/3/2026 **Status:** ✅ Merged **Merged:** 1/8/2026 **Merged by:** [@christian-bromann](https://github.com/christian-bromann) **Base:** `main` ← **Head:** `cb/vivek-skills-memory` --- ### 📝 Commits (6) - [`2db5427`](https://github.com/langchain-ai/deepagentsjs/commit/2db542729e46d3ca3e29b3d1007c617d8c9482e5) feat: catch up with Python - [`fd3317a`](https://github.com/langchain-ai/deepagentsjs/commit/fd3317a5e1b3d958ef36ea3034bc71e598f56fd9) feat: add SDK Skills + Memory System - [`8634184`](https://github.com/langchain-ai/deepagentsjs/commit/8634184af0161a90410d2334d393e02e5bd20a12) prettier - [`726a3d8`](https://github.com/langchain-ai/deepagentsjs/commit/726a3d88b440d8ff8ae8c8508f4f24a909bf44db) fix unit test for Windows - [`0ea830c`](https://github.com/langchain-ai/deepagentsjs/commit/0ea830cae7536e0bb9dfccfe88994672d92c0fb4) add example - [`f2a05d1`](https://github.com/langchain-ai/deepagentsjs/commit/f2a05d1b27691716eaaef1a0e2fb4b55b0531e49) format ### 📊 Changes **23 files changed** (+3647 additions, -19 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+1 -1) ➕ `examples/skills-memory/skills-memory-agent.ts` (+156 -0) ➕ `examples/skills/arxiv-search/SKILL.md` (+84 -0) ➕ `examples/skills/arxiv-search/arxiv_search.ts` (+103 -0) ➕ `examples/skills/langgraph-docs/SKILL.md` (+36 -0) ➕ `examples/skills/skill-creator/SKILL.md` (+100 -0) ➕ `examples/skills/skill-creator/scripts/init_skill.ts` (+174 -0) ➕ `examples/skills/skill-creator/scripts/quick_validate.ts` (+185 -0) ➕ `examples/skills/web-research/SKILL.md` (+109 -0) 📝 `package.json` (+3 -2) 📝 `pnpm-lock.yaml` (+20 -9) ➕ `src/config.ts` (+222 -0) 📝 `src/index.ts` (+31 -0) ➕ `src/middleware/agent-memory.ts` (+267 -0) ➕ `src/middleware/skills.ts` (+244 -0) ➕ `src/skills/index.ts` (+19 -0) ➕ `src/skills/loader.ts` (+390 -0) 📝 `tests/integration/hitl.test.ts` (+0 -7) ➕ `tests/integration/skills.test.ts` (+279 -0) ➕ `tests/unit/config.test.ts` (+259 -0) _...and 3 more files_ </details> ### 📄 Description This PR ports the SDK Skills + Memory System from Python PR #646 to TypeScript, enabling agents to discover and use specialized skills and maintain long-term memory across sessions. ## What's New ### 🧠 Agent Memory Agents can now persist and recall information through `agent.md` files: - **User-level memory** (`~/.deepagents/{agent}/agent.md`) - Personal preferences across all projects - **Project-level memory** (`{project}/.deepagents/agent.md`) - Project-specific instructions and context ### 🛠️ Skills System Agents can discover and use modular skill packages defined in `SKILL.md` files: - **Progressive disclosure** - Agents see skill names/descriptions upfront, read full instructions on-demand - **Two-tier hierarchy** - User skills provide a foundation, project skills can override - **YAML frontmatter** - Standard format with `name`, `description`, and optional metadata ### 📁 Project Detection Automatic detection of project root via `.git` directory, enabling project-scoped skills and memory. ## Usage ```typescript import { createDeepAgent, createSettings, createSkillsMiddleware, createAgentMemoryMiddleware, } from "deepagents"; const settings = createSettings(); const agent = await createDeepAgent({ model: "gpt-4", middleware: [ createSkillsMiddleware({ skillsDir: settings.getUserSkillsDir("my-agent"), assistantId: "my-agent", projectSkillsDir: settings.getProjectSkillsDir(), }), createAgentMemoryMiddleware({ settings, assistantId: "my-agent", }), ], }); ``` ## Example Skills Included | Skill | Description | |-------|-------------| | `web-research` | Structured approach to web research using subagents | | `langgraph-docs` | Access LangGraph documentation for accurate guidance | | `skill-creator` | Guide for creating new skills with helper scripts | --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 06:17:10 -05:00
yindo closed this issue 2026-02-16 06:17:10 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/deepagentsjs#108