embedding
MCP server

Docs/MCP server

MCP server

decide() as a tool your agent can gate on, over stdio. Two tools, one client entry, and the instruction to give the agent.


bash
pip install "vegaml[mcp]"
vegaml-mcp-server --model 4b

A stdio MCP server with two tools, for agents that speak the protocol. The point is not another text channel: the agent gets a decision instrument, typed answers with probabilities it can branch on, from a model on the machine it is already running on.

The two tools#

  • decide (state_text, questions, mode?, alpha?, views?) returns the full decide() dictionary.
  • model_info reports the loaded checkpoint without running anything.

The client entry#

json
{"mcpServers": {"vegaml": {"command": "vegaml-mcp-server",
                           "args": ["--model", "4b"]}}}

The checkpoint loads on first use and stays resident, so the first tool call is slow and the rest are not. A bad question comes back as a tool error carrying the model's own message.

Tell the agent to gate on abstain#

This is the one instruction worth putting in the system prompt alongside the tool. An answer flagged abstain is the model saying it is not confident enough at the configured risk, and an agent that acts on it anyway has discarded the only thing that made the tool better than a guess.

Note

A suggested line for the prompt.

“Before acting on a vegaml answer, check abstain. If it is true, do not branch on choice: ask the user, or gather more context and decide again.”

What makes this worth wiring up for an agent specifically: an agent's own reasoning gives you no number to threshold on, so every branch is taken at an unknown confidence. A typed decision with a calibrated probability turns “the agent decided to refund” into a branch you can audit, rate-limit and escalate. See Cascade routing for the pattern where the uncertain cases go to a bigger reader rather than to a human.