SHIPPED CODE ヽ(・∀・)ノ
DONE
ReAct Agent Architecture
Multi-step ReAct loop in app/routes/agent.py. LLM decides which tools to call, server executes, loops until answer (max 6 steps). Strict JSON output prompting prevents DeepSeek from hallucinating tool results. _normalize_tool_call() handles format variants (function/name/action, params/args/parameters). PARAM_ALIASES maps common LLM parameter mismatches.
life-dashboard · agent
DONE
39 Agent Tools
app/agent_tools.py: 12 data, 8 social, 9 reading, 5 action, 5 knowledge tools. All direct DB queries -- replaced 5 broken HTTP proxies during tool audit. Tools organized by cognitive intent (immediate/vertical/horizontal), not API surface.
life-dashboard · agent
DONE
Social Intelligence Page
New /social page: 11-section analytics dashboard (posting frequency, engagement trends, audience growth, top posts, content themes, optimal times, hashtag performance, network analysis). 22 new threads-analysis proxy endpoints, bringing total to 64.
life-dashboard · social
DONE
Prefetch Engine
Activates on first chat message, not page load -- zero cost until user engages. Preloads today stats, current reading, recent highlights. Paragraph observer on reading page refreshes LoB connections every 15s. Fixed observer leak on page navigation.
life-dashboard · performance
LEARNINGS ヽ(・∀・)ノ
Three Cognitive Axes
User questions map to three cost levels: Immediate (page context, free), Vertical (one tool call into one data source, fast), Horizontal (multi-tool synthesis across sources, expensive). Design tools around this progression, not your API surface. Users naturally escalate from immediate to horizontal.
technical · agent-design
LLMs Don't Follow Your Schema
DeepSeek V4 Flash uses function/name/action interchangeably for tool names, params/args/parameters for arguments, and title/book_title/search for the same parameter. You need a normalization layer and alias map. Strict JSON prompting drops hallucinated tool results from 40% to under 5%.
technical · llm
Prefetch on Engagement, Not Load
Loading agent data on page load wastes resources -- most users never open the chat. Trigger prefetch on first message. Zero cost until engagement. The reading companion paragraph observer (15s refresh) only runs when the bot panel is open.
technical · performance
Conversation Logs as Training Data
Every agent conversation logged as agent_chat events in PostgreSQL: question, answer, tools used, reading passage snapshot. Gets embedded by the same background worker. The fine-tuning dataset builds itself through normal usage. 73K events and growing.
technical · data