CREATE TABLE IF NOT EXISTS agent_capability_cache (
  workspace_id TEXT NOT NULL,
  agent_type TEXT NOT NULL,
  config_options_json TEXT NOT NULL,
  content_hash TEXT NOT NULL,
  updated_at TEXT NOT NULL,
  PRIMARY KEY (workspace_id, agent_type)
);

CREATE INDEX IF NOT EXISTS idx_agent_capability_cache_workspace ON agent_capability_cache(workspace_id);
