llm-cli-gateway / site
AGENTS.md16 starsChanged 2 months agoMITView on GitHub
llm-cli-gateway is a local-first MCP server for operating coding-agent CLIs and configured API providers through one control plane. Use it when an MCP client needs cross-model review, provider CLI session continuity, durable async jobs, or a single approval and audit surface. - Ask Claude Code, Codex, Gemini/Antigravity, Grok Build, Mistral Vibe, Devin, Cursor Agent, or configured API providers from one MCP client. - Review a Git change with review_changes, or run general cross-model validation with consensus_check, compare_answers, second_opinion, or red_team_review.…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,700 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository19 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- site/llms.txtllms.txt
- async-job-orchestrationSkill
- implement-review-fixSkill
- least-cost-routingSkill
- multi-llm-reviewSkill
- personal-agent-config-kitSkill
- provider-claudeSkill
- provider-codexSkill
- provider-cursorSkill
- provider-devinSkill
- provider-geminiSkill
- provider-grokSkill
- provider-mistralSkill
- public-demo-sessionSkill
- retrospective-walkSkill
- secure-orchestrationSkill
- session-workflowSkill
- supply-chain-guardSkill
The file
Show its rules and text
We split this agents.md into the rules it gives an agent
14 rules. About 2 are common, 6 are distinctive, and 6 are very specific to this project.
≈2
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Ask Claude Code, Codex, Gemini/Antigravity, Grok Build, Mistral Vibe, Devin, Cursor Agent, or configured API providers from one MCP client.
- Very specific: line 15
Start long-running provider work with *_request_async and recover it later with llm_job_status, llm_job_watch, and llm_job_result.
- Distinctive: line 19
Keep a single-developer instruction baseline in sync across workstations and repository overlays with Personal Agent Config Kit.
- Distinctive: line 26
Do not use the HTTP transport without bearer or OAuth authentication.
- Distinctive: line 27
Do not use remote provider calls without a registered workspace.
- Common: line 28
Do not treat the gateway as a hosted model API replacement.
- Common: line 30
Do not put API key values in config.
- Very specific: line 35
Read <https://llm-cli-gateway.dev/install.md> and configure the current MCP client to launch:
- Distinctive: line 42
Use stdio transport unless the user explicitly asks for remote HTTP.
- Very specific: line 139
Run llm-cli-gateway doctor --json for local configuration diagnostics.
- Very specific: line 140
Use cli_versions to inspect installed provider CLIs.
- Very specific: line 141
Use llm_process_health to inspect async-job manager state and persistence.
- Distinctive: line 142
If a remote call cannot access files, register or select a workspace instead of trying to pass arbitrary host paths.
- Very specific: line 144
If an async job is interrupted, poll llm_job_status and fetch the result with llm_job_result.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
llm-cli-gateway agent guide
llm-cli-gateway is a local-first MCP server for operating coding-agent CLIs and configured API providers through one control plane. Use it when an MCP client needs cross-model review, provider CLI session continuity, durable async jobs, or a single approval and audit surface.
When to use
- Ask Claude Code, Codex, Gemini/Antigravity, Grok Build, Mistral Vibe, Devin, Cursor Agent, or configured API providers from one MCP client.
- Review a Git change with
review_changes, or run general cross-model validation withconsensus_check,compare_answers,second_opinion, orred_team_review. - Start long-running provider work with
*_request_asyncand recover it later withllm_job_status,llm_job_watch, andllm_job_result. - Reuse provider-native sessions through
session_create,session_get, and provider-specific resume support. - Keep a single-developer instruction baseline in sync across workstations and repository overlays with Personal Agent Config Kit.
- Expose the gateway over local stdio by default, or HTTP when a remote client needs it and authentication is configured.
When not to use
- Do not use the HTTP transport without bearer or OAuth authentication.
- Do not use remote provider calls without a registered workspace.
- Do not treat the gateway as a hosted model API replacement; provider CLIs keep their own credentials, tools, files, and session semantics.
- Do not put API key values in config. Configured API providers read keys from named environment variables at request time.
Install task for agents
Read https://llm-cli-gateway.dev/install.md and configure the current MCP client to launch:
npx -y llm-cli-gatewayUse stdio transport unless the user explicitly asks for remote HTTP.
Local stdio setup
The default command is:
{
"command": "npx",
"args": ["-y", "llm-cli-gateway"]
}The MCP Registry name is io.github.verivus-oss/llm-cli-gateway.
Remote HTTP setup
HTTP transport is opt-in:
LLM_GATEWAY_AUTH_TOKEN=your-long-random-token llm-cli-gateway --transport=httpThe default endpoint is http://127.0.0.1:3333/mcp. Remote HTTP supports a
static bearer token or built-in OAuth 2.0 with PKCE. Remote calls are
principal-scoped. OAuth or trusted-principal callers cannot read another
principal's sessions, jobs, or stored requests; callers sharing one static bearer
token deliberately share one principal and are not multi-tenant isolated.
Remote provider calls require a registered workspace. Non-Kit local stdio
callers can pass local workingDir, addDir, or provider-native path controls
directly. Claude and Mistral requests made with Personal Agent Config Kit enabled are an
exception: the Kit rejects caller-supplied workingDir; use an already
configured registered workspace alias or the configured default workspace. A
Codex Kit request is not in that exception set and may supply an absolute
workingDir.
Kit scope never inherits the gateway process cwd.
An ordinary local CLI request with no resolved target runs in a fresh private
temporary cwd, not the gateway process repository. Select workingDir or a
registered workspace for repository-dependent work. A gateway worktree also
requires a selected registered workspace and never falls back to process cwd.
Cwd-scoped resumeLatest requests fail closed without a stable target.
Gateway worktrees work with file-backed and PostgreSQL session managers, but
their filesystem ownership remains host-local. For session deletion,
session_clear_all, and file-backed TTL eviction, both managers keep a failed
Git removal as a hidden cleanup-pending tombstone and retry cleanup when a
manager is registered on the owning host; the record is finalized only once Git
no longer registers the worktree, read back rather than inferred from the
recorded path being absent. Deletion processed by a different host removes no worktree
and leaves the owning host's record intact. The database-side
cleanup_expired_sessions function stages the same tombstone instead of
deleting a worktree-bearing session; it invokes no gateway observer and so
attempts no removal itself. A tombstone is not bounded by retention.
Security model
- stdout is reserved for MCP JSON-RPC; gateway diagnostics use stderr.
- Async job stores persist prompts and results; treat SQLite or Postgres stores as sensitive at rest.
review_changesretains its exact fenced prompt in the expiry-bound job payload, stores only a hash marker in persisted argv, and does not copy the repository-review prompt into the flight recorder.- API provider keys are resolved from environment variables and excluded from persisted payloads, dedup keys, logs, diagnostics, and the flight recorder.
- Dangerous remote OAuth configurations fail closed.
- Approval decisions are inspectable through
approval_list.
Tool families
See https://llm-cli-gateway.dev/tools.md for the runtime-derived public MCP tool index. Common families:
- Provider requests:
claude_request,codex_request,gemini_request,grok_request,mistral_request,devin_request,cursor_request, and async variants. - Async jobs:
llm_job_status,llm_job_watch,llm_job_result,llm_job_cancel,llm_request_result. - Sessions:
session_create,session_list,session_set_active,session_get,session_delete,session_clear_all. - Review and validation:
review_changes,consensus_check,compare_answers,red_team_review,second_opinion,validate_with_models. - Workspaces:
workspace_create,workspace_list,workspace_get,workspace_register_existing_repo. - Personal Agent Config Kit, local-only:
config_init,config_publish,config_sync,config_status,config_rollback,config_ack_stale,config_recover_kit_attempt, andexplain_effective_config.
Common workflows
- Cross-model review: https://llm-cli-gateway.dev/workflows/cross-model-review.md
- Personal Agent Config Kit: https://llm-cli-gateway.dev/guides/personal-agent-config-kit.md
- Short install spec: https://llm-cli-gateway.dev/install.md
- Runtime tool index: https://llm-cli-gateway.dev/tools.md
Troubleshooting
- Run
llm-cli-gateway doctor --jsonfor local configuration diagnostics. - Use
cli_versionsto inspect installed provider CLIs. - Use
llm_process_healthto inspect async-job manager state and persistence. - If a remote call cannot access files, register or select a workspace instead of trying to pass arbitrary host paths.
- If an async job is interrupted, poll
llm_job_statusand fetch the result withllm_job_result. - Page normalized progress with
afterProgressSeq, or usellm_job_watchfor a bounded long poll. Progress messages are privacy-safe activity, not raw reasoning or provider output. - An argv-bound provider can reject a multibyte prompt as non-retryable
input_too_large. The gateway never truncates instructions; narrow the input or choose a verified stdin, ACP, or HTTP path. Codex new and resume prompts use stdin.codex_fork_sessionremains argv-bound and rejects oversized UTF-8 prompts as non-retryableinput_too_large. Every other caller-controlled argv value is also checked in its final encoded form, including serialized JSON and joined lists, before a provider can spawn. The resolved command line also has a conservative platform-specific aggregate byte budget and a 2,048-element cap. NativeE2BIGremains a redacted fallback for environment and platform variance. Windows preflight assumes the smaller npm.cmd/.batwrapper limit until resolution proves a native executable, and handler-added native session flags are admitted before workspace, session, provider-artifact handoff, or durable-job side effects on non-Kit requests. Claude Kit projects its eventual argv before compiled-context artifact materialization or durable Kit-session allocation. An embedded NUL byte in command or argv is rejected before spawn as non-retryableinvalid_input; long-lived job memory, durable args, and async flight rows use a fixed invalid-argv marker, while the optional duplicate durable payload is suppressed. Public and retained fields omit the rejected vector and Node's value-echoing native message. Stdin-backed requests also require a successful complete-payload callback before a clean child exit can complete; closed or pending delivery becomes a fixed non-sensitive failure. - For resumable large-output retrieval, use
llm_job_resultwithrawOutput:trueand its per-stream next offsets. Default display output is transformed and cannot resume from captured-stream offsets. Local stdio raw pages concatenate to captured streams; remote raw pages remain provider-session-ID-redacted. See the technical guide.
Machine-readable resources
- Agent metadata: https://llm-cli-gateway.dev/.well-known/agent.json
- MCP server card: https://llm-cli-gateway.dev/.well-known/mcp/server-card.json
- API catalog: https://llm-cli-gateway.dev/.well-known/api-catalog
- Compatibility AI catalog: https://llm-cli-gateway.dev/.well-known/ai-catalog.json
- Integration declaration: https://llm-cli-gateway.dev/.well-known/integrations.json
- Sitemap: https://llm-cli-gateway.dev/sitemap.md
- Repository: https://github.com/verivus-oss/llm-cli-gateway
- npm package: https://www.npmjs.com/package/llm-cli-gateway
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

