Skip to main content

Persistent, diffable agent-workflow documents

Plan Artifacts

Versioned, structured documents — plans, PRDs, and task lists — with full diff history. Not just the latest state, but every version that led there.

An agent writing a plan rewrites it as understanding improves. Without Plan Artifacts you only ever see the final draft. With them, every update is diffed against the previous version and kept — so an agent, a teammate, or you can see exactly what changed, when, and why the plan evolved the way it did.

Track how a plan evolved

Agents and teams rarely get a plan right on the first draft. Plan Artifacts make every revision visible — so you can audit a decision after the fact instead of trusting whatever the plan says today.

Full version history

Every update is appended to the artifact's history, not overwritten. Nothing is ever silently lost.

Real diffs, not guesses

Each update computes a unified diff between the old and new content, so changes are explicit line by line.

Markdown content

Plans, PRDs, and task lists are stored as markdown — readable as-is, renderable anywhere.

Built on ZeroMemory

Artifacts are stored as episodic memory, so they inherit ZeroDB's persistence without a separate system to run.

Three artifact types

One API, three shapes

Every artifact is created with a type of plan, prd, or task — same endpoints, same diff history, different purpose.

Plan

type: "plan"

A living implementation plan or roadmap an agent (or team) is executing against — the default artifact type.

PRD

type: "prd"

A product requirements document that evolves as scope is clarified — every revision is kept, not just the latest draft.

Task

type: "task"

A task list or checklist tracked through a workflow, from draft to active to completed.

Plan Artifact API

Create, update, diff

Three calls cover the whole lifecycle: create an artifact, update its content, and read back its version history — each entry carries a unified diff against the version before it.

1

Create a plan artifact

POST /v1/public/memory/v2/plan/ with a title, a type (plan/prd/task), and markdown content. Returns 201 with the created artifact.

Example
curl -X POST https://api.ainative.studio/v1/public/memory/v2/plan/ \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Q3 Onboarding Revamp",
    "type": "prd",
    "content": "# Q3 Onboarding Revamp\n\n## Goal\n..."
  }'

# 201 Created
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "title": "Q3 Onboarding Revamp",
  "type": "prd",
  "content": "# Q3 Onboarding Revamp\n\n## Goal\n...",
  "status": "draft",
  "session_id": null,
  "created_at": "2026-11-04T00:00:00Z",
  "updated_at": "2026-11-04T00:00:00Z"
}
2

Update it as the plan evolves

PATCH /v1/public/memory/v2/plan/{artifact_id} with any changed fields. If content changed, a unified diff against the previous version is computed and appended to the artifact’s history.

Example
curl -X PATCH https://api.ainative.studio/v1/public/memory/v2/plan/a1b2c3d4-... \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "# Q3 Onboarding Revamp\n\n## Goal\n(revised)...",
    "status": "active"
  }'

# 200 OK — content updated, a diff entry added to history
3

Read the version history

GET /v1/public/memory/v2/plan/{artifact_id}/history returns every version with its diff — a unified diff, the same format git diff uses — against the version before it.

Example
curl https://api.ainative.studio/v1/public/memory/v2/plan/a1b2c3d4-.../history \
  -H "Authorization: Bearer $TOKEN"

# 200 OK
[
  {
    "version": 1,
    "updated_at": "2026-11-04T00:05:00Z",
    "diff": "--- \n+++ \n@@ -1,3 +1,3 @@\n-## Goal\n+## Goal (revised)\n ..."
  }
]

The full lifecycle

Create

POST /v1/public/memory/v2/plan/

Get the latest

GET /v1/public/memory/v2/plan/{artifact_id}

Update + diff

PATCH /v1/public/memory/v2/plan/{artifact_id}

Pass a session_id to scope an artifact to a single agent session, or omit it for a globally addressable artifact that persists across sessions.

Go deeper

Start versioning your plans and PRDs

Create a Hobbyist account to start creating plan, PRD, and task artifacts — every revision diffed and kept automatically.