[!WARNING]
Deprecation Notice: Agent Integrations will be phased out in future releases in favor of Model Context Protocol (MCP) servers utilizing useAgentMcpServers.
The useAgentIntegrations hook provides the core functionalities required for managing an AI agent’s connections to external services, such as Google Drive or Slack.This hook interfaces directly with the Frontend API (/agent/integrations), facilitating the retrieval of existing connections, the generation of secure OAuth consent URLs for new integrations, and the managed disconnection of existing services.
The target agent’s identifier. Specifying this parameter ensures that all integration actions and data queries are scoped appropriately to a single agent’s context.
interface AgentIntegration { id: string; // The unique identifier for this integration record name: string; // The display name of the service integration_type: string; // The system identifier for the type of service agent_id: string; // The ID of the agent this integration is bound to is_active: boolean; // Indicates if the OAuth connection is currently valid connection_metadata?: Record<string, any>; // Supporting metadata required by the service}
Show ConsentURLResponse
interface ConsentURLResponse { consent_url: string; // The destination URL for user authorization approval state: string; // The OAuth state parameter, securely managed by the backend expires_in: number; // Time remaining in seconds before the generated URL expires}