Skip to main content

agentskills.io support for LangChain and LangGraph

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

langchain_agentskills-0.1.1.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

langchain_agentskills-0.1.1-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

Details for the file langchain_agentskills-0.1.1.tar.gz.

File metadata

  • Download URL: langchain_agentskills-0.1.1.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","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}

File hashes

Hashes for langchain_agentskills-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a7337e2efa0bfb347ee9ab1a2f61867f32259346257117c488b1f854691df474
MD5 3c05e0e4a03643a4015d35c305130ad6
BLAKE2b-256 85a6c5e8af8eea992a39f0998a07b2afbf58a342d37a1070678fc532d4d48566

See more details on using hashes here.

File details

Details for the file langchain_agentskills-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: langchain_agentskills-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 16.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","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}

File hashes

Hashes for langchain_agentskills-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cd0a60ab7b9c008858f2c781351a3c02c3b827cf332ded55af462d5327b148a1
MD5 082dd0eff9a48b1a5eb8e9a67e8166ce
BLAKE2b-256 7d280ea49d3aef1d4e85118c4c8d41d88d10d0167642325b08cc0e58851f6a97

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page