Clojure wrappers over the beta agents-platform APIs of the official Anthropic Java SDK: skills, memory stores, agents, sessions, deployments, deployment runs, environments, vaults, user profiles, and webhooks.
These wrap beta endpoints that Anthropic may change. Errors follow
anthropic.core's contract: API/IO failures are ex-info keyed
:anthropic/error with the SDK exception as cause.
Clojure wrappers over the beta agents-platform APIs of the official Anthropic Java SDK: skills, memory stores, agents, sessions, deployments, deployment runs, environments, vaults, user profiles, and webhooks. These wrap beta endpoints that Anthropic may change. Errors follow `anthropic.core`'s contract: API/IO failures are ex-info keyed `:anthropic/error` with the SDK exception as cause.
(add-session-resource client session-id req)Add a file resource to a session. Resource responses include GitHub
:checkout and memory-store :access, :description, :instructions,
and :name when returned by the SDK.
Add a file resource to a session. Resource responses include GitHub `:checkout` and memory-store `:access`, `:description`, `:instructions`, and `:name` when returned by the SDK.
(archive-agent client agent-id)Archive an agent by id. Returns the archived agent map, including
:multiagent when present.
Archive an agent by id. Returns the archived agent map, including `:multiagent` when present.
(archive-deployment client deployment-id)Archive a deployment by id. Returns the deployment map.
Archive a deployment by id. Returns the deployment map.
(archive-environment client environment-id)Archive an environment by id. Returns the environment map.
Archive an environment by id. Returns the environment map.
(archive-memory-store client memory-store-id)Archive a memory store by id. Returns the archived store map.
Archive a memory store by id. Returns the archived store map.
(archive-session client session-id)Archive a session by id. Returns the archived session map with complete resource and agent tool maps.
Archive a session by id. Returns the archived session map with complete resource and agent tool maps.
(archive-session-thread client session-id thread-id)Archive a session thread by session id and thread id.
Archive a session thread by session id and thread id.
(archive-vault client vault-id)Archive a vault by id. Returns the vault map.
Archive a vault by id. Returns the vault map.
(create-agent client req)Create a managed agent: :name and :model (required), :system,
:description, :metadata, :skills, :mcp-servers, :tools, and
:multiagent, :betas, :inference-geo, and :speed when using model config.
Returns the agent as a map (:id, :name, :model, :version,
:system, :description, :skills, :mcp-servers, :tools, :multiagent,
:created-at, :updated-at). Tool maps include custom input-schema
:properties, and tool config :permission-policy values.
Create a managed agent: `:name` and `:model` (required), `:system`, `:description`, `:metadata`, `:skills`, `:mcp-servers`, `:tools`, and `:multiagent`, `:betas`, `:inference-geo`, and `:speed` when using model config. Returns the agent as a map (`:id`, `:name`, `:model`, `:version`, `:system`, `:description`, `:skills`, `:mcp-servers`, `:tools`, `:multiagent`, `:created-at`, `:updated-at`). Tool maps include custom input-schema `:properties`, and tool config `:permission-policy` values.
(create-deployment client req)Create a deployment. Required: :name, :agent, :environment-id, and
:initial-events (event maps). Optional: :description,
:metadata, :vault-ids, :resources (including GitHub :checkout and
memory-store :access and :instructions), :schedule, :budget, and :betas. Budget uses the
{:max-list-cost {:amount '...' :currency :usd} :type :limit} shape.
Returns the deployment map.
Create a deployment. Required: `:name`, `:agent`, `:environment-id`, and
`:initial-events` (event maps). Optional: `:description`,
`:metadata`, `:vault-ids`, `:resources` (including GitHub `:checkout` and
memory-store `:access` and `:instructions`), `:schedule`, `:budget`, and `:betas`. Budget uses the
`{:max-list-cost {:amount '...' :currency :usd} :type :limit}` shape.
Returns the deployment map.(create-enrollment-url client user-profile-id)Create an enrollment URL for a user profile. Returns {:url ... :expires-at ...}.
Create an enrollment URL for a user profile. Returns `{:url ...
:expires-at ...}`.(create-environment client req)Create an environment: :name (required), :description, :metadata,
:config, :scope, and :betas. Returns the environment map.
Create an environment: `:name` (required), `:description`, `:metadata`, `:config`, `:scope`, and `:betas`. Returns the environment map.
(create-memory client memory-store-id req)Create a memory in memory-store-id: :path (required), :content,
and :view. Returns the memory map.
Create a memory in `memory-store-id`: `:path` (required), `:content`, and `:view`. Returns the memory map.
(create-memory-store client req)Create a memory store: :name (required), :description, :metadata.
Returns the store as a map (:id, :name, :description, :created-at,
:updated-at).
Create a memory store: `:name` (required), `:description`, `:metadata`. Returns the store as a map (`:id`, `:name`, `:description`, `:created-at`, `:updated-at`).
(create-session client req)Create a session for :agent (an agent id, required), with optional
:title, :environment-id, :metadata, and :budget shaped as
{:max-list-cost {:amount '...' :currency :usd} :type :limit}. Optional
:resources, :vault-ids, :betas, and per-session agent overrides
via :agent with :mcp-servers and :tools. Returns the
session as a map (:id, :status, :title, :environment-id,
:created-at, :updated-at, :budget, and :usage). Resource maps may
include GitHub :checkout and memory-store :access, :description,
:instructions, and :name. Session agent tool maps match agent tool maps,
including custom input-schema :properties and config :permission-policy.
Create a session for `:agent` (an agent id, required), with optional
`:title`, `:environment-id`, `:metadata`, and `:budget` shaped as
`{:max-list-cost {:amount '...' :currency :usd} :type :limit}`. Optional
`:resources`, `:vault-ids`, `:betas`, and per-session agent overrides
via `:agent` with `:mcp-servers` and `:tools`. Returns the
session as a map (`:id`, `:status`, `:title`, `:environment-id`,
`:created-at`, `:updated-at`, `:budget`, and `:usage`). Resource maps may
include GitHub `:checkout` and memory-store `:access`, `:description`,
`:instructions`, and `:name`. Session agent tool maps match agent tool maps,
including custom input-schema `:properties` and config `:permission-policy`.(create-skill client req)Create a skill from :files (paths or java.io.Files; typically a
SKILL.md plus resources) with an optional :display-title. Returns the
skill as a map (:id, :display-title, :latest-version, :source,
:created-at, :updated-at).
Create a skill from `:files` (paths or `java.io.File`s; typically a SKILL.md plus resources) with an optional `:display-title`. Returns the skill as a map (`:id`, `:display-title`, `:latest-version`, `:source`, `:created-at`, `:updated-at`).
(create-skill-version client skill-id req)Create a new skill version for skill-id from :files (paths or
java.io.Files). Returns the version as a map.
Create a new skill version for `skill-id` from `:files` (paths or `java.io.File`s). Returns the version as a map.
(create-user-profile client req)Create a user profile with optional :name, :external-id, :metadata,
and :relationship (:external, :resold, or :internal). Returns the
profile map, including :relationship and :trust-grants.
Create a user profile with optional `:name`, `:external-id`, `:metadata`, and `:relationship` (`:external`, `:resold`, or `:internal`). Returns the profile map, including `:relationship` and `:trust-grants`.
(create-vault client req)Create a vault: :display-name (required), :metadata, and :betas. Credentials are
not wrapped yet. Returns the vault map.
Create a vault: `:display-name` (required), `:metadata`, and `:betas`. Credentials are not wrapped yet. Returns the vault map.
(delete-environment client environment-id)Delete an environment by id. Returns {:id ... :deleted true}.
Delete an environment by id. Returns `{:id ... :deleted true}`.
(delete-memory client memory-store-id memory-id)(delete-memory client memory-store-id memory-id opts)Delete a memory. opts may include :expected-content-sha256.
Delete a memory. `opts` may include `:expected-content-sha256`.
(delete-memory-store client memory-store-id)Delete a memory store by id. Returns {:id ... :deleted true :type ...}.
Delete a memory store by id. Returns `{:id ... :deleted true :type ...}`.
(delete-session client session-id)Delete a session by id. Returns {:id ... :deleted true :type ...}.
Delete a session by id. Returns `{:id ... :deleted true :type ...}`.
(delete-skill client skill-id)Delete a skill by id. Returns {:id ... :deleted true :type ...}.
Delete a skill by id. Returns `{:id ... :deleted true :type ...}`.
(delete-skill-version client skill-id version)Delete a skill version. Returns {:id ... :deleted true :type ...}.
Delete a skill version. Returns `{:id ... :deleted true :type ...}`.
(delete-vault client vault-id)Delete a vault by id. Returns {:id ... :deleted true :type ...}.
Delete a vault by id. Returns `{:id ... :deleted true :type ...}`.
(download-skill-version client skill-id version)Download a skill version archive. Returns the response body as a byte array.
Download a skill version archive. Returns the response body as a byte array.
(get-agent client agent-id)Retrieve an agent by id, as a map like create-agent's return, including
:multiagent when present. Tool maps include custom input-schema
:properties and tool config :permission-policy values.
Retrieve an agent by id, as a map like `create-agent`'s return, including `:multiagent` when present. Tool maps include custom input-schema `:properties` and tool config `:permission-policy` values.
(get-beta-model client model-id)(get-beta-model client model-id opts)Retrieve one beta model's info by id as a map shaped like list-beta-models' entries.
Retrieve one beta model's info by id as a map shaped like `list-beta-models`' entries.
(get-deployment client deployment-id)Retrieve a deployment by id.
Retrieve a deployment by id.
(get-deployment-run client deployment-run-id)Retrieve a deployment run by id. Returns a deployment run map, with nested
:error and :trigger-context plain-data maps when present.
Retrieve a deployment run by id. Returns a deployment run map, with nested `:error` and `:trigger-context` plain-data maps when present.
(get-environment client environment-id)Retrieve an environment by id.
Retrieve an environment by id.
(get-memory client memory-store-id memory-id)Retrieve a memory by id.
Retrieve a memory by id.
(get-memory-store client memory-store-id)Retrieve a memory store by id, as a map like create-memory-store's return.
Retrieve a memory store by id, as a map like `create-memory-store`'s return.
(get-memory-version client memory-store-id memory-version-id)(get-memory-version client memory-store-id memory-version-id opts)Retrieve one memory version. opts may include :view.
Retrieve one memory version. `opts` may include `:view`.
(get-session client session-id)Retrieve a session by id, as a map like create-session's return, including
resource GitHub :checkout, memory-store fields, and complete agent tool maps.
Retrieve a session by id, as a map like `create-session`'s return, including resource GitHub `:checkout`, memory-store fields, and complete agent tool maps.
(get-session-resource client session-id resource-id)Retrieve a session resource, including GitHub :checkout and all returned
memory-store fields.
Retrieve a session resource, including GitHub `:checkout` and all returned memory-store fields.
(get-session-thread client session-id thread-id)Retrieve a session thread by session id and thread id.
Retrieve a session thread by session id and thread id.
(get-skill client skill-id)Retrieve one skill by id, as a map shaped like create-skill's return.
Retrieve one skill by id, as a map shaped like `create-skill`'s return.
(get-skill-version client skill-id version)Retrieve one skill version.
Retrieve one skill version.
(get-user-profile client user-profile-id)Retrieve a user profile by id.
Retrieve a user profile by id.
(get-vault client vault-id)Retrieve a vault by id.
Retrieve a vault by id.
(heartbeat-environment-work client environment-id work-id)(heartbeat-environment-work client environment-id work-id opts)(list-agent-versions client agent-id opts)List an agent's versions (pages followed) as agent maps.
List an agent's versions (pages followed) as agent maps.
(list-agents client)(list-agents client opts)List agents with optional :created-at-gte, :created-at-lte,
:include-archived, :limit, :page, and :betas.
List agents with optional `:created-at-gte`, `:created-at-lte`, `:include-archived`, `:limit`, `:page`, and `:betas`.
(list-beta-models client)(list-beta-models client opts)List beta models as maps, newest first. Optional opts accepts :limit,
:before-id, :after-id, and free-form string or keyword :betas. Each map
includes the stable model keys plus :allowed-fallback-models and :type
when the API reports them. Pages are followed automatically.
List beta models as maps, newest first. Optional `opts` accepts `:limit`, `:before-id`, `:after-id`, and free-form string or keyword `:betas`. Each map includes the stable model keys plus `:allowed-fallback-models` and `:type` when the API reports them. Pages are followed automatically.
(list-deployment-runs client)(list-deployment-runs client opts)List deployment runs with optional timestamps, :deployment-id,
:has-error, :limit, :page, :trigger-type, and :betas. Returns
deployment run maps, with nested :error and :trigger-context plain-data
maps when present.
List deployment runs with optional timestamps, `:deployment-id`, `:has-error`, `:limit`, `:page`, `:trigger-type`, and `:betas`. Returns deployment run maps, with nested `:error` and `:trigger-context` plain-data maps when present.
(list-deployments client)(list-deployments client opts)List deployments with optional :agent-id, timestamps, :include-archived,
:limit, :page, :status, and :betas.
List deployments with optional `:agent-id`, timestamps, `:include-archived`, `:limit`, `:page`, `:status`, and `:betas`.
(list-dreams client)(list-dreams client opts)List dreams with optional timestamp filters, :include-archived, :limit,
:page, :statuses, and :betas.
List dreams with optional timestamp filters, `:include-archived`, `:limit`, `:page`, `:statuses`, and `:betas`.
(list-environments client)(list-environments client opts)List environments with optional :include-archived, :limit, :page,
and :betas.
List environments with optional `:include-archived`, `:limit`, `:page`, and `:betas`.
(list-memories client memory-store-id)(list-memories client memory-store-id opts)List memories (pages followed) for a memory store.
List memories (pages followed) for a memory store.
(list-memory-stores client)(list-memory-stores client opts)List memory stores with optional :created-at-gte, :created-at-lte,
:include-archived, :limit, :page, and :betas.
List memory stores with optional `:created-at-gte`, `:created-at-lte`, `:include-archived`, `:limit`, `:page`, and `:betas`.
(list-memory-versions client memory-store-id)(list-memory-versions client memory-store-id opts)List memory versions for a memory store. Optional filters include :memory-id,
:operation, :view, :limit, and :page.
List memory versions for a memory store. Optional filters include `:memory-id`, `:operation`, `:view`, `:limit`, and `:page`.
(list-session-events client session-id)(list-session-events client session-id opts)List session events (pages followed) as normalized event maps. Options include
:created-at-gt, :created-at-gte, :created-at-lt, :created-at-lte, :limit,
:order, :page, :types, and :betas.
List session events (pages followed) as normalized event maps. Options include `:created-at-gt`, `:created-at-gte`, `:created-at-lt`, `:created-at-lte`, `:limit`, `:order`, `:page`, `:types`, and `:betas`.
(list-session-resources client session-id opts)List session resources, including GitHub :checkout and all returned
memory-store fields.
List session resources, including GitHub `:checkout` and all returned memory-store fields.
(list-session-threads client session-id)List session threads (pages followed) for a session.
List session threads (pages followed) for a session.
(list-sessions client)(list-sessions client opts)List sessions with optional :agent-id, :agent-version, timestamp
filters, :deployment-id, :include-archived, :limit, :memory-store-id,
:order, :page, :statuses, and :betas. Returned resource maps include
GitHub :checkout, memory-store fields, and complete agent tool maps.
List sessions with optional `:agent-id`, `:agent-version`, timestamp filters, `:deployment-id`, `:include-archived`, `:limit`, `:memory-store-id`, `:order`, `:page`, `:statuses`, and `:betas`. Returned resource maps include GitHub `:checkout`, memory-store fields, and complete agent tool maps.
(list-skill-versions client skill-id)(list-skill-versions client skill-id opts)List skill versions with optional :limit, :page, and :betas.
List skill versions with optional `:limit`, `:page`, and `:betas`.
(list-skills client)(list-skills client opts)List skills with optional :limit, :page, :source, and :betas.
List skills with optional `:limit`, `:page`, `:source`, and `:betas`.
(list-thread-events client session-id thread-id opts)List thread events (pages followed) as normalized event maps.
List thread events (pages followed) as normalized event maps.
(list-tunnel-certificates client tunnel-id)(list-tunnel-certificates client tunnel-id opts)List tunnel certificates with optional :include-archived, :limit,
:page, and :betas.
List tunnel certificates with optional `:include-archived`, `:limit`, `:page`, and `:betas`.
(list-tunnels client)(list-tunnels client opts)List tunnels with optional :include-archived, :limit, :page, and
:betas.
List tunnels with optional `:include-archived`, `:limit`, `:page`, and `:betas`.
(list-user-profiles client)(list-user-profiles client opts)List user profiles with optional :limit, :order, :page, and :betas.
List user profiles with optional `:limit`, `:order`, `:page`, and `:betas`.
(list-vault-credentials client vault-id)(list-vault-credentials client vault-id opts)List vault credentials with optional :include-archived, :limit, :page,
and :betas.
List vault credentials with optional `:include-archived`, `:limit`, `:page`, and `:betas`.
(list-vaults client)(list-vaults client opts)List vaults with optional :include-archived, :limit, :page, and
:betas.
List vaults with optional `:include-archived`, `:limit`, `:page`, and `:betas`.
(mcp-oauth-validate-vault-credential client vault-id credential-id)(pause-deployment client deployment-id)Pause a deployment by id. Returns the deployment map.
Pause a deployment by id. Returns the deployment map.
(poll-environment-work client environment-id)(poll-environment-work client environment-id opts)(rotate-tunnel-token client tunnel-id)(rotate-tunnel-token client tunnel-id opts)(run-deployment client deployment-id)Run a deployment manually by id. Returns the deployment run map, with nested
:error and :trigger-context plain-data maps when present.
Run a deployment manually by id. Returns the deployment run map, with nested `:error` and `:trigger-context` plain-data maps when present.
(send-session-events client session-id events)Send a vector of session event maps to session-id. Event maps support
{:type :user-message :content ...}, {:type :system-message :content ...},
and {:type :user-define-outcome :description ... :rubric ...}. Returns
{:data [...]} maps with common fields and each event variant's typed payload,
including user message content, outcome rubric, tool confirmation result, and
tool result content.
Send a vector of session event maps to `session-id`. Event maps support
`{:type :user-message :content ...}`, `{:type :system-message :content ...}`,
and `{:type :user-define-outcome :description ... :rubric ...}`. Returns
`{:data [...]}` maps with common fields and each event variant's typed payload,
including user message content, outcome rubric, tool confirmation result, and
tool result content.(stream-session-events client session-id)(stream-session-events client session-id opts)(stream-session-events client session-id opts on-event)Open an SSE stream of beta session events. Calls on-event with a normalized
event map for each event, returns a vector of all event maps, and closes the
HTTP stream automatically. Event maps retain raw event fields and use :type
keywords such as :agent-message, :agent-thinking, :session-status-running,
and :event-delta. :event-deltas may contain :agent-message and
:agent-thinking to narrow the delta stream.
Open an SSE stream of beta session events. Calls `on-event` with a normalized event map for each event, returns a vector of all event maps, and closes the HTTP stream automatically. Event maps retain raw event fields and use `:type` keywords such as `:agent-message`, `:agent-thinking`, `:session-status-running`, and `:event-delta`. `:event-deltas` may contain `:agent-message` and `:agent-thinking` to narrow the delta stream.
(stream-thread-events client session-id thread-id)(stream-thread-events client session-id thread-id opts)(stream-thread-events client session-id thread-id opts on-event)Open an SSE stream of beta session-thread events. Calls on-event with a
normalized event map for each event, returns a vector of all event maps, and
closes the HTTP stream automatically. Event maps retain raw event fields and
use :type keywords such as :agent-message, :agent-thinking,
:session-status-running, and :event-delta. :event-deltas may contain
:agent-message and :agent-thinking to narrow the delta stream.
Open an SSE stream of beta session-thread events. Calls `on-event` with a normalized event map for each event, returns a vector of all event maps, and closes the HTTP stream automatically. Event maps retain raw event fields and use `:type` keywords such as `:agent-message`, `:agent-thinking`, `:session-status-running`, and `:event-delta`. `:event-deltas` may contain `:agent-message` and `:agent-thinking` to narrow the delta stream.
(unpause-deployment client deployment-id)Unpause a deployment by id. Returns the deployment map.
Unpause a deployment by id. Returns the deployment map.
(unwrap-webhook client payload)(unwrap-webhook client payload opts)Parse a raw webhook payload into a normalized map. With a second arity,
verifies signatures when :headers and :secret are supplied.
Parse a raw webhook payload into a normalized map. With a second arity, verifies signatures when `:headers` and `:secret` are supplied.
(update-agent client agent-id changes)Update an agent. changes may include :version (the current agent version,
for optimistic concurrency - see :version in get-agent's return) plus
:name, :model, :inference-geo, :system, :description, :metadata, or
:multiagent and :betas. Returns the updated agent map, including
:multiagent when present. Tool maps include custom input-schema
:properties and tool config :permission-policy values.
Update an agent. `changes` may include `:version` (the current agent version, for optimistic concurrency - see `:version` in `get-agent`'s return) plus `:name`, `:model`, `:inference-geo`, `:system`, `:description`, `:metadata`, or `:multiagent` and `:betas`. Returns the updated agent map, including `:multiagent` when present. Tool maps include custom input-schema `:properties` and tool config `:permission-policy` values.
(update-deployment client deployment-id changes)Update a deployment. changes may include :name, :agent,
:environment-id, :initial-events, :description, :metadata,
:vault-ids, :resources (including GitHub :checkout and memory-store
:access and :instructions), :schedule, :budget, or :betas. Returns the updated deployment map.
Update a deployment. `changes` may include `:name`, `:agent`, `:environment-id`, `:initial-events`, `:description`, `:metadata`, `:vault-ids`, `:resources` (including GitHub `:checkout` and memory-store `:access` and `:instructions`), `:schedule`, `:budget`, or `:betas`. Returns the updated deployment map.
(update-environment client environment-id changes)Update an environment's :name, :description, :metadata, :config, or
:scope, or :betas.
Update an environment's `:name`, `:description`, `:metadata`, `:config`, or `:scope`, or `:betas`.
(update-memory client memory-store-id memory-id changes)Update a memory's :path, :content, or :view.
Update a memory's `:path`, `:content`, or `:view`.
(update-memory-store client memory-store-id changes)Update a memory store's :name, :description, or :metadata. Returns
the updated store map.
Update a memory store's `:name`, `:description`, or `:metadata`. Returns the updated store map.
(update-session client session-id changes)Update a session's :title, :metadata, :budget, :agent, :vault-ids,
or :betas. Budget uses the {:max-list-cost {:amount '...' :currency :usd} :type :limit} shape. Returns the updated session map with complete resource
and agent tool maps.
Update a session's `:title`, `:metadata`, `:budget`, `:agent`, `:vault-ids`,
or `:betas`. Budget uses the `{:max-list-cost {:amount '...' :currency :usd}
:type :limit}` shape. Returns the updated session map with complete resource
and agent tool maps.(update-session-resource client session-id resource-id changes)Update a session resource and return its complete mapped representation,
including GitHub :checkout and all returned memory-store fields.
Update a session resource and return its complete mapped representation, including GitHub `:checkout` and all returned memory-store fields.
(update-user-profile client user-profile-id changes)Update a user profile's :name, :external-id, :metadata, or
:relationship (:external, :resold, or :internal).
Update a user profile's `:name`, `:external-id`, `:metadata`, or `:relationship` (`:external`, `:resold`, or `:internal`).
(update-vault client vault-id changes)Update a vault's :display-name, :metadata, or :betas.
Update a vault's `:display-name`, `:metadata`, or `:betas`.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |