| name | agentkit-cli |
| description | Drive the agentkit CLI (aliases agentkit / ak) to scaffold, build, deploy, and manage agents on Volcengine AgentKit from the terminal — runtimes, knowledge bases, memory collections, tools, harnesses, invocation, SSO auth, sandboxes, and evaluation datasets. Use when a user wants to create/deploy an agent project, call or inspect a deployed runtime, manage AgentKit resources, or resolve a CLI/auth/deploy error. Does NOT handle non-AgentKit deployment, general Docker/k8s operations, Volcengine IAM management, or writing agent application code (use veadk-agent-development for that). |
AgentKit CLI
The agentkit CLI (also aliased ak) scaffolds, builds, deploys, and manages agents on
Volcengine AgentKit. It signs Volcengine OpenAPI requests, so every command needs
credentials (see Authentication). Optimize for a tight loop:
init → deploy → invoke → iterate.
For the exhaustive command list with one-liners and examples, read
references/commands.md — locate it and read it rather than guessing at flags. When
in doubt about what exists, run agentkit tree (add --all for args/options, --json
for machine output).
When to Use This Skill
- Scaffolding a new agent project (
init) and shipping it (deploy)
- Calling a deployed runtime (
invoke) or inspecting one (runtime show/logs/versions)
- Managing AgentKit resources: knowledge bases, memory collections, tools, datasets
- Building a code-free agent from a
harness.yaml (harness)
- Signing in via SSO or switching login profiles (
auth)
- Diagnosing a CLI, auth, build, or deploy failure
Authentication
Every command signs a Volcengine OpenAPI request; without credentials it fails. Provide
them one of two ways:
-
SSO (recommended) — a browser login that stores short-lived STS credentials:
agentkit login <sso-address>
agentkit whoami
login / logout / whoami are available both under auth and at the top level.
Multiple SSO targets are handled with login profiles (auth profile set/list/show).
-
AK/SK — set in the environment or a git-ignored local .env:
VOLCENGINE_ACCESS_KEY=<ak>
VOLCENGINE_SECRET_KEY=<sk>
VOLCENGINE_REGION=cn-beijing
Region is auto-sensed per resource; override any command with -r, --region.
Core Workflow: init → deploy → invoke
agentkit init my-agent -L python -t basic-agent
cd my-agent
agentkit deploy --name my-agent
agentkit invoke my-agent -m "hello"
agentkit runtime logs my-agent --limit 100
deploy is the composite of three steps you can also run individually:
| Step | What it does |
|---|
deploy config | scaffold .agentkit/ (agentkit.yaml + Dockerfile) for the project |
deploy build | build the image in the cloud and write the artifact |
deploy apply | create/update the runtime from the latest built artifact |
Run them separately when you want to inspect or hand-edit agentkit.yaml / the
Dockerfile between scaffolding and building.
init generates .agentkit/agentkit.yaml from a single source, so every
language/template starts from the same, current config. deploy is yaml-driven —
runtime resources, envs (${VAR} refs, never plaintext secrets), gateway auth,
an im.feishu bot proxy, and an SSO frontend BFF are all declared there, no flags
needed. The model credential is resolved on the cloud runtime from its mounted
IAM role / AK-SK, so do not set MODEL_AGENT_API_KEY.
Managing a Runtime
agentkit runtime list
agentkit runtime show my-agent --rev 3
agentkit runtime versions my-agent
agentkit runtime release my-agent --rev 3
agentkit runtime update my-agent \
--min-instance 1 --max-instance 5 --auto-release
agentkit runtime logs my-agent --instance <id> --limit 100
agentkit runtime delete my-agent -y
update changes configuration but does not publish unless you pass --auto-release;
otherwise follow it with runtime release.
AgentKit Resources
Knowledge bases (knowledge, alias kb), memory collections (memory, alias mem),
and tools (tool) share the same list / show / create / update / delete shape:
agentkit kb list
agentkit kb create --name my-kb
agentkit kb create --name my-kb --provider-knowledge-id kb-xxxx
agentkit kb add my-kb ./notes.md ./docs
agentkit mem list
agentkit mem create --name my-mem --provider-type viking
agentkit tool list
agentkit tool create --name my-mcp --tool-type McpServer --image-url <url> --port 8080
Code-Free Agents (harness)
A harness is an agent defined entirely by a harness.yaml — no application code:
agentkit harness init my-harness
agentkit harness set --name my-agent \
--model-name doubao --system-prompt "You are helpful."
agentkit harness deploy
Evaluation
The eval loop is dataset → evaluator → run → results. The eval prefix is
optional (agentkit dataset … == agentkit eval dataset …).
Datasets ("evaluation sets") hold cases; verbs distinguish the target —
create/delete act on the dataset, add/remove on its cases:
agentkit dataset create --name my-dataset --schema question,answer
agentkit dataset add my-dataset --field 'input=最大的行星?' --field 'reference_output=木星'
agentkit dataset show my-dataset --items 20
agentkit dataset remove my-dataset <item-id>
An evaluator is a scoring rubric + judge model; submit an experiment against a
deployed runtime, then read the scores:
agentkit eval evaluator create --name my-judge \
--from-template <template-id> --model ep-xxxxxxxx
agentkit eval run --dataset my-dataset \
--evaluator my-judge --target my-agent
agentkit eval experiment results <id> --limit 20
Conventions
- Aliases:
knowledge↔kb, memory↔mem, experiment↔exp; the eval prefix is optional.
- JSON output: most read commands accept
--json for scripting.
- Region: auto-sensed unless you pass
-r, --region.
- Confirmation: destructive commands (
delete, remove, destroy) prompt; pass -y to skip.
- Self-service:
agentkit docs opens the documentation; agentkit upgrade updates the CLI itself.
Gotchas
- Auth first. Every command hits the signed OpenAPI. If commands fail with an auth
error, run
agentkit whoami; re-login if the STS session has expired.
deploy builds in the cloud, not locally — the Dockerfile must use a
Volcengine-hosted base image and no # syntax= directive (cloud builds can't reach
Docker Hub). Install dependencies from PyPI.
update ≠ release. runtime update stages configuration; the change is not live
until a runtime release (or --auto-release).
invoke resolves the endpoint from the runtime name/id automatically — you don't
pass a URL. It auto-detects the runtime's route (/run_sse vs /invoke).
- Read
runtime logs for the cloud instance's stdout/stderr when a deploy is Ready
but the agent misbehaves; that's where model-credential and startup errors surface.