Skip to main content
The CLI calls a model provider that you own. agentgg init saves the credential to ~/.agentgg/config.json. Pass flags on agentgg scan to use a different provider for one run instead. See One-off credentials for the full flag list.
Run agentgg init again to add a second provider. It keeps the credentials you already saved, and it makes the provider you just added the new default.

Anthropic

Credential: an API key, or an OAuth token from a Claude Pro or Max plan.

OpenAI

Credential: an API key.

Ollama

Credential: the local server URL. The default is http://localhost:11434. Use qwen2.5:14b or a stronger model, with at least 12 GB of VRAM.

AWS Bedrock

Credential: AWS credentials from the standard chain (environment variables, a profile, SSO, or an IAM role), plus a region.

Google Vertex AI

Credential: Google Application Default Credentials (ADC), plus a GCP project ID.

OpenRouter

Credential: an API key.

OpenRouter routing

OpenRouter can serve one model from many hosts. The routing settings tell OpenRouter which hosts to use. By default, agentgg asks for the lowest price. Save a default routing with agentgg config. Set up OpenRouter with agentgg init first.
The value is inline JSON or the path to a JSON file. A file avoids quote problems in Windows shells. none clears the saved routing. agentgg init --provider openrouter --openrouter-routing <json|file> takes the same values. To use a routing for one run only, pass --openrouter-routing to agentgg scan. Three layers set the routing. For each top-level key, a later layer wins:
  1. The saved routing.
  2. The OPENROUTER_* environment variables in the table below.
  3. The --openrouter-routing flag.
If no layer sets order or only, agentgg adds "sort": "price". If a layer sets one of them, agentgg removes sort. agentgg config prints the saved routing only. It does not show the environment variables or the default. These variables set other limits of an OpenRouter request: With no reasoning setting, the model chooses how much to reason. A call that sets its own reasoning keeps it.

Switch the default provider

The config holds every provider you set up, and marks one of them the default. A scan uses the default unless you override it for that run.
This prints the default, every configured provider, and its model. Secrets are masked.
The first command makes openai the default. The second sets the model for that provider. --model needs --provider.
agentgg config only switches between providers you already set up, and it changes no credentials. To add a provider, run agentgg init, which also makes that provider the default.

One-off credentials

Pass these flags to agentgg scan, or to any other command that calls the model, to run once with a different provider or credential. The CLI does not save these values to ~/.agentgg/config.json. A flag that does not apply to the active provider is a hard error, not a silent ignore. To change the saved default instead of passing a flag every run, see Switch the default provider.

Credentials from environment variables

A scan also reads a credential from an environment variable. A flag wins over the saved config, and the saved config wins over an environment variable. An environment variable does not choose the provider. With no saved config, pass --provider as well.