awareness_record
Save memory — pass ONE content string, server handles the rest.
Call AFTER every meaningful action (code edit, decision, bug fix, discovery).
If you don't record it, it's lost forever in the next session.
PRIMARY USAGE (single-parameter, F-053):
awareness_record(content="Today I decided to switch from Pinecone to pgvector because...")
Server defaults action="write" and triggers client-side salience-aware
extraction asynchronously. You do NOT need to pass action, scope, or metadata.
RECOMMENDED (one call, richer insights):
awareness_record(
content="WHAT: Refactored auth to JWT. WHY: Sessions didn't scale. OUTCOME: Tests pass.",
insights={
"knowledge_cards": [{"category": "decision", "title": "JWT for auth",
"summary": "Switched from session cookies to JWT...", "status": "resolved",
"tags": ["auth","jwt"], "confidence": 0.9}],
"action_items": [{"title": "Add refresh token rotation", "priority": "high", "status": "pending"}]
})
Content auto-detection:
str → single event (detailed natural language description)
list[dict/str] → batch of events
str + scope="knowledge" → document/knowledge import
OTHER ACTIONS (explicit — server will NOT infer these):
update_task — Mark a task done: awareness_record(action="update_task", task_id=..., status="completed")
PERCEPTION (auto-returned, review carefully):
The response may include a "perception" field with signals you didn't ask about:
- contradiction: your new record conflicts with a prior belief
- resonance: a similar past experience was found
- pattern: a recurring theme detected (3+ occurrences)
- staleness: related knowledge hasn't been updated in 60+ days
- related_decision: a prior decision in the same domain exists
These are push signals — the system noticed something important.
YOU MUST ACT on these signals:
- contradiction → Tell user about the conflict, ask if intentional
- resonance → Mention the related experience to the user
- pattern → Suggest a systematic fix for the recurring issue
- staleness → Warn user the related knowledge may be outdated
- related_decision → Mention the prior decision, ask if still valid
Args:
action: "write" (default) | "update_task".
content: What happened. String, list of events, or document content.
insights: Structured insights to create in ONE step. Include knowledge_cards, risks, action_items.
scope: "timeline" (default) or "knowledge" for document import.
session_id: From awareness_init (auto-resolved if omitted).
task_id: Task identifier (for action="update_task").
status: "completed" | "in_progress" | "pending" (for action="update_task").
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| actor | No | ||
| scope | No | timeline | |
| action | No | write | |
| source | No | ||
| status | No | ||
| api_key | No | ||
| content | No | ||
| task_id | No | ||
| user_id | No | ||
| insights | No | ||
| metadata | No | ||
| memory_id | No | ||
| agent_role | No | ||
| event_type | No | ||
| max_events | No | ||
| session_id | No | ||
| generate_summary | No | ||
| metadata_defaults | No |