BYOK AI Coding Agent CLI: Use Your Own Model API Key
Configure a local BYOK AI coding agent CLI with your own model API key, understand what stays local, and run Wukong Loops without an account or monthly quota.
> What BYOK means in Wukong Code
BYOK means Bring Your Own Key. Wukong provides the terminal workflow and local Loop orchestration, while inference is billed and served by the model provider you choose.
The current Wukong release has no paid plan, managed model credits, Guest trial, or monthly Wukong Loop allowance. A Wukong account is optional and does not unlock the local coding Loop.
> Configure a model provider
Use the provider flow as the single place to add an API key and choose a default model. Login connects an optional Wukong account; it does not configure an OpenAI, Anthropic, DeepSeek, or other model provider.
wukong provider
wukong
/provider- [+]Do not commit API keys to the repository.
- [+]Use a provider key with the minimum permissions and spending limit appropriate for your work.
- [+]The writer and read-only reviewer can use separate configured model aliases.
> What stays local—and what does not
Wukong runs in your terminal, reads and edits the local workspace under its permission mode, runs project checks locally, and stores content-free Loop lifecycle records for recovery. Current clients do not upload Loop goals, prompts, transcripts, diffs, or verification evidence to a Wukong Web/D1 metrics backend.
BYOK is not the same as offline inference. The context required for a model request is sent to the model provider you configured, subject to that provider’s terms and data controls. Wukong does not make a third-party model local merely because you supplied the key.
> What it costs
The Wukong CLI is currently free. Model usage is not necessarily free: your selected provider charges your account according to its own token pricing, subscription, or local-model setup.
Use --max-iterations, explicit objectives, and a suitable writer/reviewer model pair to control a run. The local limit is a safety and cost boundary that you choose; it is not a Wukong subscription quota.
wukong loop "finish the API validation change" --max-iterations 5 --dry-run> Start a verified local Loop
After the provider is configured, run Wukong in the repository you want to change. The Loop writes, checks, reviews, and fixes against one goal until it passes, stops at a limit, encounters an error, or you cancel it.
cd your-project
wukong
/loop add input validation and make the project checks pass> Related guides
Try the workflow in your repository
Wukong Code is free and BYOK for macOS, Linux, and Windows.
[DOWNLOAD_WUKONG]