Skip to content
中文

Install on an agent

Install a published skill on one or more agents: a specific version is installed and is never upgraded automatically; changing the version and uninstalling each have their own endpoint. Plugins work the same way with computers as targets; see Plugins.

Prerequisites: an organization API key in PRAXIS_API_KEY, plus curl and jq; PRAXIS_API_BASE defaults to https://api.deepraxis.com. Every name carries a docs-example prefix and a timestamp.

Install in the Console

  1. Open Console → 资源库 (Registry) (/registry) and find the skill in the “搜索资源” (Search resources) box.
  2. Hover over the resource card and click ”…” on its right, then “安装到智能体” (Install to agents). Once you open a resource, the same “安装到智能体” button is at the top right.
  3. Pick a version, tick the agents to install on, and click the “安装到 N 个智能体” (Install on N agents) button at the bottom.

A plugin installs onto computers instead, and its button reads “安装到电脑” (Install to computers).

1. Prepare a skill with two versions

Publish versions 1.0.0 and 1.0.1 of a skill in the default repository (publishing is explained in Publish a skill and read it back).

终端窗口
export BASE="${PRAXIS_API_BASE:-https://api.deepraxis.com}"
export TAG=$(date +%s)
REPO_ID=$(curl --fail-with-body -sS "$BASE/registry/v1/repositories" \
-H "Authorization: Bearer $PRAXIS_API_KEY" | jq -er '.data[] | select(.is_default) | .id')
mkdir -p install-src
cat > install-src/SKILL.md <<SKILL
---
name: docs-example-reviewer-$TAG
description: Reviews a short text and lists problems.
---
Review the text the user gives you and list the problems.
SKILL
export PKG_ID=$(curl --fail-with-body -sS -X POST "$BASE/registry/v1/repositories/$REPO_ID/packages" \
-H "Authorization: Bearer $PRAXIS_API_KEY" \
-F "version=1.0.0" \
-F "files=@install-src/SKILL.md;filename=SKILL.md" | jq -er '.id')
echo "Be concise." >> install-src/SKILL.md
curl --fail-with-body -sS -X POST "$BASE/registry/v1/packages/$PKG_ID/versions" \
-H "Authorization: Bearer $PRAXIS_API_KEY" \
-F "version=1.0.1" \
-F "files=@install-src/SKILL.md;filename=SKILL.md" | jq '{version, withdrawn}'

Expected: version 1.0.1 is published and the package’s kind is skill. A skill installs on agents; read the package kind from kind in GET /registry/v1/packages/{package_id}.

2. Create an agent

终端窗口
export AGENT_ID=$(curl --fail-with-body -sS -X POST "$BASE/agent/v1/agents" \
-H "Authorization: Bearer $PRAXIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "docs-example-agent", "kind": "service", "model": "deepseek-flash", "system": "Answer briefly.", "tools": []}' | jq -er '.id')
echo "$AGENT_ID"

Expected: an agent ID starting with agent_.

3. Install

agent_ids takes up to 50 agents per call; leave version out to install the latest version.

终端窗口
INSTALL_JSON=$(curl --fail-with-body -sS -X POST "$BASE/registry/v1/packages/$PKG_ID/installations" \
-H "Authorization: Bearer $PRAXIS_API_KEY" \
-H "Content-Type: application/json" \
-d "$(jq -n --arg agent "$AGENT_ID" '{agent_ids: [$agent], version: "1.0.1"}')")
export INSTALL_ID=$(printf '%s' "$INSTALL_JSON" | jq -er '.data[0].id')
printf '%s\n' "$INSTALL_JSON" | jq '{data: [.data[] | {id, kind, target, version, state}], errors}'

Expected: HTTP 201 with one record in data: target is {"type":"agent","id":…}, version is 1.0.1, state is installed, and errors is an empty array.

Targets are handled independently: if at least one succeeds the call returns 201, and each failed target is listed in errors (target_id, code, message); fix the cause and resend only the failed targets. If every target fails, the call returns the first failure’s error status instead of 201. Installing the same package on the same target again is not an error; it moves the target to that version.

4. Read it back

终端窗口
curl --fail-with-body -sS "$BASE/registry/v1/packages/$PKG_ID/installations" \
-H "Authorization: Bearer $PRAXIS_API_KEY" | jq '.data[] | {id, target, version, state}'
curl --fail-with-body -sS "$BASE/agent/v1/agents/$AGENT_ID" \
-H "Authorization: Bearer $PRAXIS_API_KEY" | jq '.skills'

Expected: the installation’s state is installed, and the agent’s skills gained one entry with type custom.

Every read of the installation list is reconciled with the target, and state is the conclusion at that moment:

stateMeaningWhat to do
installedThe target has it and the version matches the recordNothing
driftedThe target has it at a different version; version shows the version on the targetUse installations.update to move to the version you want
missingThe target no longer has it (someone removed it on the agent or computer); the record staysReinstall with installations.update, or clear the record with installations.delete
unknownThe target could not be asked this time; it does not mean the package is not installedRead again later

A record with withdrawn true is installed at a version that has since been withdrawn; what is already installed keeps working.

5. Change the version

A skill can move to any version that is not withdrawn (upgrade or rollback). Leaving version out (body {}) moves it to the latest version.

终端窗口
curl --fail-with-body -sS -X POST "$BASE/registry/v1/installations/$INSTALL_ID:update" \
-H "Authorization: Bearer $PRAXIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"version": "1.0.0"}' | jq '{id, version, state}'
curl --fail-with-body -sS -X POST "$BASE/registry/v1/installations/$INSTALL_ID:update" \
-H "Authorization: Bearer $PRAXIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{}' | jq '{id, version, state}'

Expected: both calls return HTTP 200 with state installed; the first shows version 1.0.0, the second returns to 1.0.1.

6. Uninstall

Uninstalling removes the skill from the agent and deletes the installation record; the package and its versions are untouched and can be installed again.

终端窗口
curl --fail-with-body -sS -X DELETE "$BASE/registry/v1/installations/$INSTALL_ID" \
-H "Authorization: Bearer $PRAXIS_API_KEY"
curl --fail-with-body -sS "$BASE/registry/v1/packages/$PKG_ID/installations" \
-H "Authorization: Bearer $PRAXIS_API_KEY"

Expected: the first request returns {"id":…,"object":"registry.installation","deleted":true}; the second returns {"data":[]}. Repeating a delete returns 404, so read before you delete.

Failure branches

SituationResult
Installing a withdrawn version409 FAILED_PRECONDITION; the message says the version is withdrawn and cannot be installed
computer_ids in a skill request400 INVALID_PARAMS; the message says a skill installs only on agents
An agent in agent_ids does not exist409 FAILED_PRECONDITION; the message says the agent was not found
The agent already has a different skill with the same name, or already has 20 skillsThe target appears in errors with code FAILED_PRECONDITION

Plugins

A plugin installs on a computer: the body uses computer_ids instead of agent_ids, up to 50 per call. A plugin can only be installed at the repository’s latest version; if version is given it must equal the latest, otherwise the call returns FAILED_PRECONDITION. Changing version works the same way: only to the latest.

终端窗口
curl --fail-with-body -sS -X POST "$BASE/registry/v1/packages/$PLUGIN_PKG_ID/installations" \
-H "Authorization: Bearer $PRAXIS_API_KEY" \
-H "Content-Type: application/json" \
-d "$(jq -n --arg computer "$COMPUTER_ID" '{computer_ids: [$computer]}')"

Clean up

终端窗口
curl --fail-with-body -sS -X POST "$BASE/agent/v1/agents/$AGENT_ID/archive" \
-H "Authorization: Bearer $PRAXIS_API_KEY" | jq '{id, status}'
for v in 1.0.0 1.0.1; do
curl --fail-with-body -sS -X POST "$BASE/registry/v1/packages/$PKG_ID/versions/$v:withdraw" \
-H "Authorization: Bearer $PRAXIS_API_KEY" | jq '{version, withdrawn}'
done

Expected: the agent’s status is archived and both versions are withdrawn. There is no endpoint to delete a package yet, so the package stays in the repository.

Limits and errors → · Publish a skill and read it back →