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

fitalyagents

v1.2.1

Published

Multi-agent framework for async parallel tool orchestration and intelligent task dispatch

Readme

fitalyagents

Event-driven multi-agent framework with built-in governance.

This package contains the core runtime:

  • InMemoryBus, RedisBus, createBus
  • InteractionAgent, StaffAgent, UIAgent, AmbientAgent, ContextBuilderAgent, ProactiveAgent
  • SafetyGuard, InMemoryDraftStore, ApprovalOrchestrator
  • InMemoryContextStore, InMemorySessionManager, TargetGroupBridge
  • tracing primitives such as NoopTracer and LangfuseTracer

Install

npm install fitalyagents

Quickstart

import { InMemoryBus, InMemoryContextStore, InteractionAgent, SafetyGuard } from 'fitalyagents'
import type { IStreamingLLM, IToolExecutor } from 'fitalyagents'

const llm: IStreamingLLM = {
  async *stream() {
    yield { type: 'text', text: 'Hola, te ayudo con eso.' }
    yield { type: 'end', stop_reason: 'end_turn' }
  },
}

const executor: IToolExecutor = {
  async execute(toolId, input) {
    return { toolId, input }
  },
}

const bus = new InMemoryBus()
const contextStore = new InMemoryContextStore()
const safetyGuard = new SafetyGuard({
  toolConfigs: [
    { name: 'product_search', safety: 'safe' },
    { name: 'order_create', safety: 'staged' },
    {
      name: 'refund_create',
      safety: 'restricted',
      required_role: 'supervisor',
      approval_channels: [{ type: 'voice', timeout_ms: 60_000 }],
      approval_strategy: 'sequential',
    },
  ],
})

const toolRegistry = new Map([
  [
    'product_search',
    {
      tool_id: 'product_search',
      description: 'Search the catalog',
      safety: 'safe' as const,
    },
  ],
])

const agent = new InteractionAgent({
  bus,
  llm,
  contextStore,
  toolRegistry,
  executor,
  safetyGuard,
  ttsCallback: (text, sessionId) => {
    console.log(`[${sessionId}] ${text}`)
  },
})

agent.subscribePauseResume()

const turn = await agent.handleSpeechFinal({
  session_id: 'session-1',
  text: 'Busco tenis nike',
  speaker_id: 'customer-1',
})

console.log(turn.textChunks)

Governance model

SafetyGuard evaluates every tool call using four safety levels:

| Level | Behavior | | ------------ | ------------------------------------- | | safe | Executes immediately | | staged | Creates a draft first | | protected | Requires end-user confirmation | | restricted | Requires an authorized human approver |

Human roles support both the generic and retail naming schemes:

  • user / customer
  • agent / staff
  • operator / cashier
  • supervisor / manager
  • owner

HumanProfile also accepts both org_id and store_id.

Main building blocks

Event bus

  • InMemoryBus is useful for tests and single-process development
  • RedisBus and createBus() are the production transport
  • StreamAgent publishes bus:AGENT_ERROR when an event handler fails

Agents

  • InteractionAgent handles the main LLM turn and safety pipeline
  • StaffAgent pauses customer interaction, handles privileged commands, and resumes the session
  • UIAgent converts bus events into UI update payloads
  • AmbientAgent enriches context from non-targeted speech

Safety and approvals

  • InMemoryDraftStore manages staged actions with TTL, rollback, confirm, and cancel
  • ApprovalOrchestrator coordinates voice, webhook, and external approval channels

Docs

  • Root docs: ../../README.md
  • Governance guide: ../../docs/GOVERNANCE.md
  • Human roles: ../../docs/HUMAN-ROLES.md
  • Safety model: ../../docs/SAFETY-MODEL.md

License

MIT