com.atiproto.actions

atiproto.com

Documentation

create object

Instructs the agent to call com.atproto.repo.createRecord on the user's PDS.

Properties

collection string nsid Required

A namespaced identifier (e.g., app.bsky.feed.post).

name string Required

Server-assigned name for this action; echoed back on the corresponding response so the server can correlate.

maxLength: 64 bytes
record unknown Required

No description available.

repo string did Required

DID of the repo to write to. The PDS auth check is the source of truth for whether the write is allowed.

rkey string Optional

Optional. When omitted (the default), the PDS generates the rkey and returns the resulting URI on the response. Server-assigned rkeys are reserved for fixed-rkey records like com.atiproto.profile/self.

maxLength: 128 bytes
View raw schema
{
  "type": "object",
  "required": [
    "repo",
    "name",
    "collection",
    "record"
  ],
  "properties": {
    "name": {
      "type": "string",
      "maxLength": 64,
      "description": "Server-assigned name for this action; echoed back on the corresponding response so the server can correlate."
    },
    "repo": {
      "type": "string",
      "format": "did",
      "description": "DID of the repo to write to. The PDS auth check is the source of truth for whether the write is allowed."
    },
    "rkey": {
      "type": "string",
      "maxLength": 128,
      "description": "Optional. When omitted (the default), the PDS generates the rkey and returns the resulting URI on the response. Server-assigned rkeys are reserved for fixed-rkey records like com.atiproto.profile/self."
    },
    "record": {
      "type": "unknown"
    },
    "collection": {
      "type": "string",
      "format": "nsid"
    }
  },
  "description": "Instructs the agent to call com.atproto.repo.createRecord on the user's PDS."
}
delete object

Instructs the agent to call com.atproto.repo.deleteRecord on the user's PDS.

Properties

collection string nsid Required

A namespaced identifier (e.g., app.bsky.feed.post).

name string Required

No description available.

maxLength: 64 bytes
repo string did Required

A decentralized identifier (DID).

rkey string Required

No description available.

maxLength: 128 bytes
swapCommit string cid Optional

A content identifier (CID) referencing immutable data.

View raw schema
{
  "type": "object",
  "required": [
    "repo",
    "name",
    "collection",
    "rkey"
  ],
  "properties": {
    "name": {
      "type": "string",
      "maxLength": 64
    },
    "repo": {
      "type": "string",
      "format": "did"
    },
    "rkey": {
      "type": "string",
      "maxLength": 128
    },
    "collection": {
      "type": "string",
      "format": "nsid"
    },
    "swapCommit": {
      "type": "string",
      "format": "cid"
    }
  },
  "description": "Instructs the agent to call com.atproto.repo.deleteRecord on the user's PDS."
}
error object

Populated by the agent when an action fails. The server's error branch uses this to construct compensating actions and a final raise.

Properties

action string Required

The verb of the action that failed (create/update/delete).

maxLength: 32 bytes
code string Optional

No description available.

maxLength: 64 bytes
message string Required

No description available.

maxLength: 1024 bytes
name string Optional

No description available.

maxLength: 64 bytes
View raw schema
{
  "type": "object",
  "required": [
    "action",
    "message"
  ],
  "properties": {
    "code": {
      "type": "string",
      "maxLength": 64
    },
    "name": {
      "type": "string",
      "maxLength": 64
    },
    "action": {
      "type": "string",
      "maxLength": 32,
      "description": "The verb of the action that failed (create/update/delete)."
    },
    "message": {
      "type": "string",
      "maxLength": 1024
    }
  },
  "description": "Populated by the agent when an action fails. The server's error branch uses this to construct compensating actions and a final raise."
}
inboundWorkflow object

Agent → server callback envelope. Echoes the server's intent verbatim, except when the agent overrides to "error" after an action failure.

Properties

error ref #error Optional

No description available.

intent string Required

No description available.

maxLength: 64 bytes
responses array of ref#response Required

No description available.

View raw schema
{
  "type": "object",
  "required": [
    "intent",
    "responses"
  ],
  "properties": {
    "error": {
      "ref": "#error",
      "type": "ref"
    },
    "intent": {
      "type": "string",
      "maxLength": 64
    },
    "responses": {
      "type": "array",
      "items": {
        "ref": "#response",
        "type": "ref"
      }
    }
  },
  "description": "Agent → server callback envelope. Echoes the server's intent verbatim, except when the agent overrides to \"error\" after an action failure."
}
outboundWorkflow object

Server → agent envelope. Server-defined intent string acts as a phase marker; the agent treats it as opaque. Each item in `actions` is discriminated by `$type` against `#create` / `#update` / `#delete` / `#raise`.

Properties

intent string Required

No description available.

maxLength: 64 bytes
View raw schema
{
  "type": "object",
  "required": [
    "intent",
    "actions"
  ],
  "properties": {
    "intent": {
      "type": "string",
      "maxLength": 64
    },
    "actions": {
      "type": "array",
      "items": {
        "refs": [
          "#create",
          "#update",
          "#delete",
          "#raise"
        ],
        "type": "union"
      }
    }
  },
  "description": "Server → agent envelope. Server-defined intent string acts as a phase marker; the agent treats it as opaque. Each item in `actions` is discriminated by `$type` against `#create` / `#update` / `#delete` / `#raise`."
}
raise object

Terminal action: the agent throws a WorkflowRaisedError carrying message and code. Subsequent actions in the same batch are not executed.

Properties

code string Optional

No description available.

maxLength: 64 bytes
message string Required

No description available.

maxLength: 1024 bytes
View raw schema
{
  "type": "object",
  "required": [
    "message"
  ],
  "properties": {
    "code": {
      "type": "string",
      "maxLength": 64
    },
    "message": {
      "type": "string",
      "maxLength": 1024
    }
  },
  "description": "Terminal action: the agent throws a WorkflowRaisedError carrying message and code. Subsequent actions in the same batch are not executed."
}
recordResult object

No description available.

Properties

cid string cid Optional

Present on create/update responses; absent on delete (the record is gone).

uri string at-uri Required

An AT Protocol URI (e.g., at://did:plc:xyz/app.bsky.feed.post/abc).

View raw schema
{
  "type": "object",
  "required": [
    "uri"
  ],
  "properties": {
    "cid": {
      "type": "string",
      "format": "cid",
      "description": "Present on create/update responses; absent on delete (the record is gone)."
    },
    "uri": {
      "type": "string",
      "format": "at-uri"
    }
  }
}
response object

Result of executing one action. Carries the verb (so the server can branch without inspecting result shape) plus the action name and the resulting record reference.

Properties

action string Required

No description available.

maxLength: 32 bytes
Known values: create, update, delete
name string Required

No description available.

maxLength: 64 bytes
View raw schema
{
  "type": "object",
  "required": [
    "action",
    "name",
    "result"
  ],
  "properties": {
    "name": {
      "type": "string",
      "maxLength": 64
    },
    "action": {
      "type": "string",
      "maxLength": 32,
      "knownValues": [
        "create",
        "update",
        "delete"
      ]
    },
    "result": {
      "ref": "#recordResult",
      "type": "ref"
    }
  },
  "description": "Result of executing one action. Carries the verb (so the server can branch without inspecting result shape) plus the action name and the resulting record reference."
}
update object

Instructs the agent to call com.atproto.repo.putRecord on the user's PDS.

Properties

collection string nsid Required

A namespaced identifier (e.g., app.bsky.feed.post).

name string Required

No description available.

maxLength: 64 bytes
record unknown Required

No description available.

repo string did Required

A decentralized identifier (DID).

rkey string Required

No description available.

maxLength: 128 bytes
swapCommit string cid Optional

A content identifier (CID) referencing immutable data.

View raw schema
{
  "type": "object",
  "required": [
    "repo",
    "name",
    "collection",
    "rkey",
    "record"
  ],
  "properties": {
    "name": {
      "type": "string",
      "maxLength": 64
    },
    "repo": {
      "type": "string",
      "format": "did"
    },
    "rkey": {
      "type": "string",
      "maxLength": 128
    },
    "record": {
      "type": "unknown"
    },
    "collection": {
      "type": "string",
      "format": "nsid"
    },
    "swapCommit": {
      "type": "string",
      "format": "cid"
    }
  },
  "description": "Instructs the agent to call com.atproto.repo.putRecord on the user's PDS."
}

Lexicon Garden

@