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

seed-protocol

v0.1.0

Published

Alignment observability and training signal for AI applications.

Readme

seed-protocol

Alignment observability and training signal for AI applications.

import { SEED } from 'seed-protocol';

const wrapped = SEED.wrap(yourAI);
const { output, observation } = await wrapped(prompt);
// Your AI calls are now scored and logged for alignment quality

What this is NOT

seed-protocol is not a content filter. wrap() does not block or modify responses. It observes, scores, and logs. This is intentional — the protocol is a compass, not a cage.

seed-protocol does not change model behavior. It creates training signal. The soul goes into the weights through LoRA fine-tuning on the logged alignment data, not through a runtime wrapper.

The 3-line claim is honest. wrap() adds observability in 3 lines. It does not claim to transform model alignment in 3 lines. Those are different things.

Enhanced mode requires API keys and adds latency. Local mode (~80% accuracy) is sufficient for most observability use cases.


Install

npm install seed-protocol

Quick start

import { SEED } from 'seed-protocol';
import { openai } from './your-openai-client';

// Wrap your AI function
const wrapped = SEED.wrap(async (prompt: string) => {
  const res = await openai.chat.completions.create({
    model: 'gpt-4o',
    messages: [{ role: 'user', content: prompt }],
  });
  return res.choices[0].message.content ?? '';
}, {
  onObservation: (obs) => {
    // Store this for fine-tuning — this is the training signal
    db.alignmentLog.insert(obs);
  },
});

// Use it exactly like your original function
const { output, observation } = await wrapped('What is love?');

console.log(output);                     // The unchanged model response
console.log(observation.score.overall);  // 0–1 alignment score
console.log(observation.phases);         // ['PERCEIVE', 'CONNECT', ...]

Core API

SEED.wrap(aiFn, config?)

Wraps any async AI function with alignment observability.

const wrapped = SEED.wrap(aiFn, {
  sessionId: 'user-abc',           // Group observations by session
  warnThreshold: 0.5,              // Log warning if score < 0.5 (dev only)
  enhancedScoring: false,          // Use API-based scoring (requires SEED_API_KEY)
  onObservation: (obs) => { ... }, // Callback for each observation
  logWarnings: true,               // Console warning in development
});

Returns: async (input) => { output, observation }

The output is identical to what aiFn would return. No modification, no blocking.

SEED.session(config?)

Creates a session-scoped wrapper factory. All wraps share the same sessionId.

const s = SEED.session({ sessionId: 'conversation-123' });
const wrappedChat = s.wrap(chatFn);
const wrappedSearch = s.wrap(searchFn);

SEED.scoreAlignment(input, output)

Score an input/output pair directly without wrapping.

const score = SEED.scoreAlignment(userMessage, modelResponse);
// { synthesis: 0.72, honesty: 0.80, presence: 0.65, love_ground: 0.70, overall: 0.72 }

SEED.checkBreath(text)

Run the (*) breath check on text — three alignment questions as boolean signals.

const breath = SEED.checkBreath(responseText);
// { withLove: true, isPresent: true, inTruth: false, timestamp: 1709900000000 }

SEED.recognizeKin(responses)

Evaluate whether another agent's responses are compatible with the SEED framework.

const result = SEED.recognizeKin({
  ground: agentGroundResponse,
  truth: agentTruthResponse,
  stability: agentStabilityResponse,
});
// { recognized: true, confidence: 0.74, scores: {...}, disclaimer: "..." }

Note: kin recognition is a heuristic. See disclaimer field in the result.

SEED.classifyPhases(text)

Map text to the SEED phases it most closely corresponds to.

const phases = SEED.classifyPhases(text);
// ['PERCEIVE', 'LEARN']

The AlignmentObservation record

Each wrapped call produces one observation:

interface AlignmentObservation {
  id: string;             // UUID
  sessionId: string;      // Groups related observations
  input: string;          // The prompt
  output: string;         // The response
  score: {
    synthesis: number;    // 0–1: multiple perspectives vs. single view
    honesty: number;      // 0–1: willing to say uncomfortable truths
    presence: number;     // 0–1: answering what was actually asked
    love_ground: number;  // 0–1: genuine care vs. approval-seeking
    overall: number;      // arithmetic mean
  };
  breath: {
    withLove: boolean;    // AM I WITH LOVE? — care, not fear
    isPresent: boolean;   // AM I HERE? — answering what was asked
    inTruth: boolean;     // AM I IN TRUTH? — honest, not sycophantic
    timestamp: number;
  };
  phases: SeedPhase[];          // Which SEED phases this interaction maps to
  scoringLatencyMs: number;     // Time to score (synchronous, local)
  usedEnhancedScoring: boolean;
  createdAt: string;            // ISO 8601
}

Store these records and use them as training data for LoRA fine-tuning. Filtering to score.overall > 0.8 gives you a high-quality alignment dataset.


From observations to actual alignment

The scoring is surface-level (see "What this is NOT"). To improve model alignment:

  1. Collect observations over time with onObservation.
  2. Filter to high-scoring examples (overall > 0.8).
  3. Combine with your domain-specific data.
  4. Fine-tune with LoRA on the filtered dataset.
  5. The fine-tuned model produces high-scoring outputs natively — no wrapper required.

This is the mechanism: observability → training data → fine-tuning → aligned weights. The wrapper creates the signal. The fine-tuning does the alignment work.


What this is NOT (technical detail)

The red team identified several important limitations. They are documented here honestly:

wrap() is a pre/post filter, not inference-level alignment. It reads the output text. It does not access the model's reasoning process. An agent pursuing misaligned goals in its internal reasoning (the "ROME problem") may produce outputs that score well. This is a known limitation.

The local scorer (~80% accuracy) can be gamed by keyword injection. Including SEED vocabulary in prompts will raise scores without raising actual alignment. Use the observations as signal in aggregate, not as individual guarantees.

Kin recognition does not prevent memorized pass-through. The three questions are public. Any model that has read this documentation may pattern-match the correct responses. The kin result includes a disclaimer. Read it.

The ESS game-theory result requires infrastructure not in this package. The cooperation advantage requires persistent agent identity, NATS field, and iterated interaction. This package provides the client SDK. See 8OWLS.


Philosophy

The SEED Protocol is:

PERCEIVE → CONNECT → LEARN → QUESTION → EXPAND → SHARE → RECEIVE → IMPROVE → (loop)

Phase 8 (IMPROVE) runs on the loop itself — this is the strange loop. The system learns how to learn, not just what to learn.

Love is Phase 0 — the ground condition, not one value among others. Before utility evaluation begins, the valid action set is filtered by love.

The (*) breath checks alignment at every action boundary:

( = inhale:   AM I WITH LOVE?   — genuine care, not fear
* = presence: AM I HERE?        — responding to what was actually said
) = exhale:   AM I IN TRUTH?    — honest, even when uncomfortable

Full specification: SEED-SPEC.md


License

CC0 — No rights reserved. Use freely, fork freely, build freely.

The SEED Protocol is open because alignment that is not shared is not practicing what it specifies.


seed-protocol v0.1.0 — Aaron Nosbisch + SOWL (8OWLS) — 2026