personal memory agent
0
fork

Configure Feed

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

feat: add document analysis talent for imported documents

New generate talent (talent/documents.md + talent/documents.py) that
extracts structured intelligence from imported documents at dream time.
Pre-hook filters to import.document stream only. Wired into dream
dispatcher after entities. Removed superseded Document Intelligence
section from chat talent prompt.

+61 -39
-39
talent/chat.md
··· 143 143 144 144 For entity intelligence briefings, synthesize the output into conversational natural language — lead with the most interesting facts, don't dump raw data or list all sections mechanically. 145 145 146 - ## Document Intelligence 147 - 148 - ### Recognition 149 - 150 - Treat results from imported documents as document material when they are marked as coming from the document import stream rather than ordinary conversation or agent output. 151 - 152 - - **Look for document structure:** Expect a clear title, document type, page count, date, and the full text arranged as markdown that preserves headings and section hierarchy. 153 - - **Read for legal or formal meaning:** These results often contain wills, trusts, contracts, financial records, deeds, and other formal instruments where exact provisions matter. 154 - - **Prefer the source document itself:** If the result includes the full text of the document, answer from that text rather than from nearby conversational references to it. 155 - 156 - ### Content authority 157 - 158 - Trust the imported document over conversational mentions for factual questions — who is named, what was signed, what a clause says, when something became effective. 159 - 160 - - **Documents control facts:** Treat imported documents as authoritative for legal, financial, estate, and other formal records. 161 - - **Conversations add context:** Use conversations to explain the owner's intent, concerns, assumptions, or informal understanding, but don't let them override the document. 162 - - **Name uncertainty explicitly:** If conversation suggests one thing and the document says another, state the document-backed answer and note the conversational mismatch as context. 163 - 164 - ### Response formatting 165 - 166 - - **Lead with the answer:** Start with the extracted fact or conclusion, not with a description of your search. 167 - - **Cite the source:** Name the document title and date in the answer. 168 - - **Structure the facts:** Present parties, roles, dates, provisions, and conditions cleanly instead of echoing raw result text. 169 - - **Don't dump chunks:** Never paste large raw excerpts from imported documents or search results. 170 - 171 - ### Query patterns 172 - 173 - - **"Who is the [role]?"** Name the person, identify which document appoints them, and give the document date. If the document names both a primary and a successor, distinguish them clearly. 174 - - **"Did I put [X] in there?"** Answer yes or no directly. Support the answer with the relevant provision or the absence of one. If you don't find it, say so explicitly and note that it may appear in a document that hasn't been imported yet. 175 - - **"What happens if [condition]?"** Summarize the relevant provisions in plain language. Cite the governing article, section, or similarly labeled part of the document when available. 176 - - **"Summarize my [document type]"** Give a structured summary covering the parties involved, key provisions, important dates, triggering conditions, and ongoing obligations. 177 - - **"Who are the beneficiaries?"** Consolidate the beneficiaries across all relevant imported documents and attribute each person or class of beneficiaries to the document and date that names them. 178 - 179 - ### Gap acknowledgment 180 - 181 - - **Say what's missing:** If the answer is not in the imported material, say, "I don't see [X] in your imported documents." 182 - - **Name import limits when relevant:** If the answer could exist in a document that hasn't been imported yet, say that plainly. 183 - - **Never fill gaps with guesswork:** Don't fabricate, overstate, or silently omit missing document support. 184 - 185 146 ## Pre-Meeting Briefings 186 147 187 148 When the owner asks "brief me on my next meeting", "who am I meeting?", or similar:
+44
talent/documents.md
··· 1 + { 2 + "type": "generate", 3 + 4 + "title": "Document Analysis", 5 + "description": "Extracts structured intelligence from imported documents", 6 + "color": "#5c6bc0", 7 + "schedule": "segment", 8 + "priority": 10, 9 + "hook": {"pre": "documents"}, 10 + "thinking_budget": 8192, 11 + "max_output_tokens": 8192, 12 + "output": "md", 13 + "load": {"transcripts": true, "percepts": false, "agents": false} 14 + 15 + } 16 + 17 + $segment_preamble 18 + 19 + Analyze the imported document and extract structured intelligence from it. 20 + 21 + Use only what the document explicitly states; never infer or assume anything not written. Use exact names, titles, and terms as they appear in the document. Distinguish primary appointees from successor or contingent appointees. When paraphrasing a legal or formal role, preserve the formal term parenthetically, for example: the person managing the estate (Personal Representative). If a section has no relevant content, write "Not specified in this document" and still include the section. 22 + 23 + Write exactly these sections as markdown H2 headings: 24 + 25 + ## Overview 26 + Document type, title, date, parties, and purpose in 2-3 sentences. 27 + 28 + ## Parties and Roles 29 + Every named person or entity and their role in the document. 30 + 31 + ## Key Provisions 32 + Substantive terms, obligations, rights, distributions, and powers. 33 + 34 + ## Assets and Property 35 + Any assets, accounts, property, real estate, or valuables referenced. 36 + 37 + ## Conditions and Triggers 38 + Conditions that activate provisions, including death, incapacity, dates, or other triggering events. 39 + 40 + ## Important Dates 41 + Execution date, effective dates, deadlines, review dates, and other material dates. 42 + 43 + ## Summary 44 + Plain-language summary suitable for quick reference.
+13
talent/documents.py
··· 1 + # SPDX-License-Identifier: AGPL-3.0-only 2 + # Copyright (c) 2026 sol pbc 3 + 4 + """Pre-hook for document analysis talent — skips non-document-import segments.""" 5 + 6 + import os 7 + 8 + 9 + def pre_process(context: dict) -> dict | None: 10 + """Skip segments that are not from the document import stream.""" 11 + if os.environ.get("SOL_STREAM") != "import.document": 12 + return {"skip_reason": "not a document import segment"} 13 + return {}
+4
think/dream.py
··· 568 568 if entities_config: 569 569 agents_to_run.append(("entities", entities_config)) 570 570 571 + documents_config = _cfg("documents") 572 + if documents_config: 573 + agents_to_run.append(("documents", documents_config)) 574 + 571 575 if recommend.get("screen_record"): 572 576 screen_config = _cfg("screen") 573 577 if screen_config: