@byteplus/ark-cli-darwin-x64 0.0.0-stage → 1.0.46-prerelease.46bd0d6dcc58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/bin/arkcli-darwin-amd64 +4 -0
- package/manifest.json +43 -0
- package/package.json +20 -4
- package/skills/arkcli-agent/SKILL.md +152 -0
- package/skills/arkcli-agent/references/agent.md +398 -0
- package/skills/arkcli-agent/references/byok.md +65 -0
- package/skills/arkcli-agent/references/context-management.md +42 -0
- package/skills/arkcli-agent/references/debug-export.md +26 -0
- package/skills/arkcli-agent/references/evals.md +178 -0
- package/skills/arkcli-agent/references/events-chat.md +148 -0
- package/skills/arkcli-agent/references/interfaces-gaps.md +52 -0
- package/skills/arkcli-agent/references/mcp-vault.md +111 -0
- package/skills/arkcli-agent/references/model-config.md +46 -0
- package/skills/arkcli-agent/references/self-hosted.md +47 -0
- package/skills/arkcli-agent/references/session-files.md +149 -0
- package/skills/arkcli-agent/references/session-upgrade.md +61 -0
- package/skills/arkcli-agent/references/skills.md +87 -0
- package/skills/arkcli-agent/references/todo-write.md +31 -0
- package/skills/arkcli-api-explorer/SKILL.md +188 -0
- package/skills/arkcli-api-explorer/references/arkcli-api.md +180 -0
- package/skills/arkcli-api-explorer/references/evals.md +176 -0
- package/skills/arkcli-auth/SKILL.md +184 -0
- package/skills/arkcli-auth/references/arkcli-auth-login.md +92 -0
- package/skills/arkcli-auth/references/arkcli-auth-status.md +109 -0
- package/skills/arkcli-auth/references/arkcli-auth-whoami.md +56 -0
- package/skills/arkcli-auth/references/auth-modes.md +78 -0
- package/skills/arkcli-auth/references/evals.md +82 -0
- package/skills/arkcli-auth/references/identity-resolution.md +33 -0
- package/skills/arkcli-auth/references/realname-gate.md +69 -0
- package/skills/arkcli-billing/SKILL.md +122 -0
- package/skills/arkcli-billing/references/arkcli-billing-list.md +259 -0
- package/skills/arkcli-billing/references/evals.md +107 -0
- package/skills/arkcli-chat/SKILL.md +114 -0
- package/skills/arkcli-chat/references/arkcli-chat.md +283 -0
- package/skills/arkcli-chat/references/caching-thinking.md +124 -0
- package/skills/arkcli-chat/references/chat-meta.md +77 -0
- package/skills/arkcli-chat/references/evals.md +34 -0
- package/skills/arkcli-chat/references/stream-events.md +124 -0
- package/skills/arkcli-chat/references/text-format.md +167 -0
- package/skills/arkcli-chat/references/tools.md +119 -0
- package/skills/arkcli-config/SKILL.md +197 -0
- package/skills/arkcli-config/references/arkcli-config-init.md +89 -0
- package/skills/arkcli-config/references/arkcli-config-profile.md +106 -0
- package/skills/arkcli-config/references/evals.md +154 -0
- package/skills/arkcli-connect/SKILL.md +196 -0
- package/skills/arkcli-connect/references/arkcli-connect.md +165 -0
- package/skills/arkcli-connect/references/evals.md +231 -0
- package/skills/arkcli-custommodel/SKILL.md +167 -0
- package/skills/arkcli-custommodel/references/arkcli-custommodel-available-quantizations.md +29 -0
- package/skills/arkcli-custommodel/references/arkcli-custommodel-delete.md +37 -0
- package/skills/arkcli-custommodel/references/arkcli-custommodel-get.md +45 -0
- package/skills/arkcli-custommodel/references/arkcli-custommodel-list.md +65 -0
- package/skills/arkcli-custommodel/references/arkcli-custommodel-quantize.md +59 -0
- package/skills/arkcli-custommodel/references/arkcli-custommodel-update.md +47 -0
- package/skills/arkcli-custommodel/references/arkcli-custommodel-upload.md +64 -0
- package/skills/arkcli-custommodel/references/evals.md +59 -0
- package/skills/arkcli-datasets/SKILL.md +39 -0
- package/skills/arkcli-datasets/references/commands.md +83 -0
- package/skills/arkcli-datasets/references/evals.md +31 -0
- package/skills/arkcli-deploy/SKILL.md +89 -0
- package/skills/arkcli-deploy/references/arkcli-deploy.md +141 -0
- package/skills/arkcli-deploy/references/evals.md +80 -0
- package/skills/arkcli-docs/SKILL.md +453 -0
- package/skills/arkcli-docs/references/commands.md +283 -0
- package/skills/arkcli-docs/references/evals.md +201 -0
- package/skills/arkcli-docs/references/failure-modes.md +85 -0
- package/skills/arkcli-doctor/CONTRIBUTING.md +54 -0
- package/skills/arkcli-doctor/SKILL.md +367 -0
- package/skills/arkcli-doctor/references/error-codes.md +162 -0
- package/skills/arkcli-doctor/references/evals.md +385 -0
- package/skills/arkcli-doctor/references/scope-account.md +94 -0
- package/skills/arkcli-doctor/references/scope-cli.md +88 -0
- package/skills/arkcli-doctor/references/scope-infer-endpoint.md +132 -0
- package/skills/arkcli-doctor/references/scope-metrics.md +157 -0
- package/skills/arkcli-doctor/references/scope-model.md +130 -0
- package/skills/arkcli-doctor/references/verify-origin.md +102 -0
- package/skills/arkcli-gen/SKILL.md +188 -0
- package/skills/arkcli-gen/references/arkcli-gen.md +230 -0
- package/skills/arkcli-gen/references/gen-meta.md +154 -0
- package/skills/arkcli-gen/references/image-stream.md +105 -0
- package/skills/arkcli-helper/SKILL.md +200 -0
- package/skills/arkcli-helper/references/arkcli-helper.md +298 -0
- package/skills/arkcli-helper/references/evals.md +334 -0
- package/skills/arkcli-iam/SKILL.md +46 -0
- package/skills/arkcli-iam/references/arkcli-iam-userid.md +54 -0
- package/skills/arkcli-iam/references/evals.md +24 -0
- package/skills/arkcli-infer-endpoint/SKILL.md +82 -0
- package/skills/arkcli-infer-endpoint/references/arkcli-infer-endpoint-capability-get.md +50 -0
- package/skills/arkcli-infer-endpoint/references/arkcli-infer-endpoint-create.md +121 -0
- package/skills/arkcli-infer-endpoint/references/arkcli-infer-endpoint-delete.md +71 -0
- package/skills/arkcli-infer-endpoint/references/arkcli-infer-endpoint-get.md +43 -0
- package/skills/arkcli-infer-endpoint/references/arkcli-infer-endpoint-list.md +82 -0
- package/skills/arkcli-infer-endpoint/references/arkcli-infer-endpoint-start.md +36 -0
- package/skills/arkcli-infer-endpoint/references/arkcli-infer-endpoint-stop.md +36 -0
- package/skills/arkcli-infer-endpoint/references/arkcli-infer-endpoint-update.md +78 -0
- package/skills/arkcli-infer-endpoint/references/evals.md +24 -0
- package/skills/arkcli-models/SKILL.md +305 -0
- package/skills/arkcli-models/references/arkcli-models-activate.md +103 -0
- package/skills/arkcli-models/references/arkcli-models-get.md +94 -0
- package/skills/arkcli-models/references/arkcli-models-list.md +71 -0
- package/skills/arkcli-models/references/arkcli-models-scenario-table.md +75 -0
- package/skills/arkcli-models/references/arkcli-models-search.md +170 -0
- package/skills/arkcli-models/references/evals.md +57 -0
- package/skills/arkcli-onboard/SKILL.md +169 -0
- package/skills/arkcli-onboard/references/evals.md +156 -0
- package/skills/arkcli-plans/SKILL.md +135 -0
- package/skills/arkcli-plans/references/arkcli-plans-buy.md +125 -0
- package/skills/arkcli-plans/references/arkcli-plans-get.md +84 -0
- package/skills/arkcli-plans/references/arkcli-plans-model-apply.md +58 -0
- package/skills/arkcli-plans/references/arkcli-plans-model-list.md +114 -0
- package/skills/arkcli-plans/references/arkcli-plans-renew.md +125 -0
- package/skills/arkcli-plans/references/arkcli-plans-team-rotate-apikey.md +61 -0
- package/skills/arkcli-plans/references/arkcli-plans-team-seat-assign.md +147 -0
- package/skills/arkcli-plans/references/arkcli-plans-team-seat-list.md +100 -0
- package/skills/arkcli-plans/references/evals.md +178 -0
- package/skills/arkcli-pricing/SKILL.md +120 -0
- package/skills/arkcli-pricing/references/arkcli-pricing-models.md +258 -0
- package/skills/arkcli-pricing/references/arkcli-pricing-plans.md +139 -0
- package/skills/arkcli-profile/SKILL.md +168 -0
- package/skills/arkcli-profile/references/arkcli-profile-create.md +92 -0
- package/skills/arkcli-profile/references/arkcli-profile-keys.md +135 -0
- package/skills/arkcli-profile/references/arkcli-profile-set-default.md +81 -0
- package/skills/arkcli-profile/references/evals.md +93 -0
- package/skills/arkcli-resources/SKILL.md +112 -0
- package/skills/arkcli-resources/references/arkcli-resources-list.md +105 -0
- package/skills/arkcli-shared/SKILL.md +209 -0
- package/skills/arkcli-shared/references/global-flags.md +77 -0
- package/skills/arkcli-shared/references/profile-defaults.md +35 -0
- package/skills/arkcli-shared/references/troubleshooting.md +49 -0
- package/skills/arkcli-shared/references/update.md +117 -0
- package/skills/arkcli-train-finetune/SKILL.md +109 -0
- package/skills/arkcli-train-finetune/references/create.md +274 -0
- package/skills/arkcli-train-finetune/references/download.md +50 -0
- package/skills/arkcli-train-finetune/references/evals.md +59 -0
- package/skills/arkcli-train-finetune/references/export-deploy.md +179 -0
- package/skills/arkcli-train-finetune/references/list.md +79 -0
- package/skills/arkcli-train-finetune/references/manage.md +140 -0
- package/skills/arkcli-understand/SKILL.md +105 -0
- package/skills/arkcli-understand/references/arkcli-understand.md +249 -0
- package/skills/arkcli-understand/references/evals.md +109 -0
- package/skills/arkcli-understand/references/sub-skills.md +137 -0
- package/skills/arkcli-usage/SKILL.md +123 -0
- package/skills/arkcli-usage/references/arkcli-usage-balance.md +196 -0
- package/skills/arkcli-usage/references/arkcli-usage-plan.md +153 -0
- package/skills/arkcli-usage/references/arkcli-usage-seats.md +199 -0
- package/skills/arkcli-usage/references/arkcli-usage-stats.md +160 -0
- package/README.md +0 -3
|
@@ -0,0 +1,398 @@
|
|
|
1
|
+
# Agent
|
|
2
|
+
|
|
3
|
+
`BaseAgent`, when returned by the service, is retained in JSON/YAML and shown as `base_agent` in table output. `+new-agent --fork` preserves it; an explicit create `--base-agent` overrides the source value. It is a base type, not an `agent-*` resource ID. Do not infer Volc Vision/Ultra availability in BytePlus from this shared field support or use Volc-specific templates. Agent update and Session overrides do not expose base-type changes.
|
|
4
|
+
|
|
5
|
+
When configuring `speed/thinking/reasoning_effort/service_tier`, query the target model's [runtime parameter metadata](model-config.md). Values from another model are not universal enums.
|
|
6
|
+
|
|
7
|
+
## Create Agent SOP
|
|
8
|
+
|
|
9
|
+
User says"Create a XXX agent / Agent"Execute the link when this occurs,Don't just concatenate one `agent create`.
|
|
10
|
+
|
|
11
|
+
1. Run `arkcli auth status --format json`. Confirm login, profile, project, and
|
|
12
|
+
API key, then read `byteplus_sso.identity.verified`. If it is `false`, stop
|
|
13
|
+
before model lookup and send the user to
|
|
14
|
+
`https://console.byteplus.com/user/basics/`; both account-opening and
|
|
15
|
+
payment verification must be complete. If the field is absent, continue
|
|
16
|
+
without guessing and preserve any structured backend error. See
|
|
17
|
+
[`realname-gate.md`](../../arkcli-auth/references/realname-gate.md).
|
|
18
|
+
2. If the user does not provide an exact model, list all candidates with `arkcli agent model list --format json`. Only for explicit context/modality/capability requirements, fetch and filter by [exact-version metadata](#exact-version-filtering). Otherwise do not make per-model metadata requests. Use the selected `items[].model` unchanged as `--model`.
|
|
19
|
+
3. extend user intent skill Select context.example:data analysis -> `data analysis Excel CSV table BI SQL`;Code Assistant -> `code programming repo bash`;document generation -> `documentation Write summary Markdown`.
|
|
20
|
+
4. Create Agent default prefers existing account ones custom skill Choose Ark,even the user hasn't explicitly said"Using custom skill":On-demand Execution `arkcli agent skill list --source custom --limit 100 --format json`.by BytePlus ModelArk Read this page fully `Items`,By Name, Description, Capability and version check;No suitable candidates,Reacting `NextPage` As-is Pass Through `--page` Scroll down to continue,Until hit or no next page.don't just call `search --source custom "<query>"` Subsequent first;Users request a full list explicitly or need it offline for analysis. `--page-all`.
|
|
21
|
+
5. If no custom skill matches, BytePlus can query read-only Ark skills with `agent skill list --source ark`; it does not support market/SkillHub. Otherwise upload a local skill zip with `arkcli agent skill create --zip <path>` or create a base Agent and explain that no matching skill was found.
|
|
22
|
+
6. Assemble parameters and a domain-specific system prompt. Use `--thinking`, `--reasoning-effort`, and `--service-tier` only when required by the user and supported by server `ModelMeta`. Do not inject legacy `speed=standard`, and never map `speed` to the new fields. Use an `arkcli` prefix for online test resources; if unnamed, generate `arkcli-<domain>-agent-<YYYYMMDDHHMMSS>`.
|
|
23
|
+
7. First run the same `agent agent create ... --dry-run --format json` command and read its zero-network `preview.v1` plan. Restate `DisplayName`, `Model`, `Skills`, default `Tools`, `McpServers`, and every `unresolved` item. A bare custom Skill intentionally omits `Version` so the service always selects latest; it does not require online version resolution. Managed Agent/model activation checks and `--skill-zip` upload remain unresolved until real execution. After explicit confirmation, remove `--dry-run` and run the real create command.
|
|
24
|
+
8. Real creation time,CLI it will first check BytePlus ModelArk Capability and model enabled status:Model not activated will go through shared model activation confirmation link;Non-interactive environment will not automatically activate,Returned `model_activation_required`.BytePlus ModelArk Product/Ability not enabled,TTY This will prompt the user to confirm and call the front-end equivalent. `OpenChargeItems(ResourceType=DataManagedAgentSum, ResourceNames=[sandbox, web_search])`,Non-interactive Environment Return `managed_agent_activation_required`,Does not automatically activate.
|
|
25
|
+
- If explicit confirmation from the user is already obtained in the conversation,Non-interactive call can retry the original command and add `--yes` from environment variables `ARKCLI_ALLOW_HEADLESS_ACTIVATION=1`.do not set this environment variable without user confirmation.
|
|
26
|
+
9. Real creation upon creation `agent agent get <agent-id> --format json` Confirm depot slot.Server final configuration should be displayed when echoing to users.,Do not display only"Created"or summarize a single field.
|
|
27
|
+
10. User requests end-to-end validation,Create again env/session,Send a minimal message,Pull events/thread/resources.unless the user explicitly requests to clean,Do not delete created resources.
|
|
28
|
+
|
|
29
|
+
model candidate, skill Candidates, MCP provider Candidate Independence;Create in parallel first:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
arkcli agent model list --format json
|
|
33
|
+
arkcli agent model list --query "<capability-query>" --format json
|
|
34
|
+
arkcli agent skill list --source custom --limit 100 --format json
|
|
35
|
+
arkcli agent vault oauth-provider list --limit 100 --format json
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
`--name` is the stable resource name and `--display-name` is the user-visible label. Model runtime fields may be passed inside `--model` or as dedicated flags; dedicated flags take precedence:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
arkcli agent agent create \
|
|
42
|
+
--name arkcli-reasoning-agent-20260828 \
|
|
43
|
+
--display-name "Reasoning Assistant" \
|
|
44
|
+
--model '{id: <items[].model>, thinking: enabled, reasoning_effort: high, service_tier: auto}' \
|
|
45
|
+
--reasoning-effort medium \
|
|
46
|
+
--system @./system.md \
|
|
47
|
+
--format json
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
- The model object accepts `id`, `provider`, `speed`, `thinking`, `reasoning_effort`, and `service_tier`, including camel/Pascal aliases.
|
|
51
|
+
- `speed` is legacy-only. When omitted, the CLI leaves it absent.
|
|
52
|
+
- `agent agent update <id> --display-name ""` clears the display name.
|
|
53
|
+
- Normal updates omit `--version`, for example `arkcli agent agent update <id> --description "Updated description"`. The CLI calls `GetAgent` and supplies its current `Result.Version` to `UpdateAgent`; do not ask users to look up and enter a version manually. Model-ID hydration and Metadata merging reuse the same read.
|
|
54
|
+
- Optional `--version <positive-integer>` pins a previously read version for concurrency checking. `Version` in `--file`/stdin is also supported; an explicit flag wins. Omitted or `0` means automatic lookup; negative versions are invalid. A failed lookup or missing valid version prevents the write. Surface subsequent version conflicts without automatically refreshing the version and retrying the write.
|
|
55
|
+
- With no version, zero-network `--dry-run` shows `GetAgent -> UpdateAgent` with `<current-agent-version>` and `unresolved`; this is not a real or reserved version. An explicit version with no model/Metadata lookup produces only `UpdateAgent`. This rule applies only to Agent update, not Session version parameters.
|
|
56
|
+
- Runtime-only model updates do not require the model ID again. During real execution, the CLI reads the current Agent first and supplies its current `Model.Id` to `UpdateAgent`.
|
|
57
|
+
- An explicit `Model.Id` from `--model <new-id>`, a model object, or `--file` always wins; the CLI never replaces it with the old ID. Dedicated `--thinking`, `--reasoning-effort`, `--service-tier`, and `--speed` flags still override the same fields in the model object.
|
|
58
|
+
- A `--model` object without an ID is treated as a runtime-settings patch and hydrated with the current `Model.Id`. The CLI fails before the write if the current Agent does not return a model ID.
|
|
59
|
+
- `agent agent update ... --dry-run` remains zero-network. When the ID must be hydrated, preview shows `GetAgent -> UpdateAgent` and represents the execution-time value with `<current-agent-model-id>` plus `unresolved`; never send the placeholder as a real ID.
|
|
60
|
+
- `agent agent list --display-name <keyword>` filters on the display label; table output keeps `DISPLAY_NAME` separate from stable `NAME`.
|
|
61
|
+
|
|
62
|
+
## model selection
|
|
63
|
+
|
|
64
|
+
`agent agent create --model` Model must be specified exactly ID.Don't name bare models or displays by impression..
|
|
65
|
+
|
|
66
|
+
List all eligible candidates by default:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
arkcli agent model list --format json
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
`--query` mode still remains BytePlus ModelArk Whitelist as Master Table,Reverse generate candidates from model directory.It will call `models search` Get details and enhance whitelist model:Matched whitelist models are brought `detail` Fields are placed in front.;Whitelisted models that miss the target are retained.,Only exists `detail`.`detail` Field contains signals for assessing fit,such as `display_name`, `description`, `context_window`, `input_modalities`, `output_modalities`, `capabilities`, `lifecycle_status`.
|
|
73
|
+
|
|
74
|
+
Optionally enrich details and rank by intent; this is not a default step:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
arkcli agent model list --query "data analysis Excel CSV SQL agent" --format json
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Select rule:
|
|
81
|
+
|
|
82
|
+
- default only from `agent_support=true` select from the result;`agent model list` default filtering non Agent model.
|
|
83
|
+
- Neither Agent nor tool discovery defaults to `--primary-only` or locally excludes `primary_version=false`. Filter to primary versions only when the user explicitly asks. Primary does not mean latest; never combine fields from different version entries.
|
|
84
|
+
- Return during creation `model` Field,such as `items[0].model`,Do not return `id`.
|
|
85
|
+
- If the user explicitly requests a model family, narrow candidates with `--name <keyword>`:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
arkcli agent model list --name doubao-seed-2-0-pro --format json
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
- Need troubleshooting or confirmation why a model is not selectable,Add `--include-all`,View `agent_support=false` entry.
|
|
92
|
+
- For explicit hard requirements, filter by [exact-version metadata](#exact-version-filtering). List does not support `--size`, `--modality`, `--input-modality`, `--output-modality`, `--multimodal`, `--min-context-window`, `--capability`, or `--strict-filter`. Generic `models search` flags remain unchanged.
|
|
93
|
+
- User has granted full model ID it can directly use,but if creation fails due to unsupported model / Nonexistent,Back to `agent model list` reselect.
|
|
94
|
+
|
|
95
|
+
### Exact-version filtering
|
|
96
|
+
|
|
97
|
+
Use this flow only for explicit requirements such as at least 200000 context tokens, image input, or function calling:
|
|
98
|
+
|
|
99
|
+
1. List all eligible candidates with `agent model list` (`--usage tool` for tool models). Preserve each `name`, `version`, and `model`. Apply an explicit name constraint with `--name`; do not default to primary versions.
|
|
100
|
+
2. Reuse metadata already retrieved for the same name and version. Otherwise query `ListModelMetaDatas` as needed. `models get <name> --version <version>` provides product details; raw metadata has no dedicated product command, so use [API Explorer](../../arkcli-api-explorer/SKILL.md). Confirm the registry and local preview before the real read:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
arkcli api model.list_model_meta_datas \
|
|
104
|
+
--params '{"FoundationModelName":"<items[].name>","FoundationModelVersion":"<items[].version>","Keys":["context_window"],"PageNum":1,"PageSize":1000}' \
|
|
105
|
+
--format json
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Replace placeholders with real candidate fields. Request only relevant keys; batch multiple keys for the same version in one call:
|
|
109
|
+
|
|
110
|
+
| Requirement | Metadata key / interpretation |
|
|
111
|
+
| --- | --- |
|
|
112
|
+
| At least N context tokens | `context_window`: parse `Data[0]` as a positive integer and compare with N |
|
|
113
|
+
| Input/output modalities | `input_modalities` / `output_modalities`: inspect actual text/image/video/audio values in `Data` |
|
|
114
|
+
| Thinking / function calling / MCP | `thinking.support` / `functioncall.support` / `mcp.support`: read actual support values rather than inferring from names |
|
|
115
|
+
|
|
116
|
+
3. Read `ModelMetaDatas` or `Result.ModelMetaDatas` from the actual response and verify its model name/version. If pagination indicates more rows, increment `PageNum`; do not rely on `--page-all`. A metadata row's `Version` is an edit revision, not `FoundationModelVersion`.
|
|
117
|
+
4. Filter with matching-version data only. Missing, empty, unparseable, or failed metadata is unknown, not zero/unsupported and not verified compliance. Distinguish matching, non-matching, and unknown candidates. For strict requirements recommend only verified matches and disclose unverified entries; multiple matches still require user selection.
|
|
118
|
+
|
|
119
|
+
Query-mode `detail` is joined by name and may describe a primary version, not another version's hard limits. `ListModelMetaDatas` is also distinct from `ListManagedAgentModelMetaDatas`, used by `agent model config` for runtime parameter values. Tool eligibility still comes only from version-level ArkModels `epa_tool_model.support`. Do not add metadata calls without explicit requirements or turn selection guidance into a write gate for user-supplied model IDs.
|
|
120
|
+
|
|
121
|
+
### Model value example
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
arkcli agent agent create \
|
|
125
|
+
--name arkcli-data-analysis-agent-20260706 \
|
|
126
|
+
--model <items[].model from agent model list> \
|
|
127
|
+
--system "You are a data analysis agent. Help users inspect datasets, reason about metrics, write analysis code, and summarize findings clearly." \
|
|
128
|
+
--format json
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## Copy Agent
|
|
132
|
+
|
|
133
|
+
User says"Copy / fork / Based on existing agent Update to a new version"Timestamp,Prioritize Using `+new-agent --fork`,Avoid manual get reassemble fully create Request.
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
arkcli +new-agent --fork agent-xxx --format json
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
- User explicitly granted the source `agent-id` but without a new name,Don't stop at just names.;CLI Yes, first. `GetAgent`,default source Agent of `Name` Add `copy-` Prefix,Immediately `copy-<source-agent-name>`.If source name empty,Just fallback to `copy-<agent-id-tail>`.
|
|
140
|
+
- If the user says"Copy that data analysis agent"but without it ID,Use first `agent agent list --name <keyword>` Choose candidates;continue replication if there are any candidates,Candidates must be confirmed by the user when multiple are selected `agent-id`.
|
|
141
|
+
- `+new-agent --fork` must read the source Agent online and cannot provide a local Client Preview, so it does not register `--dry-run`. Inspect the source with `agent agent get <id>`, restate overrides, obtain confirmation, and then execute the copy.
|
|
142
|
+
- `--fork` / `--from` Yes, first. `GetAgent`,Copy Source Agent of `Model`, `System`, `Description`, `Tools`, `Skills`, `McpServers`, `Multiagent`, `Metadata`, `Tags`,Invoke again `CreateAgent` Create new Agent.
|
|
143
|
+
- `--name` explicitly override default copy name.
|
|
144
|
+
- User-provided create flags overrides copied configuration,such as `--system`, `--model`, `--description`, `--skill`, `--tool`, `--mcp-server`.
|
|
145
|
+
- `--skill` / `--tool` / `--mcp-server` replace the corresponding list rather than append. Use read-only `agent agent get` to inspect the source, then pass the complete list.
|
|
146
|
+
- default creates again after success `GetAgent` Echo Final Configuration;Want only to take `CreateAgent` Usage `--no-echo`.
|
|
147
|
+
- Result Creation `System` actual effect system prompt.Human-readable echo must display the following fields at a minimum:
|
|
148
|
+
- Identity:`Id`, `Name`, `Description`, `Version`, `ProjectName`
|
|
149
|
+
- model:`Model.Id`, `Model.Speed` and other model configurations returned by the server
|
|
150
|
+
- Agent Behavior:Whole `System`, `Tools`, `Skills`, `McpServers`
|
|
151
|
+
- Expanded configuration:`Multiagent`, `Metadata`, `Tags`
|
|
152
|
+
- server response timestamp:`CreateTime`/`CreatedAt`, `UpdateTime`/`UpdatedAt`
|
|
153
|
+
- Structure Output Use `agent agent get <agent-id> --format json` or `--format yaml` Keep all non-empty fields returned by the server;The caller shall not discard, truncating or replacing config field with a summary.human-readable summary compresses time, ID Wait for display format,But this cannot hide the above configuration content..
|
|
154
|
+
- Read the correct output envelope first: `agent agent create/get --format json` uses `Result`; `+new-agent` uses `data.agent` (also exposed as `Result`). Check that the object exists before interpreting a null field.
|
|
155
|
+
- If the create response omits System, use the returned real ID for a read-only `agent agent get`. Reuse the default readback from `+new-agent` when available. A failed readback or missing object/field means the persisted value is unconfirmed, not proven unsaved. Report explicit differences without automatically creating or updating another resource.
|
|
156
|
+
- `+new-agent` Current disabled LLM Draft and template;Natural language understanding, parameter selection, User confirms by calling `arkcli` of BytePlus ModelArk AI agent Complete.
|
|
157
|
+
|
|
158
|
+
## Iteration Agent and create Session
|
|
159
|
+
|
|
160
|
+
User says"Change this agent Then try it out / Update system run again / Adjust tools New after session verify"Timestamp,using `+iterate`,Don't manually run three or four commands at a time..
|
|
161
|
+
|
|
162
|
+
`+iterate` Occurs:
|
|
163
|
+
|
|
164
|
+
1. `GetAgent` Show current version.
|
|
165
|
+
2. Updates were provided flag,then use the current version `UpdateAgent`.
|
|
166
|
+
3. Call `CreateSession` Start a new one. session.
|
|
167
|
+
4. Has `--message` Send the first message and stream output;TTY And there is `--message` Enter time `+new session` REPL;Non TTY None message output structured result only.
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
arkcli +iterate agent-xxx \
|
|
171
|
+
--system @./prompts/da-v2.md \
|
|
172
|
+
--message "Use the new configuration to explain how you're going to analyze it. sales.csv" \
|
|
173
|
+
--format json
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
- `--environment-id` / `--env-id` is syntactically optional, but Skill execution should verify the Agent, Environment, and new Session belong to the same Project and pass an explicit environment ID. See [Session project consistency](session-files.md#session-project-consistency).
|
|
177
|
+
- If no environment ID is supplied, query same-Project candidates first. Do not rely on automatic `ListEnvironments` selection with `CreateTime Desc, Limit=1`: account-wide context may select another project's environment. Ask the user when candidates remain ambiguous or no same-Project environment exists.
|
|
178
|
+
- `--diff` does not call `ListEnvironments` and shows `<auto-select-latest-environment>` in `CreateSession.EnvironmentId`. This is a placeholder. `+iterate` does not register Client Preview `--dry-run`.
|
|
179
|
+
- `--resource`, `--vault-id` / `--vault-ids`, `--tags` It will be passed to the new session.
|
|
180
|
+
- `--diff` reads the current Agent online and previews `UpdateAgent`, `CreateSession`, and chat requests without remote mutation. It is a command-specific online diff, not zero-network Client Preview.
|
|
181
|
+
- `--no-chat` Update Only agent and create session,Do not send message, No Input REPL.
|
|
182
|
+
- `--tool`, `--skill`, and `--mcp-server` replace the corresponding configuration with the complete semantic value supplied by the user.
|
|
183
|
+
- When `+iterate` changes only `--thinking`, `--reasoning-effort`, `--service-tier`, or `--speed`, it reuses the current `Model.Id` from the Agent it already read; an explicit new model ID still wins.
|
|
184
|
+
- `--display-name`, including an empty string used to clear it, is an Agent update and must not be skipped as “no update.”
|
|
185
|
+
- With `--agent-overrides`, the Session Agent version belongs in `AgentWithOverrides.Version`; the final CreateSession request must not also contain the mutually exclusive top-level `AgentId` or `AgentVersion`.
|
|
186
|
+
|
|
187
|
+
## script output
|
|
188
|
+
|
|
189
|
+
`+new-agent` output compatible `data.agent` Structure,Script-friendly:
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
arkcli +new-agent --fork agent-xxx --format json --transform "data.agent.id"
|
|
193
|
+
arkcli +new-agent --fork agent-xxx --format yaml > new-agent.yaml
|
|
194
|
+
arkcli +new-agent --fork agent-xxx --no-echo --format json
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
## Finding an existing Agent
|
|
198
|
+
|
|
199
|
+
- An explicit Agent ID goes directly to `agent agent get <agent-id> --format json`. For a name, use `agent agent list --name <keyword>` and inspect pagination. Multiple candidates require selection from the actual returned IDs, not an invented or silently chosen target.
|
|
200
|
+
- A successful empty `ListAgents` result is not proof that a known Session's Agent never existed. Check filters/pages; if only a Session ID is known, read that Session's saved Agent reference/snapshot and get the current Agent only when it provides a real ID.
|
|
201
|
+
- A Session snapshot is historical configuration, not proof of current Agent existence or permission. Report list-empty, not-found and forbidden separately; do not create an Agent, change profiles or fetch new keys to repair an empty list.
|
|
202
|
+
|
|
203
|
+
## Custom tools
|
|
204
|
+
|
|
205
|
+
`agent agent create` / `+new-agent` accept custom tools through `--tool`; updates use the same structure. A custom tool is an entry in `Tools` with `Type: custom`, not a separate `custom_tools` field, `--custom-tools` flag, or custom Skill.
|
|
206
|
+
|
|
207
|
+
| Parameter | Type / requirement | Meaning |
|
|
208
|
+
| --- | --- | --- |
|
|
209
|
+
| `Type` | string, required: `custom` | Custom tool type |
|
|
210
|
+
| `Name` | string, required | Model-visible tool name; the current backend allows 1–128 ASCII letters, digits, underscores, or hyphens, with unique custom tool names per Agent |
|
|
211
|
+
| `Description` | string, required | Purpose, usage context, and behavior; the current backend limit is 10,000 characters |
|
|
212
|
+
| `InputSchema` | object, required for custom tools | Input schema; supply an object, not a JSON string or base64 |
|
|
213
|
+
| `InputSchema.Type` | string, optional | `object`; the backend defaults to `object` when omitted. Prefer writing it explicitly |
|
|
214
|
+
| `InputSchema.Properties` | object, optional | Parameter names mapped to JSON Schema, e.g. `city: {type: string}`. Parameter names and nested schema keys are preserved, not converted to PascalCase |
|
|
215
|
+
| `InputSchema.Required` | string[], optional | Required parameter names matching Properties keys, e.g. `[city]`; omit or use `[]` when none are required |
|
|
216
|
+
|
|
217
|
+
The current backend allows up to 8 custom tools per Agent. Business validation, including names and counts, remains server-owned. Custom tools do not use toolset fields `Configs`, `DefaultConfig`, or `McpServerName`.
|
|
218
|
+
|
|
219
|
+
This example configures only one custom tool, without default tools. Replace the model placeholder with the selected available ID:
|
|
220
|
+
|
|
221
|
+
```bash
|
|
222
|
+
arkcli agent agent create \
|
|
223
|
+
--name arkcli-weather-agent \
|
|
224
|
+
--model '<selected-model-id>' \
|
|
225
|
+
--tool '{
|
|
226
|
+
Type: custom,
|
|
227
|
+
Name: get_weather,
|
|
228
|
+
Description: Get weather for a city,
|
|
229
|
+
InputSchema: {
|
|
230
|
+
Type: object,
|
|
231
|
+
Properties: {city: {type: string, description: City name}},
|
|
232
|
+
Required: [city]
|
|
233
|
+
}
|
|
234
|
+
}' \
|
|
235
|
+
--dry-run --format json
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
- `--tool` accepts a JSON/YAML object, array, or repeated flags. Tool fields accept PascalCase / camelCase / snake_case aliases, such as `InputSchema` / `inputSchema` / `input_schema`. For complete file/stdin requests, use TOP fields with `Tools: [...]` and the structure above.
|
|
239
|
+
- All supplied entries form the complete replacement `Tools` array; defaults are not appended. To keep default tools, include the `agent_toolset_20260701` toolset alongside custom entries. Before appending through an update, get the current configuration and submit the full list. `--tool '[]'` clears tools.
|
|
240
|
+
- Check that dry-run shows an object InputSchema and unchanged Properties, then create and read back with get. A declaration does not upload an executable implementation or make the CLI automatically execute arbitrary functions. Return results through the [custom tool result event](events-chat.md), using the corresponding `custom_tool_use_id`.
|
|
241
|
+
|
|
242
|
+
## Tool model bindings (supported tools only)
|
|
243
|
+
|
|
244
|
+
For a Todo-only request, follow [Todo Write](todo-write.md) instead: it belongs to the multimodal toolset but needs neither model discovery nor Models. The binding workflow below does not apply to Todo.
|
|
245
|
+
|
|
246
|
+
When creating an Agent, enter this discovery/configuration flow only if the user explicitly requests multimodal tools (such as image or video generation) or supplies such a tool configuration. Otherwise do not query `agent model list --usage tool` or add `agent_toolset_multimodal_20260825`, `image_generate`, `video_generate`, or their `Configs[].Models`. Multimodal model inputs, available tool-model candidates, or example fields do not imply a request for generation tools. Retain the ordinary default toolset when tools are unspecified; do not pass `--tool '[]'` to clear it. Preserve explicit user configurations rather than silently removing them under this rule.
|
|
247
|
+
|
|
248
|
+
`Tools[].Configs[].Models` is not a universal tool parameter or the Agent's primary `Model`. The current backend contract supports it only for `image_generate` and `video_generate` within `Type: agent_toolset_multimodal_20260825`. Do not add it to ordinary tools, custom tools, MCP, or `DefaultConfig`. The CLI does not inject models or maintain a tool allowlist; the service validates availability, model permissions, and modality compatibility.
|
|
249
|
+
|
|
250
|
+
Each entry in `Models` accepts:
|
|
251
|
+
|
|
252
|
+
| Field | Type / requirement | Meaning |
|
|
253
|
+
| --- | --- | --- |
|
|
254
|
+
| `ID` | string, required | Exact model or Endpoint ID; the sole model identity. The TOP field is uppercase `ID` |
|
|
255
|
+
| `Default` | boolean, optional | Preferred binding for this tool configuration; explicit `false` is preserved and omission does not trigger a CLI default |
|
|
256
|
+
| `Name` | string, optional | Display name only; cannot replace the ID |
|
|
257
|
+
| `Version` | string, optional | Display version only; not model identity or the Agent version |
|
|
258
|
+
|
|
259
|
+
The current service allows at most 10 bindings per configuration with distinct IDs. Multiple bindings require exactly one `Default: true`; a single binding may omit it. The Agent primary-model whitelist is not an image/video-generation model catalog. Query tool usage below, then confirm the target tool's modality and permissions.
|
|
260
|
+
|
|
261
|
+
### Discover tool models and cache behavior
|
|
262
|
+
|
|
263
|
+
```bash
|
|
264
|
+
arkcli agent model list --usage tool --format json
|
|
265
|
+
arkcli agent model list --usage tool --name <model-name-keyword> --format json
|
|
266
|
+
arkcli agent model list --usage tool --include-all --format json
|
|
267
|
+
arkcli agent model list --usage tool --refresh-cache --format json
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
| Parameter/output | Meaning |
|
|
271
|
+
| --- | --- |
|
|
272
|
+
| `--usage agent` | Default: primary Agent models, using version-level `ep_agent.support`; preserves existing behavior. |
|
|
273
|
+
| `--usage tool` | Tool models, using version-level `epa_tool_model.support`; does not require `ep_agent.support` too. Other usage values are rejected. |
|
|
274
|
+
| `--include-all` | Skip the selected usage's support filter for diagnosis; not every returned model is eligible. |
|
|
275
|
+
| `--primary-only` | Locally keep server-designated primary versions from the full cache. Omit by default for both Agent and tool discovery; use only when the user explicitly requests primary versions, so eligible non-primary versions are not lost. |
|
|
276
|
+
| `--name` | Local case-insensitive substring match against `name` or versioned `model`. |
|
|
277
|
+
| `--query` | Optional detail enrichment/ranking with the selected usage's ArkModels candidates as the source of truth. Unmatched candidates remain without truncation. Details are joined by name, not authoritative for a specific version's hard requirements. |
|
|
278
|
+
| `items[].tool_model_support` | Version-level tool eligibility, separate from `agent_support`. Metadata keys are case-insensitive; any Data value equal to true/1/yes/y after trimming and case folding indicates support. |
|
|
279
|
+
| `items[].model` | Exact versioned identifier to put in `Tools[].Configs[].Models[].ID`, not the catalog's internal `id` (such as epm-*). |
|
|
280
|
+
| `--refresh-cache` | Synchronously refresh ArkModels without requiring query; failure cooldown still applies. Query mode also refreshes existing search caches. |
|
|
281
|
+
| `cache` | CLI returns `source` (network/cache), `fetched_at`, and `expires_at` for candidate provenance. |
|
|
282
|
+
|
|
283
|
+
The CLI persists the full ArkModels catalog for 5 minutes, isolated by product, environment, account/user, profile, region, and project. Agent/tool usage and name/primary filters share the same full-version snapshot. Ordinary fresh-cache reads do not request ArkModels again; expiry refreshes synchronously and a cross-process lock coalesces overlapping refreshes. Cache access failures are reported, not bypassed with repeated API requests. Request failures retain the previous snapshot and enforce a 1-minute cooldown, without presenting expired data as current eligibility. Retry after cooldown. Query detail enrichment uses its existing separate caches and is not covered by the candidate-cache hit guarantee.
|
|
284
|
+
|
|
285
|
+
Tool eligibility comes only from ArkModels. Do not substitute `agent model config --key epa_tool_model.support` (ListManagedAgentModelMetaDatas) or name-collapsed primary-version search data. Empty candidates mean the current catalog declares none, not that all tools reject Models. Eligibility does not guarantee tool modality compatibility, account permissions, activation, or successful inference. The CLI does not add the frontend's trial-display tag restriction. Ask the user to choose among multiple candidates; do not automatically bind a model. An explicitly supplied ID can still be submitted directly to create/update: cache contents do not introduce a new write-time gate.
|
|
286
|
+
|
|
287
|
+
Supply this fragment through create/update `--tool`, or as an entry in a complete JSON/YAML request's `Tools` array. Replace placeholders with actual model IDs:
|
|
288
|
+
|
|
289
|
+
```yaml
|
|
290
|
+
Type: agent_toolset_multimodal_20260825
|
|
291
|
+
Configs:
|
|
292
|
+
- Name: image_generate
|
|
293
|
+
Enabled: true
|
|
294
|
+
Models:
|
|
295
|
+
- ID: <selected-image-model-id>
|
|
296
|
+
Default: true
|
|
297
|
+
- Name: video_generate
|
|
298
|
+
Enabled: true
|
|
299
|
+
Models:
|
|
300
|
+
- ID: <selected-video-model-id>
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
`--tool` still replaces the complete list: get the existing Agent first, retain other required tools/configurations, and submit the full `Tools` list. Client Preview checks local structure, not backend acceptance. Get/list/versions output and `+new-agent --fork` preserve tool bindings; verify `Configs[].Models`, not just the primary `Model.Id`.
|
|
304
|
+
|
|
305
|
+
## Default Agent Tools
|
|
306
|
+
|
|
307
|
+
When creating an agent without explicit `--tool` and without `Tools` in the request body, the CLI automatically adds the default `Tools` array:
|
|
308
|
+
|
|
309
|
+
```yaml
|
|
310
|
+
Type: agent_toolset_20260701
|
|
311
|
+
Name: agent_toolset_20260701
|
|
312
|
+
Configs:
|
|
313
|
+
- Name: bash
|
|
314
|
+
Enabled: true
|
|
315
|
+
PermissionPolicy: { Type: always_allow }
|
|
316
|
+
- Name: read
|
|
317
|
+
Enabled: true
|
|
318
|
+
PermissionPolicy: { Type: always_allow }
|
|
319
|
+
- Name: write
|
|
320
|
+
Enabled: true
|
|
321
|
+
PermissionPolicy: { Type: always_allow }
|
|
322
|
+
- Name: edit
|
|
323
|
+
Enabled: true
|
|
324
|
+
PermissionPolicy: { Type: always_allow }
|
|
325
|
+
- Name: glob
|
|
326
|
+
Enabled: true
|
|
327
|
+
PermissionPolicy: { Type: always_allow }
|
|
328
|
+
- Name: grep
|
|
329
|
+
Enabled: true
|
|
330
|
+
PermissionPolicy: { Type: always_allow }
|
|
331
|
+
- Name: web_fetch
|
|
332
|
+
Enabled: true
|
|
333
|
+
PermissionPolicy: { Type: always_allow }
|
|
334
|
+
- Name: web_search
|
|
335
|
+
Enabled: true
|
|
336
|
+
PermissionPolicy: { Type: always_allow }
|
|
337
|
+
DefaultConfig:
|
|
338
|
+
Enabled: true
|
|
339
|
+
PermissionPolicy: { Type: always_allow }
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
- Explicitly passing `--tool '[]'` indicates the default tools are to be disabled, which must be respected.
|
|
343
|
+
- When providing any `--tool`, the passed value is the complete `Tools` array. The CLI does not append or merge default tools.
|
|
344
|
+
- When needing `advisor` and retaining default tools, provide both toolsets in the complete array, e.g., `--tool '[{Type: agent_toolset_20260701, Name: agent_toolset_20260701}, {Type: evolution, Configs: [{Name: advisor, Enabled: true}]}]'`. `advisor` belongs to the separate `evolution` toolset, not `agent_toolset_20260701`; do not attach a permission policy to it. Availability is subject to backend account/project enablement.
|
|
345
|
+
- Do not manually write default tools unless the user wants to adjust permissions or explicitly disable them.
|
|
346
|
+
|
|
347
|
+
### Modify Default Tool Permissions
|
|
348
|
+
|
|
349
|
+
When a user says, "set the policy of `<tool-name>` to always ask / always confirm," do not modify just one config. Since `--tool` is a complete array, it must be replaced with the full default toolset, and only the `PermissionPolicy.Type` for the specific tool must be changed.
|
|
350
|
+
|
|
351
|
+
Permission policy values:
|
|
352
|
+
|
|
353
|
+
- Always allow: `always_allow`
|
|
354
|
+
- Always ask: `always_ask`
|
|
355
|
+
|
|
356
|
+
For example, "create a data analysis agent with the `write` policy set to always ask":
|
|
357
|
+
|
|
358
|
+
```bash
|
|
359
|
+
arkcli agent agent create \
|
|
360
|
+
--name arkcli-data-analysis-agent-20260706 \
|
|
361
|
+
--model <items[].model from agent model list> \
|
|
362
|
+
--system "You are a data analysis agent. Help users inspect datasets, reason about metrics, write analysis code, and summarize findings clearly." \
|
|
363
|
+
--skill skill-xxx \
|
|
364
|
+
--tool '[{
|
|
365
|
+
Type: agent_toolset_20260701,
|
|
366
|
+
Name: agent_toolset_20260701,
|
|
367
|
+
DefaultConfig: {Enabled: true, PermissionPolicy: {Type: always_allow}},
|
|
368
|
+
Configs: [
|
|
369
|
+
{Name: bash, Enabled: true, PermissionPolicy: {Type: always_allow}},
|
|
370
|
+
{Name: read, Enabled: true, PermissionPolicy: {Type: always_allow}},
|
|
371
|
+
{Name: write, Enabled: true, PermissionPolicy: {Type: always_ask}},
|
|
372
|
+
{Name: edit, Enabled: true, PermissionPolicy: {Type: always_allow}},
|
|
373
|
+
{Name: glob, Enabled: true, PermissionPolicy: {Type: always_allow}},
|
|
374
|
+
{Name: grep, Enabled: true, PermissionPolicy: {Type: always_allow}},
|
|
375
|
+
{Name: web_fetch, Enabled: true, PermissionPolicy: {Type: always_allow}},
|
|
376
|
+
{Name: web_search, Enabled: true, PermissionPolicy: {Type: always_allow}}
|
|
377
|
+
]
|
|
378
|
+
}]' \
|
|
379
|
+
--format json
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
If the user requests different policies for multiple tools, modify them in the same `agent_toolset_20260701` `Configs` array, do not split into multiple `agent_toolset` entries.
|
|
383
|
+
|
|
384
|
+
## Example
|
|
385
|
+
|
|
386
|
+
```bash
|
|
387
|
+
# Agent + Skill
|
|
388
|
+
arkcli agent skill search "Excel data analysis" --source custom --limit 10 --format json
|
|
389
|
+
arkcli agent agent create \
|
|
390
|
+
--name arkcli-data-analysis-agent-20260706 \
|
|
391
|
+
--model <items[].model from agent model list> \
|
|
392
|
+
--system "You are a data analysis agent. Help users inspect datasets, reason about metrics, write analysis code, and summarize findings clearly." \
|
|
393
|
+
--skill skill-xxx \
|
|
394
|
+
--format json
|
|
395
|
+
|
|
396
|
+
# Fork existing agent
|
|
397
|
+
arkcli +new-agent --fork agent-20260707063932-vbfjd --format json
|
|
398
|
+
```
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# BYOK Models and Request Credentials
|
|
2
|
+
|
|
3
|
+
This release covers Direct access only: the MA model gateway calls the configured upstream HTTPS API. The provider must be configured for Direct access in the target MA environment. Obtain its name from the user or verified service configuration; do not infer availability from its name or reuse a staging test provider as a production default. There is no CLI egress-mode switch.
|
|
4
|
+
|
|
5
|
+
Use this path only when the user explicitly chooses a third-party model and provides its connection settings. Use a verified Platform profile in the current BytePlus product, not a Coding Plan profile; select it with invocation-scoped `--profile` when needed. See [Authentication and Profiles](../SKILL.md#authentication-and-profiles). `Model.BaseUrl` addresses the upstream model; CLI `--base-url` instead changes the MA data-plane destination.
|
|
6
|
+
|
|
7
|
+
## Model Configuration
|
|
8
|
+
|
|
9
|
+
Keep the two connections separate: `--env` selects the MA control plane and default data plane, while `Model.BaseUrl` selects the upstream. MA authentication uses a compatible Platform profile or an explicit `ARK_API_KEY` / `--api-key`; control-plane operations still need login. Upstream authentication uses `--model-header-env`, not the global API key. Environments may differ when explicitly requested; switching `--env` does not rewrite the upstream URL or guarantee that the profile key works in that MA environment. CLI `--base-url` is not an upstream setting.
|
|
10
|
+
|
|
11
|
+
Agent create/update accepts an ID or inline JSON/YAML object with `--model`; use `--file` for a complete request. Session creation uses `--agent-overrides`, while existing Sessions use `session upgrade --model`. Upgrade emits snake_case; other paths emit the TOP names below. Common aliases are normalized without rewriting Header keys or values.
|
|
12
|
+
|
|
13
|
+
| Field | Type and meaning |
|
|
14
|
+
| --- | --- |
|
|
15
|
+
| `Id` | Selected model identifier; do not invent or replace it |
|
|
16
|
+
| `Provider` | Provider name; omitted or `ark` keeps Ark model activation checks; other values skip Ark lookup/activation, but not the MA service activation gate |
|
|
17
|
+
| `Protocol` | Provider protocol, for example `openai_chat_completions`, `openai_responses`, `anthropic_messages`, or `ark_responses`; server-validated |
|
|
18
|
+
| `BaseUrl` | Full HTTPS model API URL from the user or verified configuration; the gateway does not append a path. For Chat Completions, include the actual upstream path, for example `/v1/chat/completions` |
|
|
19
|
+
| `Headers` | String-to-string map of persistent ordinary headers, not secrets |
|
|
20
|
+
| `TokenLimits.ContextWindow` | int64 context-window token limit |
|
|
21
|
+
| `TokenLimits.MaxInputTokenLength` | int64 maximum input tokens |
|
|
22
|
+
| `TokenLimits.MaxOutputTokenLength` | int64 maximum output tokens |
|
|
23
|
+
| `InputModalities` | Array of supported input modality strings; does not authorize enabling multimodal tools |
|
|
24
|
+
| `Speed/Thinking/ReasoningEffort/ServiceTier` | Optional runtime settings; see [model-config.md](model-config.md). Ark metadata is not authoritative for arbitrary third-party models |
|
|
25
|
+
|
|
26
|
+
Omitted optional fields stay absent. Explicit empty strings/maps/arrays and zero token limits are preserved; the API decides whether clearing or a value is valid. Do not inject defaults or a client business allowlist.
|
|
27
|
+
|
|
28
|
+
Custom Direct providers require all three TokenLimits as positive integers, not ContextWindow alone. Use verified upstream specifications. If the upstream is explicitly an Ark model, query its exact name/version metadata in the upstream environment: `context_window`, `max_input_tokens`, and `max_completion_tokens` map to the three fields above. Missing values are not zero; do not borrow another model's limits.
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
arkcli agent agent create \
|
|
32
|
+
--name byok-demo \
|
|
33
|
+
--model '{"Id":"<model-id>","Provider":"<provider>","Protocol":"openai_chat_completions","BaseUrl":"https://model.example/v1/chat/completions","TokenLimits":{"ContextWindow":131072,"MaxInputTokenLength":126976,"MaxOutputTokenLength":4096},"InputModalities":["text"]}' \
|
|
34
|
+
--dry-run --format json
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Replace sample values with verified settings. Confirm before executing and read the created Agent back. Preview does not establish upstream availability.
|
|
38
|
+
|
|
39
|
+
Agent precedence: file, then explicit `--model` replaces the request Model, then explicit runtime flags. Update without `--version` still reads the current version; it does not merge the entire old model into the new request. Updating an Agent does not update existing Sessions: explicitly upgrade them. Override/upgrade forwards supplied fields; the server defines omission and clearing semantics.
|
|
40
|
+
|
|
41
|
+
## Request-Only Credentials
|
|
42
|
+
|
|
43
|
+
Supported commands: `agent session events send`, `agent session compact`, and `+new session`. Repeat `--model-header-env HeaderName=ENV_NAME` as needed. The variable contains the full header value; no `Bearer` prefix is added.
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
# Let the user or secret manager set MODEL_AUTH securely; never print it.
|
|
47
|
+
arkcli agent session events send <session-id> \
|
|
48
|
+
--text 'hello' \
|
|
49
|
+
--model-header-env Authorization=MODEL_AUTH \
|
|
50
|
+
--dry-run --format json
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
- Preview shows references without reading environment values. Send and compact support preview; `+new session` does not, so use read-only checks and explicit confirmation.
|
|
54
|
+
- Execution reads the variables. MA Authorization comes from an explicit MA key or the active Platform profile; model credentials use separate `X-User-Model-Header-*` headers. Supply the upstream mapping on each send/compact invocation; Sessions do not persist it.
|
|
55
|
+
- Only event POST requests receive these headers, never reads, SSE, uploads, stored config, or request bodies. A serial event batch reuses the invocation's credentials and does not replay accepted events.
|
|
56
|
+
- Duplicate case-insensitive header names, missing/empty variables, and invalid HTTP header values fail before effects. Credential-bearing requests do not follow redirects.
|
|
57
|
+
- Never place `Authorization`, `X-Api-Key`, or `Api-Key` in persistent Model.Headers. The backend checks static/dynamic collisions; do not bypass this with static headers.
|
|
58
|
+
- Credential propagation for upgrade initial_events is unconfirmed; upgrade has no such flag. Read back the upgraded configuration, then separately compact only if explicitly requested.
|
|
59
|
+
- Never disclose secrets in conversation, logs, exports, or reports. Creation or send acceptance does not prove inference success; an authorized test must verify a real reply and terminal events.
|
|
60
|
+
|
|
61
|
+
## Verification and Troubleshooting
|
|
62
|
+
|
|
63
|
+
- Use `events send ... --stream --format jsonl`, or omit format, to await a reply. Streaming does not accept `--format json`. Verify the reply, `end_turn`, and exit 0.
|
|
64
|
+
- An intermediate model request with `is_error=true` may recover through backend retries. Record attempts and the final outcome; do not resend accepted messages. Final `retries_exhausted` produces exit 5 / `agent_execution_failed`.
|
|
65
|
+
- An MA authentication error on message submission concerns the MA key/environment, not necessarily the upstream key. For model failures, check the provider configuration in the target MA environment, full URL, protocol, and upstream credentials. A generic provider error does not prove a 401, rate limit, or network fault; retain the Session ID and timestamp for server logs. An authorized direct upstream probe does not replace MA end-to-end verification.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Automatic context compaction configuration
|
|
2
|
+
|
|
3
|
+
`ContextManagement` configures automatic compaction; it does not immediately compact a session.
|
|
4
|
+
Use `agent session compact` for an immediate request. Do not add configuration unless requested.
|
|
5
|
+
Backend acceptance and rollout must be verified from actual responses, not from CLI flag availability.
|
|
6
|
+
|
|
7
|
+
The array currently accepts zero or one policy:
|
|
8
|
+
|
|
9
|
+
| Field | Meaning |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| `Type` | Required; `compaction` |
|
|
12
|
+
| `CompactThreshold` | Optional integer, full-context token threshold that triggers compaction, not the output length. The backend requires at least 50000 and, for Ark models with known context windows, at most floor(window × 0.8). BYOK has no context-window upper-bound check |
|
|
13
|
+
| `Instructions` | Optional additional compaction instructions; omitted or empty uses the built-in prompt. The backend allows at most 100000 characters and rejects non-empty whitespace-only text; do not impose the frontend input's 400-character limit |
|
|
14
|
+
|
|
15
|
+
Omission/null on create leaves defaults to the backend. On update/override it keeps existing/inherited configuration.
|
|
16
|
+
`[]` clears custom settings, **not automatic compaction**. A non-empty array replaces the whole policy list;
|
|
17
|
+
`[{"Type":"compaction"}]` restores a policy without a custom threshold or prompt. Missing fields do not merge with the old policy.
|
|
18
|
+
Public responses may fill display defaults (currently dynamic configuration with a 192000 fallback).
|
|
19
|
+
Never hardcode that value into requests or treat displayed defaults as explicit user settings.
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
arkcli agent agent create --name my-agent --model <model-id> \
|
|
23
|
+
--context-management '[{"Type":"compaction","CompactThreshold":64000,"Instructions":"Retain goals and pending work"}]'
|
|
24
|
+
arkcli agent agent update <agent-id> --context-management '[]'
|
|
25
|
+
arkcli agent session create --agent-id <agent-id> --environment-id <env-id> \
|
|
26
|
+
--agent-overrides '{"ContextManagement":[{"Type":"compaction","CompactThreshold":64000}]}'
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Resolve real IDs before execution. Agent flags accept a JSON/YAML array or null, including via `@file`; complete `--file`/stdin requests
|
|
30
|
+
accept `ContextManagement`. Explicit flags override file values, including null: it does not fall back to the file policy;
|
|
31
|
+
create uses defaults and update retains the server policy. Only `[]` clears custom settings. An empty string is not null and is rejected. PascalCase, camelCase and snake_case keys are accepted;
|
|
32
|
+
prompt contents are preserved. `+new-agent` and `+iterate` accept the same flag. Fork preserves source configuration;
|
|
33
|
+
use an explicit `[]` to clear it. With `+iterate`, this flag updates the Agent itself.
|
|
34
|
+
|
|
35
|
+
For a new Session use `--agent-overrides` (also accepts `@file`) or `AgentWithOverrides.ContextManagement` in its request,
|
|
36
|
+
not a top-level Session field. This affects only the new Session, not the source Agent or existing sessions.
|
|
37
|
+
Use `{"ContextManagement":[]}` to clear inherited custom configuration. Business validation belongs to the server;
|
|
38
|
+
do not fetch model metadata as a write gate or silently clamp values.
|
|
39
|
+
|
|
40
|
+
Read back with `agent agent get` or `agent session get --format json`. A stored configuration does not prove that
|
|
41
|
+
compaction ran; inspect events separately after context reaches the threshold. `--dry-run` verifies local construction,
|
|
42
|
+
not backend deployment or parameter acceptance.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Debug / Export / Validate
|
|
2
|
+
|
|
3
|
+
## Debug / Export
|
|
4
|
+
|
|
5
|
+
- `+debug <session-id>` Aggregates session get, recent events, resources, threads, outputs status, error events, pending actions, and warnings. Use `--limit` to control the number of events, and `--session-thread-id` to focus on a single thread.
|
|
6
|
+
- `+export <session-id>` Exports to `arkcli-session-<session-id>-<timestamp>.tar.gz` with `--output` to specify the path. The archive includes `manifest.json`, `session.json`, `events.json`, `resources.json`, `threads.json`, and `notes.md`. If the workspace tarball and memory snapshot are not available for reading, the manifest is marked as unsupported without fabricating content.
|
|
7
|
+
- Before writing the archive, run the same `+export <session-id> ... --dry-run --format json` command and inspect the four read steps, archive entries, and local output path in the zero-network `preview.v1` plan. Without `--output`, the timestamp in the default filename is an `unresolved` placeholder. Preview neither reads the session nor creates or replaces the archive.
|
|
8
|
+
|
|
9
|
+
## End-to-End Validation Template
|
|
10
|
+
|
|
11
|
+
Run every line below as a **separate shell or tool call**. Pass an ID to the next step only after the preceding step succeeds. If a step times out, diagnose the known ID separately.
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
arkcli agent agent get <agent-id> --format json
|
|
15
|
+
arkcli agent env create --name arkcli-<domain>-env-<timestamp> --config '{Type: cloud, Networking: {Type: unrestricted}}' --format json
|
|
16
|
+
arkcli agent session create --agent-id <agent-id> --environment-id <env-id> --title arkcli-<domain>-session-<timestamp> --format json
|
|
17
|
+
arkcli agent session events send <session-id> --type user.message --text "<one small test task>" --format json
|
|
18
|
+
arkcli agent session events stream <session-id>
|
|
19
|
+
arkcli agent session get <session-id> --format json
|
|
20
|
+
arkcli agent session events list <session-id> --limit 20 --format json
|
|
21
|
+
arkcli +tail <session-id> --session-thread-id <thread-id>
|
|
22
|
+
arkcli agent session threads list <session-id> --limit 10 --format json
|
|
23
|
+
arkcli agent session resources list <session-id> --format json
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
When the user requests to keep resources, retain the created agent/env/session/vault/credential.
|