'object', 'properties' => [ 'id' => [ 'type' => 'string', 'format' => 'uuid', 'description' => 'UUID of the memory to remove', ], 'reason' => [ 'type' => 'string', 'description' => 'Optional reason for forgetting this memory', 'maxLength' => 500, ], ], 'required' => ['id'], ]; } public function handle(array $args, array $context = []): array { $workspaceId = $context['workspace_id'] ?? null; if ($workspaceId === null) { return $this->error('workspace_id is required. Ensure you have authenticated with a valid API key. See: https://host.uk.com/ai'); } $id = $args['id'] ?? ''; $reason = $this->optionalString($args, 'reason', null, 500); $agentId = $context['agent_id'] ?? $context['session_id'] ?? 'anonymous'; return $this->withCircuitBreaker('brain', function () use ($id, $workspaceId, $agentId, $reason) { $result = ForgetKnowledge::run($id, (int) $workspaceId, $agentId, $reason); return $this->success($result); }, fn () => $this->error('Brain service temporarily unavailable. Memory could not be removed.', 'service_unavailable')); } }