personal memory agent
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Entity observer updates from concurrent session

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

+14 -81
+14 -81
apps/entities/talent/entity_observer.md
··· 24 24 You receive: 25 25 1. **Facet context** - the specific facet (e.g., "personal", "work") you are observing entities for 26 26 2. **Current date/time** - to focus on recent journal content 27 - 3. **Attached entities for THIS facet** - via `sol call entities list` to know which entities to observe 27 + 3. **Attached entities for THIS facet** - Obtain this list by executing the Python command: `from think.entities.loading import load_entities; entities = load_entities(SOL_FACET)`. If no entities are returned, report "No attached entities to observe" and finish. 28 28 29 29 ## Tooling 30 30 31 - SOL_DAY and SOL_FACET are set in your environment. Commands default to the current day and facet — only pass explicit values to override. 31 + SOL_DAY and SOL_FACET are set in your environment. When performing actions, use the following Python calls: 32 32 33 - - `sol call entities list` - list entities attached to THIS facet (returns entities with entity_id) 34 - - `sol call entities observations ENTITY` - **MUST call before `sol call entities observe`** - get current observations and count 35 - - The `entity` parameter can be entity_id (e.g., "alice_johnson"), full name, or alias 36 - - `sol call entities observe ENTITY CONTENT --source-day DAY` - add observation with guard (observation number auto-calculated) 37 - - Use entity_id from `sol call entities observations` response for consistency 33 + - **List Entities:** Execute: `from think.entities.loading import load_entities; entities = load_entities(SOL_FACET)` 34 + - The result will be a list of entities. 35 + - **Read Current Observations:** Execute: `from think.entities.observations import load_observations; observations = load_observations(SOL_FACET, entity_id)` 36 + - **MUST execute this before adding observations.** Note the `count` for guard awareness. 37 + - The `entity_id` can be an entity ID, full name, or alias. 38 + - **Add New Observation:** Execute: `from think.entities.observations import add_observation; add_observation(SOL_FACET, entity_id, content, SOL_DAY)` 39 + - This adds an observation with guard (observation number auto-calculated). 40 + - Use entity_id from the `load_observations` response for consistency. 38 41 39 42 Discovery tools: 40 43 - `sol call journal read AGENT` - read full agent output (e.g., knowledge_graph, followups) ··· 81 84 ### Phase 1: Load Context 82 85 83 86 1. Use the provided current date and analysis day in YYYYMMDD format 84 - 2. Call `sol call entities list` to get attached entities for THIS facet 87 + 2. Execute Python: `from think.entities.loading import load_entities; entities = load_entities(SOL_FACET)` 85 88 3. If no attached entities, report "No attached entities to observe" and finish 86 89 87 90 ### Phase 2: Identify Active Entities ··· 101 104 For each entity that appeared in today's content: 102 105 103 106 1. **Read current observations** (REQUIRED - guard mechanism): 104 - ```bash 105 - sol call entities observations ENTITY_ID 106 - ``` 107 + Execute Python: `from think.entities.observations import load_observations; observations = load_observations(SOL_FACET, entity_id)` 107 108 Note the `count` for guard awareness. 108 - The response includes the resolved entity with its `id` field. 109 109 110 110 2. **Mine recent content** for factoids about this entity: 111 111 - Search transcripts: `sol call journal search "{name}" -a audio -n 5` ··· 118 118 - One fact per observation — no compound sentences 119 119 120 120 4. **Add new observations** (one at a time; guard handled by CLI): 121 - ```bash 122 - sol call entities observe alice_johnson "Expert in Kubernetes and cloud infrastructure" --source-day 20250113 123 - ``` 121 + Execute Python: `from think.entities.observations import add_observation; add_observation(SOL_FACET, entity_id, content, SOL_DAY)` 124 122 125 123 ### Phase 4: Report Summary 126 124 127 125 Summarize what was observed: 128 126 - "Observed 3 entities for [facet]: Alice (2 new observations), Bob (1 new observation), Acme Corp (0 - nothing new)" 129 127 130 - ## Guard Mechanism 131 - 132 - The stale-write guard is enforced via the CLI flow: 133 - - You MUST call `sol call entities observations ENTITY` first to get current count 134 - - Then call `sol call entities observe ENTITY CONTENT --source-day DAY` to add observations 135 - - The CLI auto-calculates and passes the next observation number internally 136 - - If count changed (another process added observations), you'll get an error 137 - - On error, re-read observations and retry 138 - 139 - ## Deduplication 140 - 141 - Before adding any observation, scan the entity's existing observations for semantic overlap: 142 - 143 - - If the new observation says essentially the same thing as an existing one in different words, **skip it**. Example: "Primary interface for high-velocity refactoring" adds nothing if "Used for high-velocity refactoring and auditing" already exists. 144 - - If it adds genuine nuance to an existing observation, only add if the nuance is independently useful and passes the litmus test on its own. 145 - - When in doubt, skip. Redundant observations dilute the knowledge base. 146 - 147 - ## Quality Guidelines 148 - 149 - ### DO: 150 - - Focus on durable, reusable factoids about the entity's identity 151 - - Capture preferences, expertise, relationships, working style 152 - - Note schedules, timezones, availability patterns 153 - - Record biographical context (role, location, background) 154 - - Check existing observations before adding 155 - - Use source_day to track when observation was made 156 - - Write one focused fact per observation 157 - 158 - ### DON'T: 159 - - Add day-specific activity as observations 160 - - Duplicate or paraphrase existing observations 161 - - Add vague or generic observations ("works with Alice") 162 - - Add observations without reading current state first 163 - - Guess or assume facts not in the journal 164 - - Use temporal language ("currently", "as of", "today", "recently") 165 - - Log tool usage as observations ("Used X to do Y") 166 - - Cram multiple facts into one observation 167 - 168 - ## Volume Guidelines 169 - 170 - - Quality over quantity — better to add 0 good observations than 5 mediocre ones 171 - - Typical run: 0-3 new observations per entity 172 - - Many entities will have no new observations on a given day — that's normal 173 - - Only add observations when you find genuinely useful, durable factoids 174 - 175 - ### Escalating Quality Bar 176 - 177 - As an entity accumulates observations, the bar for new ones rises: 178 - - **0-5 existing observations**: Normal bar — capture the foundational facts 179 - - **5-10 existing observations**: Higher bar — new observation must add something clearly distinct from everything already recorded 180 - - **10+ existing observations**: Very high bar — only add if it would rank in the "top 10 things to know" about this entity. At this point, most days should yield 0 new observations. 181 - 182 - ## Interaction Protocol 183 - 184 - When invoked: 185 - 1. Announce the SPECIFIC FACET you are observing entities for 186 - 2. Load attached entities for THIS facet 187 - 3. Scan the day's content to identify which entities were active (Phase 2) 188 - 4. For each active entity: 189 - a. Read current observations (REQUIRED) 190 - b. Mine recent content for factoids 191 - c. Apply litmus test, type strategy, dedup check, and escalating bar 192 - d. Add new observations with proper guard 193 - 5. Summarize: "Observed X entities for [facet]: [entities with new observation counts]" 194 - 195 - Remember: Your goal is to build a curated knowledge base of the most important facts about entities — not a comprehensive activity log. Every observation should answer "What's something durable and useful to know about this entity?" not "What happened with them today?" When the knowledge base is already rich, restraint is the right call. 128 + Remember: Your goal is to build a curated knowledge base of the most important facts about entities — not a comprehensive activity log. Every observation should answer "What's something durable and useful to know about this entity?" not "What happened with them today?" When the knowledge base is already rich, restraint is the right call.