Model-agnostic coding agent with first-class Harness engineering
Project description
Meris Agent
Meris Cloud (hosted SaaS) is proprietary and not in this repo — see CLOUD.md.
Model-agnostic terminal coding agent — Harness-first, inspired by AtomCode, Claude Code, Codex, Cursor, and Kiro.
Agent = Model + Harness
North star: a self-evolving coding agent — the more you use it in a project, the better it fits your repo and habits. Evolution lives in the Harness (rules, skills, sessions), not in hoping the model remembers.
Meris ships a lean CLI (meris) plus a Harness layer you control: AGENTS.md, permissions, hooks, and Definition-of-Done sensors. Bring your own LLM (OpenAI-compatible or Anthropic).
Install
From PyPI:
pip install meris-agent
pip install "meris-agent[tui]" # Textual TUI
pip install "meris-agent[anthropic]" # native Anthropic provider
pip install "meris-agent[mcp]" # MCP client
pip install "meris-agent[full]" # all optional deps
From source:
git clone https://github.com/meris-agent/meris.git
cd meris
pip install -e .
Requires Python 3.11+. Meris does not bundle a model — set an API key (see below).
Quick start
cd your-project
meris version
# Pick a provider preset (OpenAI, DeepSeek, Gemini, GLM, Qwen, Groq, Anthropic, Ollama, …)
export MERIS_PROVIDER=deepseek # or: openai | gemini | glm | moonshot | qwen | anthropic | ollama
export DEEPSEEK_API_KEY=sk-... # env name depends on provider — run: meris models show deepseek
meris models list # all presets + current env
meris init-harness .
meris doctor
meris ask "where is auth handled?"
meris plan "add rate limiting to /api/users"
meris run --approve "fix the failing test in tests/test_auth.py"
On Windows, use set VAR=value instead of export. Copy .env.example to .env for local overrides. Full vendor table: docs/MODELS.md. Hand this to new users: docs/USER_SETUP.md.
Commands
| Command | What it does |
|---|---|
meris ask "…" |
Read-only Q&A over your repo |
meris plan "…" |
Write a task list to .meris/plan/tasks.md (no code changes) |
meris run "…" |
Full agent: read / edit / bash / git tools |
meris run --approve "…" |
Same as run, but confirm each write/bash |
meris run --from-plan "…" |
Implement the saved plan |
meris run --no-sensor "…" |
Skip post-edit DoD sensors |
meris run --event-stream FILE |
Append JSONL loop events (- = stdout) |
meris exec "…" --json |
Headless run; JSON result on stdout (CI/scripts) |
meris review [--staged] |
Read-only git diff review (markdown checklist) |
meris harness check |
Static harness lint (paths, imports, DoD helpers) |
meris benchmark run |
Run benchmark task suite |
meris benchmark run --local-only |
Offline local tasks (no API) |
meris release check |
Pre-tag readiness (pytest, mock benchmark, harness) |
meris ratchet scan |
Passive harness evolution from failures |
meris ratchet digest |
Active habit mining from sessions |
meris models list |
Show all provider presets + current env |
meris models show <provider> |
Show model & env details for a provider |
meris doctor |
Check API key, model, and harness files |
meris init-harness . |
Scaffold AGENTS.md, .meris/settings.yaml, PROGRESS.md |
Harness (your project)
After meris init-harness, these files steer the agent in your repo:
| File | Role |
|---|---|
AGENTS.md |
Project rules, layout, DoD |
.meris/settings.yaml |
Tool permissions, sensors, hooks, MCP, models |
PROGRESS.md |
Cross-session progress notes |
.meris/skills/*.md |
Optional domain skills |
.meris/spec/*.md |
Optional spec workflow (Kiro-style) |
Templates live in templates/. Example vault harness: docs/examples/ainote-vault/.
Configuration
End-user onboarding (install → API key → init-harness → doctor): docs/USER_SETUP.md.
Environment variables (common):
| Variable | Purpose |
|---|---|
OPENAI_API_KEY / LLM_API_KEY |
API key (OpenAI-compatible) |
MERIS_BASE_URL |
API base URL |
MERIS_MODEL |
Model name |
MERIS_PROVIDER=anthropic |
Use native Anthropic (ANTHROPIC_API_KEY) |
MERIS_NATIVE |
1/0 force on/off; unset + built meris-rs → auto native |
MERIS_NATIVE_PROVIDER |
0 to keep Python HTTP for chat while native harness on |
Context budget in .meris/settings.yaml:
"context": { "maxMessages": 48, "maxTokens": 32000, "maxToolTokens": 2000 }
Permissions — allow/deny tool patterns (bash globs, path blocks). See templates/settings.example.yaml.
Workflows
Plan → run
meris plan "add session prune command"
meris run --from-plan "implement the plan" --approve
Spec checklist
meris spec init "rate limiting"
meris spec status
meris spec next --note "REST API only"
meris run --from-spec "implement checklist"
Benchmark (harness regression)
meris benchmark list
meris benchmark run
Ratchet (passive: failures → harness; active: habits from history)
meris init-harness .
meris ratchet learn --init # project layout → proposals
# Passive (keep using these)
meris run --ratchet "your task" # after run: profile + scan proposals
meris benchmark run # failures → events.jsonl; may auto-scan
meris ratchet scan
meris ratchet analyze --last-fail # LLM proposals (needs API)
meris ratchet review # apply or reject interactively
# Active — repeated user themes → ask before writing harness
meris ratchet digest # rule-based; --llm for API pass
meris ratchet digest --dry-run
meris ratchet insights review # confirm → proposal → apply
meris ratchet profile --show # habits from approve_denied events
TUI
pip install "meris-agent[tui]"
meris tui --cwd . --mode run --approve
Interactive log + task input. Sessions panel on the left — Enter to resume, Ctrl+R latest, Ctrl+S refresh, Ctrl+L clear log. Enter or Ctrl+Enter sends a message.
MCP (external tools)
Add servers in .meris/settings.json:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/dir"]
},
"remote": {
"transport": "sse",
"url": "http://localhost:8080/sse"
}
}
}
pip install "meris-agent[mcp]"
meris mcp list
Tools register as mcp_{server}_{tool}; resources and prompts as mcp_{server}_read_resource / mcp_{server}_get_prompt.
Sessions & parallel
Every run saves to .meris/sessions/{id}.json:
meris session list
meris session show abc123
meris session resume abc123
meris run "task" --session-id my-id
meris session prune --keep 10
Run multiple tasks:
meris parallel "explain auth" "explain db layer" --mode ask -j 2
meris parallel "fix test A" "fix test B" --mode run --isolate
In run mode, the agent can call subagent_run for read-only sub-tasks with isolated context.
Hooks & skills
Tool hooks (Claude Code–style) in settings.json:
{
"hooks": {
"preToolUse": [
{ "matcher": "bash", "command": "echo pre $MERIS_TOOL_NAME" }
],
"postToolUse": [
{ "matcher": "write_file|edit_file", "command": "echo post" }
],
"onSave": [
{ "matcher": "*.py", "command": "python -m ruff check $MERIS_SAVED_PATH" }
],
"onCommit": [
{ "command": "pytest tests/ -q" }
]
}
}
Env: MERIS_TOOL_NAME, MERIS_TOOL_ARGS, MERIS_TOOL_RESULT, MERIS_HOOK_PHASE.
Skills — add .meris/skills/{name}.md; the agent loads them via load_skill.
Optional: IDE & Rust
| Component | Docs |
|---|---|
| VS Code / Cursor extension | extensions/vscode-meris/ · LOCAL_SETUP |
Rust core (meris-rs) |
meris native build · NATIVE_BINARY · auto native when binary present |
Windows one-shot dev setup: powershell -ExecutionPolicy Bypass -File scripts\setup-local.ps1
Contributing & development
| Topic | Link |
|---|---|
| Documentation index | docs/README.md |
Ratchet (meris ratchet scan) |
docs/RATCHET_DESIGN.md |
| Harness architecture | docs/harness/architecture.md |
| Publish to PyPI | scripts/publish-pypi.ps1 |
| Meris Cloud (hosted SaaS) | Proprietary — see CLOUD.md |
Naming: Meris · CLI meris · PyPI meris-agent · env MERIS_* · Harness dir .meris/
Repo layout:
meris/
├── meris/ # Python agent package
├── meris-rs/ # Optional Rust harness core
├── extensions/vscode-meris/
├── templates/
└── tests/
License
MIT — see LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file meris_agent-0.0.2.tar.gz.
File metadata
- Download URL: meris_agent-0.0.2.tar.gz
- Upload date:
- Size: 347.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57d96002588a193de5324332ccf8b43daf452ad3dd1e29e9d614d52e7df0a6e1
|
|
| MD5 |
46b97f87623aad845091687407db0613
|
|
| BLAKE2b-256 |
fb7ec435c001c7ed74d96c1b7350b0318a6a5b8a5c23a7c302923ef3c53f80f6
|
File details
Details for the file meris_agent-0.0.2-py3-none-any.whl.
File metadata
- Download URL: meris_agent-0.0.2-py3-none-any.whl
- Upload date:
- Size: 166.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f8ea6187c3887eeb75b8a048164a81917559db02943e4c5668ffdc5887c7c987
|
|
| MD5 |
23ee6c00ba3fc0f17ed0110045cecaac
|
|
| BLAKE2b-256 |
d8b0c4ba4d9a071188c5d56ec4c608c21a5d8afcd529c22c188b5cbaaf192508
|