Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ users/{id}/
USER.md — Information about the human
```

Discovery: `wp datamachine agent paths --allow-root`
Discovery: `wp datamachine memory paths --allow-root`

### Abilities API

Expand Down
12 changes: 6 additions & 6 deletions docs/core-system/daily-memory-system.md
Original file line number Diff line number Diff line change
Expand Up @@ -330,22 +330,22 @@ All endpoints require `manage_options` capability. The `PUT` endpoint accepts co

```bash
# List all daily memory files
wp datamachine agent daily list [--agent=<slug>] [--user=<id>] [--format=table|json]
wp datamachine memory daily list [--agent=<slug>] [--user=<id>] [--format=table|json]

# Read a daily file (defaults to today)
wp datamachine agent daily read [YYYY-MM-DD] [--agent=<slug>]
wp datamachine memory daily read [YYYY-MM-DD] [--agent=<slug>]

# Write (replace) a daily file
wp datamachine agent daily write [YYYY-MM-DD] <content> [--agent=<slug>]
wp datamachine memory daily write [YYYY-MM-DD] <content> [--agent=<slug>]

# Append to a daily file
wp datamachine agent daily append [YYYY-MM-DD] <content> [--agent=<slug>]
wp datamachine memory daily append [YYYY-MM-DD] <content> [--agent=<slug>]

# Delete a daily file
wp datamachine agent daily delete <YYYY-MM-DD> [--agent=<slug>]
wp datamachine memory daily delete <YYYY-MM-DD> [--agent=<slug>]

# Search across daily files
wp datamachine agent daily search <query> [--from=YYYY-MM-DD] [--to=YYYY-MM-DD] [--agent=<slug>]
wp datamachine memory daily search <query> [--from=YYYY-MM-DD] [--to=YYYY-MM-DD] [--agent=<slug>]
```

All commands resolve agent scoping via `AgentResolver` (from `--agent` flag) with fallback to `--user`.
Expand Down
2 changes: 1 addition & 1 deletion docs/core-system/ephemeral-workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ When a direct execution workflow is triggered via the `/execute` REST endpoint,
- **AI Chatbot Execution**: When the Data Machine chat agent suggests a sequence of actions, it can trigger them immediately as a direct execution workflow.
- **External Triggers**: Programmatically trigger a specific sequence of steps from an external script without cluttering the WordPress database with temporary pipelines.
- **Testing**: Quickly test a new combination of handlers and prompts without going through the Pipeline Builder UI.
- **CLI Tools**: Use the `wp datamachine agent` WP-CLI command to run the chat agent directly for debugging and validation.
- **CLI Tools**: Use the `wp datamachine chat` WP-CLI command to run the chat agent directly for debugging and validation.

## Limitations

Expand Down
42 changes: 21 additions & 21 deletions docs/core-system/wordpress-as-agent-memory.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ The **CoreMemoryFilesDirective** loads all files from the **MemoryFileRegistry**
- Editable through the WordPress admin Agent page
- No serialization — plain markdown, human-readable, git-friendly
- Core files created on activation with starter templates
- Discover paths via `wp datamachine agent paths --allow-root`
- Discover paths via `wp datamachine memory paths --allow-root`

### 2. Daily Memory — Temporal Knowledge

Expand Down Expand Up @@ -142,7 +142,7 @@ wp datamachine agents create --slug=my-agent --name="My Agent" --allow-root
wp datamachine agents rename old-slug new-slug --allow-root

# Discover file paths for an agent
wp datamachine agent paths --agent=my-agent --allow-root
wp datamachine memory paths --agent=my-agent --allow-root
```

## Core Memory Files
Expand Down Expand Up @@ -398,13 +398,13 @@ The canonical way to find agent memory file paths is via WP-CLI:

```bash
# Discover all paths for the current agent
wp datamachine agent paths --allow-root
wp datamachine memory paths --allow-root

# For a specific agent
wp datamachine agent paths --agent=my-agent --allow-root
wp datamachine memory paths --agent=my-agent --allow-root

# Table format for readability
wp datamachine agent paths --format=table --allow-root
wp datamachine memory paths --format=table --allow-root
```

Output structure:
Expand Down Expand Up @@ -456,24 +456,24 @@ This makes WordPress the single source of truth for agent memory, regardless of

### Reading Memory via WP-CLI

Agents with shell access can use the `agent` command for structured access:
Agents with shell access can use the `memory` command for structured access:

```bash
# Discover file paths (canonical command for external consumers)
wp datamachine agent paths --allow-root
wp datamachine memory paths --allow-root

# Read memory file
wp datamachine agent files read SOUL.md --allow-root
wp datamachine agent files read MEMORY.md --allow-root
wp datamachine memory files read SOUL.md --allow-root
wp datamachine memory files read MEMORY.md --allow-root

# List agent directory contents
wp datamachine agent files list --allow-root
wp datamachine memory files list --allow-root

# Read daily memory
wp datamachine agent daily read 2026-03-15 --allow-root
wp datamachine memory daily read 2026-03-15 --allow-root

# Search daily memory
wp datamachine agent daily search "deployment" --allow-root
wp datamachine memory daily search "deployment" --allow-root
```

### The Key Principle
Expand Down Expand Up @@ -634,16 +634,16 @@ All daily memory abilities accept `user_id` and `agent_id` for multi-agent scopi

```bash
# Canonical discovery command — returns all layer paths and file locations
wp datamachine agent paths --allow-root
wp datamachine memory paths --allow-root

# Resolve for a specific agent
wp datamachine agent paths --agent=my-agent --allow-root
wp datamachine memory paths --agent=my-agent --allow-root

# Table format
wp datamachine agent paths --format=table --allow-root
wp datamachine memory paths --format=table --allow-root

# Relative paths (useful for AGENTS.md generators)
wp datamachine agent paths --relative --allow-root
wp datamachine memory paths --relative --allow-root
```

### Agent Management
Expand All @@ -657,11 +657,11 @@ wp datamachine agents rename old-slug new-slug --allow-root
### Agent File Commands

```bash
wp datamachine agent paths --allow-root
wp datamachine agent files list --allow-root
wp datamachine agent files read <file> --allow-root
wp datamachine agent files write <file> --content="..." --allow-root
wp datamachine agent files edit <file> --old="..." --new="..." --allow-root
wp datamachine memory paths --allow-root
wp datamachine memory files list --allow-root
wp datamachine memory files read <file> --allow-root
wp datamachine memory files write <file> --content="..." --allow-root
wp datamachine memory files edit <file> --old="..." --new="..." --allow-root
```

> **Note:** For workspace/git operations, install the `data-machine-code` extension and use `wp datamachine-code workspace`.
Expand Down
52 changes: 27 additions & 25 deletions docs/core-system/wp-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,12 @@ wp datamachine jobs undo 42 --task-type=alt_text --force

### datamachine agents

Manage agent identities. **Since**: 0.37.0
Manage agent identities. **Aliases**: `agent`. **Since**: 0.37.0

```bash
# List all agents
wp datamachine agents list
wp datamachine agent list # alias

# Show agent details (config, access grants, directory info)
wp datamachine agents show my-agent
Expand All @@ -211,44 +212,44 @@ wp datamachine agents access revoke my-agent 2
wp datamachine agents access list my-agent
```

### datamachine agent
### datamachine memory

Agent memory operations. **Alias**: `memory`. **Since**: 0.30.0
Agent memory-file operations. **Since**: 0.30.0

```bash
# Read full memory
wp datamachine agent read
wp datamachine memory read

# Read a specific section
wp datamachine agent read "## State"
wp datamachine memory read "## State"

# List sections
wp datamachine agent sections
wp datamachine memory sections

# Write to a section
wp datamachine agent write "## State" "Active and running"
wp datamachine agent write "## State" "New note" --mode=append
wp datamachine memory write "## State" "Active and running"
wp datamachine memory write "## State" "New note" --mode=append

# Search memory
wp datamachine agent search "deployment" --section="## State"
wp datamachine memory search "deployment" --section="## State"

# Daily memory operations
wp datamachine agent daily list
wp datamachine agent daily read 2026-03-15
wp datamachine agent daily write 2026-03-15 "Session notes"
wp datamachine agent daily append 2026-03-15 "More notes"
wp datamachine agent daily delete 2026-03-15
wp datamachine agent daily search "keyword" --from=2026-03-01 --to=2026-03-15
wp datamachine memory daily list
wp datamachine memory daily read 2026-03-15
wp datamachine memory daily write 2026-03-15 "Session notes"
wp datamachine memory daily append 2026-03-15 "More notes"
wp datamachine memory daily delete 2026-03-15
wp datamachine memory daily search "keyword" --from=2026-03-01 --to=2026-03-15

# Agent file management
wp datamachine agent files list
wp datamachine agent files read SOUL.md
echo "content" | wp datamachine agent files write CUSTOM.md
wp datamachine agent files check --days=7
wp datamachine memory files list
wp datamachine memory files read SOUL.md
echo "content" | wp datamachine memory files write CUSTOM.md
wp datamachine memory files check --days=7

# Show resolved file paths for all memory layers
wp datamachine agent paths
wp datamachine agent paths --agent=my-agent --format=json
wp datamachine memory paths
wp datamachine memory paths --agent=my-agent --format=json
```


Expand Down Expand Up @@ -650,7 +651,8 @@ Most commands have singular and plural forms:
- `wp datamachine step-type` / `wp datamachine step-types`
- `wp datamachine processed-item` / `wp datamachine processed-items`
- `wp datamachine setting` / `wp datamachine settings`
- `wp datamachine agent` / `wp datamachine memory` (backwards-compatible alias)
- `wp datamachine agent` / `wp datamachine agents` (agent management)
- `wp datamachine memory` (agent memory-file operations)

## Examples

Expand Down Expand Up @@ -687,6 +689,6 @@ fi

```bash
# Read current memory, update a section, verify
wp datamachine agent read
wp datamachine agent write "## Status" "All systems operational"
wp datamachine agent search "operational"
wp datamachine memory read
wp datamachine memory write "## Status" "All systems operational"
wp datamachine memory search "operational"
2 changes: 1 addition & 1 deletion docs/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Pipelines can selectively inject daily memory via the **DailyMemorySelectorDirec
### Memory Path Discovery

```bash
wp datamachine agent paths --allow-root
wp datamachine memory paths --allow-root
```

This canonical CLI command returns the full directory structure and file locations for any agent — the recommended way for external consumers to discover memory file paths.
Expand Down
4 changes: 2 additions & 2 deletions inc/Cli/Bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
WP_CLI::add_command( 'datamachine pipelines', Commands\PipelinesCommand::class );
WP_CLI::add_command( 'datamachine posts', Commands\PostsCommand::class );
WP_CLI::add_command( 'datamachine logs', Commands\LogsCommand::class );
WP_CLI::add_command( 'datamachine agent', Commands\MemoryCommand::class );
WP_CLI::add_command( 'datamachine agent', Commands\AgentsCommand::class );
WP_CLI::add_command( 'datamachine agents', Commands\AgentsCommand::class );

// Backwards-compatible alias: `wp datamachine memory` → agent.
// Canonical home for agent memory-file operations.
WP_CLI::add_command( 'datamachine memory', Commands\MemoryCommand::class );
WP_CLI::add_command( 'datamachine batch', Commands\BatchCommand::class );
WP_CLI::add_command( 'datamachine image', Commands\ImageCommand::class );
Expand Down
Loading
Loading