Layout and Storage
This page defines the filesystem layout used by Toolang and the canonical identity model for agents.
Core terms
toolang rootthe local Toolang system directory, defaulting to~/.toolangagent homethe local directory that hosts one or more.toofilesagent roomthe private machine-managed area for one agentresident agentan agent whose home lives under${TOOLANG_ROOT}/agents/roaming agentan agent whose home stays at an external local pathvisiting agentan agent discovered from a remote URL and materialized under${TOOLANG_ROOT}/guests/
Canonical agent URIs
Canonical URI forms:
agent://<home_name>/<agent_name>.tooresident agentfile:///absolute/path/to/<agent_name>.tooroaming agenthttps://<host>/<path>visiting agent
Rules:
agent_id = hash(agent_uri)- canonical identity stays separate from local placement
agent_urimust not depend on the absoluteTOOLANG_ROOTpath
Toolang root
{TOOLANG_ROOT}/
agents.db
agents.too
sync/
skills/
services/
prompts/
psyches/
skills/
services/
prompts/
psyches/
agents/{HOME}/
guests/{HOME}/
sandbox/{AGENT_KEY}/
bus/
events.db
bus.run
bus.logThis is where Toolang keeps the global registry, global shared source, global local capabilities, synced output, resident or visiting agent homes, and the shared bus projection.
Agent home
${AGENT_HOME}/
{AGENT}.too
agents.too
channels.toml
hooks.toml
.env
.toolang/
agents/{AGENT}/
sync/
{AGENT}.state.json
skills/
services/
prompts/
psyches/
skills/
services/
prompts/
psyches/The agent home is the split between authored state and machine-managed state:
- authored source stays in
.too,.env, and loop config files - shared local capabilities stay under
.toolang/{skills,services,prompts,psyches}/ - generated synced output stays under
.toolang/sync/
Agent room
${AGENT_HOME}/.toolang/agents/{AGENT}/
agent.run
agent.log
execution.db
pulse.json
task_mirrors.json
runs/
{RUN_ID}/
prompt.json
poll/
hooks/
sync/
skills/
services/
prompts/
psyches/
chats/
chats.db
sandbox/
tasks/
*.md
chores/
*.md
will.mdThe agent room is the local truth layer for one agent. It holds runtime state, task files, chat history, traces, and loop-owned state.
Scope roots
Capability scopes map to these roots:
agent- source:
${AGENT_HOME}/{AGENT}.too - sync:
${AGENT_HOME}/.toolang/agents/{AGENT}/sync/
- source:
shared- source:
${AGENT_HOME}/agents.too - local:
${AGENT_HOME}/.toolang/{skills,services,prompts,psyches}/ - sync:
${AGENT_HOME}/.toolang/sync/
- source:
global- source:
${TOOLANG_ROOT}/agents.too - local:
${TOOLANG_ROOT}/{skills,services,prompts,psyches}/ - sync:
${TOOLANG_ROOT}/sync/
- source:
Keeping these roots separate preserves explicit precedence and keeps synced runtime inputs inspectable.
Read next
- Read Capability Model for how these scope roots are populated and used.
- Read Execution Model for what lives in
execution.db,runs/, and loop state.