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/sessions/<session-id>/events.dbSessionPer-session event database.
$AGH_HOME/sessions/<session-id>/meta.jsonSessionPer-session metadata.
$AGH_HOME/agents/<name>/AGENT.mdGlobal agentUser-wide agent definition.
$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/agents/<name>/AGENT.mdWorkspace agentWorkspace-local agent definition.
<workspace>/.agh/skills/<name>/SKILL.mdWorkspace skillWorkspace-local skill definition.
<workspace>/.agh/memory/Workspace memoryWorkspace-scoped memory files.

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/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.

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.

Session Files

Every durable session owns a directory under $AGH_HOME/sessions/.

~/.agh/sessions/<session-id>/
  events.db
  meta.json
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.

Agent Files

PathScopeDescription
$AGH_HOME/agents/<name>/AGENT.mdGlobalAgent available across workspaces.
$AGH_HOME/agents/<name>/mcp.jsonGlobal agentOptional agent-local MCP sidecar.
<workspace>/.agh/agents/<name>/AGENT.mdWorkspaceAgent available to sessions in that workspace.
<workspace>/.agh/agents/<name>/mcp.jsonWorkspace agentOptional agent-local MCP sidecar.
<additional-root>/.agh/agents/<name>/AGENT.mdAdditional rootAgent available when the workspace has that additional root registered.

Agent discovery order is workspace root, additional roots in registered order, then global home. First name wins. AGH does not use .agents/<name>/AGENT.md as a current runtime path; that appears only in draft RFC material.

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.
$HOME/.agents/skills/<name>/SKILL.mdUser AgentSkills conventionAdditional user-level skill source resolved from HOME.
<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. 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/
    config.toml
    mcp.json
    agents/
    skills/
    memory/
PathDescription
<workspace>/.envOptional dotenv file loaded before home path resolution when config is loaded with a workspace root.
<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.
<workspace>/.agh/skills/Workspace skill definitions.
<workspace>/.agh/memory/Workspace-scoped memory files.

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.

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