> ## Documentation Index
> Fetch the complete documentation index at: https://docs.veadk.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# 快速开始

## 安装

无需 Node.js，一行命令即可安装独立二进制，并将 `agentkit`（及别名 `ak`）加入 PATH：

<Tabs>
  <Tab title="wget">
    ```bash lines theme={null}
    wget -qO- https://agentkit-cli.tos-cn-beijing.volces.com/install.sh | sh
    ```
  </Tab>

  <Tab title="curl">
    ```bash lines theme={null}
    curl -fsSL https://agentkit-cli.tos-cn-beijing.volces.com/install.sh | sh
    ```
  </Tab>
</Tabs>

安装完成后验证：

```bash lines theme={null}
agentkit --help
```

<Tip>
  二进制安装在 `~/.agentkit`，并在 `~/.local/bin` 下创建 `agentkit`、`ak` 两个软链接。若提示命令未找到，请将 `~/.local/bin` 加入 PATH。需要安装指定版本时，设置环境变量 `AGENTKIT_VERSION`（默认 `latest`）。
</Tip>

## 鉴权

CLI 会对每一次云端 OpenAPI 请求签名。按使用的云厂商或登录方式提供凭证：

<Tabs>
  <Tab title="AK/SK">
    在环境变量或本地 `.env`（已被 git 忽略）中设置：

    ```bash lines theme={null}
    VOLCENGINE_ACCESS_KEY=...
    VOLCENGINE_SECRET_KEY=...
    VOLCENGINE_REGION=cn-beijing   # 可选，默认 cn-beijing
    ```
  </Tab>

  <Tab title="BytePlus">
    设置 BytePlus 凭证，并把默认云厂商与区域写入用户级配置：

    ```bash lines theme={null}
    BYTEPLUS_ACCESS_KEY=...
    BYTEPLUS_SECRET_KEY=...
    agentkit --provider byteplus config --global --region ap-southeast-1
    ```
  </Tab>

  <Tab title="SSO">
    浏览器登录，存储短期 STS 凭证。

    ```bash lines theme={null}
    agentkit login <sso-address>
    agentkit whoami
    ```
  </Tab>
</Tabs>

<Tip>
  SSO 登录会缓存短期 STS 凭证。未显式提供 AK/SK 时，运行时、知识库、记忆、工具和其他云端命令会使用当前登录 profile 的有效凭证；凭证过期后重新运行 `agentkit login`。
</Tip>

## 三步部署

<Steps>
  <Step title="脚手架项目">
    ```bash lines theme={null}
    agentkit init my-agent --template basic
    cd my-agent
    ```
  </Step>

  <Step title="构建并部署">
    ```bash lines theme={null}
    agentkit launch
    ```
  </Step>

  <Step title="调用运行时">
    ```bash lines theme={null}
    agentkit invoke my-agent -m "hello"
    ```
  </Step>
</Steps>

完整命令见 [命令参考](/productions/agentkit-cli/archives/0.51.1/zh/commands)，或运行 `agentkit tree` 打印命令树。需要切换云厂商或区域时，运行 `agentkit config --cloud_provider byteplus --region ap-southeast-1` 更新项目配置。
