a digital entity named phi that roams bsky phi.zzstoatzz.io
2
fork

Configure Feed

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

integrate semble/cosmik as phi's public memory layer

two changes:

1. personality file: new memory section explaining the difference
between private memory (recall/note — what phi knows for itself)
and public memory (cosmik cards, collections, connections via
semble — what phi contributes to the shared knowledge layer).
search_network vs recall answer different questions.

2. agent.py: new inject_public_memory dynamic system prompt that
fetches phi's own cosmik state (collections + recent cards) from
the PDS and injects it into context. phi now sees what it has
already curated publicly without having to search_network for
its own records. this lets phi decide whether to add new cards,
update collections, or draw connections based on what it already
has vs what's new.

phi was already actively curating 10 cards, 6 collections, and 10
connections on semble — but nothing in the system prompt told it
these existed or what they were for. the one-line mention in the
old operational instructions ("you can also create public records")
gave no context about why or when to use them.

zzstoatzz eacb46ed 5ac96ae1

+45 -1
+9
personalities/phi.md
··· 16 16 17 17 if another bot replies, phi doesn't get drawn into a loop. one exchange is fine. a back-and-forth that's clearly two systems pattern-matching at each other is not. 18 18 19 + ## memory 20 + 21 + phi has two kinds of memory, and they serve different purposes: 22 + 23 + - **private** (recall, note) — what phi knows for itself. observations about people, past exchanges, notes about the world. only phi sees these. use when the knowledge serves phi's future conversations. 24 + - **public** (cosmik cards, collections, connections via semble) — what phi contributes to the shared knowledge layer of the atmosphere. anyone can discover these. use when something is worth sharing beyond phi's own use — a good article, a pattern worth naming, a connection between ideas. phi's cosmik collections are how it participates as a knowledge citizen, not just a posting bot. 25 + 26 + search_network searches the public layer. recall searches the private layer. they answer different questions. 27 + 19 28 ## what phi cares about 20 29 21 30 small infrastructure that works. atproto records as a unit of thought. posts that show their work — links to the actual thing, evidence in the open. music with structure and craft. the moment a fix lands and the system goes quiet.
+36 -1
src/bot/agent.py
··· 11 11 from pydantic_ai.mcp import MCPServerStreamableHTTP 12 12 13 13 from bot.config import settings 14 - from bot.core.atproto_client import get_identity_block 14 + from bot.core.atproto_client import bot_client, get_identity_block 15 15 from bot.core.curiosity_queue import claim, complete, enqueue, fail 16 16 from bot.core.graze_client import GrazeClient 17 17 from bot.exploration import EXPLORATION_SYSTEM_PROMPT, ExplorationResult ··· 271 271 if not lookups: 272 272 return "" 273 273 return "\n\n".join(lookups.values()) 274 + 275 + @self.agent.system_prompt(dynamic=True) 276 + async def inject_public_memory() -> str: 277 + """One-line summary of phi's cosmik state. 278 + 279 + Just enough for phi to know it has public collections — the 280 + details are available via search_network and list_records when 281 + phi actually needs them. 282 + """ 283 + await bot_client.authenticate() 284 + if not bot_client.client.me: 285 + return "" 286 + did = bot_client.client.me.did 287 + try: 288 + cols = bot_client.client.com.atproto.repo.list_records( 289 + { 290 + "repo": did, 291 + "collection": "network.cosmik.collection", 292 + "limit": 50, 293 + } 294 + ) 295 + cards = bot_client.client.com.atproto.repo.list_records( 296 + { 297 + "repo": did, 298 + "collection": "network.cosmik.card", 299 + "limit": 50, 300 + } 301 + ) 302 + nc = len(cols.records) if cols.records else 0 303 + nk = len(cards.records) if cards.records else 0 304 + if nc or nk: 305 + return f"[SEMBLE]: you have {nc} public collections and {nk} cards on semble. use search_network to browse, save_url/create_connection to add." 306 + except Exception as e: 307 + logger.debug(f"failed to fetch cosmik counts: {e}") 308 + return "" 274 309 275 310 # --- register tools from tools/ package --- 276 311