Agent skill

Agents And Middleware

by VectorSpaceLab in VectorSpaceLab/AREX-Skill

Work on the actively maintained LangChain v1 agent package: initchatmodel, createagent, structured output, tools, middleware, embeddings initialization, provider routing, and agent runtime…

MITAuto-check passedAI & LLM Engineering

Install Agents And Middleware

skills CLI
$ npx skills add VectorSpaceLab/AREX-Skill --skill agents-and-middleware -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install VectorSpaceLab/AREX-Skill agents-and-middleware --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/VectorSpaceLab/AREX-Skill.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/repositories/repo-skills/langchain/sub-skills/agents-and-middleware .claude/skills/agents-and-middleware && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
agents-and-middleware
GitHub stars
330
Token cost
~1.2k tokens
SKILL.md length
463 words
Files
5 (incl. scripts, references)
Skills in repo
159
Repo updated
First seen
Licence
MIT

At a glance

Work on the actively maintained LangChain v1 agent package: initchatmodel, createagent, structured output, tools, middleware, embeddings initialization, provider routing, and agent runtime…

  • Works in 5 steps: Confirm the target package is… → Inspect the nearest v1 public API files… → Prefer tests under… → …
  • Libs/langchainv1 agent workflows and route low-level core primitives
  • SKILL.md covers When to Use, Route Elsewhere, Reference Map and Fast Workflow, plus 2 more sections
  • Runs Python scripts from its folder; calls uv and python

What it does

Agents And Middleware is an agent skill from VectorSpaceLab/AREX-Skill. Work on the actively maintained LangChain v1 agent package: initchatmodel, createagent, structured output, tools, middleware, embeddings initialization, provider routing, and agent runtime customization. Use for libs/langchainv1 agent workflows and route low-level core primitives or provider implementation details to sibling skills.

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including scripts and reference files (for example `references/agent-workflows.md`, `references/middleware-reference.md` and `references/troubleshooting.md`).

It sits in AI & LLM Engineering, covering Building AI agents, Embeddings and Structured output and tool calling. It works with LangChain. The repository describes itself as: A Skill Library for Automated Machine Learning. The licence is MIT.

When your agent uses it

  • Libs/langchainv1 agent workflows and route low-level core primitives
  • Provider implementation details to sibling skills

Example prompts

  • “/agents-and-middleware”

Requirements

  • Python 3

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Confirm the target package is libs/langchain_v1; its distribution name is langchain and its package imports are langchain.*.
  2. Inspect the nearest v1 public API files first: langchain/chat_models/base.py, langchain/agents/factory.py…
  3. Prefer tests under tests/unit_tests/agents, tests/unit_tests/chat_models, tests/unit_tests/tools, and tests/unit_tests/embeddings for…
  4. For package validation, use uv from libs/langchain_v1; do not use pip, poetry, or conda directly for this monorepo.
  5. Skip network-backed model invocations unless credentials, provider packages, and user permission are present; use fake models or import…

What it can do on your machine

Read from SKILL.md and the folder at commit ac3fe1a. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • uv
    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use uv, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Agents And Middleware loads about 1.2k tokens when it runs, and up to ~9.8k if it reads all its reference files. Until then it costs about 90 tokens; SKILL.md has 463 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~90
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~9.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from VectorSpaceLab/AREX-Skill at commit ac3fe1a, republished under its MIT licence (© VectorSpaceLab). 463 words, ~1,225 tokens.

Download SKILL.mdSave it as .claude/skills/agents-and-middleware/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
agents-and-middleware
description
Work on the actively maintained LangChain v1 agent package: init_chat_model, create_agent, structured output, tools, middleware, embeddings initialization, provider routing, and agent runtime customization. Use for libs/langchain_v1 agent workflows and route low-level core primitives or provider implementation details to sibling skills.
disable-model-invocation
true
metadata.disco-role
operating
license
MIT

Agents and Middleware

Use this sub-skill for practical work in the actively maintained langchain package around v1 agents, middleware, model initialization, structured output, tools, and embeddings. This guidance is distilled from the LangChain v1 source and tests and is self-contained for future coding agents.

When to Use

  • User asks about init_chat_model, create_agent, response_format, tool schemas, injected tool runtime, or configurable chat models.
  • User asks to add, configure, or debug middleware such as retry, fallback, human-in-the-loop, summarization, tool/model call limits, PII redaction, file search, shell execution, todo planning, provider tool search, tool retry, or tool selection.
  • User asks why provider resolution fails for a chat or embedding model, especially when optional integration packages or credentials are missing.
  • User asks to customize agent state, runtime context, checkpointer/store usage, interrupts, streaming, or debug behavior at the langchain v1 layer.

Route Elsewhere

  • For low-level runnable, message, tool, callback, language-model, or embedding primitives from langchain_core, use ../core-primitives/SKILL.md.
  • For provider implementation packages such as langchain-openai, langchain-anthropic, langchain-ollama, or provider-specific parameters/classes, use ../integrations/SKILL.md.
  • For legacy langchain-classic imports, chains, retrievers, or classic agents, use the sibling skill that owns classic APIs instead of rewriting v1 guidance.

Reference Map

  • Start with references/agent-workflows.md for source layout, import paths, common edit workflows, validation commands, structured output, tools, embeddings, and provider initialization.
  • Use references/middleware-reference.md for middleware families, exported classes, hook styles, ordering, state/context patterns, and safety constraints.
  • Use references/troubleshooting.md for missing provider packages, credentials/network skips, structured output/tool validation, middleware ordering, HITL/shell/file-search safety, and v1-vs-classic confusion.
  • Run scripts/agent_import_smoke.py as a safe import-only smoke check when an environment is available.
Show full SKILL.md (207 more words)Show less

Fast Workflow

  1. Confirm the target package is libs/langchain_v1; its distribution name is langchain and its package imports are langchain.*.
  2. Inspect the nearest v1 public API files first: langchain/chat_models/base.py, langchain/agents/factory.py, langchain/agents/structured_output.py, langchain/agents/middleware/, langchain/tools/, and langchain/embeddings/base.py.
  3. Prefer tests under tests/unit_tests/agents, tests/unit_tests/chat_models, tests/unit_tests/tools, and tests/unit_tests/embeddings for expected public behavior.
  4. For package validation, use uv from libs/langchain_v1; do not use pip, poetry, or conda directly for this monorepo.
  5. Skip network-backed model invocations unless credentials, provider packages, and user permission are present; use fake models or import checks for local validation.

Safe Validation

From libs/langchain_v1, use targeted package tests when uv is available:

bash
uv run --group test pytest tests/unit_tests/chat_models/test_chat_models.py tests/unit_tests/agents/test_response_format.py tests/unit_tests/tools/test_imports.py tests/unit_tests/embeddings/test_base.py

From this sub-skill directory, use the bundled smoke script with any Python environment that already has langchain installed:

bash
python scripts/agent_import_smoke.py

The smoke script imports public APIs only and does not call providers, networks, shell commands, or external files.

Guardrails

  • Keep v1 import paths explicit: langchain.chat_models, langchain.agents, langchain.agents.middleware, langchain.tools, and langchain.embeddings.
  • Do not add provider-specific hard dependencies to langchain core code unless the package metadata intentionally lists them as optional extras.
  • Do not run shell/file-search/HITL examples as unattended validation; these require user-reviewed safety decisions.
  • Do not link future runtime instructions to source-checkout docs, examples, tests, or absolute local paths; distill facts into this sub-skill or bundled references.

© VectorSpaceLab, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (scripts, references) in skills/repositories/repo-skills/langchain/sub-skills/agents-and-middleware of VectorSpaceLab/AREX-Skill.

  • SKILL.md
  • references/agent-workflows.md
  • references/middleware-reference.md
  • references/troubleshooting.md
  • scripts/agent_import_smoke.py

Open the folder on GitHubat commit ac3fe1a

Compare with similar skills

Agents And Middleware next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Agents And Middleware compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Agents And Middleware this skillVectorSpaceLab/AREX-Skill330—~1.2kAutomated safety check: PassMIT
Sap Cloud SDK AIsecondsky/sap-skills462—~3.2kAutomated safety check: PassGPL-3.0
Routerbase Model Routingaiskillstore/marketplace430—~964Automated safety check: PassNone
AI SDKvercel-labs/ai-facts16820 repos~1.2kAutomated safety check: PassNone
Llmobs IntegrationDataDog/dd-trace-js837—~1.4kAutomated safety check: PassCustom licence
LangGraph Decision Modelslangchain-ai/langchain-skills1.3k—~2.3kAutomated safety check: PassMIT

Similar skills

  • Sap Cloud SDK AI

    secondsky/sap-skills

    Integrates SAP Cloud SDK for AI into JavaScript/TypeScript and Java applications.

    462 GitHub stars~3.2k tokensUpdated 4 days ago
    AI & LLM EngineeringAuto-check passed
  • Routerbase Model Routing

    aiskillstore/marketplace

    Choose RouterBase model IDs and routing strategies for chat, image, video, audio, and embeddings workloads.

    430 GitHub stars~964 tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • AI SDK

    vercel-labs/ai-facts

    Official

    Answer questions about the AI SDK and help build AI-powered features.

    168 GitHub starsUsed in 20 repos~1.2k tokens
    AI & LLM EngineeringAuto-check passed
  • Llmobs Integration

    DataDog/dd-trace-js

    Official

    A skill your agent uses when adding, debugging, or modifying LLMObs plugins for an LLM library in dd-trace-js.

    837 GitHub stars~1.4k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • LangGraph Decision Models

    langchain-ai/langchain-skills

    Official

    Routes LangGraph agents with typed decision models that return probabilities, and finds LLM calls that only exist to produce a routing decision.

    1.3k GitHub stars~2.3k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Tool Design

    agentailor/fullstack-langgraph-nextjs-agent

    Design and verify tools that AI agents can actually use — for any framework or language (MCP servers, LangChain/LangGraph, function-calling, raw JSON schema; TypeScript, Python, or otherwise).

    132 GitHub stars~3.2k tokensUpdated 1 mo ago
    AI & LLM EngineeringAuto-check passed

More from VectorSpaceLab/AREX-Skill

All 159 skills in this repo
  • Agent Lightning

    VectorSpaceLab/AREX-Skill

    Use this repo skill for Agent Lightning package tasks: authoring trainable agents, tracing rewards and spans, running LightningStore/Trainer loops, using agl CLI services, choosing examples, and…

    330 GitHub stars~1.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Agent Tools

    VectorSpaceLab/AREX-Skill

    A skill your agent uses when configuring LiteLLM for MCP tools, A2A agents, Claude Code/Cursor agent gateway traffic, MCP auth/OAuth, tool permissions, semantic filtering, or agent-specific proxy…

    330 GitHub stars~1.2k tokensUpdated 1 mo ago
    Auto-check passed
  • Agents And Awel

    VectorSpaceLab/AREX-Skill

    Build and debug DB-GPT agents, tools, skills, teams, and AWEL workflows, including deterministic local DAG runs and HTTP-trigger topology without assuming an LLM, credential, or external service.

    330 GitHub stars~2.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Agents Workflows

    VectorSpaceLab/AREX-Skill

    A skill your agent uses for giskard.agents async chat workflows, tools, prompt templates, structured outputs, retries, rate limiting, embeddings, and optional LiteLLM backend.

    330 GitHub stars~500 tokensUpdated 1 mo ago
    Auto-check passed
  • Alphafold3

    VectorSpaceLab/AREX-Skill

    A skill your agent uses for AlphaFold 3 input preparation, prediction command planning, output interpretation, and Python API inspection.

    330 GitHub stars~1.2k tokensUpdated 1 mo ago
    Auto-check passed
  • App Callback Workflows

    VectorSpaceLab/AREX-Skill

    A skill your agent uses for Plotly Dash app layouts, callbacks, pages, assets, configuration, clientside callbacks, Jupyter display, CSP, and app-level debugging.

    330 GitHub stars~1.4k tokensUpdated 1 mo ago
    Auto-check passed

Works with

Questions about Agents And Middleware

What does Agents And Middleware do?

Work on the actively maintained LangChain v1 agent package: initchatmodel, createagent, structured output, tools, middleware, embeddings initialization, provider routing, and agent runtime…. Agents And Middleware is an agent skill from VectorSpaceLab/AREX-Skill. Work on the actively maintained LangChain v1 agent package: initchatmodel, createagent, structured output, tools, middleware, embeddings initialization, provider routing, and agent runtime customization.

When should I use Agents And Middleware?

Agents And Middleware fits situations like: libs/langchainv1 agent workflows and route low-level core primitives; provider implementation details to sibling skills.

How do I install Agents And Middleware in Claude Code?

Run `npx skills add VectorSpaceLab/AREX-Skill --skill agents-and-middleware -a claude-code`. Or copy the skill folder (skills/repositories/repo-skills/langchain/sub-skills/agents-and-middleware in VectorSpaceLab/AREX-Skill) into .claude/skills/agents-and-middleware in your project. Claude Code loads it when a task matches its description.

How do I install Agents And Middleware in Codex?

Run `npx skills add VectorSpaceLab/AREX-Skill --skill agents-and-middleware -a codex`. Or copy the skill folder (skills/repositories/repo-skills/langchain/sub-skills/agents-and-middleware in VectorSpaceLab/AREX-Skill) into .agents/skills/agents-and-middleware in your project. Codex loads it when a task matches its description.

Can I use Agents And Middleware in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add VectorSpaceLab/AREX-Skill --skill agents-and-middleware -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/agents-and-middleware, .gemini/skills/agents-and-middleware, .github/skills/agents-and-middleware and .opencode/skills/agents-and-middleware in your project.

What does Agents And Middleware need to run?

Going by SKILL.md and its folder, Agents And Middleware needs Python for the scripts in its folder and the command-line tools its instructions call (uv and python). Our summary lists: Python 3.

Does Agents And Middleware access the network?

SKILL.md contains no URLs. Its commands use uv, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Agents And Middleware safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Agents And Middleware use?

Agents And Middleware is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Agents And Middleware use?

About 1.2k tokens (SKILL.md is roughly 4.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 8.6k tokens, read only when the agent opens those files.

What are the alternatives to Agents And Middleware?

Skills that share tags, products or a category with Agents And Middleware: Sap Cloud SDK AI (secondsky/sap-skills, 462 stars), Routerbase Model Routing (aiskillstore/marketplace, 430 stars), AI SDK (vercel-labs/ai-facts, 168 stars) and Llmobs Integration (DataDog/dd-trace-js, 837 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Agents And Middleware?

VectorSpaceLab (a GitHub organization) maintains it in VectorSpaceLab/AREX-Skill, which has 330 GitHub stars. The repository holds 159 skills in this directory. The repository was last updated on September 3, 2026.

Source: VectorSpaceLab/AREX-Skill on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.