Reference
Connect your agent
Lodestar OSS wraps your agent in your environment and records what it does. Pick the path that matches how your agent runs, then ship the session. Machinaut never runs the agent.
Before you start
install Lodestarbash
bun add -g @qmilab/lodestar-cli # the lodestar CLI, from npm- Lodestar is public on GitHub and its packages are on npm. Its get-started guide covers setup in full.
- Mint a Machinaut API token in the console under Settings → API Tokens.
- To send a recorded session, follow Ship a session and share the report.
Integration paths
| Path | When | What it is |
|---|---|---|
| MCP proxy | An off-the-shelf coding agent that speaks MCP | Point the agent at Lodestar's governed proxy and turn off its native tools, so every action goes through Lodestar. |
| guard.wrap() | Your own agent loop in TypeScript | Wrap the loop so every ctx.callTool goes through Lodestar's kernel. |
| Runtime gate | Python frameworks: LangGraph, CrewAI, AutoGen | A native hook launches Lodestar's gate, and every tool call goes through it. |
| Sample project | No agent yet | Load a labelled sample into your own org, so the console has a chain to show. |
MCP proxy: the Claude Code recipe
1 · proxy.config.jsonjson
{
"project_id": "my-agent",
"actor_id": "agent:claude-code",
"session_id": "auto",
"log_root": ".lodestar/events",
"default_scope": { "level": "project", "identifier": "my-agent" },
"default_sensitivity": "internal",
"auto_approve_ceiling": 3,
"downstream_servers": [
{
"name": "fs",
"command": "bunx",
"args": ["@modelcontextprotocol/server-filesystem", "/abs/path/to/workspace"]
}
]
}auto_approve_ceiling is the trust level up to which actions run without a hold. Lodestar's default trust level for a tool is 3, so at this ceiling every tool auto-approves. A hold reaches the inbox only for an action above the ceiling: lower the ceiling, or raise a tool's required_trust_level under tool_defaults. To send holds to the console, add the fields in Send holds to your team's inbox.2 · .mcp.jsonjson
{
"mcpServers": {
"lodestar": {
"command": "lodestar",
"args": ["guard", "mcp-proxy", "--config", "proxy.config.json"]
}
}
}lodestar, so Claude Code sees them as mcp__lodestar__*.3 · settings.jsonjson
{
"permissions": {
"deny": [
"Edit", "Write", "MultiEdit", "NotebookEdit", "Bash",
"Read", "Glob", "Grep", "LS", "WebFetch", "WebSearch"
],
"allow": ["mcp__lodestar__*"]
}
}4 · launchbash
claude \
--mcp-config .mcp.json --strict-mcp-config \
--settings settings.json--strict-mcp-config ignores any other MCP servers you have configured, so none of them becomes an ungoverned bypass. The proxy prints its session id to stderr at startup.Governance holds only if native tools are off
Lodestar's proxy sees only the calls that go through it. If the agent keeps its own edit, read, shell or web tools, it can act without the proxy, and the chain misses those steps. Reads bypass the proxy too, so denying only writes still leaves gaps.
Checked against Lodestar v0.6.x, with Claude Code as the client.
Which agents fit the proxy
| Agent | Governance | How |
|---|---|---|
| Claude Code | Enforceable, verified | Deny native tools and allow only mcp__lodestar__* (see above). |
| Gemini CLI | Enforceable | Restrict built-ins with the tools.core allowlist. |
| Goose | Enforceable | Turn off the built-in developer extension. |
| Qwen Code | Enforceable | Same coreTools allowlist as Gemini CLI. |
| Zed | Enforceable | A custom Agent Profile without native edit and terminal tools. |
| Continue | Enforceable | Agent mode with native edit and terminal excluded. |
| Amp | Enforceable | amp.tools.disable: ["builtin:*"]. |
| Codex CLI | Gated, not removed | apply_patch can't be removed. Run the sandbox read-only. |
| Google Antigravity | Gated, not removed | No MCP-only mode. Native edits can bypass the proxy. |
| Amazon Q CLI | Gated, not removed | Turning off native tools is unconfirmed. |
| Cursor, Windsurf, Cline, Roo Code, Kilo Code | Bypassable | Native tools can't be turned off. |
| OpenHands | Different path | Python framework. Use the runtime gate. |
| Aider | No path | Not an MCP client. |
| OpenClaw, Hermes Agent | No path | Assistant gateways whose native tools cannot be restricted. |
Compiled by Machinaut from Lodestar's adapters and each agent's settings, last checked 2026-06-29. Only Claude Code has been run end to end into the console. For Lodestar itself, see Lodestar's docs.
guard.wrap(): your own TypeScript loop
instrument your loopts
import { wrap, autoApprovePolicy, alwaysHoldsChecker } from "@qmilab/lodestar-guard"
const run = await wrap(myAgentLoop)({
project_id: "my-agent",
actor_id: "agent:dev",
default_scope: { level: "project", identifier: "my-agent" },
default_sensitivity: "internal",
policy_gate: autoApprovePolicy({ auto_approve_up_to: 2, approver_id: "policy" }),
precondition_checker: alwaysHoldsChecker,
})
console.log(run.session_id) // ship this idctx.callTool goes through Lodestar's kernel and lands in the same event log the other paths write. Ship the returned session_id.Runtime gate: Python frameworks
start the gatebash
lodestar runtime gate --config gate.config.jsonlodestar-langgraph) launch the gate and talk to it over stdin and stdout. The gate prints its session id to stderr at startup.Sample project: no agent yet
| Where | What it does |
|---|---|
| Console: Explore a sample project | Seeds a labelled sample into your org: a chain, a hold and an audit trail. It calls POST /v1/demo/seed (see the API reference). The sample is a Lodestar chain. Machinaut hosts it. |