Project: Athena — Second Brain Orchestrator Agent Developer: Stratos Louvaris Timeline: February 12–24, 2026 Hackathon Deadline: February 27, 2026, 1:00 PM EST
| Metric | Value |
|---|---|
| Total time | ~35 hours across 17 sessions |
| Sub-projects | 8 (indexer, mcp-server, voice-client, agent-config, heartbeat, artemis-backend, frontend, scripts) |
| ES indices | 2 (athena-notes, athena-conversations) |
| MCP tools | 14 (3 vault + 7 Artemis + 1 knowledge + 2 research + 1 skills) |
| ES | QL tools |
| Sample vault | 23 notes across 7 folders, 135 wikilinks |
| System prompt | 257 lines — persona, tool routing, workflows, Eisenhower, 1-3-5, guardrails, memory |
| Agent Builder | 20 tools (6 ES |
| Status | Submitted — demo video, Devpost, X post all done |
Completed all hackathon submission deliverables and fixed remaining bugs.
Deliverables:
- Devpost article — 7 sections (Inspiration → What's Next), ~1,200 words. Researched Cal Hacks 12.0 winners (AgentOverflow, MarketMind) for positioning
- X post — tagged @elastic and @elastic_devs, repo link + demo video
- README — demo video link, Phase 10 to roadmap, 7 future roadmap items
Bug fixes:
- Whisper Greek transcription — No
languageparameter in Whisper API call; auto-detect picked up Greek accent. Fix:"language": "en"invoice-client/serve.py - Converse API field name —
systemPromptAdditionis invalid; correct field isconfiguration_overrides.instructions. Fixed inserve.py,heartbeat.py, and API reference docs
Infrastructure:
- Added
indexer-watcherDocker service — auto-syncs vault changes to ES via watchdog - Polling fallback for Windows/macOS Docker (inotify doesn't propagate through bind mounts) — auto-detects with 3s probe, falls back to
PollingObserverevery 30s
Extended full-viewport treatment to all content pages and ran comprehensive E2E browser tests.
Full-height layout: Applied fillHeight pattern from Dashboard to Tasks, Daily Plan, and Pomodoro. Bumped font sizes across all dashboard components for desktop readability (3 sessions of incremental sizing, 14 files touched).
E2E bug sweep (desktop 1280x800 + mobile 375x667, 6 fixes):
useTasks.ts—useCompleteTasknow invalidatesdailyPlanKeys.all(cross-page cache sync)- Renamed API proxy
/athena→/athena-api(was intercepting SPA route navigation) athena-api.ts— improved error parsing (extractserror/message/detailfrom response body)Tasks/index.tsx— addedwindow.confirm()before deletionLuxuryQuickTaskInput.tsx— stacked vertically on mobile (input was squeezed to 88px)analytics/repository.py—get_tasks_in_rangenow includes tasks completed in range, not just created
Major UX pass: dashboard redesign, dedicated Athena page, mobile navigation, and settings wiring.
Pomodoro settings wiring: Work duration was hardcoded to 25 min at 3 layers (backend service, frontend API, timer display). Wired duration_minutes end-to-end. Progress ring uses session's actual duration from server response (handles mid-session settings changes).
Dashboard redesign — evolved through 3 iterations:
- Swapped layout so Daily Plan takes hero center position (timer was low-information-density)
- Merged timer into bottom stats bar — 2-column grid (Plan + Matrix) with combined timer+stats card below
- Deleted
DashboardTimerColumn.tsxentirely
Daily Plan fix: find_plan_with_task() was rejecting assignment if task existed in ANY plan (across all dates). Changed to only reject when task is in the SAME plan at a different slot.
Dedicated Athena page (/athena): 2-panel layout (conversation history + chat). Extracted 6 shared components from 653-line ChatSidebar into ChatSidebar/shared/. Both page and sidebar share same Zustand store.
Mobile "More" bottom sheet: Replaced 6-item scrollable nav with 5 direct tabs + animated "More" bottom sheet (Pomodoro, Analytics, Guide, Settings). Guide and Settings were previously unreachable on mobile.
Persistent chat, polling optimization, PRD overhaul, and appearance settings.
Persistent conversations: Added Zustand persist middleware to chatStore (key: athena-chat). Conversation history panel with new/switch/delete. Transient UI state excluded via partialize. Message counter re-initialized from persisted IDs on rehydrate.
Pomodoro polling fix: Both timer components ran WebSocket + HTTP polling simultaneously (flooding terminal). Gated refetchInterval on !isConnected — HTTP only activates as WebSocket fallback.
Appearance settings: Theme/accent/font settings were saved to localStorage but never applied to DOM. Fix: CSS custom properties (--luxury-*-rgb) with [data-theme]/[data-accent]/[data-font-size] attribute selectors. useApplySettings() hook at App root dispatches artemis-settings-change custom event for instant same-tab updates. Used rgb(var() / <alpha-value>) pattern to preserve 30+ existing Tailwind opacity modifiers.
PRD overhaul: Full audit of PRD.md (+289/-143 lines) reflecting 24 days of development. Updated architecture diagram, directory tree, tool inventory, tech stack, phases, and networking section.
Added vault-based skills system, ship workflow, and ran full validation.
Skills system: skill_manager MCP tool with 5 operations (list, load, create, edit, delete). Skills stored as markdown in Meta/Skills/. 3 sample skills: morning routine, meeting debrief, weekly review. System prompt updated with Patterns 8-9 (skill execution + creation). Voice proxy injects skill names/triggers into every converse call. Synced to Agent Builder (14,508 → 16,277 chars).
Gotcha: MCP tools require explicit registration in Agent Builder even though the connector auto-discovers the schema. Tool must also be added to configuration.tools[0].tool_ids.
Ship command: .claude/commands/ship.md chains /update-devlog → /commit → git push.
Developer skills: .claude/skills/customize/SKILL.md (extending Athena) and .claude/skills/add-integration/SKILL.md (adding new service integrations).
Full validation: 13/13 checks pass — ruff lint (5 projects), pyright (3 projects), tsc + vite build (frontend), pytest (27 pass, 8 skipped integration), MCP import (14 tools), parser smoke (23 notes).
One-command bootstrap: ./setup.sh replaces 5+ manual setup steps.
Pipeline: validate env → Supabase tables (psycopg DDL) → index vault → Agent Builder tools/connector/agent via Kibana API → end-to-end verification.
Key files: scripts/ sub-project — validate_env.py, setup_supabase.py, setup_elasticsearch.py, setup_agent_builder.py, verify.py, setup.py (orchestrator with --phase flag). SQL migration: supabase/migrations/001_initial_schema.sql (3 tables, trigger, RPC, RLS — all idempotent).
API discoveries:
GET /api/agent_builder/toolsreturns{"results": [...]}not a flat array- Agent tools under
configuration.tools, not top-leveltools - "Already exists" returns HTTP 400 with message, not 409
Full pipeline + idempotent re-run both pass.
Proactive background check-in service — transforms the agent from reactive to proactive.
Architecture: APScheduler CronTrigger runs heartbeat_tick() every N minutes during active hours (default: 30 min, 8 AM–10 PM). Each tick: reads Meta/heartbeat.md checklist → injects user profile + memory → calls Kibana converse API → parses response.
Suppression: HEARTBEAT_OK responses silently discarded. Real alerts appended to daily notes as ## Heartbeat Alert (HH:MM UTC) blocks, creating the daily note if missing.
Design decisions: APScheduler v3 (stable) over v4 (alpha). Profile-gated Docker service (opt-in — costs ~$0.50-2/day at 30-min intervals). File-based conversation ID for session continuity across ticks. Direct daily note writing to avoid circular converse API dependency. Graceful shutdown via SIGTERM/SIGINT handling.
Persistent memory across sessions — the agent knows who the user is and remembers past decisions.
Memory files: Meta/user-profile.md (identity, preferences, team, work patterns) and Meta/memory.md (key decisions, project relationships, discovered preferences).
Injection: _read_memory_context() in voice proxy reads both files, strips frontmatter, truncates at 20K chars, injects via configuration_overrides.instructions in every converse call. Vault mounted read-only on voice-proxy container.
Daily note write-back: save_conversation_summary now appends ## Conversation Summary blocks to daily notes via vault_manager. Non-fatal on write failure.
System prompt update: Comprehensive memory guidance — injected memory usage, how to update Meta/memory.md via vault_manage, never modify profile without permission. Re-synced to Agent Builder (13,351 → 14,508 chars).
28-point systematic validation: indexer pipeline, MCP server (local + Docker), all 4 tool groups, Docker Compose (5 containers + ngrok), full Agent Builder chat loop via Kibana converse API. 28/28 pass.
Bug found: .env had Windows line endings (\r) — fixed with tr -d '\r'.
Merged Artemis backend (58 files → services/artemis-backend/) and frontend (122 files → frontend/) into the Athena monorepo. Used git ls-files + copy instead of git subtree (we only need 2 subdirectories). Zero source code changes — only Docker Compose paths and .env.example updated.
Claimed ngrok static domain sylas-saporific-ilona.ngrok-free.dev — no more URL churn on restart. Updated MCP connector in Kibana to permanent URL.
Result: Single repo, single docker compose up. ADR-004 Phase A complete.
Linux E2E validation: Tested indexer, MCP server (local + Docker), voice proxy, Artemis integration, ES write-back, web search, and agent chat loop. Fixed 3 bugs: indexer env_file path resolution, Artemis env file path in Docker, vault volume mount double-nesting when VAULT_PATH was set.
Frontend Docker: Added artemis-frontend as 4th Docker service. Custom nginx.conf with SPA routing + /athena/ reverse proxy to voice-proxy. ^~ modifier prevents regex static asset location from intercepting proxy requests.
Monorepo research: Evaluated 5 strategies (Bazel/Nx, subtree/submodule, file copy, fresh start, uv workspaces) against Google/Meta/Microsoft/Airflow patterns. Chose two-phase approach: Phase A (file merge) for hackathon, Phase B (uv workspaces) post-hackathon. Output: decisions/004-monorepo-merge-strategy.md.
Deep research analyzing OpenClaw and NanoClaw for adoptable patterns. 4 parallel research agents covering architecture, memory, security, and heartbeat systems. No code changes.
Key adoptions:
| Pattern | OpenClaw | Athena Equivalent |
|---|---|---|
| SOUL.md (personality) | Workspace bootstrap | agent-config/system-prompt.md (exists) |
| USER.md (identity) | Workspace bootstrap | Meta/user-profile.md (new) |
| MEMORY.md (decisions) | Workspace bootstrap | Meta/memory.md (new) |
| HEARTBEAT.md (proactive) | Cron-triggered agent turn | APScheduler + converse API (new) |
Memory injection via configuration_overrides.instructions — no agent code changes needed.
Output: decisions/003-openclaw-patterns-research.md (329 lines).
Consolidated multi-terminal setup into docker compose up and embedded Athena as a chat sidebar in the Artemis React app. Three sub-sessions: backend infra, React chat component, voice polish.
Backend infra: Fixed MCP Dockerfile CMD (src.server → src to avoid double-import). Added CORS middleware to voice proxy. Created voice-client Dockerfile. Consolidated Docker Compose — Artemis always starts, ngrok under tunnel profile.
Chat sidebar: 420px right drawer (desktop) / full-screen (mobile). Zustand store (chatStore.ts), useAthenaChat hook, athena-api.ts fetch client, markdown rendering with DOMPurify, welcome screen with hint chips, thinking indicator with pulsing dots. Floating action button (gradient indigo→gold) integrated into AppShell.
Voice: useVoiceRecorder (MediaRecorder + opus codec), useAthenaVoice (record → transcribe → chat → speak pipeline), Radix settings dialog (voice selection + auto-speak toggle), animated mic button with status indicators, keyboard shortcuts (Space to record, Escape to cancel).
Integration fixes (Feb 14):
- Kibana returns
{ response: { message: "..." } }not{ response: "..." }— passing an object tomarked.parse()crashed React's render tree - Added TanStack Query cache invalidation after agent responses (pomodoro, tasks, dailyPlans, analytics keys)
- Tracked
uv.lockfiles in git (Docker--frozenbuilds need them) - Replaced
curlhealthcheck with Pythonurllib.request.urlopen(curl not inpython:3.12-slim)
Deployed MCP server publicly via ngrok and registered everything in Agent Builder.
Transport migration: SSE → Streamable HTTP (Elastic's MCP connector requirement). Set streamable_http_path="/" because Elastic's connector POSTs to root, not the FastMCP default /mcp.
Double-import fix: python -m src.server causes double-import — tool modules do from src.server import mcp, creating a second mcp instance where tools register, while run() is called on the first (empty) one. Fixed with src/__main__.py entry point.
Agent Builder registration (all via Kibana REST API): MCP connector (type .mcp), 5 ES|QL tools + 1 index search tool, 13 MCP tools, Athena agent (19 tools, 13,351 char system prompt).
API gotchas:
| Field | Expected | Actual |
|---|---|---|
| MCP connector URL | url |
serverUrl |
| Agent system prompt | system_prompt |
instructions |
Agent type field |
Required | Auto-set, must be omitted |
| ES | QL param types | keyword |
Type checking: Added pyright to indexer and mcp-server. MCP server: 0 errors. Indexer: 15 errors across 3 files (pydantic-settings call-arg ignore, async_bulk return type guard, watchdog bytes | str path extraction).
System prompt (agent-config/system-prompt.md, 244 lines) — Elastic's Goal / Steps / Guardrails structure: full tool inventory + selection decision matrix, 7 workflow patterns (search, task extraction, daily planning, idea capture, research, productivity check-in, conversation memory), Eisenhower classification with vault examples, 1-3-5 rule, human-in-the-loop guardrails, error recovery strategy.
ES|QL tools (5 JSON + 1 index search):
search-notes— hybrid semantic (boost: 0.7) + full-text (boost: 0.3)get-recent-notes—NOW() - TO_TIMEDURATION(?time_range)parameterized date rangesget-notes-by-tag—MV_EXPAND tagsbeforeWHERE tags == ?tagcount-notes-by-tag—STATS COUNT(*) BY tags(no parameters)get-conversation-history— semantic search onathena-conversationsnotes-semantic-search— dynamic NL-to-ES|QL for complex ad-hoc queries
Setup guide: agent-config/setup-guide.md (128 lines) — LLM connectors, ES|QL tool creation (UI + API), MCP registration, agent creation, verification queries, troubleshooting.
Built the full MCP server — 3 adapter classes, 13 tools across 4 groups.
Adapters:
VaultManager(~465 lines) — CRUD, 3 search modes (keyword with scoring, metadata filtering, recency by mtime), path traversal prevention viaresolve()+startswith(),confirm_destructivegate on deletesArtemisClient(~100 lines) — thin httpx wrapper over 7 REST endpoints + health checkKnowledgeStore(~44 lines) — conversation write-back to ES,summary_semantic = summary(ELSER embeds at index time)
Tools:
| Module | Tools | Pattern |
|---|---|---|
tools/artemis.py |
7 | Direct proxy with HTTPStatusError/ConnectError handling |
tools/vault.py |
3 | Operation dispatch (4+3+6 ops) |
tools/knowledge.py |
1 | ES write-back with not-configured fallback |
tools/research.py |
2 | Tavily preferred / Brave fallback, URL fetch with 5K char truncation |
Server wiring: FastMCP("Athena") with adapter singletons at module level, conditional KnowledgeStore init (ES credentials optional), tool registration via module imports (circular-import-safe because adapters defined before tool imports).
Finding: FastMCP v1.26 moved host/port from run() to constructor — PRD specified the older API.
Scaffold: 4 sub-projects with uv (indexer, mcp-server, voice-client, agent-config). pydantic-settings configs for indexer and MCP server. .env.example with all variables. Docker Compose with vault volume mount and optional Artemis profile.
Elasticsearch Cloud Serverless (europe-west3 trial): ELSER v2 available as built-in inference endpoint (.elser-2-elastic) — zero model deployment. semantic_text field type handles chunking + embedding automatically at index time. Created athena-notes (semantic + keyword + date fields) and athena-conversations (semantic + keyword arrays) indices.
Indexer pipeline:
parser.py—ParsedNotePydantic model,python-frontmatterextraction with filesystem stat fallback, note type inferred from folder, MD5 checksum for change detection, SHA-256 of vault-relative path for deterministic ES_idindexer.py—VaultIndexerwith async bulk indexing viaasync_bulk, scroll API for checksum dedup (handles >1000 notes), single-note index/delete for watchercli.py— 3 subcommands (setup-indices,index,watch) with Rich console outputwatcher.py— watchdogFileSystemEventHandlerbridging sync callbacks to async ES operations viaasyncio.run_coroutine_threadsafe()
Sample vault: 17 notes across 5 folders (Research, Ideas, Projects, Meeting Notes, Daily Notes). All with YAML frontmatter, 135 wikilinks. Key demo content: 7 extractable tasks in API Refactoring.md, 5 action items in Sprint Review, pomodoro entries for analytics.
Validation: 17/17 parsed and indexed, checksum dedup confirmed (re-run: 0 indexed, 17 skipped), ELSER semantic search verified — "user authentication login" matches Authentication Module despite no keyword overlap.
Key decisions:
.elser-2-elastic(managed) over.elser-2-elasticsearch(self-hosted) — zero ML node configsemantic_textfield type — no client-side embedding code needed- Single unified MCP server — all tools in one process, one connection for Agent Builder
- Renamed
ELASTIC_CLOUD_ID→ELASTIC_URL(Serverless uses direct HTTPS URL) extra: "ignore"in pydantic-settings (shared.envhas vars for all services)
| Decision | Rationale |
|---|---|
| Elastic Agent Builder | Built-in conversation management, tool routing, LLM connector — no custom agent framework |
| Dual-path knowledge | ES for semantic search + analytics; direct vault for real-time read/write |
| 3-tool vault consolidation | vault_query, vault_read, vault_manage with operation params — fewer tools for the LLM |
ELSER via semantic_text |
Zero embedding code — ES handles chunking, inference, and storage |
| Streamable HTTP transport | Elastic's MCP connector requirement; mount at / not default /mcp |
| Docker volume mount | Scoped filesystem access (/vault:rw), consistent paths in dev and prod |
| Checksum-based dedup | MD5 of content for change detection, SHA-256 of path for ES _id |
confirm_destructive pattern |
Vault deletes require explicit flag — prevents accidental LLM data loss |
| Voice as pure client layer | Agent never knows if input was typed or spoken — zero backend changes |
__main__.py entry point |
Avoids Python double-import (python -m src vs src.server) |
| Kibana API for all setup | Agent Builder config via REST — reproducible, scriptable, idempotent |
ES|QL (Agent Builder): search_notes, get_recent_notes, get_notes_by_tag, get_conversation_history, count_notes_by_tag + semantic_search (index search)
MCP — Vault: vault_query (4 ops), vault_read (3 ops), vault_manage (6 ops)
MCP — Artemis: artemis_create_task, artemis_list_tasks, artemis_complete_task, artemis_get_daily_plan, artemis_assign_to_plan, artemis_get_analytics, artemis_start_pomodoro
MCP — Knowledge: save_conversation_summary
MCP — Research: web_search, fetch_url
MCP — Skills: skill_manager (5 ops: list, load, create, edit, delete)
Last updated: February 24, 2026