npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@loopstack/code-agent

v0.3.0

Published

AI-powered code agent workflows for Loopstack — codebase exploration, analysis, and more

Downloads

438

Readme

@loopstack/code-agent

A module for the Loopstack AI automation framework.

AI-powered code exploration for Loopstack workflows. Bundles a sub-agent workflow that searches, reads, and synthesises findings from a remote workspace, plus a tool that lets any parent workflow delegate exploration as a single call.

Overview

The Code Agent module is the go-to primitive when a workflow needs to "figure something out" about a codebase before acting — for example, locating a function, summarising a feature, or answering a free-form question about existing code. The sub-agent runs its own plan-then-tool-call loop against glob, grep, and read from @loopstack/remote-client, and returns a plain-text response.

By using this module you'll get:

  • ExploreAgentWorkflow — a self-contained Claude-powered agent that iteratively explores a remote workspace and returns a synthesised answer
  • ExploreTask — a tool that launches ExploreAgentWorkflow as a sub-workflow, so a parent workflow can delegate exploration with one call

Installation

npm install @loopstack/code-agent

Register the module in your application:

import { CodeAgentModule } from '@loopstack/code-agent';

@Module({
  imports: [CodeAgentModule /* ... */],
})
export class AppModule {}

CodeAgentModule depends on ClaudeModule, LoopCoreModule, and RemoteClientModule — make sure those are configured in your app (typically done in the project scaffold).

How It Works

Using ExploreTask from a parent workflow

Inject the tool with @InjectTool() and call it with a natural-language instruction. The tool returns the workflowId of the launched sub-agent and resolves with the synthesised text response when the sub-agent completes:

import { ExploreTask } from '@loopstack/code-agent';
import { BaseWorkflow, InjectTool, Transition, Workflow } from '@loopstack/common';

@Workflow({ uiConfig: __dirname + '/my.ui.yaml' })
export class MyWorkflow extends BaseWorkflow {
  @InjectTool() explore: ExploreTask;

  @Transition({ from: 'ready', to: 'done' })
  async investigate() {
    const result = await this.explore.call({
      instructions: 'Find the NestJS module where user authentication is wired up.',
    });
    // result.data.response contains the agent's summary
  }
}

What the sub-agent does

ExploreAgentWorkflow runs a Claude model with three tools exposed: glob, grep, and read. On each turn it either calls a tool (and transitions to awaiting_tools) or produces a final answer (@Final). The agent's system prompt instructs it to prefer grep over reading whole files — see src/workflows/explore-agent.workflow.ts for the prompt.

Running the workflow directly

You can also run ExploreAgentWorkflow standalone without going through the tool:

import { ExploreAgentWorkflow } from '@loopstack/code-agent';

// Inject and call .run({ instructions: '...' }) from any service or workflow.

Public API

  • Workflow: ExploreAgentWorkflow
  • Tool: ExploreTask
  • Module: CodeAgentModule

Dependencies

  • @loopstack/common — core decorators and BaseTool / BaseWorkflow
  • @loopstack/coreLoopCoreModule
  • @loopstack/llm-provider-moduleLlmGenerateTextTool, LlmDelegateToolCallsTool, LlmMessageDocument
  • @loopstack/remote-clientGlobTool, GrepTool, ReadTool (executed on the remote workspace)

About

Author: Jakob Klippel

License: MIT

Additional Resources