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

@tuttiai/core

v0.23.2

Published

Tutti runtime — multi-agent orchestration for TypeScript

Readme

@tuttiai/core

The runtime engine for Tutti — an open-source multi-agent orchestration framework for TypeScript.

Install

npm install @tuttiai/core

Quick start

import { TuttiRuntime, AnthropicProvider, defineScore } from "@tuttiai/core";

const score = defineScore({
  name: "my-project",
  provider: new AnthropicProvider(), // uses ANTHROPIC_API_KEY env var
  agents: {
    assistant: {
      name: "assistant",
      model: "claude-sonnet-4-20250514",
      system_prompt: "You are a helpful assistant.",
      voices: [],
    },
  },
});

const tutti = new TuttiRuntime(score);
const result = await tutti.run("assistant", "Hello!");
console.log(result.output);

What's included

Runtime & orchestration

  • TuttiRuntime — top-level orchestrator
  • AgentRunner — agentic while-loop (LLM call → tool execution → repeat)
  • AgentRouter — delegation between orchestrator and specialist agents
  • TuttiGraph — explicit directed-graph routing when you need more control than pure delegation
  • ScoreLoader / defineScore() — typed loader + identity function for tutti.score.ts

Providers

  • AnthropicProvider@anthropic-ai/sdk
  • OpenAIProvideropenai
  • GeminiProvider@google/generative-ai
  • OpenRouterProvider — OpenAI-compatible aggregator for 300+ models across providers via one API key. See openrouter.ai/models for the live catalogue. Per-call USD cost is returned inline on ChatResponse.usage.cost_usd (via OpenRouter's usage: { include: true } extension).
  • All four support streaming, tool calling, and prompt caching where the underlying API supports it

Sessions & memory

  • InMemorySessionStore, PostgresSessionStore — session persistence
  • SemanticMemoryStore — per-agent long-term memory (in-memory or Postgres). Two surfaces share one enforcement pipeline:
    • System-prompt injection — relevant entries injected at the start of each turn (agent.memory.semantic.inject_system).
    • Curated agent tools — remember / recall / forget exposed to the model itself (agent.memory.semantic.curated_tools, default true). Agent-curated entries are tagged source: "agent" and a per-agent cap evicts the least-recently-used entry on overflow. See examples/curated-memory.ts.
  • UserMemoryStore — per-end-user memory, auto-injected into the system prompt on every run (Postgres)

Durability & scheduling

  • DurableCheckpointStore — Redis / Postgres adapters; checkpoint between turns so crashed runs can resume with tutti-ai resume
  • SchedulerEngine — cron / interval / one-shot triggers for any agent
  • InterruptStore — per-tool approval gates for human-in-the-loop flows

Observability

  • EventBus — typed pub/sub for the full run lifecycle
  • getTuttiTracer() — in-process OpenTelemetry-compatible span tracer (always on)
  • @tuttiai/telemetry — exporters (OTLP, JSON file) + cost estimation

Evaluation & guardrails

  • GoldenRunner + built-in scorers (ExactScorer, SimilarityScorer, ToolSequenceScorer) for golden-dataset regression
  • beforeRun / afterRun hooks for validation, PII redaction, topic blocking
  • Built-in guardrail factories: profanityFilter(), piiDetector(), topicBlocker()

Security

  • SecretsManager — redaction of API keys and tokens from logs, events, and errors
  • PathSanitizer, UrlSanitizer — defence against path traversal and SSRF
  • PromptGuard — wraps tool results before returning them to the LLM
  • PermissionGuard — enforces Voice.required_permissions at runtime

Observability

Every action emits typed events:

tutti.events.on("tool:start", (e) => {
  console.log(`Calling tool: ${e.tool_name}`);
});

Spans for every run, LLM call, and tool invocation are also available via the built-in tracer:

import { getTuttiTracer } from "@tuttiai/telemetry";

const tracer = getTuttiTracer();
tracer.onSpan((span) => {
  console.log(span.kind, span.name, span.durationMs);
});

Or inspect them from the CLI while running tutti-ai serve in another shell:

tutti-ai traces list       # last 20 traces
tutti-ai traces show <id>  # full span tree
tutti-ai traces tail       # live-tail spans

Links

License

Apache 2.0