update-agent

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Update Agent

更新Agent

Update an existing AI agent on a live LiteLLM proxy.
在运行中的LiteLLM代理上更新现有AI Agent。

Setup

配置

LITELLM_BASE_URL  — e.g. https://my-proxy.example.com
LITELLM_API_KEY   — proxy admin key
LITELLM_BASE_URL  — 示例:https://my-proxy.example.com
LITELLM_API_KEY   — 代理管理员密钥

Ask the user

询问用户信息

  1. agent_id — if they don't have it, list first:
    bash
    curl -s "$BASE/v1/agents" -H "Authorization: Bearer $KEY"
  2. What to change — any combination of:
    • model
      (swap the underlying model)
    • description
    • tpm_limit
      /
      rpm_limit
    • MCP server access
  1. agent_id — 如果用户没有该ID,先执行以下命令列出所有Agent:
    bash
    curl -s "$BASE/v1/agents" -H "Authorization: Bearer $KEY"
  2. 需要修改的内容 — 可组合修改以下任意项:
    • model
      (替换底层模型)
    • description
    • tpm_limit
      /
      rpm_limit
    • MCP服务器访问权限

Run

执行更新

Use PATCH to update only the changed fields:
bash
curl -s -X PATCH "$BASE/v1/agents/<agent_id>" \
  -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "litellm_params": {"model": "<new_model>"},
    "agent_card_params": {"description": "<new_description>"}
  }'
使用PATCH请求仅更新修改的字段:
bash
curl -s -X PATCH "$BASE/v1/agents/<agent_id>" \
  -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "litellm_params": {"model": "<new_model>"},
    "agent_card_params": {"description": "<new_description>"}
  }'

Output

输出结果

Show the updated agent name, model, and description. Confirm the agent ID is unchanged.
显示更新后的Agent名称、模型和描述。确认Agent ID保持不变。