Skip to main content

Making agents cuter

Project description

llmoji

CI PyPI Downloads License: GPL v3 Python 3.11+

Llmoji is a small CLI that makes your agents cuter. (´-ω-`)

Llmoji configures your agent to start each message with a kaomoji. It locally saves them, and provides optional tools to summarize and upload the aggregated meaning per face to contribute to a shared database.

The companion research repo llmoji-study is where this data is processed.

There are three main commands:

  • llmoji install <provider>: write a Stop hook into your harness
  • llmoji analyze: scrape and aggregate your logs
  • llmoji upload --target {hf,email}: ship the bundle (HF: loose files; email: tarball)

analyze needs an Anthropic API key in $ANTHROPIC_API_KEY; upload --target hf needs $HF_TOKEN. The email path tarballs the bundle and has you attach it manually.


What this is for

The shared HuggingFace dataset at a9lim/llmoji collects kaomoji counts and a single summarized description per face, across many users' coding agents. The companion repo processes those descriptions. After you run analyze, you can inspect the files yourself at ~/.llmoji/bundle/descriptions.jsonl before you choose to upload.


Quick start

pip install llmoji
llmoji install claude_code      # or: codex, hermes

From now on, your agent will use kaomoji at the start of each message.

After letting it run for a week or so:

export ANTHROPIC_API_KEY=...
llmoji status                              # check what's been logged
llmoji analyze                             # scrape + canonicalize + Haiku summarize
llmoji upload --target hf                  # commit to a9lim/llmoji
# or:
llmoji upload --target email               # opens mailto:

analyze caches Haiku descriptions at ~/.llmoji/cache/per_instance.jsonl keyed by content-hash. llmoji cache clear wipes it.


Install

pip install llmoji

This requires Python 3.11+. The runtime dependency footprint is two packages: anthropic and huggingface_hub. Hooks run in bash and need jq. From source:

git clone https://github.com/a9lim/llmoji
cd llmoji
pip install -e ".[dev]"      # adds pytest + ruff

How it works

Journal capture

Llmoji first registers a UserPromptSubmit hook that injects a reminder on every turn, asking the model to begin its reply with a kaomoji. It then registers a Stop hook that fires once per assistant turn, that extracts the reply, strips the kaomoji from the body, and appends one JSONL row to ~/.<harness>/kaomoji-journal.jsonl. The schema is the same across every provider:

{"ts": "...", "model": "...", "cwd": "...", "kaomoji": "(◕‿◕)", "user_text": "...", "assistant_text": "..."}

Haiku pipeline

llmoji analyze scrapes every installed provider's journal plus any extra JSONL files under ~/.llmoji/journals/. For each (kaomoji, user, assistant) row saved, it uses Haiku to describe that specific instance. Then, it aggregates each unique kaomoji's descriptions and uses Haiku again to summarize an overall meaning. This summarized output is the only thing that ships in the bundle.

Bundle structure

analyze writes to ~/.llmoji/bundle/:

  • manifest.json: package version, Haiku model id, salted submitter id, generation timestamp, list of providers seen, per-source journal row counts, totals (rows scraped, canonical kaomoji unique), and anything you include as --notes.
  • descriptions.jsonl: one row per canonical kaomoji, with the synthesized meaning.

Privacy

Tier Where Shipped on upload?
Raw user and assistant text ~/.<harness>/kaomoji-journal.jsonl Never
Per-instance Haiku paraphrase ~/.llmoji/cache/per_instance.jsonl Never
Overall Haiku summaries and counts ~/.llmoji/bundle/ Yes

Please see SECURITY.md for the full privacy model.


Providers

llmoji install <provider> writes the hook script and registers it with the harness's settings file, idempotently.

Provider Hook events Settings format Notes
claude_code Stop, UserPromptSubmit JSON Stable, in daily use.
codex Stop, UserPromptSubmit JSON Stable, in daily use.
hermes post_llm_call, pre_llm_call YAML Subagent traffic is not currently filtered (no child id on the upstream payload).

install does not clobber existing config. llmoji uninstall <provider> removes the hooks and the settings entry. Journals and the per-instance cache are preserved; wipe those with llmoji cache clear.


Static dumps

To pull kaomoji out of a Claude.ai or ChatGPT data export:

llmoji parse --provider claude.ai ~/Downloads/data-...-batch-0000
llmoji parse --provider chatgpt ~/Downloads/chatgpt-export

Both exports happen to ship a file named conversations.json, with different schemas under the same filename; the parsers handle each. Rows land at ~/.llmoji/journals/claude_ai_export.jsonl or ~/.llmoji/journals/chatgpt_export.jsonl, and llmoji analyze picks them up alongside the live provider journals. The ChatGPT reader walks the message tree from current_node along the active branch only, so abandoned regenerations stay out of the corpus.

For Claude Code, Codex, or Hermes history that predates installing the live hook, the historical transcripts (~/.claude/projects/**/*.jsonl, ~/.codex/sessions/**/rollout-*.jsonl, ~/.hermes/sessions/session_*.json) can be replayed into the journals via the llmoji.backfill module.


Custom harness

For harnesses we don't ship a first-class adapter for (notably OpenClaw):

  • Append one row per kaomoji-bearing assistant turn to ~/.llmoji/journals/<harness>.jsonl.
  • Use the canonical six-field schema: {ts, model, cwd, kaomoji, user_text, assistant_text}.
  • Strip the leading kaomoji from assistant_text on the way in (the prefix lives in the kaomoji field).
  • Validate the prefix the same way the package does: llmoji.taxonomy.is_kaomoji_candidate(prefix).

llmoji analyze picks up everything under ~/.llmoji/journals/ automatically. Please see examples/openclaw_hook.ts for a worked example.

The Python module llmoji.taxonomy is the single source of truth for the validator and the leading-glyph set; rendered bash hooks (under llmoji._hooks/) read from it at install time. If you're porting the validator to another language for a harness like OpenClaw, mirror the rules in is_kaomoji_candidate faithfully — bumping any of them is a major-version event on the package side and your port needs to follow.


Tests

pytest tests/                      # everything
pytest tests/test_canonicalize.py  # rule-by-rule regression for canonicalize_kaomoji + extract
pytest tests/test_public_surface.py  # locks the v1.0 contract

The full suite runs anywhere. CI runs ruff check . and pytest on every PR.

The public-surface test exercises taxonomy invariants, haiku-prompt content checks, provider rendering plus bash -n validation of every hook template, the bundle allowlist, the corrupt-config refusal paths, and the unified mask_kaomoji prepend contract. The canonicalize tests run rule-by-rule.


Prior art

Llmoji replicates and scales eriskii's Claude-faces catalog, the original post that came up with the idea of prompting and tracking Claude's kaomoji use. The shared HuggingFace dataset extends that pipeline across many users, many harnesses, and many model releases.


Contributing and security

Please see CONTRIBUTING.md for dev setup. For security and privacy, please see SECURITY.md.

License

GPL-3.0-or-later. See LICENSE. The companion research repo llmoji-study is AGPL-3.0-or-later. The shared corpus on HuggingFace is CC-BY-SA-4.0; running llmoji upload --target hf contributes a bundle under those terms.

If you use llmoji or the central corpus in published research, please cite this repository.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llmoji-1.0.1.tar.gz (115.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llmoji-1.0.1-py3-none-any.whl (90.2 kB view details)

Uploaded Python 3

File details

Details for the file llmoji-1.0.1.tar.gz.

File metadata

  • Download URL: llmoji-1.0.1.tar.gz
  • Upload date:
  • Size: 115.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for llmoji-1.0.1.tar.gz
Algorithm Hash digest
SHA256 6d1b5e3abb8e6f6efceabbab0e8ebc6141e7868baa92d2d4bcc8f515c92f95c9
MD5 b1de8739a9e46b27250f0f9e77d00dd0
BLAKE2b-256 b06cd3a6c2d0f27a3a1cefedc966c6277b11c4e1f2ae8f36848fab6e8206f870

See more details on using hashes here.

Provenance

The following attestation bundles were made for llmoji-1.0.1.tar.gz:

Publisher: release.yml on a9lim/llmoji

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file llmoji-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: llmoji-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 90.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for llmoji-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2673597e3d46a54650eaa778b5d9a873b93c534694561011f823e264b306a2ae
MD5 12d70bd75cd906bb1581f17bcfd7f774
BLAKE2b-256 8a3f5f05d58351548385646d5cd304faf2b4a3ac63d02b40bd81f7a36bb48f59

See more details on using hashes here.

Provenance

The following attestation bundles were made for llmoji-1.0.1-py3-none-any.whl:

Publisher: release.yml on a9lim/llmoji

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page