guide
Free-text notes
Attach durable prose to a trace or observation — create, list, patch, and delete with a project API key. Use when structured scores are the wrong shape for the judgment.
How it works
- Free-text judgment
- A prose body on exactly one target — a trace or an observation. Distinct from scores: no numeric type, no name-based upsert.
- Many per target
- Each POST creates a new note. Multiple notes on the same trace or observation are allowed; body may be empty.
- Denormalized traceId
- Observation notes store the parent trace id, so listing by traceId includes them and they appear under Observation notes on the trace page.
- Notes vs scores
- Use notes for qualitative rationale and handoffs. Use scores when you need a value to aggregate, dashboard, or alert on.
Auth
Every public note route needs Authorization: Bearer sk-as-… from the project's Keys tab. Keys are project-scoped; missing or invalid keys return 401.
API
Base path /api/public/notes. Create with exactly one of traceId or observationId. body is optional (defaults to empty).
Create
curl -X POST "$AGENTSENTRI_HOST/api/public/notes" \
-H "Authorization: Bearer $AGENTSENTRI_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"body": "Retrieval missed the policy section.",
"traceId": "TRACE_ID"
}'List
curl -H "Authorization: Bearer $AGENTSENTRI_SECRET_KEY" \ "$AGENTSENTRI_HOST/api/public/notes?traceId=TRACE_ID"
Patch by id
curl -X PATCH "$AGENTSENTRI_HOST/api/public/notes/NOTE_ID" \
-H "Authorization: Bearer $AGENTSENTRI_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{ "body": "Updated after second review." }'Delete with DELETE /api/public/notes/:noteId.
UI
Open a trace: Trace notes and Observation notes show body (or empty placeholder), observation id, short id, and timestamps. Panels are read-only — write via API or SDK.
Python SDK
from agentsentri import AgentSentri
sentri = AgentSentri()
note = sentri.create_note(
body="Retrieval missed the policy section.",
trace_id="TRACE_ID",
)
listed = sentri.list_notes(trace_id="TRACE_ID")
sentri.update_note(note["note"]["id"], body="Updated after second review.")
sentri.delete_note(note["note"]["id"])list_notes requires trace_id and/or observation_id.
Edge cases
| XOR target on create | Exactly one of traceId or observationId — both or neither returns 400. |
| List requires a filter | API 400 / SDK ValueError without traceId and/or observationId. |
| Empty body | Allowed on create; clear with PATCH body="". |
| No upsert-by-name | Unlike scores, every POST inserts a new row (client id collision → 409). |
| Project isolation | API keys never read or write another project's notes. |