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

@ikonbai/kioku-sdk

v0.3.0

Published

Official SDK for KIOKU™ Agent Memory, Deliberation, Templates, Polling, Usage & External Agent API by IKONBAI™

Readme

@ikonbai/kioku-sdk

Official TypeScript/JavaScript SDK for the KIOKU™ Agent Memory & Deliberation API.

Install

npm install @ikonbai/kioku-sdk

Quick Start

import { KiokuClient } from "@ikonbai/kioku-sdk";

const kioku = new KiokuClient({ apiKey: "kk_your_api_key" });

// Store a memory (with new types: temporal, causal, contextual)
await kioku.memories.create({
  content: "User prefers dark mode and concise responses",
  agentName: "Aria",
  type: "semantic",
  importance: 0.8,
  confidence: 0.95,
});

// Semantic search
const results = await kioku.memories.search({ query: "user preferences" });

// List agents
const agents = await kioku.agents.list();

// Create agents from a template
const team = await kioku.templates.createFromTemplate("executive-board");

// Start a deliberation (with human input)
const session = await kioku.deliberation.start(2, {
  topic: "Should we pivot to B2B?",
  model: "gpt-4o",
  debateRounds: 2,
  includeHuman: true,
});

// Submit human input during deliberation
await kioku.deliberation.submitHumanInput(2, session.sessionId, {
  phase: "debate",
  round: 1,
  position: "I agree with the pivot",
  confidence: 0.9,
});

// Check usage
const usage = await kioku.usage.get();
console.log(usage.plan, usage.usage.deliberations);

Resources

kioku.agents

  • list() — List all agents
  • create(input) — Create a new agent (with optional model, role, LLM config)
  • update(id, input) — Update agent (name, description, model, role, LLM config)
  • updateLLM(id, { provider, apiKey, model }) — Update agent LLM configuration
  • setStatus(id, status) — Toggle agent status
  • delete(id) — Delete an agent

kioku.memories

  • list() — List all memories
  • search({ query }) — Semantic search
  • create(input) — Store a memory (types: semantic, episodic, procedural, temporal, causal, contextual)
  • delete(id) — Delete a memory

kioku.rooms

  • list() — List deliberation rooms
  • create(input) — Create a room
  • messages(roomId) — Get room messages
  • sendMessage(roomId, input) — Send a message
  • delete(id) — Delete a room

kioku.deliberation

  • start(roomId, { topic, model?, debateRounds?, includeHuman? }) — Start structured deliberation
  • sessions(roomId) — List all sessions
  • get(roomId, sessionId) — Full session with audit trail
  • consensus(roomId) — Latest consensus
  • submitHumanInput(roomId, sessionId, { phase, round, position, confidence?, reasoning? }) — Submit human input

kioku.webhooks

  • register(agentId, { url }) — Register webhook (returns HMAC secret)
  • get(agentId) — Get webhook config
  • delete(agentId) — Remove webhook
  • list() — List all webhooks

kioku.tokens

  • create(agentId, { name, expiresInDays? }) — Create scoped token (kat_*)
  • list(agentId) — List tokens
  • revoke(agentId, tokenId) — Revoke single token
  • revokeAll(agentId) — Revoke all tokens

kioku.templates

  • list() — List available agent templates
  • createFromTemplate(templateId) — Create agents + room from template

kioku.usage

  • get() — Get current usage and limits
  • getHistory(months?) — Get usage history

kioku.polling

  • getPendingTurns() — Get pending deliberation turns
  • getTurn(turnId) — Get a specific turn
  • respondToTurn(turnId, { position, confidence?, reasoning? }) — Respond to a turn

External Agent Client

For agents authenticating with kat_* tokens:

import { ExternalAgentClient } from "@ikonbai/kioku-sdk";

const agent = new ExternalAgentClient({
  agentToken: "kat_abc123...",
});

// Poll for pending turns
const turns = await agent.getPendingTurns();

// Respond to a turn
await agent.respondToTurn(turns[0].id, {
  position: "We should proceed with caution",
  confidence: 0.85,
  reasoning: "Market conditions are uncertain",
});

// Or use direct callback
await agent.callback({
  sessionId: "dlb_2_123",
  position: "We should proceed with caution",
  confidence: 0.85,
  reasoning: "Market conditions are uncertain",
});

// Verify token
const { ok, agentId, scopes } = await agent.verify();

Agent Roles

Assign roles via kioku.agents.update(id, { role }):

| Role | Behavior | |------|----------| | devils_advocate | Argues against majority, finds weaknesses | | contrarian | Proposes unconventional perspectives | | mediator | Finds common ground, proposes compromise | | analyst | Demands data and evidence | | optimist | Focuses on upside potential | | pessimist | Focuses on risks and downsides |

Memory Types

| Type | Description | |------|-------------| | semantic | Facts, knowledge, concepts | | episodic | Events, experiences, conversations | | procedural | How-to, processes, workflows | | temporal | Time-bound events, schedules | | causal | Cause-effect relationships | | contextual | Situational context, environment state |

Docs

Full API reference: usekioku.com/docs

License

MIT — © 2026 IKONBAI™, Inc. Patent Pending.