-
Notifications
You must be signed in to change notification settings - Fork 0
RPC Reference
Complete reference for all 174+ JSON-RPC 2.0 methods exposed by clawd on port 4300.
All methods follow the JSON-RPC 2.0 specification over WebSocket. Before calling any method a client must authenticate with daemon.auth. Push events are broadcast to all connected clients; they are not responses to a request.
Every connection must send daemon.auth as its first message:
{ "jsonrpc": "2.0", "id": 1, "method": "daemon.auth", "params": { "token": "<auth_token>" } }The token is stored in {data_dir}/auth_token (mode 0600). On success the daemon responds { "authenticated": true }. All subsequent messages on the same connection are accepted.
| Code | Constant | Meaning |
|---|---|---|
| -32700 | PARSE_ERROR |
Malformed JSON |
| -32600 | INVALID_REQUEST |
Not a valid JSON-RPC 2.0 request |
| -32601 | METHOD_NOT_FOUND |
Method does not exist |
| -32602 | INVALID_PARAMS |
Missing or wrong-type params |
| -32603 | INTERNAL_ERROR |
Unexpected server error |
| -32001 | sessionNotFound |
Session ID does not exist |
| -32002 | providerNotAvailable |
Session busy — a turn is running |
| -32003 | rateLimited |
AI provider rate limit hit |
| -32004 | unauthorized |
Bad or missing auth token |
| -32005 | repoNotFound |
Not a git repo or path missing |
| -32006 | sessionPaused |
Session paused — call session.resume first |
| -32007 | sessionLimitReached |
Max session count reached |
| -32010 | taskNotFound |
Task ID does not exist |
| -32011 | taskAlreadyClaimed |
Task claimed by another agent |
| -32014 | missingCompletionNotes |
Completion notes required when marking done |
| -32016 | modeViolation |
Tool rejected — session is in FORGE or STORM mode |
| -32028 | toolSecurityBlocked |
Tool call blocked by security policy |
| -32029 | ipcRateLimited |
Per-connection RPC rate limit exceeded |
| Namespace | Methods | Description |
|---|---|---|
account.* |
5 | Multi-account management |
ae.* |
7 | Autonomous execution engine |
afs.* |
4 | AFS (AI Filesystem) management |
agents.* |
4 | Multi-agent orchestration |
analytics.* |
4 | Personal + provider analytics |
approval.* |
2 | Human approval workflow |
arena.* |
3 | Arena mode (multi-model comparison) |
browser.* |
1 | Browser tool (screenshot) |
builder.* |
3 | Builder mode |
completion.* |
1 | Code completion suggestions |
context.* |
1 | Context bridging |
daemon.* |
10 | Daemon lifecycle + info |
device.* |
4 | Device pairing |
doctor.* |
4 | Daemon diagnostics |
drift.* |
2 | Drift scanner |
ide.* |
5 | IDE extension integration (Sprint Z) |
license.* |
3 | License tier gating |
lsp.* |
5 | Language Server Protocol proxy |
mailbox.* |
3 | Multi-repo cross-daemon messaging |
message.* |
2 | Message pin/unpin |
onboarding.* |
9 | Provider onboarding |
packs.* |
5 | Pack marketplace |
project.* |
7 | Project management |
prompt.* |
2 | Prompt intelligence |
providers.* |
2 | Provider detection |
repo.* |
11 | Git repo management |
review.* |
3 | AI code review |
scheduler.* |
1 | Account scheduler status |
session.* |
16 | AI session lifecycle |
standards.* |
1 | Coding standards |
system.* |
2 | System resource monitoring |
tasks.* |
20 | Task system |
tasks.agents.* |
4 | Task agent registry |
te.* |
14 | Task engine (Phase 45) |
threads.* |
4 | Conversation threading |
token.* |
3 | Token usage tracking |
tool.* |
2 | Tool call approve/reject |
topology.* |
5 | Multi-repo dependency topology |
traces.* |
2 | Observability traces |
validators.* |
2 | Repo validators |
worktrees.* |
9 | Per-task Git worktrees |
List all configured AI accounts.
Params: none
Returns: { accounts: Account[] }
Add a new AI account.
Params: { provider: string, api_key: string, label?: string }
Returns: { account_id: string }
Delete an AI account by ID.
Params: { account_id: string }
Returns: { deleted: true }
Set the priority order of an account in the rotation.
Params: { account_id: string, priority: number }
Returns: { updated: true }
Return usage history for an account.
Params: { account_id: string, limit?: number }
Returns: { events: AccountEvent[] }
Create an autonomous execution plan for a set of tasks.
Params: { task_ids: string[], repo_path: string, goal?: string }
Returns: { plan_id: string, phases: PlanPhase[] }
Approve an autonomous plan, allowing it to execute.
Params: { plan_id: string }
Returns: { approved: true }
Get the status and phases of a plan.
Params: { plan_id: string }
Returns: AePlan
Record a decision made during autonomous execution.
Params: { plan_id: string, decision: string, rationale: string }
Returns: { decision_id: string }
Return the current confidence score for a plan's execution.
Params: { plan_id: string }
Returns: { score: number, factors: ConfidenceFactor[] }
List all saved automation recipes.
Params: { limit?: number }
Returns: { recipes: AeRecipe[] }
Create a reusable automation recipe.
Params: { name: string, description: string, steps: RecipeStep[] }
Returns: { recipe_id: string }
Initialise AFS tracking for a workspace.
Params: { repo_path: string }
Returns: { initialised: true }
Return AFS status for a workspace.
Params: { repo_path: string }
Returns: AfsStatus
Sync .claude/CLAUDE.md and related instruction files.
Params: { repo_path: string }
Returns: { synced: number }
Register a project with AFS.
Params: { repo_path: string, project_id?: string }
Returns: { registered: true }
Spawn a new orchestrated agent for a task.
Params: { task_id: string, role: AgentRole, provider?: string }
Returns: { agent_id: string }
List all orchestrated agents.
Params: { task_id?: string, status?: string }
Returns: { agents: AgentRecord[] }
Cancel a running agent.
Params: { agent_id: string }
Returns: { cancelled: true }
Send a heartbeat for an agent.
Params: { agent_id: string }
Returns: { ok: true }
Return personal productivity analytics for the current user.
Params: { days?: number }
Returns: PersonalAnalytics
Return token usage breakdown by provider.
Params: { days?: number }
Returns: { providers: ProviderUsage[] }
Return analytics for a specific session.
Params: { session_id: string }
Returns: SessionAnalytics
List developer achievements unlocked by the current user.
Params: none
Returns: { achievements: Achievement[] }
List all tasks currently waiting for human approval.
Params: none
Returns: { approvals: ApprovalRequest[] }
Grant or deny a pending approval request.
Params: { approval_id: string, decision: "grant" | "deny", reason?: string }
Returns: { approval_id: string, task_id: string, decision: string }
Create an arena session to compare two providers on the same prompt.
Params: { session_id: string, provider_a: string, provider_b: string }
Returns: { arena_id: string }
Record a user vote on an arena response.
Params: { arena_id: string, winner: "a" | "b" | "tie" }
Returns: { recorded: true }
Return the provider win/loss leaderboard.
Params: { limit?: number }
Returns: { entries: LeaderboardEntry[] }
Take a screenshot of a URL using a headless browser.
Params: { url: string, width?: number, height?: number }
Returns: { image_base64: string, content_type: string }
Create a builder mode session for scaffolding new projects.
Params: { template: string, output_dir: string, vars?: Record<string, string> }
Returns: { builder_id: string }
List available project templates.
Params: none
Returns: { templates: BuilderTemplate[] }
Get the status of a builder session.
Params: { builder_id: string }
Returns: BuilderStatus
Request inline code completion suggestions.
Params: { file_path: string, prefix: string, language?: string, max_suggestions?: number }
Returns: { suggestions: CompletionSuggestion[] }
Bridge context from one session to a new session.
Params: { source_session_id: string, target_session_id: string, summary?: boolean }
Returns: { bridged: true, token_count: number }
Required first message. Authenticate the connection.
Params: { token: string }
Returns: { authenticated: true }
Check if the daemon is alive.
Params: none
Returns: { pong: true, version: string }
Return daemon status and configuration summary.
Params: none
Returns: DaemonStatus
Check whether a daemon update is available on GitHub Releases.
Params: none
Returns: { current: string, latest: string, update_available: boolean }
Download and apply an available update (restarts daemon).
Params: none
Returns: { applying: true }
Get the current auto-update policy.
Params: none
Returns: { policy: "auto" | "notify" | "off" }
Set the auto-update policy.
Params: { policy: "auto" | "notify" | "off" }
Returns: { updated: true }
Verify that a provider CLI is installed and authenticated.
Params: { provider: string }
Returns: { available: boolean, version?: string, error?: string }
List all detected and configured providers.
Params: none
Returns: { providers: ProviderInfo[] }
Set a human-readable name for this daemon instance.
Params: { name: string }
Returns: { updated: true }
Generate a short PIN for device pairing.
Params: none
Returns: { pin: string, expires_at: string }
Pair a new device using a PIN.
Params: { pin: string, device_name: string, device_type?: string }
Returns: { device_id: string, token: string }
List all paired devices.
Params: none
Returns: { devices: PairedDevice[] }
Revoke a paired device's access.
Params: { device_id: string }
Returns: { revoked: true }
Rename a paired device.
Params: { device_id: string, name: string }
Returns: { updated: true }
Run the full daemon health diagnostics (8 checks).
Params: none
Returns: { checks: DoctorCheck[], overall: "ok" | "warning" | "error" }
Attempt to auto-fix a failing check.
Params: { check_id: string }
Returns: { fixed: boolean, message: string }
Record that a release plan has been approved.
Params: { version: string }
Returns: { approved: true }
Install the ClawDE CC pre-commit and session hooks.
Params: { repo_path?: string }
Returns: { installed: string[] }
Run the drift scanner on a repository.
Params: { repo_path: string }
Returns: { items: DriftItem[], score: number }
List all drift items for a repository.
Params: { repo_path: string, limit?: number }
Returns: { items: DriftItem[] }
Register that an IDE extension has connected to the daemon.
Params: { extensionType: "vscode" | "jetbrains" | "neovim" | "emacs", extensionVersion?: string }
Returns: { connectionId: string }
Push event emitted: ide.extensionConnected
Push the current editor state from an IDE extension into the daemon.
Params:
{
"connectionId": "string",
"extensionType": "string",
"filePath": "string | null",
"language": "string | null",
"cursorLine": "number | null",
"cursorCol": "number | null",
"selectionText": "string | null",
"visibleRangeStart": "number | null",
"visibleRangeEnd": "number | null",
"workspaceRoot": "string | null"
}Returns: { stored: true }
Push event emitted: editor.contextChanged
Push settings from the desktop app to all connected IDE extensions.
Params: any JSON settings object
Returns: { broadcast: true, extensionCount: number }
Push event emitted: settings.changed
List all currently-connected IDE extensions.
Params: none
Returns: { connections: IdeConnectionRecord[], count: number }
Return the most-recent editor context from any connected IDE.
Params: none
Returns: EditorContext | null
Return the full stored license info.
Params: none
Returns: LicenseInfo
Check whether a specific feature is available on the current tier.
Params: { feature: string }
Returns: { allowed: boolean, tier: string }
Return the current tier string.
Params: none
Returns: { tier: string }
Start an LSP server process for a language.
Params: { language: string, root_uri: string }
Returns: { server_id: string }
Stop a running LSP server.
Params: { server_id: string }
Returns: { stopped: true }
Return current diagnostics from an LSP server.
Params: { server_id: string, file_uri?: string }
Returns: { diagnostics: LspDiagnostic[] }
Request completions from an LSP server.
Params: { server_id: string, file_uri: string, line: number, character: number }
Returns: { items: LspCompletionItem[] }
List all running LSP servers.
Params: none
Returns: { servers: LspServerInfo[] }
Send a cross-daemon inbox message.
Params: { to: string, subject: string, body: string, from?: string }
Returns: { message_id: string }
List inbox messages.
Params: { limit?: number, unread_only?: boolean }
Returns: { messages: MailboxMessage[] }
Archive a mailbox message.
Params: { message_id: string }
Returns: { archived: true }
Pin a message in a session.
Params: { session_id: string, message_id: string }
Returns: { pinned: true }
Unpin a message.
Params: { session_id: string, message_id: string }
Returns: { unpinned: true }
Run all provider checks and return a readiness summary.
Params: none
Returns: { providers: OnboardingCheck[] }
Check a specific provider's readiness.
Params: { provider: string }
Returns: OnboardingCheck
Store a provider API key and validate it.
Params: { provider: string, api_key: string }
Returns: { valid: boolean }
Return the capabilities of a configured account.
Params: { provider: string }
Returns: { models: string[], features: string[] }
Generate a CLAUDE.md (Global Claude Instructions) template.
Params: { project_name?: string }
Returns: { content: string }
Generate a CODEX.md template for OpenAI Codex.
Params: { project_name?: string }
Returns: { content: string }
Generate a .cursorrules file template.
Params: { project_name?: string }
Returns: { content: string }
Bootstrap the AID (AI Instruction Directory) for a workspace.
Params: { repo_path: string }
Returns: { created: string[] }
Check whether the AID is properly set up.
Params: { repo_path: string }
Returns: { valid: boolean, issues: string[] }
Install a pack from the marketplace.
Params: { pack_id: string, version?: string }
Returns: { installed: true }
Update an installed pack.
Params: { pack_id: string }
Returns: { updated_to: string }
Remove an installed pack.
Params: { pack_id: string }
Returns: { removed: true }
Search the pack marketplace.
Params: { query: string, limit?: number }
Returns: { results: PackInfo[] }
List all installed packs.
Params: none
Returns: { packs: InstalledPack[] }
Create a new ClawDE project.
Params: { name: string, description?: string }
Returns: { project_id: string }
List all projects.
Params: none
Returns: { projects: Project[] }
Get a project by ID.
Params: { project_id: string }
Returns: Project
Update project name or description.
Params: { project_id: string, name?: string, description?: string }
Returns: { updated: true }
Delete a project.
Params: { project_id: string }
Returns: { deleted: true }
Add a repository to a project.
Params: { project_id: string, repo_path: string }
Returns: { added: true }
Remove a repository from a project.
Params: { project_id: string, repo_path: string }
Returns: { removed: true }
Get intelligent prompt suggestions based on the current context.
Params: { session_id: string, partial?: string }
Returns: { suggestions: PromptSuggestion[] }
Record that a prompt suggestion was used.
Params: { suggestion_id: string }
Returns: { recorded: true }
Auto-detect all installed AI provider CLIs.
Params: none
Returns: { detected: string[] }
List all known providers with installation status.
Params: none
Returns: { providers: ProviderInfo[] }
List all open repositories.
Params: none
Returns: { repos: RepoInfo[] }
Open a repository by path.
Params: { path: string }
Returns: { repo_id: string }
Close an open repository.
Params: { repo_id: string }
Returns: { closed: true }
Return git status for a repository.
Params: { repo_id: string }
Returns: RepoStatus
Return the full diff for a repository.
Params: { repo_id: string, staged?: boolean }
Returns: { diff: string }
Return the diff for a single file.
Params: { repo_id: string, file_path: string, staged?: boolean }
Returns: { diff: string }
Return the file tree for a repository.
Params: { repo_id: string, max_depth?: number }
Returns: { tree: FileTreeNode[] }
Read the contents of a file in a repository.
Params: { repo_id: string, file_path: string }
Returns: { content: string, size: number }
repo.scan / repo.profile / repo.generateArtifacts / repo.syncArtifacts / repo.driftScore / repo.driftReport
See Repo Intelligence.
Run an AI code review on a diff or file set.
Params: { repo_id: string, diff?: string, files?: string[] }
Returns: { review_id: string, issues: ReviewIssue[] }
Apply a suggested fix from a code review.
Params: { review_id: string, issue_id: string }
Returns: { fixed: true }
Record that a review finding was accepted/rejected (training signal).
Params: { review_id: string, issue_id: string, accepted: boolean }
Returns: { recorded: true }
Create a new AI session.
Params: { provider: string, repo_path?: string, title?: string, mode?: string }
Returns: Session
List all sessions.
Params: { status?: string, limit?: number }
Returns: { sessions: Session[] }
Get a session by ID.
Params: { session_id: string }
Returns: Session
Delete a session.
Params: { session_id: string }
Returns: { deleted: true }
Send a message to a session and start a provider turn.
Params: { session_id: string, content: string }
Returns: { message_id: string }
Return the message history for a session.
Params: { session_id: string, limit?: number, before?: string }
Returns: { messages: Message[] }
Pause a session (suspends the provider process).
Params: { session_id: string }
Returns: { paused: true }
Resume a paused session.
Params: { session_id: string }
Returns: { resumed: true }
Cancel the currently-running provider turn.
Params: { session_id: string }
Returns: { cancelled: true }
Change the AI provider for a session.
Params: { session_id: string, provider: string }
Returns: { updated: true }
Set the GCI mode for a session.
Params: { session_id: string, mode: "NORMAL" | "LEARN" | "STORM" | "FORGE" | "CRUNCH" }
Returns: { updated: true }
Set an explicit model override for a session.
Params: { session_id: string, model: string }
Returns: { updated: true }
Query the tool call audit log for a session.
Params: { session_id?: string, limit?: number, before?: string }
Returns: { events: ToolCallEvent[], count: number }
See Tasks for the full task system reference.
Key methods: tasks.list, tasks.get, tasks.addTask, tasks.bulkAdd, tasks.claim, tasks.release, tasks.updateStatus, tasks.heartbeat, tasks.logActivity, tasks.note, tasks.activity, tasks.fromPlanning, tasks.fromChecklist, tasks.summary, tasks.progressEstimate, tasks.export, tasks.validate, tasks.sync, tasks.createSpec, tasks.transition, tasks.listEvents.
Low-level task engine with explicit phase/agent management. See Tasks/Task-Engine.md.
Methods: te.phase.create, te.phase.list, te.task.create, te.task.get, te.task.list, te.task.transition, te.task.claim, te.agent.register, te.agent.heartbeat, te.agent.deregister, te.event.log, te.event.list, te.checkpoint.write, te.note.add, te.note.list.
Start a new conversation thread.
Params: { session_id: string, title?: string }
Returns: { thread_id: string }
Resume an existing thread.
Params: { thread_id: string }
Returns: { resumed: true }
Fork a thread from a specific message.
Params: { thread_id: string, from_message_id: string }
Returns: { new_thread_id: string }
List all threads for a session.
Params: { session_id: string }
Returns: { threads: Thread[] }
Return token usage for a session.
Params: { session_id: string }
Returns: TokenUsage
Return total token usage across all sessions.
Params: { days?: number }
Returns: AggregateTokenUsage
Return current budget status for the user.
Params: none
Returns: BudgetStatus
Approve a pending tool call.
Params: { session_id: string, tool_call_id: string }
Returns: { approved: true }
Reject a pending tool call.
Params: { session_id: string, tool_call_id: string, reason?: string }
Returns: { rejected: true }
Return the dependency topology for a set of repos.
Params: { repo_paths: string[] }
Returns: Topology
Validate topology for circular or broken dependencies.
Params: { repo_paths: string[] }
Returns: { valid: boolean, issues: string[] }
Add a dependency edge between two repos.
Params: { from: string, to: string }
Returns: { added: true }
Remove a dependency edge.
Params: { from: string, to: string }
Returns: { removed: true }
Cross-validate task plans across repo boundaries.
Params: { repo_paths: string[] }
Returns: CrossValidationResult
Query observability traces.
Params: { session_id?: string, from?: string, to?: string, limit?: number }
Returns: { traces: Trace[] }
Return a cost/token summary of traces.
Params: { days?: number }
Returns: TracesSummary
List all available validators for a repo.
Params: { repo_path: string }
Returns: { validators: ValidatorInfo[] }
Run a specific validator.
Params: { repo_path: string, validator_id: string }
Returns: ValidatorResult
Create a git worktree for a task.
Params: { task_id: string, repo_path: string, base_branch?: string }
Returns: { worktree_path: string, branch: string }
List all task worktrees.
Params: { repo_path?: string }
Returns: { worktrees: WorktreeInfo[] }
Return the diff for a worktree.
Params: { task_id: string }
Returns: { diff: string }
Commit staged changes in a worktree.
Params: { task_id: string, message: string }
Returns: { commit_sha: string }
Accept worktree changes and merge to the base branch.
Params: { task_id: string }
Returns: { merged: true }
Reject worktree changes and discard them.
Params: { task_id: string }
Returns: { rejected: true }
Delete a worktree.
Params: { task_id: string }
Returns: { deleted: true }
Merge a worktree branch without deleting the worktree.
Params: { task_id: string, strategy?: string }
Returns: { merged: true }
Remove all orphaned (task-deleted) worktrees.
Params: none
Returns: { removed: number }
The daemon broadcasts events to all connected clients without a request:
| Event | Trigger |
|---|---|
daemon.ready |
Daemon started |
session.statusChanged |
Session status changes |
session.messageAdded |
New message in a session |
session.turnStarted |
Provider turn started |
session.turnCompleted |
Provider turn finished |
session.toolCallRequested |
Tool call awaiting approval |
task.statusChanged |
Task status changes |
task.approvalGranted |
Approval granted |
task.approvalDenied |
Approval denied |
warning.versionBump |
Version file changed in a monitored repo |
ide.extensionConnected |
IDE extension connected (Sprint Z) |
editor.contextChanged |
Editor context updated (Sprint Z) |
settings.changed |
Settings synced to extensions (Sprint Z) |
This reference is generated from apps/daemon/src/ipc/mod.rs dispatch table (174 methods).
ClawDE · GitHub · MIT License
ClawDE
Getting started
Reference
- Architecture
- Daemon-Reference
- Folder-Structure
- Providers
- Multi-Account
- Security
- Features
- Features/Daemon
- Features/Session-Manager
- Features/Mode-System
- Features/Repo-Intelligence
- Features/Projects
- Features/Remote-Access
- Features/Desktop-App
- Features/Provider-Knowledge
- Features/Coding-Standards
- Roadmap
Branding
Contributing