# Task ID: 146 **Title:** AgentRuntime interface definition **Status:** pending **Dependencies:** None **Priority:** medium **Description:** Define AgentRuntime adapter interface for swappable agent implementations **Details:** Create src/mcpd/src/services/agent-runtime.ts: 1. Define RuntimeSessionOpts: { agentId, projectId, taskId?, image, persona (prompt files) } 2. Define RuntimeStatus: 'starting' | 'running' | 'completed' | 'failed' 3. Define RuntimeResult: { branch: string, headCommit: string, summary: string, prUrl?: string } 4. Define AgentRuntime interface: - startSession(opts: RuntimeSessionOpts): Promise<{ sessionId: string }> - send(sessionId: string, message: string): Promise - status(sessionId: string): Promise - result(sessionId: string): Promise - endSession(sessionId: string): Promise 5. This is an interface, not an implementation - allows swapping runtimes later **Test Strategy:** Type tests: verify interface can be implemented, verify all methods have correct signatures.