> **Start here for agents.** No account is needed. The full steps, in order, are in https://harny.ai/auth.md. The index of every page is https://harny.ai/llms.txt. > Never print, commit or ask for an app key. Provision the app once and reuse its key. Do not provision on every run. Keys are server-side secrets. Never put one in browser or mobile code. > Write no API call from memory. Read the machine-readable description at https://harny.ai/openapi.json. > Every refusal uses a JSON body with code, status, debugMessage and data. Codes and what each means: https://harny.ai/docs/memory-api/errors.md # Models and keys > The agent harness runs on your own model and your own key. Harny names no model. This page lists the providers it accepts and how to set yours. You choose the provider and the model. Harny does not pick a model for you and never sees your key. The Memory API needs no model at all: recall returns ranked evidence as JSON, and your own model writes the answer. ## Set your model Pass `provider=` and `model=` to `Agent.create`. You can set the same two values with the variables `HARNY_MODEL_PROVIDER` and `HARNY_MODEL`. ```python agent = await Agent.create( harny=harny, provider="your-provider", # one of the providers in the table below model="your-model-id", # the model id your provider gives you config=AgentConfig(instructions="You help one person with their calendar."), ) ``` Replace both values with the provider and the model you chose. The harness makes no request to Harny to look them up. In the npm package the same options are `provider`, `model`, `apiKey`, `baseUrl`, `apiStyle`, `priceInPerMtok` and `priceOutPerMtok`. ## Providers | Provider | `provider=` | Key variable | Wire style | |---|---|---|---| | OpenAI | `openai` | `OPENAI_API_KEY` | chat-completions | | Anthropic Claude | `anthropic` | `ANTHROPIC_API_KEY` | messages | | Google Gemini | `google` | `GEMINI_API_KEY`, `GOOGLE_API_KEY` | generate-content | | Zhipu GLM | `zhipu` | `ZAI_API_KEY` | chat-completions | | DeepSeek | `deepseek` | `DEEPSEEK_API_KEY` | chat-completions | | OpenRouter | `openrouter` | `OPENROUTER_API_KEY` | chat-completions | 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. ## Your key The SDK reads your key from the provider's variable in the table. You can also set `HARNY_MODEL_API_KEY`, or pass `api_key=` in code. Harny never sees it. ## Prices for the spend cap A dollar spend cap needs a price. Pass the price of your model in dollars per million tokens: `price_in_per_mtok=` for input and `price_out_per_mtok=` for output. Pass both or neither. Without prices the model is unpriced. A dollar cap is then not enforced, and the token cap applies instead. Every run always has a cap. Harny holds no price for the model you name. ## Another provider For a provider that is not in the table, pass `base_url=` with the provider's address. Add `api_style=` when the provider does not speak the chat-completions style. The values are `chat_completions`, `messages` and `generate_content`. The key comes from `api_key=` or `HARNY_MODEL_API_KEY`. ## Change the model A model swap is one setting on your side: change `model=`, or `provider=` and the key, and run again. Nothing stored in Harny changes, because memory does not depend on the model that reads it. ## If you set no model `Agent.create` stops with an error that names what to set: `provider=`, `model=` and your key variable. ## Next - [Agent harness overview](/docs/agent-harness/overview) - [Agent harness limits](/docs/agent-harness/limits) - [Memory API limits](/docs/memory-api/limits)