Skip to content

Connect your agent

honest-agent reaches your agent’s data through the agent’s own MCP server: the same server, with the same tools, that your team’s agent uses. It doesn’t set that server up. Creating the server, its users, roles and tokens is done with your vendor’s docs; this page covers honest-agent’s side.

honest_agent_config.yml holds one target per agent you evaluate, like a target in a dbt profile. init writes the first one. For a remote server it looks like this:

default_target: sales-agent
targets:
sales-agent:
mcp_url: "{{ env_var('SALES_AGENT_MCP_URL') }}"
bearer_token_env: SALES_AGENT_MCP_TOKEN # names the variable in .env, never the token
evals_dir: evals
  • honest-agent run evaluates the default_target. --target <name> picks another one.
  • Results record which agent they came from: the target’s name, or its agent_name if you set one. The report lists agents by that name; you pick one at the top of the Overview.
  • honest-agent finds the config file in the folder you run it from, or the nearest parent folder. Relative paths in it are relative to the file’s folder.

{{ env_var('NAME') }} reads a value from .env or your shell, the way dbt does, so the config file holds no account details and you can commit it. bearer_token_env names the variable that holds the server’s token; the token itself never goes in the config.

Terminal window
# .env: keep it out of git
SALES_AGENT_MCP_URL=https://...
SALES_AGENT_MCP_TOKEN=...
  • Quote the whole value in YAML ("{{ env_var('...') }}").
  • {{ env_var('NAME', 'default') }} gives a default when the variable isn’t set.
  • A variable that isn’t set, with no default, stops only the target that reads it, with an error that names it.

Set mcp_url to the server’s address and, if it needs a bearer token, bearer_token_env to the variable that holds it. honest-agent sends the token only to that target’s server.

These have their own step-by-step guides, from creating the token to a first eval:

Its own docs say how to reach it and how to authenticate. Fill in mcp_url, plus bearer_token_env if it takes a bearer token.

If your server isn’t covered here, or you can’t get it to connect, open an issue with the server you use and the output of honest-agent debug. debug prints variable names, never their values, but check what you paste anyway: no tokens, keys or private URLs.

For a server you start yourself, set mcp_command instead of mcp_url:

targets:
sales-agent-local:
mcp_command: python my_mcp_server.py
mcp_env: [WAREHOUSE_TOKEN] # the variables from .env this server needs
evals_dir: evals
  • The command runs from the config file’s folder.
  • The server gets a minimal environment (PATH, HOME and similar) plus only the variables listed in mcp_env, never the rest of .env. A server that needs a token from .env must list it there.

honest-agent works with Anthropic (Claude) and OpenAI (GPT) models. You only need the API key for the provider you use: ANTHROPIC_API_KEY or OPENAI_API_KEY. A decision model as the judge of llm_judge evals needs its own provider’s key (see Using a decision model as the judge).

model: claude-haiku-5-5 # for every target
targets:
sales-agent:
model: claude-sonnet-5-5 # or per target
grading_model: claude-opus-5-5
effort: medium
  • model runs the agent. Without one, honest-agent picks a small, cheap model from the key it finds: claude-haiku-5-5 if ANTHROPIC_API_KEY is set, otherwise gpt-5.4-mini. It prints which one it chose.

  • OpenAI models run on the Responses API, as the agent and as the grading model, GPT-5.6 and GPT-6 included. Nothing is stored at OpenAI between steps (store: false): each step sends the conversation so far, with the model’s reasoning as OpenAI returned it, encrypted.

  • The provider comes from the name: gpt-*, o3 and similar are OpenAI; jev-*, gemini-decision-* and decision:gpt-6-luna are decision models; anything else is Claude.

  • grading_model is the model for grading, for both methods that use one: extract_match has it pull the value out of the answer, llm_judge has it judge the answer. contains uses none. Without one, honest-agent uses a stronger model from the agent’s provider: claude-sonnet-5-5 for a Claude agent, gpt-6.2-sol for an OpenAI one. You can change it; Choosing the grading model sums up what research says about the choice. In the config file it can also name one model per method:

    grading_model:
    extract_match: claude-sonnet-5-5
    llm_judge: jev-1.14.0

    A method you leave out gets the default. --grading-model sets both methods for one run, so it can’t name a decision model, which can only judge llm_judge evals.

  • effort sets how much the agent’s model thinks before it answers: low, medium or high. Without it, none is sent and the provider’s default applies. The effort is part of what you evaluate: the report shows each model and effort as its own agent model, such as claude-haiku-5-5 · medium.

  • grading_effort does the same for the grading model, for both extract_match and llm_judge. It defaults to low, whether the grading model is the default or one you choose: grading against an expected answer needs little thinking. Decision models take none.

  • Claude Haiku 4.5 and OpenAI’s GPT-4 models don’t accept an effort, so run stops if one is set for them. As a grading model they get no effort by default.

Setting What it does
max_tool_steps Steps the agent may take for each question before the eval fails. A step is one model call and the tool calls it asks for. Default: 5. Can also be set at the top level.
tool_timeout Seconds a tool call may take before it’s stopped; the agent gets an error result saying so and can try a lighter query or answer. Default: 120. Raise it for a warehouse with slow queries. Can also be set at the top level.
agent_name The name results are recorded under. Default: the target’s name.
evals_dir The folder with this target’s evals. Default: evals.
default_database, default_schema Where the server runs a bare table name like orders, so provenance can tell where the table lives. Set them only if the server’s connection really starts there: a wrong value puts tables in the wrong place without warning.
ignore_tools Tools whose sql, query or statement argument isn’t SQL (a search term, say), so provenance doesn’t read it as SQL. MotherDuck’s search_catalog is ignored already.

results_path, where results are stored, is set at the top level only: every target’s results share one store, so one report covers every agent.

When a setting is set in more than one place

Section titled “When a setting is set in more than one place”

A setting can come from four places. honest-agent uses the first one it finds, in this order:

  1. a flag on the command, like --model claude-haiku-5-5;
  2. an environment variable, from .env or your shell, like HONEST_AGENT_MODEL;
  3. honest_agent_config.yml;
  4. honest-agent’s own default.

So if the config says model: claude-sonnet-5-5 but you run honest-agent run --model claude-haiku-5-5, that run uses claude-haiku-5-5. The flag changes only that one run; the config stays as it is.

When an environment variable overrides the config, run prints a note saying so. Keep only secrets and account URLs in .env, so a leftover variable there doesn’t override your config without you noticing.

Terminal window
uv run honest-agent debug

debug connects to the target’s MCP server and counts its tools, without calling any. It also checks the config, the variables, the evals and the results store. Use --target <name> to check another target.

Made by Jose CotoLinkedInSubstackPrivacy