update-agent
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseUpdate 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 keyLITELLM_BASE_URL — 示例:https://my-proxy.example.com
LITELLM_API_KEY — 代理管理员密钥Ask the user
询问用户信息
- agent_id — if they don't have it, list first:
bash
curl -s "$BASE/v1/agents" -H "Authorization: Bearer $KEY" - What to change — any combination of:
- (swap the underlying model)
model description- /
tpm_limitrpm_limit - MCP server access
- agent_id — 如果用户没有该ID,先执行以下命令列出所有Agent:
bash
curl -s "$BASE/v1/agents" -H "Authorization: Bearer $KEY" - 需要修改的内容 — 可组合修改以下任意项:
- (替换底层模型)
model description- /
tpm_limitrpm_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保持不变。