Skip to content

fix: skill loading - #49

Open
Akatuoro wants to merge 3 commits into
mainfrom
fix/skills
Open

fix: skill loading#49
Akatuoro wants to merge 3 commits into
mainfrom
fix/skills

Conversation

@Akatuoro

Copy link
Copy Markdown
Contributor

deepagents skill loading mechanisms works via its backends. A read_file tool call for './skills/product-search/SKILL.md' has to return the skill content -> Expose the skills folder via a readonly backend.

@Akatuoro
Akatuoro requested a review from a team as a code owner August 21, 2026 15:07
@Akatuoro
Akatuoro requested a review from BobdenOs August 21, 2026 15:07
@hyperspace-pr-bot

Copy link
Copy Markdown

Summary

The following content is AI-generated and provides a summary of the pull request:


Fix: Skill Loading via ReadonlyBackend for DeepAgents

This PR fixes the skill loading mechanism for deepagents by exposing the skills/ folder through a dedicated readonly backend, enabling read_file tool calls targeting ./skills/<skill-name>/SKILL.md to resolve correctly.

Changes

New file: readonly-backend.js 🆕

  • Introduces a ReadonlyBackend class that wraps FilesystemBackend from deepagents using composition (not inheritance) to explicitly block all write operations (write, edit, delete, uploadFiles).
  • Delegates read-only operations (ls, read, readRaw, grep, glob, downloadFiles) to the underlying filesystem backend.

deep-agent.js 🔧

  • Replaces the direct use of FilesystemBackend with the new ReadonlyBackend for the agent directory.
  • Registers the skills/ folder under both ./skills/ and /skills/ route keys as a ReadonlyBackend in CompositeBackend, enabling skill content to be resolved by the agent's read_file tool.
  • Refactors backend construction: CompositeBackend is now built statically (always) rather than as a runtime factory function, since per-request context (taskId, contextId, userId) is now resolved lazily inside each backend via getConfig().
  • Fixes the createSkillsMiddleware source path from "./skills/" to "./skills".

uploads-backend.js & outputs-backend.js 🔧

  • Removed constructor parameters for contextId, taskId, and userId that were previously injected at construction time.
  • Both backends now resolve per-request context lazily using getConfig() from @langchain/langgraph, which makes them safe for static (non-factory) instantiation.

Category

🐛 Bug Fix / ♻️ Refactor

Have you...

  • Added relevant entry to the change log?

  • 🔄 Regenerate and Update Summary
  • ✏️ Insert as PR Description (deletes this comment)
  • 🗑️ Delete comment
PR Bot Information

Version: 1.29.33

  • Summary Prompt: Default Prompt
  • LLM: anthropic--claude-4.6-sonnet
  • Output Template: Repository PR Template
  • Correlation ID: 06080ee0-9d72-11f1-8405-c3a77769f1c4
  • File Content Strategy: Full file content
  • Event Trigger: pull_request.opened

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant