Skip to content

Design: research annotations and saved views ​

Status: backend implemented (cd904ee): tags, annotations on flows, targets and findings, saved views, server-side history filters, REST, MCP and events; reference in docs/guides/annotations.md. Interface in progress. Part of the research object model (Concepts).

Problem ​

Researchers need to mark what matters in a large history: star a request, tag it (auth, idor-candidate), write a short note, and come back to the same filtered view later. In Phantom this should be one mechanism that works on every research object, so the same tag can join a captured request, a target and a finding into one line of inquiry.

Objects ​

Tag ​

A vault-scoped label.

FieldTypeNotes
idint
vault_idintTags never cross vaults.
namestr ≤ 48Unique per vault, case-insensitive.
colorenumSmall fixed palette, so tags stay legible on the Kuro theme.
created_atdatetime

Annotation ​

A link from one research object to the user's knowledge about it.

FieldTypeNotes
idint
vault_idintMust equal the object's vault, enforced in the service.
object_kindenumflow, target, finding, later asset, scan.
object_idint
bookmarkedboolThe star.
notetext ≤ 4000Markdown, optional.
tag_idsmany-to-manyThrough annotation_tags.
actorenumuser or agent, for provenance.
updated_atdatetime

There is one annotation per object (unique (object_kind, object_id)). Polymorphic references are validated in the service layer, because SQL cannot enforce a foreign key across several tables. Deleting an object deletes its annotation, in the same transaction as the object delete.

Saved view ​

A named, reusable filter for one module.

FieldTypeNotes
idint
vault_idint
moduleenumhistory first; later findings, targets.
namestr ≤ 64Unique per vault and module.
queryJSONVersioned ({"v": 1, ...}). For history: methods, status classes, hosts, in-scope, search text, tag ids, bookmarked-only.
columnsJSON?Optional table layout to restore.
pinnedboolShown in the sidebar.

API (REST and MCP, same services) ​

  • GET/POST/PATCH/DELETE /vaults/{id}/tags
  • GET /vaults/{id}/annotations?kind=&ids= (batch, for table rows)
  • PUT /vaults/{id}/annotations/{kind}/{object_id}: upsert bookmark, note and tags; an empty annotation is deleted.
  • GET/POST/PATCH/DELETE /vaults/{id}/views?module=history
  • History filtering gains tag, bookmarked, and server-side evaluation of a saved view (view_id), which closes the "filters run on loaded rows only" limitation.
  • Events: annotation.updated, tag.updated, view.updated.
  • MCP tools: tag_*, annotation_get/set, view_*, and flow_list takes tag / bookmarked / view_id. Agent-written annotations are recorded with actor = agent.

Interface ​

  • History: a star column, tag chips in a column, B to bookmark, T to tag, and "Bookmark", "Add tag…" and "Note…" in the context menu. Multi-select allows batch tagging.
  • Request panel: a note field and tags under the summary.
  • Sidebar: pinned saved views under Traffic, and Bookmarked as a built-in view. Saving the current filters creates a view.
  • Target and finding pages: the same tag chips and note. Clicking a tag shows every object with it, across modules.

Out of scope for the first cut ​

Tag hierarchies, shared or team tags, annotation history (versions), and notes as full documents (that is the Notes module, M5).