Skip to main content

Langchain adapters to support skills in your agent

Project description

Langchain Skills Adapters

Langchain adapters to support skills in your agent.

Features

Installation

uv:

uv add langchain-skills-adapters

pip:

pip install langchain-skills-adapters

Skills Format

Skills must follow the Anthropic Open Standard for Skills. This includes having frontmatter with at minimum the name and skill description.

---
name: My Skill
description: This is my skill
---

# My Skill

Skill content

The skill directory must be in the following format to be loaded correctly:

skills
├── my-skill
│   ├── assets          # Required: instructions + metadata
│   ├── references      # Optional: executable code
│   ├── scripts         # Optional: documentation
│   └── SKILL.md        # Optional: templates, resources
└── other skills...

Usage

As a Tool

from langchain.agents import create_agent
from langchain_community.tools.file_management.read import ReadFileTool

from langchain_skills_adapters import SkillsTool

# Create the SkillsTool pointed to your skills directory
skills_dir = "/path/to/skills/"
skills_tool = SkillsTool(skills_dir)
print(skills_tool.description)

# Optional: Add a file reading tool. Recommended if your agent needs to read resources from your skill directory (scripts, assets, etc.)
read_file_tool = ReadFileTool(root_dir=skills_dir)

# Create the agent
tools = [skills_tool, read_file_tool]
agent = create_agent("openai:gpt-5", tools=tools)
response = agent.invoke(input={"messages": {"role": "user", "content": "What skills do you have?"}})
print(response)

As Middleware

COMING SOON

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_skills_adapters-0.1.2.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

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

langchain_skills_adapters-0.1.2-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file langchain_skills_adapters-0.1.2.tar.gz.

File metadata

File hashes

Hashes for langchain_skills_adapters-0.1.2.tar.gz
Algorithm Hash digest
SHA256 d0dfb74a1ea462f0b96492956dfd49b4762c543b8d52b54c48b4c740d34b2c24
MD5 f32e6828b09fb3550d30ed45ed9eae95
BLAKE2b-256 4e38d1a0764c5af5bbd07dbad0db4a57669ff3232aacb99f6c6d067860c06727

See more details on using hashes here.

File details

Details for the file langchain_skills_adapters-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for langchain_skills_adapters-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b0559c49fa6e458fd7fe8c6424d48b01dd5f1d99e60777f771a14b797da73053
MD5 249bbe98419fef11b020ab7c8084702d
BLAKE2b-256 e64a40d2713a1ba1bc7e8939196e0a8848b165038f2e9d237285c6d3b4fd573e

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