<!--
hoody-agent Subskill (cli)
Auto-generated by Hoody Skills Generator
Generated: 2026-05-06T20:40:48.563Z
Model: mimo-v2.5-pro + fixer:mimo-v2.5-pro
Mode: cli


Tokens: 48203

DO NOT EDIT MANUALLY - Changes will be overwritten on next generation
-->

# hoody-agent Subskill

## Overview

### What is hoody-agent?

hoody-agent is the AI agent orchestration and task execution service within the Hoody ecosystem. It provides a comprehensive platform for managing AI-powered coding sessions, orchestrating complex multi-phase workflows, managing workspace configurations, and integrating with external AI providers and tools.

### When to Use hoody-agent

Use hoody-agent when you need to:

- **Create and manage AI coding sessions** — interactive conversations with AI assistants that can read, write, and modify code
- **Orchestrate complex multi-phase tasks** — break large projects into phases with budgets, verification, and review cycles
- **Manage workspace configurations** — AI providers, permissions, tools, skills, and memory systems
- **Execute background jobs** — RSI reviews, self-tuning loops, CLI agent runs, and shell commands
- **Interact with MCP servers** — connect to Model Context Protocol servers for extended tool capabilities
- **Manage version control** — branches, diffs, merges, pull requests, and remote operations
- **Handle file operations** — search, read, and inspect project files with LSP integration
- **Manage memory and context** — persistent memory blocks, journal entries, and history tracking

### Authentication Model

hoody-agent uses Hoody's standard authentication mechanisms:

```
# Login with credentials
hoody auth login

# Use API token directly
hoody agent list -c <container-id> --token <api-token>

# Use environment variable
export HOODY_TOKEN=<api-token>
hoody agent list -c <container-id>
```

All commands targeting a container require either:
- `-c <container-id>` flag, or
- `HOODY_CONTAINER` environment variable

### How It Fits Into Hoody Philosophy

hoody-agent embodies Hoody's core principles:

- **Container-first architecture** — every agent session runs within an isolated container
- **Zero-configuration routing** — automatic domain-based access via Hoody Proxy
- **CLI-first interface** — all operations available through `hoody` CLI commands
- **Structured output** — use `-o json` for machine-readable responses
- **Permission-aware** — fine-grained tool and action permissions per session
- **Memory-persistent** — workspace-level and global memory blocks survive session restarts

---

## Core Resource Workflows

### 1. Health Checks

Verify service availability before operations.

```
# Check hoody-agent health
hoody agent health -c <container-id>
```

```
{
  "status": "healthy",
  "version": "1.0.0",
  "uptime": 3600,
  "timestamp": "2025-01-15T10:30:00Z",
  "services": {
    "database": "connected",
    "cache": "connected",
    "queue": "connected"
  }
}
```

### 2. Workspace Management

Workspaces are the top-level organizational unit representing projects.

#### List Workspaces

```
# List all workspaces
hoody workspaces list -c <container-id>

# List with JSON output
hoody workspaces list -c <container-id> -o json
```

```
[
  {
    "id": "ws_abc123def456",
    "name": "my-project",
    "icon": "📦",
    "createdAt": "2025-01-10T08:00:00Z",
    "updatedAt": "2025-01-15T10:00:00Z"
  }
]
```

#### Create Workspace

```
# Create new workspace
hoody workspaces create -c <container-id> --name "new-project" --icon "🚀"

# Create with JSON output
hoody workspaces create -c <container-id> --name "new-project" -o json
```

```
{
  "id": "ws_xyz789ghi012",
  "name": "new-project",
  "icon": "🚀",
  "createdAt": "2025-01-15T10:30:00Z",
  "updatedAt": "2025-01-15T10:30:00Z"
}
```

#### Get Workspace Details

```
# Get workspace by ID
hoody workspaces get -c <container-id> --id ws_abc123def456

# Get with JSON output
hoody workspaces get -c <container-id> --id ws_abc123def456 -o json
```

```
{
  "id": "ws_abc123def456",
  "name": "my-project",
  "icon": "📦",
  "commands": {},
  "createdAt": "2025-01-10T08:00:00Z",
  "updatedAt": "2025-01-15T10:00:00Z"
}
```

#### Update Workspace

```
# Update workspace name and icon
hoody workspaces update -c <container-id> --id ws_abc123def456 --name "renamed-project" --icon "✨"

# Update with JSON output
hoody workspaces update -c <container-id> --id ws_abc123def456 --name "renamed-project" -o json
```

```
{
  "id": "ws_abc123def456",
  "name": "renamed-project",
  "icon": "✨",
  "updatedAt": "2025-01-15T11:00:00Z"
}
```

#### Delete Workspace

```
# Delete workspace
hoody workspaces delete -c <container-id> --id ws_abc123def456

# Delete with confirmation
hoody workspaces rm -c <container-id> --id ws_abc123def456
```

#### Container Binding

Bind a container to a workspace for agent operations.

```
# Bind container to workspace
hoody workspaces bind -c <container-id> --id ws_abc123def456

# Unbind container from workspace
hoody workspaces unbind -c <container-id> --id ws_abc123def456
```

### 3. Session Management

Sessions are interactive AI conversations within a workspace.

#### List Sessions

```
# List all sessions in workspace
hoody agent list -c <container-id> --workspace-id ws_abc123def456

# List with JSON output
hoody agent list -c <container-id> --workspace-id ws_abc123def456 -o json
```

```
[
  {
    "id": "sess_001",
    "title": "Fix authentication bug",
    "status": "active",
    "createdAt": "2025-01-15T09:00:00Z",
    "updatedAt": "2025-01-15T10:30:00Z"
  }
]
```

#### Get Session Statuses

```
# Get status of all sessions
hoody agent status -c <container-id> --workspace-id ws_abc123def456

# Get with JSON output
hoody agent status -c <container-id> --workspace-id ws_abc123def456 -o json
```

```
[
  {
    "sessionID": "sess_001",
    "status": "active",
    "lastActivity": "2025-01-15T10:30:00Z"
  }
]
```

#### Create Session

```
# Create new session
hoody agent create -c <container-id> --workspace-id ws_abc123def456

# Create with JSON output
hoody agent create -c <container-id> --workspace-id ws_abc123def456 -o json
```

```
{
  "id": "sess_002",
  "title": "New session",
  "status": "idle",
  "createdAt": "2025-01-15T11:00:00Z"
}
```

#### Get Session Details

```
# Get session by ID
hoody agent get -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001

# Get with JSON output
hoody agent get -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 -o json
```

```
{
  "id": "sess_001",
  "title": "Fix authentication bug",
  "status": "active",
  "permission": [],
  "createdAt": "2025-01-15T09:00:00Z",
  "updatedAt": "2025-01-15T10:30:00Z"
}
```

#### Update Session

```
# Update session title
hoody agent update -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 --title "Updated title"

# Update with JSON output
hoody agent update -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 --title "Updated title" -o json
```

```
{
  "id": "sess_001",
  "title": "Updated title",
  "updatedAt": "2025-01-15T11:30:00Z"
}
```

#### Delete Session

```
# Delete session
hoody agent delete -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001
```

#### Get Child Sessions

```
# Get forked child sessions
hoody agent children -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001

# Get with JSON output
hoody agent children -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 -o json
```

```
[
  {
    "id": "sess_003",
    "parentID": "sess_001",
    "forkedAt": "2025-01-15T10:00:00Z"
  }
]
```

### 4. Session Messages

#### List Messages

```
# List all messages in session
hoody agent list -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001

# List with JSON output
hoody agent list -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 -o json
```

```
[
  {
    "id": "msg_001",
    "role": "user",
    "content": "Fix the login bug",
    "createdAt": "2025-01-15T09:00:00Z"
  },
  {
    "id": "msg_002",
    "role": "assistant",
    "content": "I'll help you fix the login bug...",
    "createdAt": "2025-01-15T09:01:00Z"
  }
]
```

#### Get Message

```
# Get specific message
hoody agent get -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 --message-id msg_001

# Get with JSON output
hoody agent get -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 --message-id msg_001 -o json
```

```
{
  "id": "msg_001",
  "role": "user",
  "parts": [
    {
      "type": "text",
      "text": "Fix the login bug"
    }
  ],
  "createdAt": "2025-01-15T09:00:00Z"
}
```

#### Update Message

```
# Update message (e.g., model selection for retry)
hoody agent update -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 --message-id msg_001
```

#### Delete Message Part

```
# Delete a part from a message
hoody agent delete -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 --message-id msg_001 --part-id part_001
```

### 5. Sending Prompts

#### Synchronous Prompt

```
# Send prompt and wait for response
hoody agent send-sync -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 --prompt "Explain this code"
```

```
{
  "id": "msg_003",
  "role": "assistant",
  "content": "This code implements...",
  "model": {
    "providerID": "openai",
    "modelID": "gpt-4"
  }
}
```

#### Asynchronous Prompt

```
# Send prompt asynchronously
hoody agent prompt-async -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 --prompt "Write tests for auth module"
```

```
{
  "id": "msg_004",
  "status": "queued"
}
```

#### Interactive Prompt

```
# Send prompt with streaming response
hoody agent prompt -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 --prompt "Refactor this function"
```

#### Send Command

```
# Execute a command
hoody agent run-command -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 --command "format" --arguments '{"style": "prettier"}'
```

#### Run Shell Command

```
# Execute shell command in session context
hoody agent shell -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 --command "npm test"
```

### 6. Session Operations

#### Get Session Summary

```
# Get lightweight session summary
hoody agent summary -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001

# Get with JSON output
hoody agent summary -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 -o json
```

```
{
  "title": "Fix authentication bug",
  "tokenTotal": 15000,
  "costTotal": 0.045,
  "fileChanges": 3,
  "lastMessage": "The fix has been applied..."
}
```

#### Get Session Diff

```
# Get file changes from session
hoody agent diff -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001

# Get with JSON output
hoody agent diff -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 -o json
```

```
{
  "files": [
    {
      "path": "src/auth/login.ts",
      "status": "modified",
      "additions": 15,
      "deletions": 8
    }
  ]
}
```

#### Get Session Todo

```
# Get todo list for session
hoody agent todo -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001

# Get with JSON output
hoody agent todo -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 -o json
```

```
{
  "items": [
    {
      "id": "todo_001",
      "task": "Fix login validation",
      "status": "completed"
    },
    {
      "id": "todo_002",
      "task": "Add error handling",
      "status": "in_progress"
    }
  ]
}
```

#### Abort Session

```
# Abort in-progress AI processing
hoody agent abort -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001
```

#### Fork Session

```
# Fork session at specific message
hoody agent fork -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 --message-id msg_002
```

```
{
  "id": "sess_003",
  "parentID": "sess_001",
  "forkedAtMessage": "msg_002"
}
```

#### Revert Session

```
# Revert to specific message
hoody agent revert -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 --message-id msg_002
```

#### Unrevert Session

```
# Restore reverted messages
hoody agent unrevert -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001
```

#### Initialize Session

```
# Trigger AI workspace analysis
hoody agent init -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001
```

#### Export Session

```
# Export session as Markdown
hoody agent export -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 --format markdown

# Export as JSON
hoody agent export -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 --format json
```

#### Summarize Session

```
# Generate AI summary of session
hoody agent summarize -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001
```

#### Update Session Tags

```
# Update MITM tags on session
hoody agent update-tags -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 --add-tag "reviewed" --remove-tag "pending"
```

### 7. Session Loop

#### Get Loop Status

```
# Check if loop is active
hoody agent get -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 --loop
```

#### Install Loop

```
# Install loop directive
hoody agent create -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 --loop --prompt "Continue fixing" --iters 5
```

#### Clear Loop

```
# Clear loop directive
hoody agent delete -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 --loop
```

### 8. Background Jobs

#### List Jobs

```
# List all jobs in session
hoody agent list -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 --jobs

# List active jobs only
hoody agent list -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 --jobs --status active

# List with JSON output
hoody agent list -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 --jobs -o json
```

```
[
  {
    "id": "job_001",
    "type": "rsi_review",
    "status": "completed",
    "startedAt": "2025-01-15T10:00:00Z",
    "completedAt": "2025-01-15T10:05:00Z"
  }
]
```

#### Get Job Details

```
# Get specific job
hoody agent get -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 --job-id job_001

# Get with JSON output
hoody agent get -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 --job-id job_001 -o json
```

```
{
  "id": "job_001",
  "type": "rsi_review",
  "status": "completed",
  "progress": 100,
  "output": "Review completed successfully",
  "startedAt": "2025-01-15T10:00:00Z",
  "completedAt": "2025-01-15T10:05:00Z"
}
```

#### Get Job Output

```
# Get full job output
hoody agent get -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 --job-id job_001 --output
```

#### Cancel Job

```
# Cancel running job
hoody agent stop -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 --job-id job_002
```

#### Bulk Cancel Jobs

```
# Cancel multiple jobs
hoody agent stop -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 --job-ids job_002,job_003
```

#### Retry Job

```
# Retry failed job
hoody agent retry -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 --job-id job_004
```



### 9. CLI Agent Jobs



#### Stream CLI Agent Progress

```
# Stream CLI agent progress (SSE - use SDK)
# Endpoint: GET /api/v1/workspaces/{workspaceID}/sessions/{sessionID}/cli-agent/runs/{jobID}/stream
```

### 10. RSI (Reviewer-Selected Improvement)

#### Start RSI Review

```
# Start multi-model review
hoody agent review -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001
```

```
{
  "jobID": "rsi_job_001",
  "status": "queued"
}
```

#### Stream RSI Progress

```
# Stream RSI review progress (SSE - use SDK)
# Endpoint: GET /api/v1/workspaces/{workspaceID}/sessions/{sessionID}/rsi/runs/{jobID}/stream
```

### 11. Self-Tuning

#### Start Self-Tuning

```
# Run single-iteration self-tuning
hoody agent tune -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001
```

```
{
  "jobID": "tune_job_001",
  "status": "queued"
}
```

#### Start Amplify

```
# Run best-of-N amplify (n must be odd, max 11)
hoody agent amplify -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 --n 5
```

```
{
  "jobID": "amp_job_001",
  "status": "queued"
}
```

#### Stream Self-Tuning Progress

```
# Stream self-tuning progress (SSE - use SDK)
# Endpoint: GET /api/v1/workspaces/{workspaceID}/sessions/{sessionID}/self-tuning/runs/{jobID}/stream
```

### 12. Session Permissions

#### Get Session Permissions

```
# Get merged permission ruleset
hoody agent get -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 --permissions

# Get with JSON output
hoody agent get -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 --permissions -o json
```

```
{
  "rules": [
    {
      "pattern": "file:*",
      "action": "allow"
    },
    {
      "pattern": "shell:*",
      "action": "ask"
    }
  ]
}
```

### 13. Branch Management

#### List Branches

```
# List all branches in workspace
hoody agent list -c <container-id> --workspace-id ws_abc123def456 --branches

# List with JSON output
hoody agent list -c <container-id> --workspace-id ws_abc123def456 --branches -o json
```

```
[
  {
    "id": "branch_001",
    "name": "feature/auth-fix",
    "status": "active",
    "diskUsage": "15MB",
    "createdAt": "2025-01-15T09:00:00Z"
  }
]
```

#### Create Branch

```
# Create new branch
hoody agent create -c <container-id> --workspace-id ws_abc123def456 --branches --name "feature/new-feature"
```

#### Get Branch Disk Usage

```
# Get disk usage for all branches
hoody agent disk-usage -c <container-id> --workspace-id ws_abc123def456
```

#### Get Remote Info

```
# Get remote repository info
hoody agent info -c <container-id> --workspace-id ws_abc123def456 --branch-id branch_001
```

#### List Remote Branches/Tags

```
# List remote refs
hoody agent refs -c <container-id> --workspace-id ws_abc123def456 --branch-id branch_001
```

#### Rename Branch

```
# Rename branch display name
hoody agent rename -c <container-id> --workspace-id ws_abc123def456 --branch-id branch_001 --name "renamed-branch"
```

#### Delete Branch

```
# Delete branch
hoody agent delete -c <container-id> --workspace-id ws_abc123def456 --branch-id branch_001
```

#### Reset Branch

```
# Reset branch to base
hoody agent reset -c <container-id> --workspace-id ws_abc123def456 --branch-id branch_001
```

#### Retry Branch

```
# Retry failed branch
hoody agent retry -c <container-id> --workspace-id ws_abc123def456 --branch-id branch_001
```

#### Get Branch Diff

```
# Get branch diff
hoody agent diff -c <container-id> --workspace-id ws_abc123def456 --branch-id branch_001

# Get with JSON output
hoody agent diff -c <container-id> --workspace-id ws_abc123def456 --branch-id branch_001 -o json
```

```
{
  "files": [
    {
      "path": "src/index.ts",
      "status": "modified",
      "additions": 25,
      "deletions": 10
    }
  ]
}
```

#### Merge Branch

```
# Merge branch
hoody agent merge -c <container-id> --workspace-id ws_abc123def456 --branch-id branch_001
```

#### Get Branch Status

```
# Get git status for branch
hoody agent status -c <container-id> --workspace-id ws_abc123def456 --branch-id branch_001

# Get with JSON output
hoody agent status -c <container-id> --workspace-id ws_abc123def456 --branch-id branch_001 -o json
```

```
{
  "branch": "feature/auth-fix",
  "ahead": 3,
  "behind": 0,
  "modified": 2,
  "staged": 1
}
```

#### Push Branch

```
# Push branch to remote
hoody agent push -c <container-id> --workspace-id ws_abc123def456 --branch-id branch_001
```

#### Pull from Remote

```
# Pull from remote
hoody agent pull -c <container-id> --workspace-id ws_abc123def456 --branch-id branch_001
```

#### Get Remote Tracking Status

```
# Get remote tracking status
hoody agent status -c <container-id> --workspace-id ws_abc123def456 --branch-id branch_001 --remote
```

#### Get PR/MR Status

```
# Get pull request status
hoody agent status -c <container-id> --workspace-id ws_abc123def456 --branch-id branch_001 --pr
```

#### Create Pull Request

```
# Create pull request
hoody agent create -c <container-id> --workspace-id ws_abc123def456 --branch-id branch_001 --pr --title "Fix auth bug" --description "Detailed description"
```

### 14. Orchestration - TODO Management

#### Read Master TODO

```
# Read full Master TODO state
hoody agent read -c <container-id> --workspace-id ws_abc123def456

# Read with JSON output
hoody agent read -c <container-id> --workspace-id ws_abc123def456 -o json
```

```
{
  "entries": [
    {
      "id": "entry_001",
      "task": "Implement user authentication",
      "status": "in_progress",
      "priority": 1,
      "phaseID": "phase_001"
    }
  ]
}
```

#### Read TODO Events

```
# Read Master TODO event log
hoody agent events -c <container-id> --workspace-id ws_abc123def456
```

#### Append TODO Entries

```
# Append entries to Master TODO
hoody agent append -c <container-id> --workspace-id ws_abc123def456 --task "Add unit tests" --priority 2
```

#### Read TODO Entry

```
# Read specific todo entry
hoody agent get -c <container-id> --workspace-id ws_abc123def456 --entry-id entry_001

# Get with JSON output
hoody agent get -c <container-id> --workspace-id ws_abc123def456 --entry-id entry_001 -o json
```

```
{
  "id": "entry_001",
  "task": "Implement user authentication",
  "status": "in_progress",
  "priority": 1,
  "phaseID": "phase_001",
  "spec": "Detailed specification...",
  "roundsCompleted": 2,
  "budgetRounds": 5
}
```

#### Update Entry Status

```
# Update entry status
hoody agent set-status -c <container-id> --workspace-id ws_abc123def456 --entry-id entry_001 --status completed
```

#### Set Entry Rounds

```
# Set entry budget rounds
hoody agent set-rounds -c <container-id> --workspace-id ws_abc123def456 --entry-id entry_001 --rounds 10
```

#### Update Entry Priority

```
# Update entry priority
hoody agent set-priority -c <container-id> --workspace-id ws_abc123def456 --entry-id entry_001 --priority 1
```

#### Update Entry Spec

```
# Update entry specification
hoody agent update -c <container-id> --workspace-id ws_abc123def456 --entry-id entry_001 --spec "Updated specification"
```

#### Freeze Entry Spec

```
# Freeze entry spec (prevent changes)
hoody agent freeze -c <container-id> --workspace-id ws_abc123def456 --entry-id entry_001
```

#### Delete TODO Entry

```
# Delete todo entry
hoody agent delete -c <container-id> --workspace-id ws_abc123def456 --entry-id entry_001
```

### 15. Orchestration - Executor

#### Get Executor Status

```
# Get executor status
hoody agent status -c <container-id> --workspace-id ws_abc123def456 --executor

# Get with JSON output
hoody agent status -c <container-id> --workspace-id ws_abc123def456 --executor -o json
```

```
{
  "status": "running",
  "activeWorkers": 2,
  "pendingEntries": 5,
  "completedEntries": 10
}
```

#### Start Executor

```
# Start executor dispatch loop
hoody agent start -c <container-id> --workspace-id ws_abc123def456 --executor
```

#### Pause Executor

```
# Pause executor dispatching
hoody agent pause -c <container-id> --workspace-id ws_abc123def456 --executor
```

#### Resume Executor

```
# Resume executor dispatching
hoody agent resume -c <container-id> --workspace-id ws_abc123def456 --executor
```

#### Stop All Workers

```
# Stop all workers and pause executor
hoody agent stop-all -c <container-id> --workspace-id ws_abc123def456 --executor
```

#### Force Dispatch

```
# Force executor dispatch cycle
hoody agent force-dispatch -c <container-id> --workspace-id ws_abc123def456 --executor
```

#### Reverify Entry

```
# Re-run verification for entry
hoody agent reverify -c <container-id> --workspace-id ws_abc123def456 --entry-id entry_001
```

#### List Executor Workers

```
# List executor workers
hoody agent list -c <container-id> --workspace-id ws_abc123def456 --workers

# List with JSON output
hoody agent list -c <container-id> --workspace-id ws_abc123def456 --workers -o json
```

```
[
  {
    "sessionID": "worker_sess_001",
    "entryID": "entry_001",
    "status": "running",
    "startedAt": "2025-01-15T10:00:00Z"
  }
]
```

#### Stop Worker

```
# Stop specific worker
hoody agent stop -c <container-id> --workspace-id ws_abc123def456 --session-id worker_sess_001
```

#### Get File Locks

```
# Get file locks per entry
hoody agent locks -c <container-id> --workspace-id ws_abc123def456

# Get with JSON output
hoody agent locks -c <container-id> --workspace-id ws_abc123def456 -o json
```

```
{
  "entry_001": ["src/auth.ts", "src/middleware.ts"],
  "entry_002": ["src/api/users.ts"]
}
```

### 16. Orchestration - Phases

#### List Phases

```
# List all phases
hoody agent list -c <container-id> --workspace-id ws_abc123def456 --phases

# List with JSON output
hoody agent list -c <container-id> --workspace-id ws_abc123def456 --phases -o json
```

```
[
  {
    "id": "phase_001",
    "name": "Authentication",
    "status": "in_progress",
    "roundsBudget": 10,
    "roundsCompleted": 3,
    "entryCount": 5
  }
]
```

#### Create Phase

```
# Create new phase
hoody agent create -c <container-id> --workspace-id ws_abc123def456 --phases --name "API Layer" --rounds-budget 15
```

#### Get Phase Details

```
# Get single phase
hoody agent get -c <container-id> --workspace-id ws_abc123def456 --phase-id phase_001

# Get with JSON output
hoody agent get -c <container-id> --workspace-id ws_abc123def456 --phase-id phase_001 -o json
```

```
{
  "id": "phase_001",
  "name": "Authentication",
  "status": "in_progress",
  "roundsBudget": 10,
  "roundsCompleted": 3,
  "entries": ["entry_001", "entry_002"]
}
```

#### Delete Phase

```
# Delete phase (entries are unphased, not deleted)
hoody agent delete -c <container-id> --workspace-id ws_abc123def456 --phase-id phase_001
```

#### Update Phase Status

```
# Manually update phase status
hoody agent update-status -c <container-id> --workspace-id ws_abc123def456 --phase-id phase_001 --status completed
```

#### Add Entry to Phase

```
# Add entry to phase
hoody agent add-entry -c <container-id> --workspace-id ws_abc123def456 --phase-id phase_001 --entry-id entry_003
```

#### Update Phase Rounds

```
# Update phase rounds budget
hoody agent update-rounds -c <container-id> --workspace-id ws_abc123def456 --phase-id phase_001 --rounds 20
```

#### Verify Phase

```
# Manually trigger phase verification
hoody agent verify -c <container-id> --workspace-id ws_abc123def456 --phase-id phase_001
```

#### Get Phase Summary

```
# Get phase summary
hoody agent summary -c <container-id> --workspace-id ws_abc123def456 --phase-id phase_001

# Get with JSON output
hoody agent summary -c <container-id> --workspace-id ws_abc123def456 --phase-id phase_001 -o json
```

```
{
  "phaseID": "phase_001",
  "name": "Authentication",
  "totalEntries": 5,
  "completedEntries": 3,
  "totalRounds": 10,
  "completedRounds": 3
}
```

#### Review Phase

```
# Manually trigger phase review
hoody agent review -c <container-id> --workspace-id ws_abc123def456 --phase-id phase_001
```

#### Phase Memory

```
# Get phase memory
hoody agent get -c <container-id> --workspace-id ws_abc123def456 --phase-id phase_001 --memory

# Attach memory to phase
hoody agent add -c <container-id> --workspace-id ws_abc123def456 --phase-id phase_001 --memory "Important decision: using JWT"

# List phase memory entries
hoody agent list -c <container-id> --workspace-id ws_abc123def456 --phase-id phase_001 --memory

# Clear phase memory
hoody agent clear -c <container-id> --workspace-id ws_abc123def456 --phase-id phase_001 --memory

# Get memory for all phases
hoody agent list-all -c <container-id> --workspace-id ws_abc123def456 --phases-memory
```

### 17. Orchestration - Budget

#### Get Budget Status

```
# Get global budget status
hoody agent status -c <container-id> --workspace-id ws_abc123def456 --budget

# Get with JSON output
hoody agent status -c <container-id> --workspace-id ws_abc123def456 --budget -o json
```

```
{
  "maxSpend": 100.00,
  "currentSpend": 45.50,
  "remaining": 54.50,
  "entries": [
    {
      "entryID": "entry_001",
      "budget": 20.00,
      "spent": 12.50,
      "locked": false
    }
  ]
}
```

#### Update Global Budget

```
# Update global budget (max project spend)
hoody agent update -c <container-id> --workspace-id ws_abc123def456 --budget --max-spend 200.00
```

#### Edit Entry Budget

```
# Edit entry budget
hoody agent edit -c <container-id> --workspace-id ws_abc123def456 --entry-id entry_001 --budget 50.00
```

#### Lock Entry Budget

```
# Toggle budget_human_locked on entry
hoody agent lock -c <container-id> --workspace-id ws_abc123def456 --entry-id entry_001
```

### 18. Orchestration - Questions

#### List Pending Questions

```
# List all pending questions
hoody agent list -c <container-id> --workspace-id ws_abc123def456 --questions

# List with JSON output
hoody agent list -c <container-id> --workspace-id ws_abc123def456 --questions -o json
```

```
[
  {
    "id": "q_001",
    "sessionID": "sess_001",
    "question": "Should I use JWT or session tokens?",
    "status": "pending",
    "createdAt": "2025-01-15T10:00:00Z"
  }
]
```

#### Get Question Details

```
# Get question detail
hoody agent get -c <container-id> --workspace-id ws_abc123def456 --question-id q_001

# Get with JSON output
hoody agent get -c <container-id> --workspace-id ws_abc123def456 --question-id q_001 -o json
```

```
{
  "id": "q_001",
  "sessionID": "sess_001",
  "question": "Should I use JWT or session tokens?",
  "context": "The authentication module needs a token strategy...",
  "status": "pending"
}
```

#### Answer Question

```
# Answer a pending question
hoody agent answer -c <container-id> --workspace-id ws_abc123def456 --question-id q_001 --answer "Use JWT with refresh tokens"
```

### 19. Orchestration - Orchestrator Sessions

#### Get Orchestrator Session

```
# Get orchestrator session info
hoody agent get-session -c <container-id> --workspace-id ws_abc123def456

# Get with JSON output
hoody agent get-session -c <container-id> --workspace-id ws_abc123def456 -o json
```

```
{
  "sessionID": "orch_sess_001",
  "status": "active",
  "currentPhase": "phase_001"
}
```

#### Create/Resume Orchestrator Session

```
# Create or resume orchestrator session
hoody agent create-session -c <container-id> --workspace-id ws_abc123def456
```

#### Send Prompt to Orchestrator

```
# Send prompt to orchestrator
hoody agent prompt -c <container-id> --workspace-id ws_abc123def456 --prompt "Continue with phase 2"
```

#### List All Orchestrator Sessions

```
# Get all orchestrator sessions
hoody agent list-sessions -c <container-id> --workspace-id ws_abc123def456

# Get with JSON output
hoody agent list-sessions -c <container-id> --workspace-id ws_abc123def456 -o json
```

```
[
  {
    "sessionID": "orch_sess_001",
    "type": "planning",
    "status": "active"
  },
  {
    "sessionID": "orch_sess_002",
    "type": "phase",
    "phaseID": "phase_001",
    "status": "active"
  }
]
```

#### Get Phase Orchestrator Session

```
# Get phase orchestrator session
hoody agent phase-session -c <container-id> --workspace-id ws_abc123def456 --phase-id phase_001
```

#### Send Prompt to Phase Orchestrator

```
# Send prompt to phase orchestrator
hoody agent prompt-phase -c <container-id> --workspace-id ws_abc123def456 --phase-id phase_001 --prompt "Focus on error handling"
```

### 20. Orchestration - Config

#### Get Orchestration Config

```
# Get orchestration config
hoody agent get -c <container-id> --workspace-id ws_abc123def456 --orchestration-config

# Get with JSON output
hoody agent get -c <container-id> --workspace-id ws_abc123def456 --orchestration-config -o json
```

```
{
  "maxConcurrentWorkers": 3,
  "defaultRoundsBudget": 10,
  "verificationEnabled": true,
  "reviewEnabled": true
}
```

#### Update Orchestration Config

```
# Patch orchestration config
hoody agent update -c <container-id> --workspace-id ws_abc123def456 --orchestration-config --max-concurrent-workers 5
```

### 21. Orchestration - Tool Call Log

#### Read Tool Call Log

```
# Read tool call log
hoody agent get -c <container-id> --workspace-id ws_abc123def456 --tool-log

# Read with JSON output
hoody agent get -c <container-id> --workspace-id ws_abc123def456 --tool-log -o json
```

```
{
  "entries": [
    {
      "id": "log_001",
      "tool": "file_write",
      "sessionID": "sess_001",
      "timestamp": "2025-01-15T10:00:00Z",
      "duration": 150
    }
  ]
}
```

#### Stream Tool Call Log

```
# Stream tool call log (SSE - use SDK)
# Endpoint: GET /api/v1/workspaces/{workspaceID}/orchestration/log/stream
```

### 22. Orchestration - Import

#### Start Repo Import

```
# Start a repo import
hoody agent start -c <container-id> --workspace-id ws_abc123def456 --import --repo "https://github.com/user/repo"
```

```
{
  "jobID": "import_job_001",
  "status": "queued"
}
```

#### Get Import Status

```
# Get import job status
hoody agent status -c <container-id> --workspace-id ws_abc123def456 --import-job-id import_job_001

# Get with JSON output
hoody agent status -c <container-id> --workspace-id ws_abc123def456 --import-job-id import_job_001 -o json
```

```
{
  "jobID": "import_job_001",
  "status": "completed",
  "progress": 100,
  "entriesImported": 15
}
```

### 23. Orchestration - Vault

#### Discover Vault TODOs

```
# Discover Master TODOs in Vault
hoody agent discover -c <container-id> --workspace-id ws_abc123def456 --vault

# Discover with JSON output
hoody agent discover -c <container-id> --workspace-id ws_abc123def456 --vault -o json
```

```
[
  {
    "id": "vault_todo_001",
    "name": "Project Alpha TODO",
    "entryCount": 25,
    "lastModified": "2025-01-14T15:00:00Z"
  }
]
```

#### Import from Vault

```
# Import TODO from Vault
hoody agent import -c <container-id> --workspace-id ws_abc123def456 --vault-todo-id vault_todo_001
```

#### Sync to Vault

```
# Sync local Master TODO to Vault
hoody agent sync -c <container-id> --workspace-id ws_abc123def456 --vault
```

### 24. Orchestration - Events

#### Stream Orchestration Events

```
# Stream orchestration events (SSE - use SDK)
# Endpoint: GET /api/v1/workspaces/{workspaceID}/orchestration/events
```

#### Get SSE Connection Count

```
# Get SSE connection count
hoody agent connections -c <container-id> --workspace-id ws_abc123def456
```

### 25. Orchestration - Debug

#### Purge Orchestration Data

```
# Purge all orchestration data
hoody agent purge -c <container-id> --workspace-id ws_abc123def456
```

#### Export Debug Dump

```
# Export full orchestration debug dump
hoody agent debug-dump -c <container-id> --workspace-id ws_abc123def456
```

### 26. File Operations

#### Search Text

```
# Search for text patterns in files
hoody agent search -c <container-id> --workspace-id ws_abc123def456 --pattern "function authenticate"

# Search with JSON output
hoody agent search -c <container-id> --workspace-id ws_abc123def456 --pattern "function authenticate" -o json
```

```
{
  "matches": [
    {
      "file": "src/auth.ts",
      "line": 15,
      "column": 10,
      "text": "export function authenticate(req: Request) {"
    }
  ]
}
```

#### Find Files

```
# Find files by name/pattern
hoody agent find -c <container-id> --workspace-id ws_abc123def456 --pattern "*.test.ts"

# Find with JSON output
hoody agent find -c <container-id> --workspace-id ws_abc123def456 --pattern "*.test.ts" -o json
```

```
{
  "files": [
    "src/auth.test.ts",
    "src/api/users.test.ts"
  ]
}
```

#### Find Symbols

```
# Find symbols (functions, classes, variables)
hoody agent find-symbols -c <container-id> --workspace-id ws_abc123def456 --query "authenticate"

# Find with JSON output
hoody agent find-symbols -c <container-id> --workspace-id ws_abc123def456 --query "authenticate" -o json
```

```
{
  "symbols": [
    {
      "name": "authenticate",
      "kind": "function",
      "file": "src/auth.ts",
      "line": 15,
      "containerName": "AuthModule"
    }
  ]
}
```

#### List Files

```
# List files in directory
hoody agent list -c <container-id> --workspace-id ws_abc123def456 --path "src/"

# List with JSON output
hoody agent list -c <container-id> --workspace-id ws_abc123def456 --path "src/" -o json
```

```
{
  "entries": [
    {
      "name": "auth.ts",
      "type": "file",
      "size": 2048
    },
    {
      "name": "api",
      "type": "directory"
    }
  ]
}
```

#### Read File

```
# Read file content
hoody agent read -c <container-id> --workspace-id ws_abc123def456 --path "src/auth.ts"

# Read with JSON output
hoody agent read -c <container-id> --workspace-id ws_abc123def456 --path "src/auth.ts" -o json
```

```
{
  "path": "src/auth.ts",
  "content": "export function authenticate(req: Request) {\n  // implementation\n}",
  "size": 2048,
  "modified": "2025-01-15T10:00:00Z"
}
```

#### Get File Status

```
# Get git status of all files
hoody agent status -c <container-id> --workspace-id ws_abc123def456 --files

# Get with JSON output
hoody agent status -c <container-id> --workspace-id ws_abc123def456 --files -o json
```

```
{
  "modified": ["src/auth.ts"],
  "added": ["src/new-feature.ts"],
  "deleted": [],
  "untracked": ["temp.log"]
}
```

### 27. Configuration

#### Get Configuration

```
# Get current configuration
hoody agent get -c <container-id> --workspace-id ws_abc123def456 --config

# Get with JSON output
hoody agent get -c <container-id> --workspace-id ws_abc123def456 --config -o json
```

```
{
  "providers": {
    "openai": {
      "defaultModel": "gpt-4"
    }
  },
  "permission": {
    "rules": []
  },
  "rsi": {
    "enabled": true
  },
  "self_tuning": {
    "enabled": true
  }
}
```

#### Update Configuration

```
# Update configuration
hoody agent update -c <container-id> --workspace-id ws_abc123def456 --config --rsi-enabled false
```

#### Get Tool Overrides

```
# Get workspace tool overrides
hoody agent tool-overrides -c <container-id> --workspace-id ws_abc123def456

# Get with JSON output
hoody agent tool-overrides -c <container-id> --workspace-id ws_abc123def456 -o json
```

```
{
  "overrides": {
    "file_write": {
      "enabled": true,
      "maxFileSize": 1048576
    }
  }
}
```

#### Get Permission Overrides

```
# Get workspace permission overrides
hoody agent overrides -c <container-id> --workspace-id ws_abc123def456

# Get with JSON output
hoody agent overrides -c <container-id> --workspace-id ws_abc123def456 -o json
```

```
{
  "rules": [
    {
      "pattern": "shell:*",
      "action": "allow"
    }
  ]
}
```

#### List Config Providers

```
# List config providers
hoody agent list-configs -c <container-id> --workspace-id ws_abc123def456

# List with JSON output
hoody agent list-configs -c <container-id> --workspace-id ws_abc123def456 -o json
```

```
[
  {
    "providerID": "openai",
    "defaultModel": "gpt-4",
    "models": ["gpt-4", "gpt-3.5-turbo"]
  }
]
```

### 28. Permissions

#### List Pending Permissions

```
# List all pending permission requests
hoody agent list -c <container-id> --workspace-id ws_abc123def456 --permissions

# List with JSON output
hoody agent list -c <container-id> --workspace-id ws_abc123def456 --permissions -o json
```

```
[
  {
    "id": "perm_001",
    "sessionID": "sess_001",
    "tool": "file_write",
    "path": "src/auth.ts",
    "status": "pending",
    "createdAt": "2025-01-15T10:00:00Z"
  }
]
```

#### Reply to Permission Request

```
# Approve permission request
hoody agent reply -c <container-id> --workspace-id ws_abc123def456 --request-id perm_001 --action approve

# Deny permission request
hoody agent reply -c <container-id> --workspace-id ws_abc123def456 --request-id perm_001 --action deny --reason "Not authorized"
```

### 29. Providers

#### List Providers

```
# List all providers
hoody agent list -c <container-id> --workspace-id ws_abc123def456 --providers

# List with JSON output
hoody agent list -c <container-id> --workspace-id ws_abc123def456 --providers -o json
```

```
[
  {
    "id": "openai",
    "name": "OpenAI",
    "status": "connected",
    "models": ["gpt-4", "gpt-3.5-turbo"]
  },
  {
    "id": "anthropic",
    "name": "Anthropic",
    "status": "available",
    "models": ["claude-3-opus", "claude-3-sonnet"]
  }
]
```

#### Get Provider Auth Methods

```
# Get provider authentication methods
hoody agent auth-methods -c <container-id> --workspace-id ws_abc123def456

# Get with JSON output
hoody agent auth-methods -c <container-id> --workspace-id ws_abc123def456 -o json
```

```
{
  "openai": {
    "methods": ["api_key", "oauth"],
    "connected": true
  },
  "anthropic": {
    "methods": ["api_key"],
    "connected": false
  }
}
```

#### OAuth Authorization

```
# Initiate OAuth authorization
hoody agent authorize -c <container-id> --workspace-id ws_abc123def456 --provider-id openai
```

```
{
  "authorizationURL": "https://auth.openai.com/authorize?...",
  "state": "random_state_string"
}
```

#### OAuth Callback

```
# Handle OAuth callback
hoody agent callback -c <container-id> --workspace-id ws_abc123def456 --provider-id openai --code "auth_code_from_callback"
```

### 30. Memory - Blocks

#### List Memory Blocks

```
# List all memory blocks
hoody agent list -c <container-id> --workspace-id ws_abc123def456 --memory-blocks

# List with scope filter
hoody agent list -c <container-id> --workspace-id ws_abc123def456 --memory-blocks --scope workspace

# List with JSON output
hoody agent list -c <container-id> --workspace-id ws_abc123def456 --memory-blocks -o json
```

```
[
  {
    "label": "project_context",
    "scope": "workspace",
    "content": "This project is a REST API for...",
    "updatedAt": "2025-01-15T10:00:00Z"
  }
]
```

#### Get Memory Block

```
# Get specific memory block
hoody agent get -c <container-id> --workspace-id ws_abc123def456 --memory-block project_context

# Get with JSON output
hoody agent get -c <container-id> --workspace-id ws_abc123def456 --memory-block project_context -o json
```

```
{
  "label": "project_context",
  "scope": "workspace",
  "content": "This project is a REST API for user management...",
  "createdAt": "2025-01-10T08:00:00Z",
  "updatedAt": "2025-01-15T10:00:00Z"
}
```

#### Set Memory Block

```
# Create or overwrite memory block
hoody agent set -c <container-id> --workspace-id ws_abc123def456 --memory-block coding_style --content "Use TypeScript strict mode, prefer functional patterns"
```

#### Replace in Memory Block

```
# Replace substring in memory block
hoody agent replace -c <container-id> --workspace-id ws_abc123def456 --memory-block coding_style --old "strict mode" --new "strict mode with noImplicitAny"
```

#### Delete Memory Block

```
# Delete memory block
hoody agent delete -c <container-id> --workspace-id ws_abc123def456 --memory-block coding_style --scope workspace
```

### 31. Memory - Journal

#### List Journal Entries

```
# List journal entries
hoody agent list -c <container-id> --workspace-id ws_abc123def456 --journal

# List with JSON output
hoody agent list -c <container-id> --workspace-id ws_abc123def456 --journal -o json
```

```
[
  {
    "id": "journal_001",
    "content": "Decided to use JWT for authentication",
    "tags": ["decision", "auth"],
    "createdAt": "2025-01-15T10:00:00Z"
  }
]
```

#### Create Journal Entry

```
# Write journal entry
hoody agent create -c <container-id> --workspace-id ws_abc123def456 --journal --content "Implemented rate limiting" --tags "feature,security"
```

#### Count Journal Entries

```
# Count journal entries
hoody agent count -c <container-id> --workspace-id ws_abc123def456 --journal

# Count with JSON output
hoody agent count -c <container-id> --workspace-id ws_abc123def456 --journal -o json
```

```
{
  "count": 42
}
```

#### Get Journal Entry

```
# Get specific journal entry
hoody agent get -c <container-id> --workspace-id ws_abc123def456 --journal-id journal_001

# Get with JSON output
hoody agent get -c <container-id> --workspace-id ws_abc123def456 --journal-id journal_001 -o json
```

```
{
  "id": "journal_001",
  "content": "Decided to use JWT for authentication",
  "tags": ["decision", "auth"],
  "createdAt": "2025-01-15T10:00:00Z"
}
```

#### Delete Journal Entry

```
# Delete journal entry
hoody agent delete -c <container-id> --workspace-id ws_abc123def456 --journal-id journal_001
```

#### Search Journal Entries

```
# Search journal entries
hoody agent search -c <container-id> --workspace-id ws_abc123def456 --journal --query "authentication" --tags "decision"

# Search with JSON output
hoody agent search -c <container-id> --workspace-id ws_abc123def456 --journal --query "authentication" -o json
```

```
{
  "results": [
    {
      "id": "journal_001",
      "content": "Decided to use JWT for authentication",
      "tags": ["decision", "auth"],
      "score": 0.95
    }
  ]
}
```

### 32. Memory - History

#### List History Events

```
# List memory change history
hoody agent list -c <container-id> --workspace-id ws_abc123def456 --history

# List with JSON output
hoody agent list -c <container-id> --workspace-id ws_abc123def456 --history -o json
```

```
[
  {
    "id": "hist_001",
    "type": "block_updated",
    "label": "project_context",
    "timestamp": "2025-01-15T10:00:00Z"
  }
]
```

#### Get History Event

```
# Get specific history event
hoody agent get -c <container-id> --workspace-id ws_abc123def456 --history-id hist_001

# Get with JSON output
hoody agent get -c <container-id> --workspace-id ws_abc123def456 --history-id hist_001 -o json
```

```
{
  "id": "hist_001",
  "type": "block_updated",
  "label": "project_context",
  "oldContent": "Old content...",
  "newContent": "New content...",
  "timestamp": "2025-01-15T10:00:00Z"
}
```

#### Get Memory Config

```
# Get memory system configuration
hoody agent config -c <container-id> --workspace-id ws_abc123def456 --memory

# Get with JSON output
hoody agent config -c <container-id> --workspace-id ws_abc123def456 --memory -o json
```

```
{
  "maxBlocks": 100,
  "maxBlockSize": 10240,
  "journalRetentionDays": 90
}
```

### 33. MCP (Model Context Protocol)

#### Get MCP Status

```
# Get status of all MCP servers
hoody agent status -c <container-id> --workspace-id ws_abc123def456 --mcp

# Get with JSON output
hoody agent status -c <container-id> --workspace-id ws_abc123def456 --mcp -o json
```

```
[
  {
    "name": "filesystem",
    "status": "connected",
    "tools": 5,
    "resources": 10
  }
]
```

#### Add MCP Server

```
# Add new MCP server
hoody agent add -c <container-id> --workspace-id ws_abc123def456 --mcp --name "custom-server" --url "http://localhost:3000"
```

#### Start MCP OAuth

```
# Start OAuth flow for MCP server
hoody agent start -c <container-id> --workspace-id ws_abc123def456 --mcp-auth --name "custom-server"
```

#### Remove MCP OAuth

```
# Remove OAuth credentials for MCP server
hoody agent remove -c <container-id> --workspace-id ws_abc123def456 --mcp-auth --name "custom-server"
```

#### Complete MCP OAuth

```
# Complete OAuth callback for MCP server
hoody agent complete -c <container-id> --workspace-id ws_abc123def456 --mcp-auth --name "custom-server" --code "auth_code"
```

#### Authenticate MCP OAuth

```
# Start OAuth flow and wait for callback
hoody agent authenticate -c <container-id> --workspace-id ws_abc123def456 --mcp-auth --name "custom-server"
```

#### Connect MCP Server

```
# Connect an MCP server
hoody agent connect -c <container-id> --workspace-id ws_abc123def456 --mcp --name "custom-server"
```

#### Disconnect MCP Server

```
# Disconnect an MCP server
hoody agent disconnect -c <container-id> --workspace-id ws_abc123def456 --mcp --name "custom-server"
```

### 34. Skills

#### Browse Marketplace

```
# Browse skills marketplace
hoody agent marketplace -c <container-id> --workspace-id ws_abc123def456

# Browse with JSON output
hoody agent marketplace -c <container-id> --workspace-id ws_abc123def456 -o json
```

```
[
  {
    "name": "code-review",
    "description": "Automated code review skill",
    "author": "hoody",
    "downloads": 1500
  }
]
```

#### Get Skill

```
# Get skill by name
hoody agent get -c <container-id> --workspace-id ws_abc123def456 --skill code-review

# Get with JSON output
hoody agent get -c <container-id> --workspace-id ws_abc123def456 --skill code-review -o json
```

```
{
  "name": "code-review",
  "description": "Automated code review skill",
  "content": "# Code Review Skill\n\nThis skill provides...",
  "scope": "workspace"
}
```

#### Create/Update Skill

```
# Create or update skill
hoody agent upsert -c <container-id> --workspace-id ws_abc123def456 --skill my-skill --description "Custom skill" --content "# My Skill\n\nCustom implementation..."
```

#### Partially Update Skill

```
# Update specific fields of skill
hoody agent update -c <container-id> --workspace-id ws_abc123def456 --skill my-skill --description "Updated description"
```

#### Delete Skill

```
# Delete skill
hoody agent delete -c <container-id> --workspace-id ws_abc123def456 --skill my-skill
```

#### Toggle Built-in Skill

```
# Enable/disable built-in skill
hoody agent toggle-builtin -c <container-id> --workspace-id ws_abc123def456 --skill code-review --enabled true
```

#### Discover Agent Skills

```
# Discover available agent skills
hoody agent discover -c <container-id> --workspace-id ws_abc123def456 --skills

# Discover with JSON output
hoody agent discover -c <container-id> --workspace-id ws_abc123def456 --skills -o json
```

```
[
  {
    "name": "code-review",
    "type": "builtin",
    "enabled": true
  },
  {
    "name": "my-skill",
    "type": "custom",
    "enabled": true
  }
]
```

#### List Exec Skills

```
# List exec skills (ground truth scripts)
hoody agent list -c <container-id> --exec-skills

# List with JSON output
hoody agent list -c <container-id> --exec-skills -o json
```

```
[
  {
    "name": "format_code",
    "description": "Format code using prettier",
    "path": "/scripts/format.sh"
  }
]
```

### 35. Tools

#### List All Tools

```
# List all available tools
hoody agent list -c <container-id> --workspace-id ws_abc123def456 --tools

# List with JSON output
hoody agent list -c <container-id> --workspace-id ws_abc123def456 --tools -o json
```

```
[
  {
    "name": "file_read",
    "source": "builtin",
    "enabled": true
  },
  {
    "name": "file_write",
    "source": "builtin",
    "enabled": true
  },
  {
    "name": "custom_tool",
    "source": "mcp:custom-server",
    "enabled": true
  }
]
```

### 36. Project

#### Get Current Project

```
# Get current project
hoody agent current -c <container-id> --workspace-id ws_abc123def456

# Get with JSON output
hoody agent current -c <container-id> --workspace-id ws_abc123def456 -o json
```

```
{
  "id": "proj_001",
  "name": "my-project",
  "icon": "📦",
  "commands": {}
}
```

#### Update Project

```
# Update project properties
hoody agent update -c <container-id> --workspace-id ws_abc123def456 --project-id proj_001 --name "renamed-project" --icon "✨"
```

### 37. Questions (Workspace-Level)

#### List Pending Questions

```
# List all pending questions across sessions
hoody agent list -c <container-id> --workspace-id ws_abc123def456 --questions

# List with JSON output
hoody agent list -c <container-id> --workspace-id ws_abc123def456 --questions -o json
```

```
[
  {
    "id": "q_001",
    "sessionID": "sess_001",
    "question": "Should I use JWT or session tokens?",
    "status": "pending"
  }
]
```

#### Reply to Question

```
# Reply to question request
hoody agent reply -c <container-id> --workspace-id ws_abc123def456 --request-id q_001 --answer "Use JWT"
```

#### Reject Question

```
# Reject question request
hoody agent reject -c <container-id> --workspace-id ws_abc123def456 --request-id q_001 --reason "Out of scope"
```

#### Consult AI About Question

```
# Ask separate AI model for advice
hoody agent consult -c <container-id> --workspace-id ws_abc123def456 --request-id q_001
```

### 38. Web Search

#### Get Web Search Status

```
# Get web search configuration status
hoody agent status -c <container-id> --workspace-id ws_abc123def456 --web-search

# Get with JSON output
hoody agent status -c <container-id> --workspace-id ws_abc123def456 --web-search -o json
```

```
{
  "enabled": true,
  "provider": "serpapi",
  "authenticated": true
}
```

### 39. Image Generation

#### Get Image Gen Status

```
# Get image generation configuration status
hoody agent status -c <container-id> --workspace-id ws_abc123def456 --image-gen

# Get with JSON output
hoody agent status -c <container-id> --workspace-id ws_abc123def456 --image-gen -o json
```

```
{
  "enabled": true,
  "provider": "dall-e",
  "authenticated": true
}
```

### 40. Experimental

#### List Tool IDs

```
# List all tool IDs
hoody agent tool-ids -c <container-id> --workspace-id ws_abc123def456

# List with JSON output
hoody agent tool-ids -c <container-id> --workspace-id ws_abc123def456 -o json
```

```
[
  "file_read",
  "file_write",
  "shell_exec",
  "web_search"
]
```

#### List Tool Schemas

```
# List tools with JSON schema parameters
hoody agent tool-schemas -c <container-id> --workspace-id ws_abc123def456 --provider openai --model gpt-4

# List with JSON output
hoody agent tool-schemas -c <container-id> --workspace-id ws_abc123def456 --provider openai --model gpt-4 -o json
```

```
[
  {
    "name": "file_read",
    "description": "Read file content",
    "parameters": {
      "type": "object",
      "properties": {
        "path": {
          "type": "string",
          "description": "File path"
        }
      },
      "required": ["path"]
    }
  }
]
```

#### Get MCP Resources

```
# Get all MCP resources
hoody agent mcp-resources -c <container-id> --workspace-id ws_abc123def456

# Get with JSON output
hoody agent mcp-resources -c <container-id> --workspace-id ws_abc123def456 -o json
```

```
[
  {
    "name": "file:///home/user/project",
    "server": "filesystem",
    "type": "resource"
  }
]
```

### 41. Meta

#### List Agents

```
# List all available AI agents
hoody agent agents -c <container-id> --workspace-id ws_abc123def456

# List with JSON output
hoody agent agents -c <container-id> --workspace-id ws_abc123def456 -o json
```

```
[
  {
    "id": "agent_001",
    "name": "coding-assistant",
    "description": "General purpose coding assistant"
  }
]
```

#### List Skills (Meta)

```
# List all available skills
hoody agent skills -c <container-id> --workspace-id ws_abc123def456

# List with JSON output
hoody agent skills -c <container-id> --workspace-id ws_abc123def456 -o json
```

```
[
  {
    "name": "code-review",
    "type": "builtin",
    "enabled": true
  }
]
```

#### Get Paths

```
# Get current working directory and path info
hoody agent paths -c <container-id> --workspace-id ws_abc123def456

# Get with JSON output
hoody agent paths -c <container-id> --workspace-id ws_abc123def456 -o json
```

```
{
  "workingDirectory": "/home/user/project",
  "projectRoot": "/home/user/project"
}
```

#### Get VCS Info

```
# Get version control system info
hoody agent vcs -c <container-id> --workspace-id ws_abc123def456

# Get with JSON output
hoody agent vcs -c <container-id> --workspace-id ws_abc123def456 -o json
```

```
{
  "type": "git",
  "branch": "main",
  "remote": "origin",
  "lastCommit": "abc123"
}
```

#### List Commands

```
# List all available commands
hoody agent commands -c <container-id> --workspace-id ws_abc123def456

# List with JSON output
hoody agent commands -c <container-id> --workspace-id ws_abc123def456 -o json
```

```
[
  {
    "name": "format",
    "description": "Format code"
  },
  {
    "name": "test",
    "description": "Run tests"
  }
]
```

#### Get LSP Status

```
# Get LSP server status
hoody agent lsp-status -c <container-id> --workspace-id ws_abc123def456

# Get with JSON output
hoody agent lsp-status -c <container-id> --workspace-id ws_abc123def456 -o json
```

```
{
  "status": "running",
  "server": "typescript-language-server",
  "version": "4.0.0"
}
```

#### Get Formatter Status

```
# Get formatter status
hoody agent formatter-status -c <container-id> --workspace-id ws_abc123def456

# Get with JSON output
hoody agent formatter-status -c <container-id> --workspace-id ws_abc123def456 -o json
```

```
{
  "status": "available",
  "formatter": "prettier",
  "version": "3.0.0"
}
```

#### Subscribe to Events

```
# Subscribe to workspace events (SSE - use SDK)
# Endpoint: GET /api/v1/workspaces/{workspaceID}/meta/events
```

#### Dispose Instance

```
# Clean up and dispose workspace instance
hoody agent dispose -c <container-id> --workspace-id ws_abc123def456
```

### 42. MITM (Man-in-the-Middle)

#### Get MITM Snapshot

```
# Get composed view of MITM config
hoody agent get -c <container-id> --workspace-id ws_abc123def456 --mitm-snapshot

# Get with JSON output
hoody agent get -c <container-id> --workspace-id ws_abc123def456 --mitm-snapshot -o json
```

```
{
  "baseConfig": {},
  "overlay": {},
  "transientEnables": {},
  "effectiveState": {}
}
```

#### List MITM Rules

```
# List effective MITM rules
hoody agent list -c <container-id> --workspace-id ws_abc123def456 --mitm-rules

# List with JSON output
hoody agent list -c <container-id> --workspace-id ws_abc123def456 --mitm-rules -o json
```

```
[
  {
    "id": "rule_001",
    "name": "Log all file writes",
    "event": "tool_call",
    "toolName": "file_write",
    "enabled": true,
    "source": "overlay"
  }
]
```

#### Create MITM Rule

```
# Add new MITM rule
hoody agent create -c <container-id> --workspace-id ws_abc123def456 --mitm-rule --name "Log shell commands" --event "tool_call" --tool-name "shell_exec"
```

#### Update MITM Rule

```
# Replace MITM rule
hoody agent update -c <container-id> --workspace-id ws_abc123def456 --mitm-rule-id rule_001 --name "Updated rule name"

# Patch MITM rule
hoody agent update -c <container-id> --workspace-id ws_abc123def456 --mitm-rule-id rule_001 --enabled false
```

#### Delete MITM Rule

```
# Delete MITM rule
hoody agent delete -c <container-id> --workspace-id ws_abc123def456 --mitm-rule-id rule_001
```



#### Get MITM Logs

```
# Get MITM logs
hoody agent get -c <container-id> --workspace-id ws_abc123def456 --mitm-logs

# Get with JSON output
hoody agent get -c <container-id> --workspace-id ws_abc123def456 --mitm-logs -o json
```

```
[
  {
    "id": "log_001",
    "ruleID": "rule_001",
    "event": "tool_call",
    "toolName": "file_write",
    "timestamp": "2025-01-15T10:00:00Z"
  }
]
```

#### Get Specific MITM Log

```
# Get specific MITM log entry
hoody agent get -c <container-id> --workspace-id ws_abc123def456 --mitm-log-id log_001
```



#### MITM Overlay

```
# Reset MITM overlay
hoody agent reset -c <container-id> --workspace-id ws_abc123def456 --mitm-overlay
```

#### Verify Webhook

```
# Verify webhook URL and auth
hoody agent verify -c <container-id> --workspace-id ws_abc123def456 --mitm-webhook --url "https://example.com/webhook"
```

#### MITM Events

```
# Subscribe to MITM events (SSE - use SDK)
# Endpoint: GET /api/v1/workspaces/{workspaceID}/mitm/events
```

#### Get Validation Rules

```
# Get MITM validation rules
hoody agent get -c <container-id> --workspace-id ws_abc123def456 --mitm-validation-rules

# Get with JSON output
hoody agent get -c <container-id> --workspace-id ws_abc123def456 --mitm-validation-rules -o json
```

```
[
  {
    "type": "event_required",
    "message": "Event field is required"
  }
]
```

#### Get Plugin Descriptors

```
# Get MITM plugin descriptors
hoody agent get -c <container-id> --workspace-id ws_abc123def456 --mitm-plugins

# Get with JSON output
hoody agent get -c <container-id> --workspace-id ws_abc123def456 --mitm-plugins -o json
```

```
[
  {
    "id": "plugin_001",
    "source": "builtin",
    "hooks": ["before_tool_call"],
    "tools": []
  }
]
```

#### MITM Tags

```
# List MITM tags
hoody agent list -c <container-id> --workspace-id ws_abc123def456 --mitm-tags

# Create MITM tag
hoody agent create -c <container-id> --workspace-id ws_abc123def456 --mitm-tag --name "reviewed"

# Delete MITM tag
hoody agent delete -c <container-id> --workspace-id ws_abc123def456 --mitm-tag-id tag_001

# Update session tags
hoody agent update-tags -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 --add-tag "reviewed"
```

#### MITM Cooldowns

```
# Get MITM cooldowns
hoody agent get -c <container-id> --workspace-id ws_abc123def456 --mitm-cooldowns

# Get with JSON output
hoody agent get -c <container-id> --workspace-id ws_abc123def456 --mitm-cooldowns -o json
```

```
{
  "rule_001": {
    "cooldownUntil": "2025-01-15T10:05:00Z",
    "remaining": 300
  }
}
```

---

## Advanced Operations

### 1. Full Session Lifecycle

Complete workflow from session creation to export.

```
# Step 1: Create workspace (if needed)
hoody workspaces create -c <container-id> --name "my-project" -o json

# Step 2: Create session
hoody agent create -c <container-id> --workspace-id ws_abc123def456 -o json

# Step 3: Send initial prompt
hoody agent prompt -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 --prompt "Analyze this codebase and create an AGENTS.md file"

# Step 4: Initialize workspace analysis
hoody agent init -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001

# Step 5: Send follow-up prompt
hoody agent prompt -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 --prompt "Now implement the authentication module"

# Step 6: Check session summary
hoody agent summary -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 -o json

# Step 7: Review file changes
hoody agent diff -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 -o json

# Step 8: Export session
hoody agent export -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 --format markdown
```

### 2. Multi-Phase Orchestration

Complex workflow with phases, budgets, and verification.

```
# Step 1: Create orchestration config
hoody agent update -c <container-id> --workspace-id ws_abc123def456 --orchestration-config --max-concurrent-workers 3

# Step 2: Create phases
hoody agent create -c <container-id> --workspace-id ws_abc123def456 --phases --name "Phase 1: Core" --rounds-budget 10
hoody agent create -c <container-id> --workspace-id ws_abc123def456 --phases --name "Phase 2: API" --rounds-budget 15
hoody agent create -c <container-id> --workspace-id ws_abc123def456 --phases --name "Phase 3: Tests" --rounds-budget 10

# Step 3: Add TODO entries
hoody agent append -c <container-id> --workspace-id ws_abc123def456 --task "Implement user model" --priority 1
hoody agent append -c <container-id> --workspace-id ws_abc123def456 --task "Implement auth middleware" --priority 1
hoody agent append -c <container-id> --workspace-id ws_abc123def456 --task "Create REST endpoints" --priority 2

# Step 4: Assign entries to phases
hoody agent add-entry -c <container-id> --workspace-id ws_abc123def456 --phase-id phase_001 --entry-id entry_001
hoody agent add-entry -c <container-id> --workspace-id ws_abc123def456 --phase-id phase_001 --entry-id entry_002
hoody agent add-entry -c <container-id> --workspace-id ws_abc123def456 --phase-id phase_002 --entry-id entry_003

# Step 5: Set budget
hoody agent update -c <container-id> --workspace-id ws_abc123def456 --budget --max-spend 100.00

# Step 6: Start executor
hoody agent start -c <container-id> --workspace-id ws_abc123def456 --executor

# Step 7: Monitor progress
hoody agent status -c <container-id> --workspace-id ws_abc123def456 --executor -o json
hoody agent status -c <container-id> --workspace-id ws_abc123def456 --budget -o json

# Step 8: Answer questions as they arise
hoody agent list -c <container-id> --workspace-id ws_abc123def456 --questions -o json
hoody agent answer -c <container-id> --workspace-id ws_abc123def456 --question-id q_001 --answer "Use JWT"

# Step 9: Review phase when complete
hoody agent review -c <container-id> --workspace-id ws_abc123def456 --phase-id phase_001

# Step 10: Get phase summary
hoody agent summary -c <container-id> --workspace-id ws_abc123def456 --phase-id phase_001 -o json
```

### 3. Branch-Based Development

Workflow using branches for isolated development.

```
# Step 1: Create branch
hoody agent create -c <container-id> --workspace-id ws_abc123def456 --branches --name "feature/auth" -o json

# Step 2: Create session on branch
hoody agent create -c <container-id> --workspace-id ws_abc123def456 --branch-id branch_001 -o json

# Step 3: Work on feature
hoody agent prompt -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 --prompt "Implement JWT authentication"

# Step 4: Check branch status
hoody agent status -c <container-id> --workspace-id ws_abc123def456 --branch-id branch_001 -o json

# Step 5: Review diff
hoody agent diff -c <container-id> --workspace-id ws_abc123def456 --branch-id branch_001 -o json

# Step 6: Push to remote
hoody agent push -c <container-id> --workspace-id ws_abc123def456 --branch-id branch_001

# Step 7: Create pull request
hoody agent create -c <container-id> --workspace-id ws_abc123def456 --branch-id branch_001 --pr --title "Add JWT authentication" --description "Implements JWT-based auth with refresh tokens"

# Step 8: Merge after approval
hoody agent merge -c <container-id> --workspace-id ws_abc123def456 --branch-id branch_001
```

### 4. Memory and Context Management

Maintain persistent context across sessions.

```
# Step 1: Set project context
hoody agent set -c <container-id> --workspace-id ws_abc123def456 --memory-block project_context --content "This is a TypeScript REST API using Express and PostgreSQL"

# Step 2: Set coding style
hoody agent set -c <container-id> --workspace-id ws_abc123def456 --memory-block coding_style --content "Use TypeScript strict mode, prefer functional patterns, use Zod for validation"

# Step 3: Log decisions
hoody agent create -c <container-id> --workspace-id ws_abc123def456 --journal --content "Decided to use JWT for authentication" --tags "decision,auth"

# Step 4: Log implementation notes
hoody agent create -c <container-id> --workspace-id ws_abc123def456 --journal --content "Implemented rate limiting using sliding window algorithm" --tags "implementation,security"

# Step 5: Search journal for context
hoody agent search -c <container-id> --workspace-id ws_abc123def456 --journal --query "authentication" -o json

# Step 6: Update memory block
hoody agent replace -c <container-id> --workspace-id ws_abc123def456 --memory-block coding_style --old "strict mode" --new "strict mode with noImplicitAny and noUnusedLocals"

# Step 7: Review memory history
hoody agent list -c <container-id> --workspace-id ws_abc123def456 --history -o json
```

### 5. MCP Integration

Connect and use Model Context Protocol servers.

```
# Step 1: Add MCP server
hoody agent add -c <container-id> --workspace-id ws_abc123def456 --mcp --name "filesystem" --url "http://localhost:3001"

# Step 2: Authenticate if needed
hoody agent authenticate -c <container-id> --workspace-id ws_abc123def456 --mcp-auth --name "filesystem"

# Step 3: Connect server
hoody agent connect -c <container-id> --workspace-id ws_abc123def456 --mcp --name "filesystem"

# Step 4: Check status
hoody agent status -c <container-id> --workspace-id ws_abc123def456 --mcp -o json

# Step 5: List available resources
hoody agent mcp-resources -c <container-id> --workspace-id ws_abc123def456 -o json

# Step 6: Use in session
hoody agent prompt -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 --prompt "Read the README.md file using the filesystem MCP server"
```

### 6. RSI and Self-Tuning

Advanced AI improvement workflows.

```
# Step 1: Create session and work
hoody agent create -c <container-id> --workspace-id ws_abc123def456 -o json
hoody agent prompt -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 --prompt "Implement the payment processing module"

# Step 2: Start RSI review
hoody agent review -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 -o json

# Step 3: Monitor RSI progress (via SDK)
# Stream: GET /api/v1/workspaces/{workspaceID}/sessions/{sessionID}/rsi/runs/{jobID}/stream

# Step 4: Start self-tuning
hoody agent tune -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 -o json

# Step 5: Run amplify for best result
hoody agent amplify -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 --n 5 -o json

# Step 6: Check job results
hoody agent list -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 --jobs -o json
```

### 7. MITM Rule Management

Configure request interception and logging.

```
# Step 1: Create logging rule
hoody agent create -c <container-id> --workspace-id ws_abc123def456 --mitm-rule --name "Log all file writes" --event "tool_call" --tool-name "file_write"

# Step 2: Create blocking rule
hoody agent create -c <container-id> --workspace-id ws_abc123def456 --mitm-rule --name "Block dangerous commands" --event "tool_call" --tool-name "shell_exec" --content-match "rm -rf"

# Step 3: Check logs
hoody agent get -c <container-id> --workspace-id ws_abc123def456 --mitm-logs -o json

# Step 4: Verify webhook
hoody agent verify -c <container-id> --workspace-id ws_abc123def456 --mitm-webhook --url "https://example.com/webhook"
```

### 8. Error Recovery Patterns

Handle common error scenarios.

```
# Scenario 1: Session stuck in processing
hoody agent abort -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001
hoody agent prompt -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 --prompt "Continue from where we left off"

# Scenario 2: Failed orchestration entry
hoody agent reverify -c <container-id> --workspace-id ws_abc123def456 --entry-id entry_001

# Scenario 3: Executor stuck
hoody agent stop-all -c <container-id> --workspace-id ws_abc123def456 --executor
hoody agent start -c <container-id> --workspace-id ws_abc123def456 --executor

# Scenario 4: Branch in bad state
hoody agent reset -c <container-id> --workspace-id ws_abc123def456 --branch-id branch_001

# Scenario 5: Failed job
hoody agent retry -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 --job-id job_001

# Scenario 6: Memory corruption
hoody agent list -c <container-id> --workspace-id ws_abc123def456 --history -o json
hoody agent set -c <container-id> --workspace-id ws_abc123def456 --memory-block project_context --content "Restored content..."
```

### 9. Batch Operations

Efficiently manage multiple resources.

```
# Batch 1: Create multiple phases
for phase in "Core" "API" "Tests" "Deploy"; do
  hoody agent create -c <container-id> --workspace-id ws_abc123def456 --phases --name "Phase: $phase" --rounds-budget 10
done

# Batch 2: Add multiple TODO entries
for task in "User model" "Auth middleware" "API endpoints" "Unit tests"; do
  hoody agent append -c <container-id> --workspace-id ws_abc123def456 --task "$task" --priority 1
done

# Batch 3: Cancel all running jobs
hoody agent list -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 --jobs --status active -o json | \
  jq -r '.[].id' | \
  xargs -I {} hoody agent stop -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 --job-id {}

# Batch 4: Export all sessions
hoody agent list -c <container-id> --workspace-id ws_abc123def456 -o json | \
  jq -r '.[].id' | \
  xargs -I {} hoody agent export -c <container-id> --workspace-id ws_abc123def456 --session-id {} --format markdown
```

### 10. Multi-Resource Orchestration

Coordinate multiple resource types.

```
# Full project setup workflow

# 1. Create workspace
hoody workspaces create -c <container-id> --name "new-project" -o json

# 2. Bind container
hoody workspaces bind -c <container-id> --id ws_abc123def456

# 3. Configure providers
hoody agent authorize -c <container-id> --workspace-id ws_abc123def456 --provider-id openai

# 4. Set up memory
hoody agent set -c <container-id> --workspace-id ws_abc123def456 --memory-block project_context --content "New project setup"

# 5. Create branch
hoody agent create -c <container-id> --workspace-id ws_abc123def456 --branches --name "main"

# 6. Create session
hoody agent create -c <container-id> --workspace-id ws_abc123def456 -o json

# 7. Initialize workspace
hoody agent init -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001

# 8. Start working
hoody agent prompt -c <container-id> --workspace-id ws_abc123def456 --session-id sess_001 --prompt "Set up the project structure"
```

---

## Quick Reference

### Endpoint Groups Summary

| Group | Path Prefix | Description |
|-------|-------------|-------------|
| Health | `/api/v1/workspaces/health` | Service health check |
| Workspaces | `/api/v1/workspaces` | Project/workspace CRUD |
| Sessions | `/api/v1/workspaces/{id}/sessions` | AI session management |
| Messages | `/api/v1/workspaces/{id}/sessions/{id}/messages` | Session messages |
| Branches | `/api/v1/workspaces/{id}/branches` | Git branch management |
| Orchestration | `/api/v1/workspaces/{id}/orchestration` | Multi-phase task orchestration |
| TODO | `/api/v1/workspaces/{id}/orchestration/todo` | Task management |
| Phases | `/api/v1/workspaces/{id}/orchestration/phases` | Phase management |
| Executor | `/api/v1/workspaces/{id}/orchestration/executor` | Worker dispatch |
| Budget | `/api/v1/workspaces/{id}/orchestration/budget` | Cost management |
| Questions | `/api/v1/workspaces/{id}/orchestration/questions` | Interactive prompts |
| Files | `/api/v1/workspaces/{id}/files` | File operations |
| Config | `/api/v1/workspaces/{id}/config` | Configuration management |
| Permissions | `/api/v1/workspaces/{id}/permissions` | Permission requests |
| Providers | `/api/v1/workspaces/{id}/providers` | AI provider management |
| Memory | `/api/v1/workspaces/{id}/memory` | Memory blocks, journal, history |
| MCP | `/api/v1/workspaces/{id}/mcp` | Model Context Protocol |
| Skills | `/api/v1/workspaces/{id}/skills` | Skill management |
| Tools | `/api/v1/workspaces/{id}/tools` | Tool listing |
| MITM | `/api/v1/workspaces/{id}/mitm` | Request interception |
| Meta | `/api/v1/workspaces/{id}/meta` | Workspace metadata |
| Experimental | `/api/v1/workspaces/{id}/experimental` | Experimental features |
| Prompt | `/api/v1/agent/prompt` | Direct prompt submission |
| RSI | `/api/v1/workspaces/{id}/sessions/{id}/rsi` | Reviewer-Selected Improvement |
| Self-Tuning | `/api/v1/workspaces/{id}/sessions/{id}/self-tuning` | AI self-improvement |

### Essential Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `--workspace-id` | string | Workspace/project ID (required for most commands) |
| `--session-id` | string | Session ID |
| `--branch-id` | string | Branch ID |
| `--phase-id` | string | Phase ID |
| `--entry-id` | string | TODO entry ID |
| `--job-id` | string | Background job ID |
| `--message-id` | string | Message ID |
| `--provider-id` | string | AI provider ID |
| `--skill` | string | Skill name |
| `--memory-block` | string | Memory block label |
| `--journal-id` | string | Journal entry ID |
| `--history-id` | string | History event ID |
| `--mitm-rule-id` | string | MITM rule ID |
| `--mitm-tag-id` | string | MITM tag ID |
| `--mitm-log-id` | string | MITM log entry ID |
| `--question-id` | string | Question ID |
| `--request-id` | string | Permission/question request ID |
| `-o json` | flag | JSON output format |
| `-c` | string | Container ID |

### Typical Response Formats

**Success Response:**
```
{
  "id": "resource_001",
  "name": "Resource Name",
  "status": "active",
  "createdAt": "2025-01-15T10:00:00Z",
  "updatedAt": "2025-01-15T10:00:00Z"
}
```

**List Response:**
```
[
  {
    "id": "resource_001",
    "name": "Resource 1"
  },
  {
    "id": "resource_002",
    "name": "Resource 2"
  }
]
```

**Error Response:**
```
{
  "error": {
    "code": "NOT_FOUND",
    "message": "Resource not found",
    "details": {}
  }
}
```

**Job Response:**
```
{
  "jobID": "job_001",
  "status": "queued"
}
```

**Status Response:**
```
{
  "status": "running",
  "progress": 75,
  "message": "Processing..."
}
```

### CLI Command Cheat Sheet

```
# Workspace management
hoody workspaces list -c <id>
hoody workspaces create -c <id> --name "name"
hoody workspaces get -c <id> --id <ws-id>
hoody workspaces update -c <id> --id <ws-id> --name "new-name"
hoody workspaces delete -c <id> --id <ws-id>
hoody workspaces bind -c <id> --id <ws-id>
hoody workspaces unbind -c <id> --id <ws-id>

# Session management
hoody agent list -c <id> --workspace-id <ws-id>
hoody agent create -c <id> --workspace-id <ws-id>
hoody agent get -c <id> --workspace-id <ws-id> --session-id <sess-id>
hoody agent update -c <id> --workspace-id <ws-id> --session-id <sess-id> --title "title"
hoody agent delete -c <id> --workspace-id <ws-id> --session-id <sess-id>

# Prompt operations
hoody agent prompt -c <id> --workspace-id <ws-id> --session-id <sess-id> --prompt "text"
hoody agent prompt-async -c <id> --workspace-id <ws-id> --session-id <sess-id> --prompt "text"
hoody agent send-sync -c <id> --workspace-id <ws-id> --session-id <sess-id> --prompt "text"

# Orchestration
hoody agent read -c <id> --workspace-id <ws-id>
hoody agent append -c <id> --workspace-id <ws-id> --task "task"
hoody agent start -c <id> --workspace-id <ws-id> --executor
hoody agent status -c <id> --workspace-id <ws-id> --executor

# Memory
hoody agent set -c <id> --workspace-id <ws-id> --memory-block <label> --content "text"
hoody agent get -c <id> --workspace-id <ws-id> --memory-block <label>
hoody agent create -c <id> --workspace-id <ws-id> --journal --content "text"

# Skills
hoody agent get -c <id> --workspace-id <ws-id> --skill <name>
hoody agent upsert -c <id> --workspace-id <ws-id> --skill <name> --content "text"
hoody agent delete -c <id> --workspace-id <ws-id> --skill <name>

# Branches
hoody agent list -c <id> --workspace-id <ws-id> --branches
hoody agent create -c <id> --workspace-id <ws-id> --branches --name "name"
hoody agent push -c <id> --workspace-id <ws-id> --branch-id <branch-id>
hoody agent merge -c <id> --workspace-id <ws-id> --branch-id <branch-id>
```

---

## Appendix: Endpoint Count by Group

| Group | Endpoint Count |
|-------|----------------|
| Sessions | 45 |
| Orchestration | 55 |
| Memory | 15 |
| MITM | 25 |
| Branches | 18 |
| Files | 6 |
| Config | 8 |
| Providers | 4 |
| MCP | 8 |
| Skills | 7 |
| Meta | 10 |
| Permissions | 3 |
| Questions | 4 |
| Experimental | 3 |
| Project | 2 |
| Web Search | 1 |
| Image Gen | 1 |
| Prompt | 3 |
| Health | 1 |
| Workspaces | 7 |
| **Total** | **231** |