Configuration
Theathena.core.config module provides centralized configuration, path discovery, and directory structure for the Athena Operating System.
Overview
Project Root Discovery
get_project_root()
Discovers the workspace root by searching forpyproject.toml. Results are cached after first call.
- Walk up from
athena/core/config.pyto findpyproject.toml - Fallback to
ATHENA_ROOTenvironment variable - Final fallback to
Path.cwd()
Directory Structure
Core Directories
Directory Reference
| Directory | Path | Purpose |
|---|---|---|
AGENT_DIR | .agent/ | Skills, workflows, scripts |
CONTEXT_DIR | .context/ | Memory bank, session logs |
FRAMEWORK_DIR | .framework/ | Core identity, protocols |
PUBLIC_DIR | Athena-Public/ | Public-facing documentation |
SCRIPTS_DIR | .agent/scripts/ | Automation scripts |
MEMORIES_DIR | .context/memories/ | Long-term memory storage |
SESSIONS_DIR | .context/memories/session_logs/ | Session transcripts |
MEMORY_DIR | .athena/memory/ | User profile, learnings |
STATE_DIR | .agent/state/ | Runtime state, cache |
INPUTS_DIR | .context/inputs/ | Input staging area |
Key Files
TAG_INDEX_A-M.md- Tags starting with A-MTAG_INDEX_N-Z.md- Tags starting with N-ZTAG_INDEX.md- Legacy monolithic (for backwards compatibility)
Active Memory Configuration
Core Memory Directories
Extended Memory Silos
Extended directories are mapped to logical memory tables:"sessions"- Session logs and transcripts"case_studies"- Analysis, proposals, reflections"protocols"- Protocol definitions"capabilities"- Capability specifications"workflows"- Workflow definitions"system_docs"- Documentation, knowledge base
get_active_memory_paths()
Returns a deduplicated list of all active memory directories.Session Management
get_current_session_log()
Finds the most recent session log file.- Format:
YYYY-MM-DD-session-XX.md - Example:
2026-03-03-session-42.md
- Sort by date (descending)
- Then by session number (descending)
Environment Variables
ATHENA_ROOT
Optional override for project root discovery.pyproject.tomldiscovery (highest)ATHENA_ROOTenvironment variablePath.cwd()(fallback)
Usage Patterns
Accessing Configuration
Dynamic Path Construction
Memory Path Iteration
Performance Considerations
Caching:get_project_root()caches result globally- First call: ~5ms (filesystem traversal)
- Subsequent calls: Less than 0.1ms (cache lookup)