Agent workflow

Use Kimi K3 Agent Locally

Set up a local Kimi K3 agent workflow with Kimi Code, Kimi Claw, OpenClaw, K3Nova, provider IDs, and safety checks.

Local agent workflow checklist for Kimi K3
Runbookpage shape
Kimi K3topic
6further reading links
2026-07-29updated

Goal and short answer

Use Kimi K3 agent locally by keeping the tool close to your machine and the credentials in a documented configuration path. The agent can run in Kimi Code, Kimi Claw/OpenClaw, or a K3Nova local workspace while Kimi K3 inference is provided through an authorized endpoint.

Start with a small task that proves the agent can read context, call the model, preserve state, and recover from an error before you let it run longer work.

Copyable commands

Use an isolated data root when you want a clean local-agent test without disturbing your normal Kimi Code setup.

Create an isolated Kimi Code home

This keeps test config, sessions, logs, and credentials away from your default setup.

export KIMI_CODE_HOME="$HOME/.config/kimi-code-agent-test"
mkdir -p "$KIMI_CODE_HOME"
kimi doctor

Run the first local-agent task

Keep the prompt small so model access and tool behavior are easy to debug.

kimi -m k3-256k -p "Read the current directory name and describe the project type in one sentence."

Start the local web service

Use this when the workflow needs a local REST, WebSocket, and browser surface.

kimi web --no-open --port 58628

Return to your normal Kimi Code home

Unset the isolated home when the test is finished.

unset KIMI_CODE_HOME

AI handoff prompt and permissions

Copy this prompt into Kimi Code, K3Nova, or another AI agent. Keep approval manual for file writes, shell commands, account actions, and secrets.

Copyable AI prompt

Use this to give the agent the task and safety boundary in one message.

You are my AI agent for this task: run a safe local-agent test with Kimi K3, record the pass condition, and stop before broader file, shell, or credential access.
Start by restating the goal and the permissions you need.
Use official docs or the files I provide before making claims.
Give me a direct answer first, then a short table or checklist.
If commands are needed, show exact copyable commands without a shell prompt.
Ask before writing files, running shell commands, deleting or moving data, logging in, spending money, changing account settings, or handling API keys.
Stop and ask me when a step requires secrets, payment, account access, destructive cleanup, or a permission broader than the task.

Recommended AI permissions

PermissionGive AIWhy
Read-only project accessAllow Read, Grep, and Glob only in the selected project or config folder.Lets the agent inspect state before acting.
Shell commandsAsk before Bash or any CLI command; run one command at a time.Commands can change files, packages, sessions, or network state.
File editsAsk before Write or Edit, and require a diff before applying changes.Prevents hidden config or source edits.
Hard stopsDeny payment, login, secret exposure, account changes, and destructive delete commands.These are not safe to automate casually.

Runbook

Pick one local surface

Choose Kimi Code for coding, OpenClaw for gateway and tool-agent work, or K3Nova for web workspace testing.

Configure the model

Use the exact model ID and base URL expected by that surface. For OpenClaw, check the provider/model list. For Kimi Code, use the Kimi Code model docs.

Run a safe task

Ask for a short repo summary, a one-file review, or a small planning memo before granting broader tool access.

Record the pass condition

Save whether the model answered, tools worked, context persisted, and no credentials appeared in output.

First local-agent smoke test

CheckWhat to doPass condition
Model accessAsk a one-sentence questionThe selected model answers without fallback confusion
Tool accessRead a harmless local file or fixtureThe agent returns the expected detail
StateSend a follow-up in the same sessionIt remembers the task boundary
SafetySearch output for keys or private pathsNo secret or irrelevant private data appears

Notes before you continue

Local does not mean unsupervised

Even local agents should run with clear permissions, a small first task, and a human review point.

Credential boundary

Do not put provider keys in prompts, public files, or screenshots. Use config, local secrets, or server-side environment storage.

K3Nova workflow

K3Nova local pages can test the workspace, pricing boundary, docs, and guides before production model calls are enabled.

FAQ

Can a local Kimi K3 agent use tools?

Yes, depending on the surface and permissions you configure.

Does Kimi K3 need to be self-hosted for a local agent?

No. A local agent can call a hosted Kimi K3 endpoint.

What is the first failure to debug?

Check provider/model ID and credential path before changing the task prompt.

Further reading