Agent harness

Models and keys

The agent harness runs on your own model key. This page lists the providers it accepts, the variable each key is read from, and the models each preset offers.

Copy page
View as Markdown

Harny does not choose your agent's model and never sees your key. The SDK reads the key from the provider's usual variable, or you pass it as api_key= together with provider=. The Memory API needs no model at all: recall returns ranked evidence as JSON, and your own model writes the answer.

Providers

Providerprovider=Key variableWire stylePresets that list it
Zhipu GLMzhipuZAI_API_KEYchat-completionscost_first, quality_first
DeepSeekdeepseekDEEPSEEK_API_KEYchat-completionscost_first
OpenAIopenaiOPENAI_API_KEYchat-completionscost_first, quality_first, regulated
Google GeminigoogleGEMINI_API_KEY, GOOGLE_API_KEYgenerate-contentcost_first, quality_first, regulated
OpenRouteropenrouterOPENROUTER_API_KEYchat-completionscost_first, quality_first
Anthropic ClaudeanthropicANTHROPIC_API_KEYmessagescost_first, quality_first, regulated

provider= (or HARNY_MODEL_PROVIDER) pins one provider. Without it the harness takes the first entry of the preset for which it finds a key in the environment. A key passed as api_key= needs provider=, so a key is never sent to the wrong provider. Anthropic's endpoint can reach Harny's tools as a remote MCP server. With every other provider the harness calls Harny's tools from the client side.

Presets and their models

A preset is an ordered list of models. The list is read from Harny's model roster at start, so a model change reaches your agent without a code change on your side. Set the preset with preset= in AgentConfig. The lists are in roster order, not a ranking.

PresetProviderModel
cost_firstopenrouterz-ai/glm-5.3-flash
cost_firstzhipuglm-5.3-flash
cost_firstdeepseekdeepseek-flash
cost_firstopenaigpt-5-nano
cost_firstgooglegemini-2.5-flash-lite
cost_firstanthropicclaude-sonnet-5
quality_firstzhipuglm-5.3
quality_firstopenrouterz-ai/glm-5.3
quality_firstopenaigpt-5.2
quality_firstgooglegemini-3.1-pro-preview
quality_firstanthropicclaude-sonnet-5
regulatedopenaigpt-5-mini
regulatedgooglegemini-2.5-flash
regulatedanthropicclaude-sonnet-5

The current roster is also served by GET /v1/models/roster with your app key. It is the source of this table.

Change the model

A model swap is one setting on your side: change preset=, or provider= and the key variable, and run again. Nothing stored in Harny changes, because memory does not depend on the model that reads it.

Next