Skip to content
AGH RuntimeConfiguration

File Locations

All AGH global, workspace, agent, skill, database, log, socket, memory, and extension paths.

Audience
Operators running durable agent work
Focus
Configuration guidance shaped for scanability, day-two clarity, and operator context.

AGH uses one global home directory plus optional workspace-local .agh/ directories. The global home defaults to ~/.agh and can be changed with AGH_HOME.

Quick Reference

PathScopePurpose
$AGH_HOMEGlobalAGH home root. Defaults to ~/.agh.
$AGH_HOME/config.tomlGlobalGlobal runtime config.
$AGH_HOME/mcp.jsonGlobalGlobal top-level MCP sidecar.
$AGH_HOME/agh.dbGlobalGlobal SQLite catalog.
$AGH_HOME/daemon.sockGlobalDefault Unix domain socket.
$AGH_HOME/daemon.lockGlobalDaemon lock file.
$AGH_HOME/daemon.jsonGlobalDaemon discovery metadata.
$AGH_HOME/logs/agh.logGlobalStructured daemon log file.
$AGH_HOME/logs/network.auditGlobalAppend-only network audit file.
$AGH_HOME/support-bundles/GlobalDaemon-created support bundle archives and operation downloads.
$AGH_HOME/providers/<provider>/ProviderIsolated provider home when home_policy is set.
$AGH_HOME/sessions/<session-id>/events.dbSession (live)Per-session event database during the live session.
$AGH_HOME/sessions/<session-id>/meta.jsonSession (live)Per-session metadata.
$AGH_HOME/sessions/<workspace_id>/<session_id>/ledger.jsonlSession (forensic)Read-only forensic JSONL ledger materialized after session stop.
$AGH_HOME/sessions/_unbound/<session_id>/ledger.jsonlSession (forensic)Forensic ledger for sessions without a resolved workspace_id.
$AGH_HOME/agents/<name>/AGENT.mdGlobal agentUser-wide agent definition.
$AGH_HOME/agents/<name>/skills/<skill>/SKILL.mdGlobal agent skillAgent-local skill overlay for the global agent.
$AGH_HOME/skills/<name>/SKILL.mdGlobal skillUser or marketplace skill definition.
<workspace>/.envWorkspaceOptional dotenv file loaded before workspace config.
<workspace>/.agh/config.tomlWorkspaceWorkspace config overlay.
<workspace>/.agh/mcp.jsonWorkspaceWorkspace top-level MCP sidecar.
<workspace>/.agh/workspace.tomlWorkspace identityStable workspace ULID. Created on first daemon touch when [memory.workspace] auto_create = true.
<workspace>/.agh/agents/<name>/AGENT.mdWorkspace agentWorkspace-local agent definition.
<workspace>/.agh/agents/<name>/memory/Agent (workspace)Agent-workspace memory tier (deepest read precedence).
<workspace>/.agh/agents/<name>/skills/<skill>/SKILL.mdWorkspace agent skillAgent-local skill overlay for that workspace agent.
<workspace>/.agh/skills/<name>/SKILL.mdWorkspace skillWorkspace-local skill definition.
<workspace>/.agh/memory/Workspace memoryWorkspace-scoped memory files.
$AGH_HOME/agents/<name>/memory/Agent (global)Agent-global memory tier (cross-workspace baseline).
$AGH_HOME/memory/_inbox/Memory extractorExtractor staging directory consumed by the controller.
$AGH_HOME/memory/_system/Memory machine-managedReserved namespace; never injected into prompts.

Global Home

PathCreated by home layoutDescription
$AGH_HOMEyesHome root. Defaults to ~/.agh; AGH_HOME overrides it.
$AGH_HOME/config.tomlnoGlobal TOML config file.
$AGH_HOME/mcp.jsonnoGlobal MCP sidecar loaded after global TOML by the general config loader.
$AGH_HOME/agents/yesGlobal agent definitions.
$AGH_HOME/skills/yesGlobal user and marketplace skills.
$AGH_HOME/memory/yesDefault global memory directory. Can be overridden by [memory].global_dir.
$AGH_HOME/providers/noParent for opt-in isolated provider homes. Created by provider launch/auth.
$AGH_HOME/sessions/yesParent directory for per-session state.
$AGH_HOME/logs/yesParent directory for daemon logs and network audit output.
$AGH_HOME/extensions/noManaged installed extension root. Created when installing managed extensions.
$AGH_HOME/support-bundles/noCreated when the daemon builds or the CLI downloads a support bundle.

EnsureHomeLayout creates the root, agents, skills, memory, sessions, and logs directories. Individual files are created by the features that own them.

Global Runtime Files

PathFormatDescription
$AGH_HOME/agh.dbSQLiteGlobal catalog database for sessions, workspace registrations, observability summaries, extension records, automation state, and network records. SQLite may create agh.db-wal and agh.db-shm sidecars.
$AGH_HOME/daemon.sockUnix domain socketDefault CLI and UDS API socket. [daemon].socket can point elsewhere.
$AGH_HOME/daemon.lockLock fileDaemon process lock.
$AGH_HOME/daemon.jsonJSONDiscovery file containing daemon PID, HTTP port, start time, and optional network diagnostics.
$AGH_HOME/logs/agh.loglog fileStructured daemon log file path from the home layout.
$AGH_HOME/logs/network.auditlog fileAppend-only network audit file.
$AGH_HOME/support-bundles/directoryRedacted support bundle archives created through agh support bundle or POST /api/support/bundles.

Provider Home Files

When a provider sets home_policy = "isolated", AGH creates a private provider home under $AGH_HOME/providers/<provider> with 0700 permissions. The launch environment points HOME, PROVIDER_HOME, XDG directories, and known provider-specific variables such as CLAUDE_CONFIG_DIR, CODEX_HOME, and OPENCODE_CONFIG_DIR at that directory. AGH never copies credentials from the operator home into an isolated provider home.

The default home_policy = "operator" does not create this directory and lets native ACP CLIs use their existing login/session state.

Session Files

Live sessions own a directory under $AGH_HOME/sessions/<session-id>/. After session stop, AGH materializes a read-only forensic JSONL ledger under $AGH_HOME/sessions/<workspace_id>/<session_id>/ledger.jsonl. Unbound sessions (no resolved workspace) materialize under $AGH_HOME/sessions/_unbound/<session_id>/.

~/.agh/sessions/<session-id>/
  events.db
  meta.json

~/.agh/sessions/<workspace_id>/<session_id>/
  ledger.jsonl

~/.agh/sessions/_unbound/<session_id>/
  ledger.jsonl
PathFormatDescription
$AGH_HOME/sessions/<session-id>/events.dbSQLitePer-session event store for ACP events, turns, token usage, permission decisions, and hook run history.
$AGH_HOME/sessions/<session-id>/meta.jsonJSONQuick metadata used by session listing and reconciliation paths.
$AGH_HOME/sessions/<workspace_id>/<session_id>/ledger.jsonlJSONLForensic ledger materialized after session stop. Read-only and content-addressed; idempotent on rerun.
$AGH_HOME/sessions/_unbound/<session_id>/ledger.jsonlJSONLForensic ledger for sessions without a resolved workspace_id.

The forensic ledger is never a memory scope, never queried by recall, and never accepted as a controller write target — it is operator-readable history only. After materialization, live events.db rows for the same session are purged once [memory.session] events_purge_grace elapses.

Agent Files

PathScopeDescription
$AGH_HOME/agents/<name>/AGENT.mdGlobalAgent available across workspaces.
$AGH_HOME/agents/<name>/mcp.jsonGlobal agentOptional agent-local MCP sidecar.
$AGH_HOME/agents/<name>/skills/<skill>/SKILL.mdGlobal agent skillAgent-local skill overlay used when this global agent wins resolution.
<workspace>/.agh/agents/<name>/AGENT.mdWorkspaceAgent available to sessions in that workspace.
<workspace>/.agh/agents/<name>/mcp.jsonWorkspace agentOptional agent-local MCP sidecar.
<workspace>/.agh/agents/<name>/skills/<skill>/SKILL.mdWorkspace agent skillAgent-local skill overlay used when this workspace agent wins resolution.
<additional-root>/.agh/agents/<name>/AGENT.mdAdditional rootAgent available when the workspace has that additional root registered.
<additional-root>/.agh/agents/<name>/skills/<skill>/SKILL.mdAdditional-root agent skillAgent-local skill overlay used when this additional-root agent wins resolution.

Agent discovery order is workspace root, additional roots in registered order, then global home. First name wins.

Skill Files

PathScopeDescription
$AGH_HOME/skills/<name>/SKILL.mdGlobal user or marketplaceUser-wide or marketplace-installed skill.
$AGH_HOME/skills/<name>/mcp.jsonSkill sidecarOptional skill MCP sidecar.
$AGH_HOME/skills/<name>/.agh-meta.jsonMarketplace sidecarManaged provenance metadata for marketplace skills.
<workspace>/.agh/skills/<name>/SKILL.mdWorkspaceWorkspace-local skill.
<workspace>/.agh/skills/<name>/mcp.jsonWorkspace skill sidecarOptional skill MCP sidecar.
<additional-root>/.agh/skills/<name>/SKILL.mdAdditional rootSkill available when the workspace has that additional root registered.

Skill filesystem precedence is bundled, marketplace, user, additional root, then workspace, with the winning agent's skills/ directory applied as a final overlay. Enabled extensions can also register runtime-owned skills into the live registry. Those overlays do not come from a filesystem path, so they are documented in Skills Overview rather than in this file-path table.

Workspace Files

my-project/
  .env
  .agh/
    workspace.toml
    config.toml
    mcp.json
    agents/
    skills/
    memory/
      MEMORY.md
      _system/
PathDescription
<workspace>/.envOptional dotenv file loaded before home path resolution when config is loaded with a workspace root.
<workspace>/.agh/workspace.tomlStable workspace identity (ULID). Memory and session ledgers key on this ULID, not on the path.
<workspace>/.agh/config.tomlWorkspace TOML overlay. Loaded after global config.
<workspace>/.agh/mcp.jsonWorkspace MCP sidecar. Loaded after workspace TOML.
<workspace>/.agh/agents/Workspace agent definitions and per-agent workspace-tier memory.
<workspace>/.agh/skills/Workspace skill definitions.
<workspace>/.agh/memory/Workspace-scoped memory files plus _system/ for machine-managed artifacts.

AGH only loads the .agh/config.toml for the resolved primary workspace root. Additional roots are resource discovery roots for agents and skills; they do not contribute config overlays.

Memory Files

Memory v2 lives in three scopes: global, workspace, and agent (with agent_tier = {workspace, global}). Curated entries are Markdown-authoritative on disk; SQLite catalogs, FTS5 indexes, decision WAL rows, and memory_events are derived from controller activity. The _system/ directory in every scope hosts machine-managed artifacts (dreaming, extractor failures, ad-hoc notes) and is never injected into prompts.

~/.agh/memory/
  MEMORY.md
  user_review-style.md
  feedback_test-integrity.md
  _inbox/
  _system/
    dreaming/
    extractor/
    extractor/failures/
    ad_hoc/

~/.agh/agents/<agent>/memory/
  MEMORY.md
  user_pedro-style.md
  _system/

<workspace>/.agh/memory/
  MEMORY.md
  project_runtime-docs.md
  reference_session-events.md
  _system/

<workspace>/.agh/agents/<agent>/memory/
  MEMORY.md
  project_repo-rules.md
  _system/
PathMemory tierDescription
$AGH_HOME/memory/GlobalUser-wide memory accessible from any workspace.
$AGH_HOME/memory/_inbox/Extractor stagingDaemon-owned inbox where the extractor stages candidates before controller acceptance.
$AGH_HOME/memory/_system/Reserved (per-scope)Hosts dreaming output, extractor failures, ad-hoc notes; never injected into prompts.
$AGH_HOME/agents/<agent>/memory/Agent-globalCross-workspace agent baseline; deepest scope after agent-workspace.
<workspace>/.agh/memory/WorkspaceWorkspace-private memory keyed by workspace_id.
<workspace>/.agh/agents/<agent>/memory/Agent-workspace (default)Workspace-private agent memory; the default tier for --scope agent writes.
<workspace>/.agh/agh.dbPer-workspace DBWorkspace catalog DB plus the per-workspace memory_events, memory_decisions, and memory_recall_signals rows.
$AGH_HOME/agh.dbGlobal DBGlobal catalog DB plus global-scope memory tables and the workspace registration table.

Extension Files

PathFormatDescription
$AGH_HOME/extensions/<name>/directoryManaged installed extension root.
$AGH_HOME/extensions/.agh-extension-stage-*temporary directoryStaging directory used while installing managed extensions.

Extension registry records are stored in the global database, not in a separate user-authored config file.

Path Overrides

SettingAffectsNotes
AGH_HOMEAll global home paths.Resolved before global config is loaded. Workspace .env can set it for workspace config loads.
[daemon].socketDaemon socket path.~ is expanded. Daemon boot resolves the final socket path to an absolute path.
[memory].global_dirGlobal memory directory.~ is expanded. Empty overlay values are ignored and keep the previous directory.
[http].host and [http].portHTTP/SSE bind address.These are not file paths but affect browser/API endpoint locations.

Special Cases

CaseBehavior
Missing config.tomlTreated as absent. Built-in defaults remain active.
Missing mcp.jsonTreated as absent.
Unknown TOML keyConfig load fails.
Unknown JSON field in mcp.jsonSidecar parse fails.
Daemon boot configDaemon startup uses the home config for boot settings. The general config loader applies MCP sidecars for session/runtime resolution.
~ expansionImplemented for daemon.socket and memory.global_dir; home paths are resolved from AGH_HOME or OS user home.

On this page