Agent
For instructions on how to authenticate to use this endpoint, see API overview.
Endpoints
GET | |
POST | |
GET | |
POST | |
GET | |
PATCH | |
DELETE | |
GET | |
GET | |
GET | |
GET | |
GET | |
POST | |
GET | |
PATCH | |
DELETE | |
POST | |
GET |
List all agent applications
Agent applications — the deployable unit of the platform.
URLs: GET /api/projects/<team>/agent_applications/ list POST /api/projects/<team>/agent_applications/ create GET /api/projects/<team>/agent_applications/<id|slug>/ retrieve PATCH /api/projects/<team>/agent_applications/<id|slug>/ update DELETE /api/projects/<team>/agent_applications/<id|slug>/ archive POST /api/projects/<team>/agent_applications/<id|slug>/set_env/ bulk replace env GET /api/projects/<team>/agent_applications/<id|slug>/env_keys/ list set keys GET /api/projects/<team>/agent_applications/<id|slug>/env_keys/<KEY>/ is one key set? PUT /api/projects/<team>/agent_applications/<id|slug>/env_keys/<KEY>/ set one key DELETE /api/projects/<team>/agent_applications/<id|slug>/env_keys/<KEY>/ clear one key
Required API key scopes
agents:readQuery parameters
- limitinteger
- offsetinteger
Response
Example request
GET /api /projects /:project_id /agent_applicationsExample response
Status 200
Create agent applications
Agent applications — the deployable unit of the platform.
URLs: GET /api/projects/<team>/agent_applications/ list POST /api/projects/<team>/agent_applications/ create GET /api/projects/<team>/agent_applications/<id|slug>/ retrieve PATCH /api/projects/<team>/agent_applications/<id|slug>/ update DELETE /api/projects/<team>/agent_applications/<id|slug>/ archive POST /api/projects/<team>/agent_applications/<id|slug>/set_env/ bulk replace env GET /api/projects/<team>/agent_applications/<id|slug>/env_keys/ list set keys GET /api/projects/<team>/agent_applications/<id|slug>/env_keys/<KEY>/ is one key set? PUT /api/projects/<team>/agent_applications/<id|slug>/env_keys/<KEY>/ set one key DELETE /api/projects/<team>/agent_applications/<id|slug>/env_keys/<KEY>/ clear one key
Required API key scopes
agents:writeRequest parameters
- namestring
- slugstring
- descriptionstring
- archivedboolean
Response
Example request
POST /api /projects /:project_id /agent_applicationsExample response
Status 201
List all agent memory list
List memory file headers under the agent's prefix. Headers only — no bodies.
Required API key scopes
agents:readPath parameters
- application_idstring
Query parameters
- prefixstring
Response
Example request
GET /api /projects /:project_id /agent_applications /:application_id /memory /filesExample response
Status 200
Create agent memory create
Create a memory file. Fails if the path already exists — use the update endpoint to overwrite.
Required API key scopes
agents:writePath parameters
- application_idstring
Request parameters
- pathstring
- descriptionstring
- contentstring
- tagsarray
Response
Example request
POST /api /projects /:project_id /agent_applications /:application_id /memory /filesExample response
Status 200
Retrieve agent memory get
Read one memory file in full (frontmatter + markdown body).
Required API key scopes
agents:readPath parameters
- application_idstring
Query parameters
- pathstring
Response
Example request
GET /api /projects /:project_id /agent_applications /:application_id /memory /files /by_pathExample response
Status 200
Update agent memory update
Update a memory file. Any field omitted is preserved from the existing file.
Required API key scopes
agents:writePath parameters
- application_idstring
Query parameters
- pathstring
Request parameters
- descriptionstring
- contentstring
- tagsarray
Response
Example request
PATCH /api /projects /:project_id /agent_applications /:application_id /memory /files /by_pathExample response
Status 200
Delete agent memory delete
Hard-delete a memory file. Activity log captures the action against the agent.
Required API key scopes
agents:writePath parameters
- application_idstring
Query parameters
- pathstring
Example request
DELETE /api /projects /:project_id /agent_applications /:application_id /memory /files /by_pathExample response
Status 204 No response body
Retrieve agent memory
BM25 search across the agent's memory files. Ranks by description+tags+path+body with field weighting.
Required API key scopes
agents:readPath parameters
- application_idstring
Query parameters
- limitinteger
- prefixstring
- qstring
Response
Example request
GET /api /projects /:project_id /agent_applications /:application_id /memory /searchExample response
Status 200
List all agent memory list
List the agent's tabular-reference tables (the @posthog/table-* JSONL tables): name + byte size.
Required API key scopes
agents:readPath parameters
- application_idstring
Response
Example request
GET /api /projects /:project_id /agent_applications /:application_id /memory /tablesExample response
Status 200
Retrieve agent memory read
Read rows from one tabular-reference table (capped via ?limit).
Required API key scopes
agents:readPath parameters
- application_idstring
- namestring
Query parameters
- limitinteger
Response
Example request
GET /api /projects /:project_id /agent_applications /:application_id /memory /tables /:nameExample response
Status 200
Retrieve agent memory
Pre-aggregated folder tree of memory files. Saves the frontend re-derivation work.
Required API key scopes
agents:readPath parameters
- application_idstring
Response
Example request
GET /api /projects /:project_id /agent_applications /:application_id /memory /treeExample response
Status 200
List all agent applications revisions
Revisions of an agent. Created in draft, promoted through
ready → live once the bundle has been uploaded + frozen.
URLs (nested under an application):
Model CRUD:
GET .../revisions/ list
POST .../revisions/ create draft
GET .../revisions/<id>/ retrieve
PATCH .../revisions/<id>/ update spec (draft only)
Lifecycle:
POST .../revisions/<id>/promote/ ready → live
POST .../revisions/<id>/archive/ → archived
POST .../revisions/<id>/freeze/ draft → ready (stamps sha256)
POST .../revisions/<id>/clone_from/ copy bundle from another rev
POST .../revisions/new_draft/ create draft + clone_from atomically
Bundle authoring (proxied to the janitor):
GET .../revisions/<id>/manifest/ list paths + sha256
GET .../revisions/<id>/file/?path=… read one file
PUT .../revisions/<id>/file/?path=… write one file (draft)
DELETE .../revisions/<id>/file/?path=… delete one file (draft)
GET .../revisions/<id>/bundle/ bulk pull all files
PUT .../revisions/<id>/bundle/ bulk push (replace|merge)
Required API key scopes
agents:readPath parameters
- application_idstring
Query parameters
- limitinteger
- offsetinteger
Response
Example request
GET /api /projects /:project_id /agent_applications /:application_id /revisionsExample response
Status 200
Create agent applications revisions
Revisions of an agent. Created in draft, promoted through
ready → live once the bundle has been uploaded + frozen.
URLs (nested under an application):
Model CRUD:
GET .../revisions/ list
POST .../revisions/ create draft
GET .../revisions/<id>/ retrieve
PATCH .../revisions/<id>/ update spec (draft only)
Lifecycle:
POST .../revisions/<id>/promote/ ready → live
POST .../revisions/<id>/archive/ → archived
POST .../revisions/<id>/freeze/ draft → ready (stamps sha256)
POST .../revisions/<id>/clone_from/ copy bundle from another rev
POST .../revisions/new_draft/ create draft + clone_from atomically
Bundle authoring (proxied to the janitor):
GET .../revisions/<id>/manifest/ list paths + sha256
GET .../revisions/<id>/file/?path=… read one file
PUT .../revisions/<id>/file/?path=… write one file (draft)
DELETE .../revisions/<id>/file/?path=… delete one file (draft)
GET .../revisions/<id>/bundle/ bulk pull all files
PUT .../revisions/<id>/bundle/ bulk push (replace|merge)
Required API key scopes
agents:writePath parameters
- application_idstring
Request parameters
- parent_revisionstringnull
- bundle_uristringDefault:
- spec
Response
Example request
POST /api /projects /:project_id /agent_applications /:application_id /revisionsExample response
Status 201
Retrieve agent applications revisions
Revisions of an agent. Created in draft, promoted through
ready → live once the bundle has been uploaded + frozen.
URLs (nested under an application):
Model CRUD:
GET .../revisions/ list
POST .../revisions/ create draft
GET .../revisions/<id>/ retrieve
PATCH .../revisions/<id>/ update spec (draft only)
Lifecycle:
POST .../revisions/<id>/promote/ ready → live
POST .../revisions/<id>/archive/ → archived
POST .../revisions/<id>/freeze/ draft → ready (stamps sha256)
POST .../revisions/<id>/clone_from/ copy bundle from another rev
POST .../revisions/new_draft/ create draft + clone_from atomically
Bundle authoring (proxied to the janitor):
GET .../revisions/<id>/manifest/ list paths + sha256
GET .../revisions/<id>/file/?path=… read one file
PUT .../revisions/<id>/file/?path=… write one file (draft)
DELETE .../revisions/<id>/file/?path=… delete one file (draft)
GET .../revisions/<id>/bundle/ bulk pull all files
PUT .../revisions/<id>/bundle/ bulk push (replace|merge)
Required API key scopes
agents:readPath parameters
- application_idstring
- idstring
Response
Example request
GET /api /projects /:project_id /agent_applications /:application_id /revisions /:idExample response
Status 200
Update agent applications revisions
Revisions of an agent. Created in draft, promoted through
ready → live once the bundle has been uploaded + frozen.
URLs (nested under an application):
Model CRUD:
GET .../revisions/ list
POST .../revisions/ create draft
GET .../revisions/<id>/ retrieve
PATCH .../revisions/<id>/ update spec (draft only)
Lifecycle:
POST .../revisions/<id>/promote/ ready → live
POST .../revisions/<id>/archive/ → archived
POST .../revisions/<id>/freeze/ draft → ready (stamps sha256)
POST .../revisions/<id>/clone_from/ copy bundle from another rev
POST .../revisions/new_draft/ create draft + clone_from atomically
Bundle authoring (proxied to the janitor):
GET .../revisions/<id>/manifest/ list paths + sha256
GET .../revisions/<id>/file/?path=… read one file
PUT .../revisions/<id>/file/?path=… write one file (draft)
DELETE .../revisions/<id>/file/?path=… delete one file (draft)
GET .../revisions/<id>/bundle/ bulk pull all files
PUT .../revisions/<id>/bundle/ bulk push (replace|merge)
Required API key scopes
agents:writePath parameters
- application_idstring
- idstring
Request parameters
- parent_revisionstringnull
- bundle_uristringDefault:
- spec
Response
Example request
PATCH /api /projects /:project_id /agent_applications /:application_id /revisions /:idExample response
Status 200
Delete agent applications revisions
Revisions of an agent. Created in draft, promoted through
ready → live once the bundle has been uploaded + frozen.
URLs (nested under an application):
Model CRUD:
GET .../revisions/ list
POST .../revisions/ create draft
GET .../revisions/<id>/ retrieve
PATCH .../revisions/<id>/ update spec (draft only)
Lifecycle:
POST .../revisions/<id>/promote/ ready → live
POST .../revisions/<id>/archive/ → archived
POST .../revisions/<id>/freeze/ draft → ready (stamps sha256)
POST .../revisions/<id>/clone_from/ copy bundle from another rev
POST .../revisions/new_draft/ create draft + clone_from atomically
Bundle authoring (proxied to the janitor):
GET .../revisions/<id>/manifest/ list paths + sha256
GET .../revisions/<id>/file/?path=… read one file
PUT .../revisions/<id>/file/?path=… write one file (draft)
DELETE .../revisions/<id>/file/?path=… delete one file (draft)
GET .../revisions/<id>/bundle/ bulk pull all files
PUT .../revisions/<id>/bundle/ bulk push (replace|merge)
Path parameters
- application_idstring
- idstring
Example request
DELETE /api /projects /:project_id /agent_applications /:application_id /revisions /:idExample response
Status 204 No response body
Create agent applications revisions archive
Mark a revision archived. If it was the live one, clear the application's live_revision pointer (the app effectively has no deployable version until another revision is promoted).
Required API key scopes
agents:writePath parameters
- application_idstring
- idstring
Response
Example request
POST /api /projects /:project_id /agent_applications /:application_id /revisions /:id /archiveExample response
Status 200
Retrieve agent applications revisions bundle
Read the full typed bundle: { agent_md, skills, tools, spec }.
Required API key scopes
agents:readPath parameters
- application_idstring
- idstring
Response
Example request
GET /api /projects /:project_id /agent_applications /:application_id /revisions /:id /bundle