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

thoth-agent

v2026.5.6-beta1

Published

A self-improving framework for domain-specific AI agents with layered memory, adaptive retrieval, and session-aware orchestration.

Readme

ThothAgent

A self-improving framework for domain-specific AI agents with layered memory, adaptive retrieval, and session-aware orchestration.

ThothAgent is a configurable runtime for building vertical AI copilots that improve over time through persistent memory, provider-based retrieval, tool feedback loops, and structured session lifecycle management.

Why ThothAgent

  • Build domain-specific agents instead of one-off chatbots
  • Persist long-term memory across sessions with layered memory architecture
  • Route memory through pluggable external providers instead of hard-coded storage
  • Keep session continuity with SQLite-backed history, summaries, and compaction
  • Combine tools, retrieval, and memory into a single agent runtime
  • Evolve agent behavior over time through explicit memory writes and conversation insights

Core Capabilities

  • Layered memory: MEMORY.md, USER.md, DOMAIN.md, working state, and external retrieval
  • Adaptive retrieval: provider-driven memory_search with hybrid lexical/embedding scoring
  • Session orchestration: active session routing, indexing, archival summaries, and compaction
  • Tool runtime: native tool catalog, secure execution harness, and structured trace logging
  • Pluggable providers: local file provider by default, extensible for remote memory backends
  • Multi-surface control: CLI, TUI, gateway, and web control UI

Quick Start

npm install -g thoth-agent
thoth configure
thoth tui

CLI Commands

thoth help
thoth configure
thoth configure provider <provider> --api-key <key>
thoth gateway [--host 127.0.0.1] [--port 18889]
thoth model list
thoth model current
thoth model use <primary> [fallback1,fallback2]
thoth model key <provider> <apiKey>
thoth model oauth <provider>
thoth onboard [--install-daemon]
thoth tui

Main command groups:

  • thoth configure: configure model providers and credentials
  • thoth tui: start the terminal workspace
  • thoth gateway: start the gateway and web control UI backend
  • thoth model *: inspect or update model routing
  • thoth onboard: initialize ~/.ThothAgent

Project Structure

src/
├── agent/              # prompt composition and agent-facing memory formatting
├── cli/                # CLI, TUI entrypoints, and configure flows
├── core/               # MCP integration and skill registry
├── gateway/            # websocket/http gateway and web control surface backend
├── harness/            # guarded exec/read/write tool harness
├── home/               # ~/.ThothAgent bootstrap and runtime home layout
├── infra/              # logging, metrics, scheduler, tracing, maintenance
├── llm/                # provider adapters and tool-loop runtime
├── memory/             # unified memory facade
│   └── layered/        # layered memory, retrieval, providers, and prompt injection
├── model_manager/      # model routing and provider configuration
├── runtime/            # tool manager and agent runtime loop
├── session/            # session store, compression, routing, archiving
└── tools/              # built-in tool adapters

Runtime Data Layout

~/.ThothAgent/
├── AGENTS.md
├── ThothAgent.json
├── agents/
│   └── main/
│       ├── SOUL.md
│       ├── USER.md
│       ├── MEMORY.md
│       ├── DOMAIN.md
│       ├── memory/
│       │   ├── daily/
│       │   └── layered/
│       │       ├── retrieval_memory.db
│       │       └── working_state.json
│       └── sessions/
│           ├── session.sqlite
│           └── session.json
└── workspace/

External Memory Providers

ThothAgent treats external memory as a provider capability rather than a fixed local database.

  • Default provider: local-file
  • Config path: memory.externalProvider in ~/.ThothAgent/ThothAgent.json
  • Search path: memory_search calls the currently configured provider abstraction
  • Future-ready: remote providers such as Honcho can be added without rewriting the tool layer

Self-Improvement Loop

ThothAgent is designed to improve over time through a simple but extensible loop:

  1. The agent completes a turn
  2. High-value turns trigger background memory persistence
  3. Explicit memory writes are stored as durable retrieval records
  4. Session summaries and conversation insights become searchable long-term memory
  5. Later turns can recall and reuse those insights through provider-backed retrieval

Web Control UI

The built-in web UI provides:

  • chat surface with live session sync
  • dashboard view for runtime state
  • Apple-inspired glass UI system
  • multimodal input entrypoints
  • animated message timeline and trace visibility

Development

npm run build
npm run typecheck
npm run memory:test

GitHub About

Suggested description:

Self-improving domain agents with layered memory, adaptive retrieval, and session-aware orchestration.

Suggested topics:

agent-framework, vertical-ai, memory, retrieval, session-management, tool-use, self-improving, typescript

License

MIT