Driftstone Docs
Back to landing

Extensions

Agent extensions

Extensions package reusable agent prompts for Driftstone storage paths. Each extension belongs to an organization, can be updated or disabled, and runs asynchronously so clients can poll for completion.

Create a private extension

Run it on a storage path

Poll the background result

Extensions

Create

Create an agent extension with a base prompt. Driftstone rejects duplicate prompts within the same organization.

POST/v1/extensions/create

Create an extension

Creates a private extension for the authenticated organization. The optional presets array currently supports openclaw.

FieldLocationRequiredDescription
typebodyyesExtension type. Currently only agent is supported.
namebodyyesHuman-readable extension name.
descriptionbodynoOptional extension description.
promptbodyyesBase agent prompt used whenever the extension runs.
presetsbodynoOptional list of preset configurations. Currently supports openclaw.
curl -X POST "https://api.driftstone.ai/v1/extensions/create" \
  -H "Authorization: Bearer dk-..." \
  -H "Content-Type: application/json" \
  -d '{
    "type": "agent",
    "name": "README reviewer",
    "description": "Reviews README updates before publishing.",
    "prompt": "Inspect the README and suggest concise release-note updates.",
    "presets": ["openclaw"]
  }'

Extensions

Update

Update mutable extension fields by id. Provide at least one mutable field in the request body.

POST/v1/extensions/update

Update an extension

Updates extension metadata, status, prompt, or presets. Status must be active or disabled.

FieldLocationRequiredDescription
extensionIdbodyyesExtension id returned by create.
namebodynoNew human-readable extension name.
descriptionbodynoNew extension description.
statusbodynoExtension status. Must be active or disabled.
promptbodynoNew base agent prompt.
presetsbodynoReplacement list of preset configurations. Currently supports openclaw.
curl -X POST "https://api.driftstone.ai/v1/extensions/update" \
  -H "Authorization: Bearer dk-..." \
  -H "Content-Type: application/json" \
  -d '{
    "extensionId": "ext-...",
    "status": "active",
    "prompt": "Inspect docs changes and return specific edits only."
  }'

Extensions

Run + Poll

Run starts an asynchronous Modal-backed agent execution. Use the returned runId with the poll endpoint until the status is completed or failed.

POST/v1/extensions/run

Run an extension

Runs the extension against a Driftstone storage path. Private extensions can only be run by their owning organization.

FieldLocationRequiredDescription
extensionIdbodyyesExtension id to run.
pathbodyyesDriftstone GCS storage path that the extension should inspect or modify.
promptbodynoAdditional run-specific instructions appended to the extension prompt.
runIdpathyes for pollingRun id returned by the run endpoint.
curl -X POST "https://api.driftstone.ai/v1/extensions/run" \
  -H "Authorization: Bearer dk-..." \
  -H "Content-Type: application/json" \
  -d '{
    "extensionId": "ext-...",
    "path": "organizations/org-.../repositories/hello-world/main/ver-1234abcd",
    "prompt": "Focus on docs/README.md."
  }'
GET/v1/extensions/poll/{runId}

Poll an extension run

Returns running, completed, or failed with the result payload when available.

FieldLocationRequiredDescription
extensionIdbodyyesExtension id to run.
pathbodyyesDriftstone GCS storage path that the extension should inspect or modify.
promptbodynoAdditional run-specific instructions appended to the extension prompt.
runIdpathyes for pollingRun id returned by the run endpoint.
curl -X GET "https://api.driftstone.ai/v1/extensions/poll/fc-..." \
  -H "Authorization: Bearer dk-..."

Extensions

Delete

Delete removes an extension owned by the authenticated organization.

POST/v1/extensions/delete

Delete an extension

Deletes the extension record and returns the deleted extension id.

FieldLocationRequiredDescription
extensionIdbodyyesExtension id to delete.
curl -X POST "https://api.driftstone.ai/v1/extensions/delete" \
  -H "Authorization: Bearer dk-..." \
  -H "Content-Type: application/json" \
  -d '{
    "extensionId": "ext-..."
  }'