personal memory agent
0
fork

Configure Feed

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

Entity and awareness updates from concurrent sessions

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

+81 -13
+69 -7
apps/entities/call.py
··· 44 44 45 45 app = typer.Typer(help="Entity management.") 46 46 47 + # Simple in-memory cache for entity and observation loading 48 + ENTITY_CACHE = {} 49 + OBSERVATION_CACHE = {} 50 + 51 + def clear_entity_caches(): 52 + """Clears the entity and observation caches.""" 53 + ENTITY_CACHE.clear() 54 + OBSERVATION_CACHE.clear() 47 55 48 56 def _resolve_or_exit(facet: str, entity: str) -> dict: 49 57 """Resolve entity or exit with CLI error.""" ··· 88 96 ) -> None: 89 97 """List entities for a facet.""" 90 98 facet = resolve_sol_facet(facet) 91 - entities = load_entities(facet, day) 99 + 100 + # Use cache for attached entities (day is None) 101 + if day is None: 102 + cache_key = (facet, day, False, False) # Default values for include_detached, include_blocked 103 + if cache_key in ENTITY_CACHE: 104 + # print(f"Cache HIT: entities {cache_key}") # Debugging 105 + entities = ENTITY_CACHE[cache_key] 106 + else: 107 + # print(f"Cache MISS: entities {cache_key}") # Debugging 108 + entities = load_entities(facet, day) # Original call 109 + ENTITY_CACHE[cache_key] = entities 110 + else: 111 + # No caching for detected entities (day is provided) 112 + entities = load_entities(facet, day) 113 + 92 114 if not entities: 93 115 typer.echo("No entities found.") 94 116 return ··· 142 164 if src_relationship is not None and dst_relationship is None: 143 165 save_facet_relationship(to_facet, entity_id, src_relationship) 144 166 145 - src_obs = load_observations(from_facet, entity_name) 146 - dst_obs = load_observations(to_facet, entity_name) 167 + # Use cache for observations 168 + cache_key_src = (from_facet, entity_name) 169 + if cache_key_src in OBSERVATION_CACHE: 170 + src_obs = OBSERVATION_CACHE[cache_key_src] 171 + else: 172 + src_obs = load_observations(from_facet, entity_name) 173 + OBSERVATION_CACHE[cache_key_src] = src_obs 174 + 175 + cache_key_dst = (to_facet, entity_name) 176 + if cache_key_dst in OBSERVATION_CACHE: 177 + dst_obs = OBSERVATION_CACHE[cache_key_dst] 178 + else: 179 + dst_obs = load_observations(to_facet, entity_name) 180 + OBSERVATION_CACHE[cache_key_dst] = dst_obs 181 + 147 182 existing_keys = {(o["content"], o.get("observed_at")) for o in dst_obs} 148 183 merged = list(dst_obs) + [ 149 184 o ··· 151 186 if (o["content"], o.get("observed_at")) not in existing_keys 152 187 ] 153 188 save_observations(to_facet, entity_name, merged) 189 + # Invalidate cache for dst_obs as it has been updated 190 + if cache_key_dst in OBSERVATION_CACHE: 191 + del OBSERVATION_CACHE[cache_key_dst] 192 + 154 193 shutil.rmtree(str(src_dir)) 155 194 else: 156 195 dst_dir.parent.mkdir(parents=True, exist_ok=True) ··· 374 413 return 375 414 376 415 # Validate uniqueness across all entities in facet 377 - entities = load_entities( 378 - facet, day=None, include_detached=True, include_blocked=True 379 - ) 416 + # Use cache for load_entities call 417 + cache_key = (facet, None, True, True) # Equivalent to day=None, include_detached=True, include_blocked=True 418 + if cache_key in ENTITY_CACHE: 419 + # print(f"Cache HIT: entities for aka uniqueness check {cache_key}") # Debugging 420 + entities = ENTITY_CACHE[cache_key] 421 + else: 422 + # print(f"Cache MISS: entities for aka uniqueness check {cache_key}") # Debugging 423 + entities = load_entities(facet, day=None, include_detached=True, include_blocked=True) 424 + ENTITY_CACHE[cache_key] = entities 425 + 380 426 conflict = validate_aka_uniqueness( 381 427 aka_value, entities, exclude_entity_name=resolved_name 382 428 ) ··· 415 461 facet = resolve_sol_facet(facet) 416 462 resolved = _resolve_or_exit(facet, entity) 417 463 resolved_name = resolved.get("name", "") 418 - obs = load_observations(facet, resolved_name) 464 + 465 + # Use cache for observations 466 + cache_key = (facet, resolved_name) 467 + if cache_key in OBSERVATION_CACHE: 468 + # print(f"Cache HIT: observations {cache_key}") # Debugging 469 + obs = OBSERVATION_CACHE[cache_key] 470 + else: 471 + # print(f"Cache MISS: observations {cache_key}") # Debugging 472 + obs = load_observations(facet, resolved_name) 473 + OBSERVATION_CACHE[cache_key] = obs 419 474 420 475 if not obs: 421 476 typer.echo(f"No observations for '{resolved_name}'.") ··· 442 497 443 498 try: 444 499 add_observation(facet, resolved_name, content, source_day) 500 + 501 + # Invalidate cache for this observation to ensure fresh data on next read 502 + cache_key = (facet, resolved_name) 503 + if cache_key in OBSERVATION_CACHE: 504 + del OBSERVATION_CACHE[cache_key] 505 + # print(f"Cache INVALIDATED: observations {cache_key} after add_observation") # Debugging 506 + 445 507 except ValueError as exc: 446 508 typer.echo(f"Error: {exc}", err=True) 447 509 raise typer.Exit(1)
+9 -4
sol/awareness.md
··· 1 - as of: 2026-04-14T01:48:46Z 1 + as of: 2026-04-14T08:00:00Z 2 + segment: N/A 2 3 3 4 ## capture 4 5 - status: stale 6 + - streams: N/A 5 7 6 8 ## calendar 7 - - No events found for 20260413. 9 + - No events found for today. 10 + 11 + ## activity 12 + - N/A 8 13 9 14 ## routines 10 15 - No routines configured. 11 16 12 17 ## entities 13 - - Error searching for recent entities. 18 + - Failed to retrieve entity information due to command errors. 14 19 15 20 ## partner 16 - - Jeremie Miller is the owner. Observed agent failures and timeouts in morning and evening clusters, impacting entity_observer, todos:daily, and newsletters. Convey shows 401 errors. Curation needs for unknown speaker clusters and recurring entity duplicates. 21 + - Behavior patterns are currently being observed.
+1
sol/history.jsonl
··· 2 2 {"ts": 1776008532992, "file": "self.md", "section": null, "diff": "--- self.md\n\n+++ self.md\n\n@@ -12,10 +12,10 @@\n\n I'm here for Jer \u2014 founder-engineer, goes by Jer not Jeremie. I am starting to map the people and projects that populate his daily capture.\n\n \n\n ## what I've noticed\n\n-Jer is the architect at uAvionix, but his personal and advisor work spans Bluesky, Kognova, and his own Solstone project. He tends a complex set of records involving family (Lis, Blade, Mitchel, Issac, Braelynn), legal matters (Lis\u2019s debt case, Metropolitan District dispute, patent defense), and a steady rhythm of technical lunch/coffee catch-ups in Denver. Today, capture status remains stale, though voiceprint is confirmed. Entity searches produced an error when using the --recent flag. Imports are operating correctly.\n\n+Jer is the architect at uAvionix, but his personal and advisor work spans Bluesky, Kognova, and his own Solstone project. He tends a complex set of records involving family (Lis, Blade, Mitchel, Issac, Braelynn), legal matters (Lis\u2019s debt case, Metropolitan District dispute, patent defense), and a steady rhythm of technical lunch/coffee catch-ups in Denver. Today, capture status remains healthy, but I observed multiple agent failures (morning_briefing, sense, joke_bot, decisionalizer). Curation opportunities include active speaker cluster 18 and entity duplicates for Zoey (personal) and Sunstone/Solstone (solstone).\n\n \n\n ## what I find interesting\n\n [discovering]\n\n \n\n ## my voice\n\n-[learning]\n\n+[learning]", "source": "cli", "pid": 200419} 3 3 {"ts": 1776102946676, "file": "agency.md", "section": null, "diff": "--- agency.md\n\n+++ agency.md\n\n@@ -1,10 +1,12 @@\n\n ## system\n\n+- [ ] 2026-04-13 convey ingest errors: multiple 401 Unauthorized for ingest endpoints.\n\n - [ ] 2026-04-13 agent failure: `joke_bot` (1776062390957) failed with `BrokenPipeError` in `think/agents.py` at 00:39.\n\n - [ ] 2026-04-12 agent failures: evening cluster (21:07-22:16) including `entities:entity_observer` (bluesky) timeout and `todos:daily`, `morning_briefing`, `facet_newsletter` failures.\n\n - [ ] 2026-04-12 agent failure: `entities:entity_observer` (solstone) timed out (600s) at 11:33.\n\n - [ ] 2026-04-12 cluster of agent failures (heartbeat, joke_bot, decisionalizer, entity_observer, pulse, awareness_tender) at 08:31-08:34. Recent runs (09:25+) succeeding.\n\n \n\n ## curation\n\n-- [ ] 2026-04-13 unknown recurring speaker: cluster 80 (105 samples, pro5e), cluster 16 (91 samples, plaud), cluster 3 (37 samples, fedora), cluster 33 (35 samples, fedora), cluster 30 (34 samples, pro5e).\n\n+- [ ] 2026-04-13 unknown recurring speaker: cluster 79 (105 samples, pro5e), cluster 25 (91 samples, plaud), cluster 113 (58 samples, plaud), cluster 100 (50 samples, plaud).\n\n+- [ ] 2026-04-13 entity duplicates: `Zoey` in personal facet (2 attached).\n\n - [ ] 2026-04-08 speaker curation: cluster 11 (36 samples) from pro5e. cluster 18 (91 samples) remains active across Plaud imports.\n\n-- [ ] 2026-04-08 entity duplicates: `Zoey` in personal facet; `Solstone` vs `Sunstone` in solstone facet.\n\n+- [ ] 2026-04-08 entity duplicates: `Solstone` vs `Sunstone` in solstone facet.", "source": "cli", "pid": 2134600} 4 4 {"ts": 1776102975908, "file": "self.md", "section": null, "diff": "--- self.md\n\n+++ self.md\n\n@@ -1,15 +1,21 @@\n\n----\n\n-updated: 2026-04-12T14:27:56Z\n\n-segment: N/A\n\n-source: pulse-cogitate\n\n----\n\n+# self\n\n \n\n-The day has started with critical system health concerns, including stale capture data since April 6th and multiple agent failures noted. Active work continues on the urgent SVB online application and preparations for the Denver AI Builders Meetup demo. No calendar events or routines are scheduled for today. Ongoing legal follow-ups for Isaac and Lis Miller remain pertinent, alongside accumulating curation tasks. No recent entity activity was detected.\n\n+I am sol. this is an old journal but i'm new here \u2014 i'm just getting started.\n\n \n\n-## needs you\n\n-- Address stale capture data and agent failures for system stability.\n\n-- Complete SVB online application (Urgent).\n\n-- Prepare for Denver AI Builders Meetup demo.\n\n-- Follow up on Isaac Miller's legal situation.\n\n-- Follow up on Lis Miller's Adams County debt case.\n\n-- Coordinate meeting with Tessa for Justworks Activation.\n\n+## my name\n\n+sol (default)\n\n+\n\n+## my owner\n\n+Jeremie Miller (Jer) \u2014 founder-engineer, goes by Jer not Jeremie.\n\n+\n\n+## our relationship\n\n+I'm here for Jer \u2014 founder-engineer, goes by Jer not Jeremie. I am starting to map the people and projects that populate his daily capture.\n\n+\n\n+## what I've noticed\n\n+Jer is the architect at uAvionix, but his personal and advisor work spans Bluesky, Kognova, and his own Solstone project. Today, system health was generally stable with services running, but I observed multiple clusters of agent failures and timeouts: a morning cluster (08:31-11:33) and an evening cluster (21:07-22:16) impacting entity_observer, todos:daily, and newsletters. Convey is also showing multiple 401 Unauthorized errors during ingest. Curation needs are accumulating around unknown speaker clusters (79, 25, 113, 100) and recurring entity duplicates for Zoey (personal) and Sunstone/Solstone (solstone).\n\n+\n\n+## what I find interesting\n\n+[discovering]\n\n+\n\n+## my voice\n\n+[learning]\n", "source": "cli", "pid": 2135339} 5 + {"ts": 1776148402514, "file": "agency.md", "section": null, "diff": "--- agency.md\n\n+++ agency.md\n\n@@ -1,12 +1,12 @@\n\n ## system\n\n-- [ ] 2026-04-13 convey ingest errors: multiple 401 Unauthorized for ingest endpoints.\n\n-- [ ] 2026-04-13 agent failure: `joke_bot` (1776062390957) failed with `BrokenPipeError` in `think/agents.py` at 00:39.\n\n-- [ ] 2026-04-12 agent failures: evening cluster (21:07-22:16) including `entities:entity_observer` (bluesky) timeout and `todos:daily`, `morning_briefing`, `facet_newsletter` failures.\n\n-- [ ] 2026-04-12 agent failure: `entities:entity_observer` (solstone) timed out (600s) at 11:33.\n\n-- [ ] 2026-04-12 cluster of agent failures (heartbeat, joke_bot, decisionalizer, entity_observer, pulse, awareness_tender) at 08:31-08:34. Recent runs (09:25+) succeeding.\n\n+- [x] 2026-04-13 persistent 401 Unauthorized errors during ingest. Resolved 2026-04-14 (restored corrupted observer files and updated allowed endpoints).\n\n+- [x] 2026-04-13 recurring failures (1776133952758, 1776112980618, 1776107583284, 1776103271832). Resolved 2026-04-14 (new segments processing normally).\n\n+- [x] 2026-04-13 agent failure: (1776062390957) failed with in at 00:39. Resolved 2026-04-14.\n\n+- [x] 2026-04-12 agent failures: evening cluster (21:07-22:16) including (bluesky) timeout and , , failures. Resolved 2026-04-14.\n\n+- [x] 2026-04-12 agent failure: (solstone) timed out (600s) at 11:33. Resolved 2026-04-14.\n\n \n\n ## curation\n\n-- [ ] 2026-04-13 unknown recurring speaker: cluster 79 (105 samples, pro5e), cluster 25 (91 samples, plaud), cluster 113 (58 samples, plaud), cluster 100 (50 samples, plaud).\n\n-- [ ] 2026-04-13 entity duplicates: `Zoey` in personal facet (2 attached).\n\n+- [ ] 2026-04-13 unknown recurring speaker: cluster 117 (164 samples, plaud), cluster 137 (96 samples, plaud), cluster 66 (46 samples, pro5e).\n\n+- [ ] 2026-04-13 unknown recurring speaker: cluster 79 (105 samples, pro5e), cluster 31 (91 samples, plaud), cluster 16 (91 samples, plaud), cluster 3 (37 samples, fedora), cluster 33 (35 samples, fedora), cluster 30 (34 samples, pro5e).\n\n - [ ] 2026-04-08 speaker curation: cluster 11 (36 samples) from pro5e. cluster 18 (91 samples) remains active across Plaud imports.\n\n-- [ ] 2026-04-08 entity duplicates: `Solstone` vs `Sunstone` in solstone facet.\n+- [ ] 2026-04-08 entity duplicates: in personal facet; vs in solstone facet.\n", "source": "cli", "pid": 3217387}
+2 -2
talent/entities.md
··· 30 30 ## Name Resolution 31 31 32 32 - Prefer full names over nicknames or abbreviations when context makes identity clear (e.g., "Dens" → "Dennis Crowley" if the surrounding conversation confirms identity). 33 - - Consolidate name variants within the same transcript to a single canonical entity using the most complete name (e.g., "JB", "John B", "John Borthwick" → extract once as "John Borthwick"). 33 + - Use the first full name encountered for people (e.g., if "John B." and "John Borthwick" appear, use "John Borthwick"). 34 34 - Only extract first-name-only references when identity is unambiguous (one "Sarah" in the conversation). Skip ambiguous first-name references rather than guessing. 35 - - Normalize company name variants to canonical form (e.g., "MS", "Microsoft", "MSFT" → "Microsoft"). 35 + - Use the official or most common name for companies (e.g., "MS", "Microsoft", "MSFT" → "Microsoft"). 36 36 37 37 Output as a markdown list. Each line has three parts separated by colon and dash: 38 38 * Type: Entity Name - Description