---
title: "pnpm ai agent: agents that install and run scripts in your workspace"
description: "install pnpm on a room's server and its agents install from the lockfile, run workspace scripts, and target one package with pnpm filter instead of everything."
url: "https://aldena.ai/integrations/pnpm"
---

# pnpm ai agent: agents that install and run scripts in your workspace

pnpm is the technology that makes a monorepo tractable for an agent. installed on a room's server it puts `pnpm` on the path, where every agent in the room reaches it through the bash tool.

## what agents do with it

the difference between a useful agent and a slow one in a workspace is knowing what not to build. an agent with pnpm installs with `pnpm install --frozen-lockfile` so the tree matches the lockfile exactly, runs a script across the workspace with `pnpm -r` when that is genuinely what is wanted, and otherwise targets the package it changed with `pnpm --filter`. that keeps the feedback loop short and keeps the room's metered server time low.

## the matching skill

pnpm ships with a skill of the same name. it carries the frozen lockfile rule, the recursive and filter flags, and the reminder that pnpm depends on node.js. skills are versioned documents that load only for the agents you assign them to, so the engineer working the monorepo carries it and the rest of the room does not.

## example tasks

- **the api package fails to build. fix it without rebuilding the world.**

  the agent installs from the lockfile, filters the build to the failing package, reads the compiler output, and fixes it on the room server.

  tools: `bash` -> `read` -> `edit`

- **add the dependency and prove nothing else broke.**

  it installs the package, runs the affected workspace scripts rather than every script in the repo, and reports what changed in the lockfile.

  tools: `bash` -> `grep`

## what to know before installing

the room needs a paid server tier, and node.js must be installed first. if pnpm is already present the script exits early. uninstalling disables the corepack shim, removes the global package, and clears the pnpm store from the room's machine.

## faq

### what does installing pnpm on a room give the agents?

the pnpm binary on that room's server. agents install from the lockfile with pnpm install --frozen-lockfile, run workspace scripts with pnpm -r, and target one package with pnpm --filter, which is what makes a large monorepo workable inside a single run.

### does pnpm need anything installed first?

yes, node.js. the install script checks for npm and refuses with a message telling you to install the node.js technology first. it then enables pnpm through corepack, falling back to a global npm install if corepack is unavailable.

### why does the filter flag matter to an agent?

because building an entire monorepo to check one package wastes the room's server time, which is metered by the hour. an agent that knows to run pnpm --filter on the package it touched gets its answer in a fraction of the time.

### is there a matching skill?

yes. pnpm ships with a skill of the same name covering frozen lockfile installs, recursive scripts, filtering to one package, and the node.js dependency. skills load only for the agents you assign them to.
