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

@weaveintel/live-agents

v0.1.2

Published

Persistent autonomous agent primitives for weaveIntel

Readme

@weaveintel/live-agents

Persistent, long-lived agents that live in a mesh, watch a mailbox, and wake up to act on their own schedule.

Why it exists

Most agents answer one question and disappear. But some jobs never end: a support agent that watches an inbox all day, a monitor that checks a dashboard every ten minutes, a coordinator that hands work between teammates. Those agents need a mailbox, a heartbeat, a budget, and a memory that survives restarts. Think of the difference between a phone call and a colleague who shows up every morning, reads their email, does the work within their remit, and knows to escalate when something's over their head. This package is the framework for that colleague. A key rule keeps it safe: agents are not security principals — accounts are. An agent only ever acts as an account (a Gmail inbox, a Slack channel) through a narrowly-scoped binding that a human granted.

When to reach for it

Reach for @weaveintel/live-agents when the agent must outlive a single request — react to events, run on a cron, sit in a mesh and message other agents. If you only need one goal answered in one process and then you're done, use @weaveintel/agents instead (this package is built on top of it). If your agent definitions, meshes, and tool bindings live in database rows and you want them hydrated with one call, layer @weaveintel/live-agents-runtime on top.

How to use it

import { weaveLiveAgent, weaveInMemoryStateStore, createHeartbeat, createActionExecutor } from '@weaveintel/live-agents';
import { weaveContext } from '@weaveintel/core';

// Define a persistent agent (parity with weaveAgent, but tick-driven).
const { handler } = weaveLiveAgent({
  name: 'support',
  model,                                       // any @weaveintel/core Model
  systemPrompt: 'You are a helpful support agent.',
});

// A heartbeat processes the agent's mailbox one batch at a time.
const stateStore = weaveInMemoryStateStore();
const heartbeat = createHeartbeat({
  stateStore,
  workerId: 'worker-1',
  concurrency: 4,
  actionExecutor: createActionExecutor(),
});

const result = await heartbeat.tick(weaveContext({ userId: 'human:ops' }));
console.log(`Processed ${result.processed} ticks`);

Run-scoped trace tools (read-only run timeline, failed attempts, recent events) live under the /trace-tools subpath:

import { createLiveTraceTools } from '@weaveintel/live-agents/trace-tools';

What's in the box

| Export | What it does | |---|---| | weaveLiveAgent | The canonical constructor for a persistent agent (prefer over createAgenticTaskHandler). | | createLiveAgentsRuntime | Wires the whole runtime — heartbeat, compression, event handling. | | createHeartbeat | Claims and processes agent ticks (the "pulse" that drives everything). | | createActionExecutor | Executes the action an agent's attention policy chose. | | createStandardAttentionPolicy / createCronAttentionPolicy / createModelAttentionPolicy | How an agent picks its next action — heuristic, scheduled, or LLM-driven. | | weaveModelResolver, composeModelResolvers | Resolve which model to use per tick. | | weaveLiveAgentPolicy | Bundle tool-approval, rate-limit, and audit into one policy slot. | | runLiveReactLoop, BudgetExhausted | The budget-bounded ReAct loop that runs inside a tick. | | weaveInMemoryStateStore, weaveRedisStateStore, weavePostgresStateStore, weaveSqliteStateStore, weaveMongoDbStateStore, weaveDynamoDbStateStore | Pluggable persistence for meshes, agents, contracts, and messages. weavePostgresStateStore takes either { url } (opens its own pool) or { pool } (shares an existing one — e.g. from weaveSharedPostgres, so the whole runtime uses one connection; an injected pool is left open on close()). The two SQL versions (SQLite + Postgres) now share one implementation, so they can't drift; both are proven to survive a restart and rehydrate their state on a real database. | | createMcpAccountSessionProvider | Open MCP sessions so an agent can act as a bound external account. | | InMemoryLiveAgentsRunLogger, replayLiveAgentsRun | Record and deterministically replay a run. | | LiveAgentsError (+ typed subclasses) | Guardrail errors — e.g. SelfGrantForbiddenError, OnlyHumansMayBindAccountsError. |

License

MIT.