Agentic.Workspace.Service (agentic v0.2.2)

Copy Markdown

Manages workspace file structure and policy.

Creates and maintains the workspace directory structure: workspace/ ├── AGENTS.md # Boot sequence & operating guidelines ├── TOOLS.md # Available tools & credentials ├── MEMORY.md # Curated long-term memory ├── HEARTBEAT.md # Periodic task config ├── CAPABILITIES.md # Skill registry ├── skills/ # Installed skills ├── memory/ │ └── YYYY-MM-DD.md # Daily logs ├── policy/ │ └── policy.yaml # Tool permissions ├── scratch/ # Scratch space (task workspaces) └── TASK.md # Task brief (task workspaces)

Identity files (SOUL.md, IDENTITY.md, USER.md) are created by the agent during the onboarding conversation, not scaffolded here.

Summary

Functions

Copy identity files (SOUL.md, IDENTITY.md, USER.md) from a source workspace to a destination workspace. AGENTS.md is intentionally excluded as it is workspace-specific and always scaffolded fresh.

Create a daily log file for today.

Create a new workspace with the full directory structure.

Ensure the workspace base directory exists.

Get the memory directory for a workspace.

Get the default workspace policy.

Get the allowed roots for a workspace.

Functions

copy_identity_files(source_workspace_path, dest_workspace_path)

Copy identity files (SOUL.md, IDENTITY.md, USER.md) from a source workspace to a destination workspace. AGENTS.md is intentionally excluded as it is workspace-specific and always scaffolded fresh.

create_daily_log(workspace_root, storage \\ nil)

Create a daily log file for today.

create_workspace(workspace_root, opts \\ [])

Create a new workspace with the full directory structure.

Options:

  • :workspace_type:general, :personal, :admin, :team, or :task (default: :general)
  • :workspace_template:standard (default: :standard)
  • :storage — a %Storage.Context{} (default: local backend for workspace_root)

ensure_base_dir!()

Ensure the workspace base directory exists.

get_memory_dir(workspace_root)

Get the memory directory for a workspace.

get_policy()

Get the default workspace policy.

get_roots(workspace_root)

Get the allowed roots for a workspace.

set_policy(workspace_root, policy, storage \\ nil)

Set the workspace policy.