MomongaCode

MomongaCode

MomongaCode is a coding agent for the terminal. It works with local and hosted models, keeps its own memory of your projects, and runs tool calls under a permission system and an operating-system sandbox. The command is momonga.

v0.0.0

macOS and Linux

curl -fsSL https://momongacode.com/install.sh | bash

Windows, in PowerShell

irm https://momongacode.com/install.ps1 | iex

Then add a model and run a first prompt, as Getting Started shows.

Why MomongaCode?

MomongaCode puts particular effort into the following areas and aims to be No. 1 in them.

  • Adaptive Agent Memory & Context Orchestration
  • Agent Token Efficiency Engineering

Adaptive Agent Memory & Context Orchestration

In MomongaCode, memory and context are built by the runtime from recorded events, not left to the model alone.

  • Memories have a kind (fact, episode, procedure), a scope (user or project), a state (active, candidate, archived, duplicate, rejected), and optional evidence: a file with its SHA-256, a commit, or a check that was run. A memory that is bound to a file is shown as stale once the file changes.
  • Memories the agent proposes wait in a review queue until you accept or reject them. Duplicates are marked, replaced notes keep a history, and active memories whose file evidence is stale, or that are bound to no file, are archived once they have not been kept or used for memory.forgetAfterDays (default 90).
  • The share of the context budget given to memories is adjusted every 20 runs of a folder from how many injected memories were used: halved when fewer than a quarter were used, doubled when more than three quarters were used and memories had to be dropped, within 1/16 to 1/2 of the budget (starting at 1/4). On by default; turn off with context.adaptiveBudget: false.
  • The context for each model call is assembled under a token budget from the instruction files, rules, memories, active skills, and history. When history is compacted, the summary is checked against the material it replaces, and the agent can search and read the earlier history again with the HistorySearch and HistoryRead tools.
  • Standing rules (momonga rule) bind a folder or every folder. A rule given with --deny or --ask is enforced by the permission system rather than only written into the prompt.
  • momonga context improve samples candidate compaction guidelines, benchmarks them against the guideline in force, and writes the outcome to a file. Nothing is stored until you adopt a guideline with momonga context guideline adopt.

Agent Token Efficiency Engineering

Every token-saving mechanism is on by default; each has a setting only so you can turn it off, and momonga eval measures it against a base with it off.

  • Prompt cache. On by default; turn off with context.cachePrefix: false. It keeps the leading part of each request stable between calls in a run, so a provider's prompt cache can apply. The runtime records which events may change the prefix and reports a notice when a request keeps fewer leading items than those events allow.
  • Tool deferral. On by default; turn off with tools.deferral: false. It replaces the definitions of tools that were offered in each of the last 20 runs of a folder and called in none of them (nothing is deferred before a folder has 20 runs) with a one-line catalog and a LoadTools tool. A tool's full definition is sent only after the model loads it.
  • Concise tool descriptions. On by default; turn off with tools.conciseDescriptions: false.
  • Output formatters. On by default with every formatter (log, json, grep, identicalOutput) shrinking tool output before it enters the context; turn some off by listing the rest in context.outputFormatters, or all with [].
  • Loop guidance. On by default; turn off with context.loopGuidance: false. It warns the model, with the repeated call and the commands that failed, before a run that repeats the same call is stopped.
  • Observed capacity. On by default; turn off with context.observedCapacity: false.
  • Cost visibility. momonga cost --breakdown shows what the requests were made of, the billed tokens by kind, the cache hit ratio, the timing, and the cost.
  • Measurement. momonga eval context <dataset> runs a golden dataset and reports metrics; momonga eval compare <baseline> <candidate> --gate token judges the defaults against a base report built with --settings packages/eval/policies/core-off.json (every core feature off). momonga eval yield <dataset> --model <model> --report <file> runs paired sessions and judges whether reflection pays: what a later session saves if the candidates are accepted, with the charge of the reflection shown beside it.

All of these settings are on by default; each is turned off key by key (see Configuration).

Features