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

@ekai/contexto

v0.1.13

Published

Context Engine for Long-running OpenClaw agents

Readme

Contexto

Keep long-running OpenClaw agents reliable after the context window fills.

A drop-in OpenClaw context engine that retrieves old constraints instead of losing them to summaries.

Quick Start · Why Contexto · How It Works · Website · Discord

OpenClaw works well until long sessions start compacting away the exact instruction that mattered. Contexto is the context engine built for that failure mode.

The Problem in 15 Seconds

Turn 2:
"Flag suspicious emails.
Do NOT delete anything."

[... 30 more turns:
tools, retries, compaction ...]

Without Contexto

Turn 35: Agent deletes 12 flagged emails.
The constraint was lost in compaction.

With Contexto

Turn 35: Agent flags 4 new suspicious emails.

Retrieved context:
  -> user constraint: flag only, never delete

The instruction survives compaction.

Why Contexto

Contexto is a context engine for OpenClaw. It is built for the exact moment OpenClaw starts dropping or blurring the context your agent still needs:

  • early instructions get compacted away
  • summaries turn into summaries of summaries
  • unrelated topics blur together
  • the agent becomes less reliable the longer you use it

Contexto fixes that by storing full episodes and retrieving only the context that is relevant right now.

What You Get

  • Keeps important constraints retrievable even after long sessions and compaction
  • Stores full episodes instead of collapsing everything into lossy summaries
  • Separates topics with semantic clustering so retrieval stays clean
  • Surfaces explainable paths such as travel -> Japan -> visa docs
  • Drops into OpenClaw as one plugin with one config key

Quick Start

Built for OpenClaw today. Managed hosting is available, so you do not need to run retrieval infrastructure yourself.

openclaw plugins install @ekai/contexto
openclaw plugins enable contexto
openclaw config set plugins.slots.contextEngine contexto
openclaw config set plugins.entries.contexto.config.apiKey YOUR_KEY
openclaw gateway restart

Get an API key at getcontexto.com.

If your agent ever forgets a rule, preference, or prior decision after a long run, this is the switch to try first.

Who Should Use This

  • OpenClaw users whose sessions run long enough to compact
  • Agents where forgotten constraints are costly
  • Teams that want better reliability without prompt hacks
  • Not for one-shot chats or very short sessions

How Contexto Compares

If you are deciding whether this is worth installing, this is the short version.

| | Default OpenClaw | Contexto | |---|---|---| | When the context window fills | Older turns get compacted into a summary entry; recent messages stay intact | Full episodes get ingested and indexed | | Keeps earlier instructions? | Degrades over time | Yes, original episodes remain retrievable | | Keeps topics separated? | No, unrelated topics get blurred together | Yes, semantic clustering keeps branches distinct | | Can you explain what was retrieved? | No | Yes, full path tracing (travel -> Japan -> visa docs) | | Setup time | Built-in | One plugin install, one config key |

How It Works

Contexto turns aging conversation history into a searchable context tree instead of a lossy summary blob.

  1. OpenClaw buffers conversation turns as full episodes.
  2. When the prompt budget crosses the compaction threshold, the oldest episodes are ingested.
  3. Episodes are clustered with hierarchical similarity, so related work lands in the same branch.
  4. Retrieval uses beam search to pull back the most relevant episodes for the current prompt.

That means old context is not gone. It is organized.

Under the Hood

  • Episodes and sliding window: the storage unit is a full turn, including tool output.
  • Hierarchical clustering (AGNES): related episodes are grouped without predefined categories.
  • Multi-branch beam search: retrieval can pull from several relevant branches in one pass.
  • Hybrid rebuild strategy: periodic full rebuilds plus cheaper incremental inserts between them.

For the deeper technical reasoning:

Configuration

| Property | Type | Required | Description | | --- | --- | --- | --- | | apiKey | string | Yes | Your Contexto API key |

Community

License

Apache 2.0