@codeworksh/harness weekly downloads statistics
By codeworksh (3 listings) · npm · AI SDKs
AI agent harness — agent loop, tools, plugins, sandbox, and more.
@codeworksh/harness has 3,156 recorded weekly downloads on npm, a decrease of 44.8% over the past 30 days, ranking #1718 of 3,247 tracked listings.
About @codeworksh/harness
@codeworksh/harness
The CodeWork agent harness: durable sessions and threads, the agent loop, tools, plugins, MCP and sandboxes, built on Effect. The codework CLI and RPC server boot it to run agents, and you can embed it to run them in your own Node process.
[!NOTE] This is an early release. Expect breaking changes between minor versions.
Install
pnpm add @codeworksh/harness effect@4.0.5
effect is a peer dependency pinned to an exact version. Node 24.14.1 or newer is required.
Usage
The public surface is the Effect SDK at @codeworksh/harness/effect. The root export is empty for now.
import { Effect } from "effect";
import { Harness, Session } from "@codeworksh/harness/effect";
const program = Effect.gen(function* () {
const session = yield* Session.create({
directory: process.cwd(),
model: { provider: "openai", id: "gpt-5.5" },
thinkingLevel: "high",
});
// Stores the prompt, runs the main thread and waits until it is idle.
yield* session.main.run("Summarize this repository in one paragraph.");
const { usage } = yield* session.main.info;
console.log(`${session.id}: ${usage.input} in, ${usage.output} out, $${usage.cost}`);
});
await program.pipe(
// `home` holds settings, the model catalog and the database. It defaults to ~/.codework.
Effect.provide(Harness.layer({ home: ".codework" })),
Effect.scoped,
Effect.runPromise,
);
API keys come from the process environment (here OPENAI_API_KEY), and the model catalog is kept in <home>/models.gen.json. See models.
A session is one durable event log, and its threads live inside it. session.main is the main thread. A thread handle can prompt (store and return), run (store and wait), interrupt, resume, fork and configure, and exposes events() and history(). Every run, prompt and durable event is stored, so Session.attach({ sessionId }) reaches a thread again after a restart, and Control.Service's resumeUnfinished picks up runs a crash cut off, as the RPC server does at start.
What It Owns
The harness is the agent itself. It owns the loop, prompt assembly, tool execution, the plugin catalog and installer, MCP clients, sandbox drivers and mounts, settings, and the SQLite store every run and durable event lands in.
It depends on @codeworksh/aikit for every model call and on @codeworksh/plugin for the plugin, tool and sandbox contracts, and on @codeworksh/schema for the ids, records and events it persists. It never imports the CLI, the RPC server or anything under apps/. That keeps it a library that never knows how it is reached, so the RPC server, in-process codework run and ACP all boot the same harness.
Third parties extend it with plugins built against @codeworksh/plugin, not against this package. Pass them to Harness.layer({ plugins }), or list them in a settings file's plugins block. Remote sandboxes load from the @codeworksh/harness/sandboxes/vercel and @codeworksh/harness/sandboxes/daytona subpaths through Harness.layer({ sandboxes }), with their provider SDK installed beside it.
Code Map
src/effect.tsis the public SDK barrel.src/effect/harness.tsbuildsHarness.layer: its options and the service wiring.src/effect/session.tscreates, attaches and relinks sessions and returns session and thread handles.src/control.tsstarts, joins and stops work: prompt, run, interrupt and resume.src/runnerholds execution, the per-thread coordinator, the loop, retries and the one boundary to aikit.src/eventis the durable event log and its projectors.src/pluginloads, installs and runs plugins, including the built-in tools and prompt.src/sandboxandsrc/sandboxeshold the driver registry, mounts and the bundled drivers.src/mcpruns MCP servers and exposes their tools.src/settingsreads and merges settings files.src/dbis the SQLite store and its migrations.
Working Locally
pnpm check # vp check
pnpm test # vp test
pnpm build # vp pack
pnpm test:sandbox:e2e runs the remote sandbox suites and needs provider credentials. See testing.
Learn More…
Description from the npm listing.
- agent
- ai
- ai-sdk
- anthropic
- grok
- harness
- llm
- node
- openai
- sandbox
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (592)Similar npm AI SDKs plugins
All 20 @codeworksh/harness alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/@codeworksh/harness. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.