Skip to main content

langchain-agentskills

agentskills.io support for LangChain and LangGraph.

Install

pip install langchain-agentskills

Quick Start

Toolkit (classic)

from langchain.agents import create_agent
from langchain_agentskills import SkillsToolkit

toolkit = SkillsToolkit(directories=["./skills"])

agent = create_agent(
    model="gpt-5.2",
    tools=toolkit.get_tools(),
    system_prompt=toolkit.get_instructions(),
)

Middleware (recommended)

from langchain.agents import create_agent
from langchain_agentskills import DirectorySkillLoader, SkillMiddleware

loader = DirectorySkillLoader("./skills")

agent = create_agent(
    model="gpt-5.2",
    middleware=[SkillMiddleware(loader=loader)],
)

The middleware automatically injects skill descriptions into the system prompt and registers load_skill, read_skill_resource, and run_skill_script tools.

Skill directory structure

skills/
  my-skill/
    SKILL.md          # Frontmatter + instructions
    references/       # Resource files the agent can read
      api-spec.yaml
    scripts/          # Executable scripts the agent can run
      deploy.sh

SKILL.md uses YAML frontmatter:

---
name: my-skill
description: Short description for the agent
version: "1.0"
tags: [deployment, ci]
---

# Instructions

Detailed instructions for the agent...

Custom loaders

Implement SkillLoader to load skills from any source (Git, S3, database, etc.):

from langchain_agentskills import SkillLoader

class MyGitLoader(SkillLoader):
    def list_skills(self): ...
    def load_skill(self, name): ...
    def read_resource(self, skill_name, resource_name): ...
    def read_script(self, skill_name, script_name): ...
    def has_skill(self, name): ...

Use with the toolkit or middleware:

# Toolkit
toolkit = SkillsToolkit(loaders=[MyGitLoader(...)])

# Middleware
middleware = SkillMiddleware(loader=MyGitLoader(...))

License

MIT

Metadata

Release files for langchain-agentskills 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for langchain-agentskills 0.4.0
File Size Uploaded
langchain_agentskills-0.4.0.tar.gz 11.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for langchain-agentskills 0.4.0
File Interpreter ABI Platform
langchain_agentskills-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 31.8 kB

Release files / langchain_agentskills-0.4.0.tar.gz

Download URL langchain_agentskills-0.4.0.tar.gz
Size 11.8 kB
Tags Source
SHA-256 checksum
How to use checksums
9a421f3f1cc81b2104fc94ef869c04051e53aaf9832a49fe5f5ac2086c690a5a
BLAKE2b-256 checksum
How to use checksums
075105f8231181ca3fa3e916a0b68a918e90910cc958b7a03acf21181a8e2e45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / langchain_agentskills-0.4.0-py3-none-any.whl

Download URL langchain_agentskills-0.4.0-py3-none-any.whl
Size 20.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
160138f8a0396ef96a63ceb58ad07f3e9d9ef58bf683f0fd9e623436b32adaf2
BLAKE2b-256 checksum
How to use checksums
ecdcbdb72ab73236c6c7ec072249ed17120336e432e0614b1d93cefe5b962e19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page