Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

feat(platform): settings v2 integrations page + provider description SDK (#12911)

Abhimanyu Yadava723966e0be9
diff --git a/autogpt_platform/backend/backend/api/features/integrations/models.py b/autogpt_platform/backend/backend/api/features/integrations/models.py
index 4d54a80739..84bda37da4 100644
--- a/autogpt_platform/backend/backend/api/features/integrations/models.py
+++ b/autogpt_platform/backend/backend/api/features/integrations/models.py
@@ -7,6 +7,7 @@ allowing frontend code generators like Orval to create corresponding TypeScript
from pydantic import BaseModel, Field
+from backend.data.model import CredentialsType
from backend.integrations.providers import ProviderName
from backend.sdk.registry import AutoRegistry
@@ -47,6 +48,57 @@ class ProviderNamesResponse(BaseModel):
)
+class ProviderMetadata(BaseModel):
+ """Display metadata for a provider, shown in the settings integrations UI."""
+
+ name: str = Field(description="Provider slug (e.g. ``github``)")
+ description: str | None = Field(
+ default=None,
+ description=(
+ "One-line human-readable summary of what the provider does. "
+ "Declared via ``ProviderBuilder.with_description(...)`` in the "
+ "provider's ``_config.py``. ``None`` if not set."
+ ),
+ )
+ supported_auth_types: list[CredentialsType] = Field(
+ default_factory=list,
+ description=(
+ "Credential types this provider accepts. Drives which connection "
+ "tabs the settings UI renders for the provider. Empty list means "
+ "no auth types declared."
+ ),
+ )
+
+
+def get_supported_auth_types(name: str) -> list[CredentialsType]:
+ """Return the provider's supported credential types from :class:`AutoRegistry`.
+
+ Populated by :meth:`ProviderBuilder.with_supported_auth_types` (or by
+ ``with_oauth`` / ``with_api_key`` / ``with_user_password`` when the provider
+ uses the full builder chain). Returns an empty list for providers with no
+ auth types declared.
+ """
+ provider = AutoRegistry.get_provider(name)
+ if provider is None:
+ return []
+ return sorted(provider.supported_auth_types)
+
+
+def get_provider_description(name: str) -> str | None:
+ """Return the provider's description from :class:`AutoRegistry`.
+
+ Descriptions are declared via ``ProviderBuilder.with_description(...)`` in
+ the provider's ``_config.py`` (SDK path) or in
+ ``blocks/_static_provider_configs.py`` (for providers that don't yet have
+ their own directory). Returns ``None`` for providers with no registered
+ description.
+ """
+ provider = AutoRegistry.get_provider(name)
+ if provider is None:
+ return None
+ return provider.description
+
+
class ProviderConstants(BaseModel):
"""
Model that exposes all provider names as a constant in the OpenAPI schema.
diff --git a/autogpt_platform/backend/backend/api/features/integrations/router.py b/autogpt_platform/backend/backend/api/features/integrations/router.py
index 2ac9f8cabe..d99cf7444d 100644
--- a/autogpt_platform/backend/backend/api/features/integrations/router.py
+++ b/autogpt_platform/backend/backend/api/features/integrations/router.py
@@ -66,7 +66,14 @@ from backend.util.exceptions import (
)
from backend.util.settings import Settings
-from .models import ProviderConstants, ProviderNamesResponse, get_all_provider_names
+from .models import (
+ ProviderConstants,
+ ProviderMetadata,
+ ProviderNamesResponse,
+ get_all_provider_names,
+ get_provider_description,
+ get_supported_auth_types,
+)
if TYPE_CHECKING:
from backend.integrations.oauth import BaseOAuthHandler
@@ -1204,20 +1211,37 @@ async def get_ayrshare_sso_url(
# === PROVIDER DISCOVERY ENDPOINTS ===
[email protected]("/providers", response_model=List[str])
-async def list_providers() -> List[str]:
[email protected]("/providers", response_model=List[ProviderMetadata])
+async def list_providers() -> List[ProviderMetadata]:
"""
- Get a list of all available provider names.
+ Get metadata for every available provider.
- Returns both statically defined providers (from ProviderName enum)
- and dynamically registered providers (from SDK decorators).
+ Returns both statically defined providers (from ``ProviderName`` enum) and
+ dynamically registered providers (from SDK decorators). Each entry includes
+ a ``description`` declared via ``ProviderBuilder.with_description(...)`` in
+ the provider's ``_config.py``.
Note: The complete list of provider names is also available as a constant
in the generated TypeScript client via PROVIDER_NAMES.
"""
- # Get all providers at runtime
+ # Ensure all block modules (and therefore every provider's _config.py) are
+ # imported before we read from AutoRegistry. Cached on first call.
+ try:
+ from backend.blocks import load_all_blocks
+
+ load_all_blocks()
+ except Exception as e:
+ logger.warning(f"Failed to load blocks for provider metadata: {e}")
+
all_providers = get_all_provider_names()
- return all_providers
+ return [
+ ProviderMetadata(
+ name=name,
+ description=get_provider_description(name),
+ supported_auth_types=get_supported_auth_types(name),
+ )
+ for name in all_providers
+ ]
@router.get("/providers/system", response_model=List[str])
diff --git a/autogpt_platform/backend/backend/blocks/_static_provider_configs.py b/autogpt_platform/backend/backend/blocks/_static_provider_configs.py
new file mode 100644
index 0000000000..fbb5d9976d
--- /dev/null
+++ b/autogpt_platform/backend/backend/blocks/_static_provider_configs.py
@@ -0,0 +1,56 @@
+"""Provider descriptions for services that don't yet have their own ``_config.py``.
+
+Every provider in ``_STATIC_PROVIDER_CONFIGS`` below is declared here because
+its block code currently lives either in a single shared file (e.g. the 8 LLM
+providers in ``blocks/llm.py``) or in a single-file block that has no dedicated
+directory (e.g. ``blocks/reddit.py``).
+
+This file gets loaded by the block auto-loader in ``blocks/__init__.py``
+(``rglob("*.py")`` picks it up) so the ``ProviderBuilder(...).build()`` calls
+run at startup and populate ``AutoRegistry`` before the first API request.
+
+**Migration path:** when a provider graduates into its own directory with a
+proper ``_config.py`` (following the SDK pattern, e.g. ``blocks/linear/_config.py``),
+delete its entry here. The metadata will still be served by
+``GET /integrations/providers`` — it just moves to live next to the provider's
+auth and webhook config.
+"""
+
+from backend.data.model import CredentialsType
+from backend.sdk import ProviderBuilder
+
+_STATIC_PROVIDER_CONFIGS: dict[str, tuple[str, tuple[CredentialsType, ...]]] = {
+ # LLM providers that share blocks/llm.py
+ "aiml_api": ("Unified access to 100+ AI models", ("api_key",)),
+ "anthropic": ("Claude language models", ("api_key",)),
+ "groq": ("Fast LLM inference", ("api_key",)),
+ "llama_api": ("Llama model hosting", ("api_key",)),
+ "ollama": ("Run open-source LLMs locally", ("api_key",)),
+ "open_router": ("One API for every LLM", ("api_key",)),
+ "openai": ("GPT models and embeddings", ("api_key",)),
+ "v0": ("AI-generated UI components", ("api_key",)),
+ # Single-file providers (one provider per standalone blocks/*.py file)
+ "d_id": ("AI avatar and video generation", ("api_key",)),
+ "e2b": ("Sandboxed code execution", ("api_key",)),
+ "google_maps": ("Places, directions, geocoding", ("api_key",)),
+ "http": ("Generic HTTP requests", ("api_key", "host_scoped")),
+ "ideogram": ("Text-to-image generation", ("api_key",)),
+ "medium": ("Publish stories and posts", ("api_key",)),
+ "mem0": ("Long-term memory for agents", ("api_key",)),
+ "openweathermap": ("Weather data and forecasts", ("api_key",)),
+ "pinecone": ("Managed vector database", ("api_key",)),
+ "reddit": ("Subreddits, posts, and comments", ("oauth2",)),
+ "revid": ("AI-generated short-form video", ("api_key",)),
+ "screenshotone": ("Automated website screenshots", ("api_key",)),
+ "smtp": ("Send email via SMTP", ("user_password",)),
+ "unreal_speech": ("Low-cost text-to-speech", ("api_key",)),
+ "webshare_proxy": ("Rotating proxies for scraping", ("api_key",)),
+}
+
+for _name, (_description, _auth_types) in _STATIC_PROVIDER_CONFIGS.items():
+ (
+ ProviderBuilder(_name)
+ .with_description(_description)
+ .with_supported_auth_types(*_auth_types)
+ .build()
+ )
diff --git a/autogpt_platform/backend/backend/blocks/agent_mail/_config.py b/autogpt_platform/backend/backend/blocks/agent_mail/_config.py
index cf5c0d0ff1..9031426b19 100644
--- a/autogpt_platform/backend/backend/blocks/agent_mail/_config.py
+++ b/autogpt_platform/backend/backend/blocks/agent_mail/_config.py
@@ -12,6 +12,7 @@ from backend.sdk import APIKeyCredentials, BlockCostType, ProviderBuilder, Secre
# past billing. Revisit once AgentMail publishes usage-based pricing.
agent_mail = (
ProviderBuilder("agent_mail")
+ .with_description("Managed email accounts for agents")
.with_api_key("AGENTMAIL_API_KEY", "AgentMail API Key")
.with_base_cost(1, BlockCostType.RUN)
.build()
diff --git a/autogpt_platform/backend/backend/blocks/airtable/_config.py b/autogpt_platform/backend/backend/blocks/airtable/_config.py
index ee168881d8..331571f1f0 100644
--- a/autogpt_platform/backend/backend/blocks/airtable/_config.py
+++ b/autogpt_platform/backend/backend/blocks/airtable/_config.py
@@ -10,6 +10,7 @@ from ._webhook import AirtableWebhookManager
# Configure the Airtable provider with API key authentication
airtable = (
ProviderBuilder("airtable")
+ .with_description("Bases, tables, and records")
.with_api_key("AIRTABLE_API_KEY", "Airtable Personal Access Token")
.with_webhook_manager(AirtableWebhookManager)
.with_base_cost(1, BlockCostType.RUN)
diff --git a/autogpt_platform/backend/backend/blocks/apollo/_config.py b/autogpt_platform/backend/backend/blocks/apollo/_config.py
new file mode 100644
index 0000000000..ad1e5ba914
--- /dev/null
+++ b/autogpt_platform/backend/backend/blocks/apollo/_config.py
@@ -0,0 +1,15 @@
+"""Provider registration for Apollo.
+
+Registers the provider description shown in the settings integrations UI.
+Apollo doesn't use a full :class:`ProviderBuilder` chain (auth is set up in
+``_auth.py``), so this file only declares metadata.
+"""
+
+from backend.sdk import ProviderBuilder
+
+apollo = (
+ ProviderBuilder("apollo")
+ .with_description("Sales intelligence and prospecting")
+ .with_supported_auth_types("api_key")
+ .build()
+)
diff --git a/autogpt_platform/backend/backend/blocks/ayrshare/_config.py b/autogpt_platform/backend/backend/blocks/ayrshare/_config.py
index 811ce6673c..b6f9548fa4 100644
--- a/autogpt_platform/backend/backend/blocks/ayrshare/_config.py
+++ b/autogpt_platform/backend/backend/blocks/ayrshare/_config.py
@@ -18,4 +18,9 @@ reach a block as a "profile key".
from backend.sdk import ProviderBuilder
-ayrshare = ProviderBuilder("ayrshare").with_managed_api_key().build()
+ayrshare = (
+ ProviderBuilder("ayrshare")
+ .with_description("Post to every social network")
+ .with_managed_api_key()
+ .build()
+)
diff --git a/autogpt_platform/backend/backend/blocks/baas/_config.py b/autogpt_platform/backend/backend/blocks/baas/_config.py
index c6ae3e68f5..cdacd9c92f 100644
--- a/autogpt_platform/backend/backend/blocks/baas/_config.py
+++ b/autogpt_platform/backend/backend/blocks/baas/_config.py
@@ -7,6 +7,7 @@ from backend.sdk import BlockCostType, ProviderBuilder
# Configure the Meeting BaaS provider with API key authentication
baas = (
ProviderBuilder("baas")
+ .with_description("Meeting recording and transcription")
.with_api_key("MEETING_BAAS_API_KEY", "Meeting BaaS API Key")
.with_base_cost(5, BlockCostType.RUN) # Higher cost for meeting recording service
.build()
diff --git a/autogpt_platform/backend/backend/blocks/bannerbear/_config.py b/autogpt_platform/backend/backend/blocks/bannerbear/_config.py
index 32fe7fff21..a783e99b96 100644
--- a/autogpt_platform/backend/backend/blocks/bannerbear/_config.py
+++ b/autogpt_platform/backend/backend/blocks/bannerbear/_config.py
@@ -2,6 +2,7 @@ from backend.sdk import BlockCostType, ProviderBuilder
bannerbear = (
ProviderBuilder("bannerbear")
+ .with_description("Auto-generate images and videos")
.with_api_key("BANNERBEAR_API_KEY", "Bannerbear API Key")
.with_base_cost(3, BlockCostType.RUN)
.build()
diff --git a/autogpt_platform/backend/backend/blocks/compass/_config.py b/autogpt_platform/backend/backend/blocks/compass/_config.py
new file mode 100644
index 0000000000..1d437cb246
--- /dev/null
+++ b/autogpt_platform/backend/backend/blocks/compass/_config.py
@@ -0,0 +1,10 @@
+"""Provider registration for Compass — metadata only (auth lives elsewhere)."""
+
+from backend.sdk import ProviderBuilder
+
+compass = (
+ ProviderBuilder("compass")
+ .with_description("Geospatial context for agents")
+ .with_supported_auth_types("api_key")
+ .build()
+)
diff --git a/autogpt_platform/backend/backend/blocks/dataforseo/_config.py b/autogpt_platform/backend/backend/blocks/dataforseo/_config.py
index ec979de893..b7db1149bf 100644
--- a/autogpt_platform/backend/backend/blocks/dataforseo/_config.py
+++ b/autogpt_platform/backend/backend/blocks/dataforseo/_config.py
@@ -7,6 +7,7 @@ from backend.sdk import BlockCostType, ProviderBuilder
# Build the DataForSEO provider with username/password authentication
dataforseo = (
ProviderBuilder("dataforseo")
+ .with_description("SEO and SERP data")
.with_user_password(
username_env_var="DATAFORSEO_USERNAME",
password_env_var="DATAFORSEO_PASSWORD",
diff --git a/autogpt_platform/backend/backend/blocks/discord/_config.py b/autogpt_platform/backend/backend/blocks/discord/_config.py
new file mode 100644
index 0000000000..d530fd0f5e
--- /dev/null
+++ b/autogpt_platform/backend/backend/blocks/discord/_config.py
@@ -0,0 +1,10 @@
+"""Provider registration for Discord — metadata only (auth lives in ``_auth.py``)."""
+
+from backend.sdk import ProviderBuilder
+
+discord = (
+ ProviderBuilder("discord")
+ .with_description("Messages, channels, and servers")
+ .with_supported_auth_types("api_key", "oauth2")
+ .build()
+)
diff --git a/autogpt_platform/backend/backend/blocks/elevenlabs/_config.py b/autogpt_platform/backend/backend/blocks/elevenlabs/_config.py
new file mode 100644
index 0000000000..c81d98fa7e
--- /dev/null
+++ b/autogpt_platform/backend/backend/blocks/elevenlabs/_config.py
@@ -0,0 +1,10 @@
+"""Provider registration for ElevenLabs — metadata only (auth lives in ``_auth.py``)."""
+
+from backend.sdk import ProviderBuilder
+
+elevenlabs = (
+ ProviderBuilder("elevenlabs")
+ .with_description("Realistic AI voice synthesis")
+ .with_supported_auth_types("api_key")
+ .build()
+)
diff --git a/autogpt_platform/backend/backend/blocks/enrichlayer/_config.py b/autogpt_platform/backend/backend/blocks/enrichlayer/_config.py
new file mode 100644
index 0000000000..e539585b09
--- /dev/null
+++ b/autogpt_platform/backend/backend/blocks/enrichlayer/_config.py
@@ -0,0 +1,10 @@
+"""Provider registration for Enrichlayer — metadata only (auth lives in ``_auth.py``)."""
+
+from backend.sdk import ProviderBuilder
+
+enrichlayer = (
+ ProviderBuilder("enrichlayer")
+ .with_description("Enrich leads with company data")
+ .with_supported_auth_types("api_key")
+ .build()
+)
diff --git a/autogpt_platform/backend/backend/blocks/exa/_config.py b/autogpt_platform/backend/backend/blocks/exa/_config.py
index 31a37ba93b..e968086091 100644
--- a/autogpt_platform/backend/backend/blocks/exa/_config.py
+++ b/autogpt_platform/backend/backend/blocks/exa/_config.py
@@ -9,6 +9,7 @@ from ._webhook import ExaWebhookManager
# Configure the Exa provider once for all blocks
exa = (
ProviderBuilder("exa")
+ .with_description("Neural web search")
.with_api_key("EXA_API_KEY", "Exa API Key")
.with_webhook_manager(ExaWebhookManager)
# Exa returns `cost_dollars.total` on every response and ExaSearchBlock
diff --git a/autogpt_platform/backend/backend/blocks/fal/_config.py b/autogpt_platform/backend/backend/blocks/fal/_config.py
new file mode 100644
index 0000000000..08e10d6ae6
--- /dev/null
+++ b/autogpt_platform/backend/backend/blocks/fal/_config.py
@@ -0,0 +1,10 @@
+"""Provider registration for fal — metadata only (auth lives in ``_auth.py``)."""
+
+from backend.sdk import ProviderBuilder
+
+fal = (
+ ProviderBuilder("fal")
+ .with_description("Hosted model inference")
+ .with_supported_auth_types("api_key")
+ .build()
+)
diff --git a/autogpt_platform/backend/backend/blocks/firecrawl/_config.py b/autogpt_platform/backend/backend/blocks/firecrawl/_config.py
index 7a2ff95fe4..12b6bba4da 100644
--- a/autogpt_platform/backend/backend/blocks/firecrawl/_config.py
+++ b/autogpt_platform/backend/backend/blocks/firecrawl/_config.py
@@ -8,6 +8,7 @@ from backend.sdk import BlockCostType, ProviderBuilder
# — roughly matches our existing per-call tier for single-page scrape.
firecrawl = (
ProviderBuilder("firecrawl")
+ .with_description("Web scraping and crawling")
.with_api_key("FIRECRAWL_API_KEY", "Firecrawl API Key")
.with_base_cost(1000, BlockCostType.COST_USD)
.build()
diff --git a/autogpt_platform/backend/backend/blocks/generic_webhook/triggers.py b/autogpt_platform/backend/backend/blocks/generic_webhook/triggers.py
index dc554a0a88..56a4c3d99d 100644
--- a/autogpt_platform/backend/backend/blocks/generic_webhook/triggers.py
+++ b/autogpt_platform/backend/backend/blocks/generic_webhook/triggers.py
@@ -14,6 +14,7 @@ from ._webhook import GenericWebhooksManager, GenericWebhookType
generic_webhook = (
ProviderBuilder("generic_webhook")
+ .with_description("Inbound webhook trigger")
.with_webhook_manager(GenericWebhooksManager)
.build()
)
diff --git a/autogpt_platform/backend/backend/blocks/github/_config.py b/autogpt_platform/backend/backend/blocks/github/_config.py
new file mode 100644
index 0000000000..f7d21652e0
--- /dev/null
+++ b/autogpt_platform/backend/backend/blocks/github/_config.py
@@ -0,0 +1,10 @@
+"""Provider registration for GitHub — metadata only (auth lives in ``_auth.py``)."""
+
+from backend.sdk import ProviderBuilder
+
+github = (
+ ProviderBuilder("github")
+ .with_description("Issues, pull requests, repositories")
+ .with_supported_auth_types("api_key", "oauth2")
+ .build()
+)
diff --git a/autogpt_platform/backend/backend/blocks/google/_config.py b/autogpt_platform/backend/backend/blocks/google/_config.py
new file mode 100644
index 0000000000..14e065f389
--- /dev/null
+++ b/autogpt_platform/backend/backend/blocks/google/_config.py
@@ -0,0 +1,10 @@
+"""Provider registration for Google — metadata only (auth lives in ``_auth.py``)."""
+
+from backend.sdk import ProviderBuilder
+
+google = (
+ ProviderBuilder("google")
+ .with_description("Gmail, Drive, Calendar, Sheets")
+ .with_supported_auth_types("oauth2")
+ .build()
+)
diff --git a/autogpt_platform/backend/backend/blocks/hubspot/_config.py b/autogpt_platform/backend/backend/blocks/hubspot/_config.py
new file mode 100644
index 0000000000..9227b1fd62
--- /dev/null
+++ b/autogpt_platform/backend/backend/blocks/hubspot/_config.py
@@ -0,0 +1,10 @@
+"""Provider registration for HubSpot — metadata only (auth lives in ``_auth.py``)."""
+
+from backend.sdk import ProviderBuilder
+
+hubspot = (
+ ProviderBuilder("hubspot")
+ .with_description("CRM, contacts, and deals")
+ .with_supported_auth_types("api_key", "oauth2")
+ .build()
+)
diff --git a/autogpt_platform/backend/backend/blocks/jina/_config.py b/autogpt_platform/backend/backend/blocks/jina/_config.py
new file mode 100644
index 0000000000..5a807f21ec
--- /dev/null
+++ b/autogpt_platform/backend/backend/blocks/jina/_config.py
@@ -0,0 +1,10 @@
+"""Provider registration for Jina — metadata only (auth lives in ``_auth.py``)."""
+
+from backend.sdk import ProviderBuilder
+
+jina = (
+ ProviderBuilder("jina")
+ .with_description("Embeddings and reranking")
+ .with_supported_auth_types("api_key")
+ .build()
+)
diff --git a/autogpt_platform/backend/backend/blocks/linear/_config.py b/autogpt_platform/backend/backend/blocks/linear/_config.py
index c0f76ecb02..f81e0ff7fb 100644
--- a/autogpt_platform/backend/backend/blocks/linear/_config.py
+++ b/autogpt_platform/backend/backend/blocks/linear/_config.py
@@ -39,6 +39,7 @@ class LinearScope(str, Enum):
linear = (
ProviderBuilder("linear")
+ .with_description("Issues and project tracking")
.with_api_key(env_var_name="LINEAR_API_KEY", title="Linear API Key")
.with_base_cost(1, BlockCostType.RUN)
.with_oauth(
diff --git a/autogpt_platform/backend/backend/blocks/mcp/_config.py b/autogpt_platform/backend/backend/blocks/mcp/_config.py
new file mode 100644
index 0000000000..c589ee269f
--- /dev/null
+++ b/autogpt_platform/backend/backend/blocks/mcp/_config.py
@@ -0,0 +1,5 @@
+"""Provider registration for MCP — metadata only."""
+
+from backend.sdk import ProviderBuilder
+
+mcp = ProviderBuilder("mcp").with_description("Model Context Protocol servers").build()
diff --git a/autogpt_platform/backend/backend/blocks/notion/_config.py b/autogpt_platform/backend/backend/blocks/notion/_config.py
new file mode 100644
index 0000000000..b36890aa3c
--- /dev/null
+++ b/autogpt_platform/backend/backend/blocks/notion/_config.py
@@ -0,0 +1,10 @@
+"""Provider registration for Notion — metadata only (auth lives in ``_auth.py``)."""
+
+from backend.sdk import ProviderBuilder
+
+notion = (
+ ProviderBuilder("notion")
+ .with_description("Pages, databases, and blocks")
+ .with_supported_auth_types("oauth2")
+ .build()
+)
diff --git a/autogpt_platform/backend/backend/blocks/nvidia/_config.py b/autogpt_platform/backend/backend/blocks/nvidia/_config.py
new file mode 100644
index 0000000000..da03da3b4b
--- /dev/null
+++ b/autogpt_platform/backend/backend/blocks/nvidia/_config.py
@@ -0,0 +1,10 @@
+"""Provider registration for Nvidia — metadata only (auth lives in ``_auth.py``)."""
+
+from backend.sdk import ProviderBuilder
+
+nvidia = (
+ ProviderBuilder("nvidia")
+ .with_description("NIM-hosted foundation models")
+ .with_supported_auth_types("api_key")
+ .build()
+)
diff --git a/autogpt_platform/backend/backend/blocks/replicate/_config.py b/autogpt_platform/backend/backend/blocks/replicate/_config.py
new file mode 100644
index 0000000000..be387c96e2
--- /dev/null
+++ b/autogpt_platform/backend/backend/blocks/replicate/_config.py
@@ -0,0 +1,10 @@
+"""Provider registration for Replicate — metadata only."""
+
+from backend.sdk import ProviderBuilder
+
+replicate = (
+ ProviderBuilder("replicate")
+ .with_description("Run and host open-source models")
+ .with_supported_auth_types("api_key")
+ .build()
+)
diff --git a/autogpt_platform/backend/backend/blocks/slant3d/_config.py b/autogpt_platform/backend/backend/blocks/slant3d/_config.py
new file mode 100644
index 0000000000..e8d41aa511
--- /dev/null
+++ b/autogpt_platform/backend/backend/blocks/slant3d/_config.py
@@ -0,0 +1,10 @@
+"""Provider registration for Slant 3D — metadata only (auth lives in ``_api.py``)."""
+
+from backend.sdk import ProviderBuilder
+
+slant3d = (
+ ProviderBuilder("slant3d")
+ .with_description("On-demand 3D printing")
+ .with_supported_auth_types("api_key")
+ .build()
+)
diff --git a/autogpt_platform/backend/backend/blocks/smartlead/_config.py b/autogpt_platform/backend/backend/blocks/smartlead/_config.py
new file mode 100644
index 0000000000..809b9c7ffe
--- /dev/null
+++ b/autogpt_platform/backend/backend/blocks/smartlead/_config.py
@@ -0,0 +1,10 @@
+"""Provider registration for Smartlead — metadata only (auth lives in ``_auth.py``)."""
+
+from backend.sdk import ProviderBuilder
+
+smartlead = (
+ ProviderBuilder("smartlead")
+ .with_description("Cold email outreach at scale")
+ .with_supported_auth_types("api_key")
+ .build()
+)
diff --git a/autogpt_platform/backend/backend/blocks/stagehand/_config.py b/autogpt_platform/backend/backend/blocks/stagehand/_config.py
index 0bb609d664..501a7bb0aa 100644
--- a/autogpt_platform/backend/backend/blocks/stagehand/_config.py
+++ b/autogpt_platform/backend/backend/blocks/stagehand/_config.py
@@ -6,6 +6,7 @@ from backend.sdk import BlockCostType, ProviderBuilder
# to COST_USD.
stagehand = (
ProviderBuilder("stagehand")
+ .with_description("AI browser automation")
.with_api_key("STAGEHAND_API_KEY", "Stagehand API Key")
.with_base_cost(1, BlockCostType.SECOND, cost_divisor=3)
.build()
diff --git a/autogpt_platform/backend/backend/blocks/telegram/_config.py b/autogpt_platform/backend/backend/blocks/telegram/_config.py
new file mode 100644
index 0000000000..b25b874466
--- /dev/null
+++ b/autogpt_platform/backend/backend/blocks/telegram/_config.py
@@ -0,0 +1,10 @@
+"""Provider registration for Telegram — metadata only."""
+
+from backend.sdk import ProviderBuilder
+
+telegram = (
+ ProviderBuilder("telegram")
+ .with_description("Bot messaging and groups")
+ .with_supported_auth_types("api_key")
+ .build()
+)
diff --git a/autogpt_platform/backend/backend/blocks/todoist/_config.py b/autogpt_platform/backend/backend/blocks/todoist/_config.py
new file mode 100644
index 0000000000..5a7a358e92
--- /dev/null
+++ b/autogpt_platform/backend/backend/blocks/todoist/_config.py
@@ -0,0 +1,10 @@
+"""Provider registration for Todoist — metadata only (auth lives in ``_auth.py``)."""
+
+from backend.sdk import ProviderBuilder
+
+todoist = (
+ ProviderBuilder("todoist")
+ .with_description("Tasks and projects")
+ .with_supported_auth_types("oauth2")
+ .build()
+)
diff --git a/autogpt_platform/backend/backend/blocks/twitter/_config.py b/autogpt_platform/backend/backend/blocks/twitter/_config.py
new file mode 100644
index 0000000000..179e23c9f1
--- /dev/null
+++ b/autogpt_platform/backend/backend/blocks/twitter/_config.py
@@ -0,0 +1,10 @@
+"""Provider registration for X (Twitter) — metadata only (auth lives in ``_auth.py``)."""
+
+from backend.sdk import ProviderBuilder
+
+twitter = (
+ ProviderBuilder("twitter")
+ .with_description("Tweets, timelines, and DMs")
+ .with_supported_auth_types("oauth2")
+ .build()
+)
diff --git a/autogpt_platform/backend/backend/blocks/wolfram/llm_api.py b/autogpt_platform/backend/backend/blocks/wolfram/llm_api.py
index cbae674bdf..c7bc7ef9b4 100644
--- a/autogpt_platform/backend/backend/blocks/wolfram/llm_api.py
+++ b/autogpt_platform/backend/backend/blocks/wolfram/llm_api.py
@@ -15,6 +15,7 @@ from ._api import llm_api_call
wolfram = (
ProviderBuilder("wolfram")
+ .with_description("Computational knowledge engine")
.with_api_key("WOLFRAM_APP_ID", "Wolfram Alpha App ID")
.with_base_cost(1, BlockCostType.RUN)
.build()
diff --git a/autogpt_platform/backend/backend/blocks/wordpress/_config.py b/autogpt_platform/backend/backend/blocks/wordpress/_config.py
index 64cd8bdb75..b25889b2b7 100644
--- a/autogpt_platform/backend/backend/blocks/wordpress/_config.py
+++ b/autogpt_platform/backend/backend/blocks/wordpress/_config.py
@@ -4,6 +4,7 @@ from ._oauth import WordPressOAuthHandler, WordPressScope
wordpress = (
ProviderBuilder("wordpress")
+ .with_description("Posts, pages, and media")
.with_base_cost(1, BlockCostType.RUN)
.with_oauth(
WordPressOAuthHandler,
diff --git a/autogpt_platform/backend/backend/blocks/zerobounce/_config.py b/autogpt_platform/backend/backend/blocks/zerobounce/_config.py
new file mode 100644
index 0000000000..88e1287fee
--- /dev/null
+++ b/autogpt_platform/backend/backend/blocks/zerobounce/_config.py
@@ -0,0 +1,10 @@
+"""Provider registration for ZeroBounce — metadata only (auth lives in ``_auth.py``)."""
+
+from backend.sdk import ProviderBuilder
+
+zerobounce = (
+ ProviderBuilder("zerobounce")
+ .with_description("Email address verification")
+ .with_supported_auth_types("api_key")
+ .build()
+)
diff --git a/autogpt_platform/backend/backend/sdk/builder.py b/autogpt_platform/backend/backend/sdk/builder.py
index 4988b11363..65ec59a35e 100644
--- a/autogpt_platform/backend/backend/sdk/builder.py
+++ b/autogpt_platform/backend/backend/sdk/builder.py
@@ -39,6 +39,7 @@ class ProviderBuilder:
self._default_scopes: Optional[List[str]] = None
self._client_id_env_var: Optional[str] = None
self._client_secret_env_var: Optional[str] = None
+ self._description: Optional[str] = None
self._extra_config: dict = {}
def with_oauth(
@@ -191,6 +192,31 @@ class ProviderBuilder:
self._extra_config.update(kwargs)
return self
+ def with_description(self, description: str) -> "ProviderBuilder":
+ """Set a short human-readable description for this provider.
+
+ Exposed via ``GET /integrations/providers`` so the frontend can display
+ a one-line summary next to each provider without hardcoding copy
+ (e.g. ``"Issues, PRs, repositories"`` for GitHub).
+ """
+ self._description = description
+ return self
+
+ def with_supported_auth_types(self, *types: CredentialsType) -> "ProviderBuilder":
+ """Declare which credential types this provider accepts.
+
+ Surfaced via ``GET /integrations/providers`` so the settings UI can
+ render only the relevant connection tabs (OAuth / API key / etc.) per
+ provider. ``with_oauth``, ``with_api_key``, ``with_managed_api_key``,
+ and ``with_user_password`` populate this set automatically — call this
+ method only for providers whose auth handlers/credentials live outside
+ the builder chain (e.g. legacy OAuth handlers in
+ ``backend/integrations/oauth/`` or block-level ``CredentialsMetaInput``
+ declarations).
+ """
+ self._supported_auth_types.update(types)
+ return self
+
def build(self) -> Provider:
"""Build and register the provider configuration."""
provider = Provider(
@@ -202,6 +228,7 @@ class ProviderBuilder:
supported_auth_types=self._supported_auth_types,
api_client_factory=self._api_client_factory,
error_handler=self._error_handler,
+ description=self._description,
**self._extra_config,
)
diff --git a/autogpt_platform/backend/backend/sdk/provider.py b/autogpt_platform/backend/backend/sdk/provider.py
index 2933121703..1103ed51a2 100644
--- a/autogpt_platform/backend/backend/sdk/provider.py
+++ b/autogpt_platform/backend/backend/sdk/provider.py
@@ -55,6 +55,7 @@ class Provider:
supported_auth_types: Optional[Set[CredentialsType]] = None,
api_client_factory: Optional[Callable] = None,
error_handler: Optional[Callable[[Exception], str]] = None,
+ description: Optional[str] = None,
**kwargs,
):
self.name = name
@@ -63,6 +64,7 @@ class Provider:
self.default_credentials = default_credentials or []
self.base_costs = base_costs or []
self.supported_auth_types = supported_auth_types or set()
+ self.description = description
self._api_client_factory = api_client_factory
self._error_handler = error_handler
diff --git a/autogpt_platform/frontend/src/app/(platform)/settings/__tests__/placeholder-pages.test.tsx b/autogpt_platform/frontend/src/app/(platform)/settings/__tests__/placeholder-pages.test.tsx
index 7ed8421642..2caeb55d54 100644
--- a/autogpt_platform/frontend/src/app/(platform)/settings/__tests__/placeholder-pages.test.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/settings/__tests__/placeholder-pages.test.tsx
@@ -3,7 +3,6 @@ import { describe, expect, it } from "vitest";
import SettingsProfilePage from "../profile/page";
import SettingsCreatorDashboardPage from "../creator-dashboard/page";
import SettingsBillingPage from "../billing/page";
-import SettingsIntegrationsPage from "../integrations/page";
import SettingsPreferencesPage from "../preferences/page";
import SettingsOAuthAppsPage from "../oauth-apps/page";
@@ -11,7 +10,6 @@ const pages = [
{ Component: SettingsProfilePage, title: "Profile" },
{ Component: SettingsCreatorDashboardPage, title: "Creator Dashboard" },
{ Component: SettingsBillingPage, title: "Billing" },
- { Component: SettingsIntegrationsPage, title: "Integrations" },
{ Component: SettingsPreferencesPage, title: "Settings" },
{ Component: SettingsOAuthAppsPage, title: "OAuth Apps" },
];
diff --git a/autogpt_platform/frontend/src/app/(platform)/settings/integrations/__tests__/helpers.test.ts b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/__tests__/helpers.test.ts
new file mode 100644
index 0000000000..ce1f1b6546
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/__tests__/helpers.test.ts
@@ -0,0 +1,165 @@
+import { describe, expect, test } from "vitest";
+
+import type { CredentialsMetaResponse } from "@/app/api/__generated__/models/credentialsMetaResponse";
+
+import {
+ filterProviders,
+ formatMaskedValue,
+ formatProviderName,
+ groupCredentialsByProvider,
+ type CredentialView,
+ type ProviderGroupView,
+} from "../helpers";
+
+function makeCred(
+ overrides: Partial<CredentialsMetaResponse> = {},
+): CredentialsMetaResponse {
+ return {
+ id: "id-1",
+ provider: "github",
+ type: "api_key",
+ title: "Mock",
+ scopes: null,
+ username: null,
+ host: null,
+ is_managed: false,
+ ...overrides,
+ };
+}
+
+function makeView(overrides: Partial<CredentialView> = {}): CredentialView {
+ return {
+ id: "id-1",
+ provider: "github",
+ type: "api_key",
+ title: "Mock",
+ username: null,
+ host: null,
+ isManaged: false,
+ ...overrides,
+ };
+}
+
+describe("formatProviderName", () => {
+ test("uses curated override when one exists", () => {
+ expect(formatProviderName("github")).toBe("GitHub");
+ expect(formatProviderName("d_id")).toBe("D-ID");
+ expect(formatProviderName("twitter")).toBe("X");
+ });
+
+ test("title-cases unknown snake_case slugs", () => {
+ expect(formatProviderName("foo_bar")).toBe("Foo Bar");
+ expect(formatProviderName("hello-world")).toBe("Hello World");
+ });
+
+ test("returns empty string for non-string input — guards against provider.split TypeError", () => {
+ expect(formatProviderName(undefined)).toBe("");
+ expect(formatProviderName(null)).toBe("");
+ expect(formatProviderName(42)).toBe("");
+ expect(formatProviderName("")).toBe("");
+ });
+});
+
+describe("formatMaskedValue", () => {
+ test("prefers username when present", () => {
+ expect(formatMaskedValue(makeView({ username: "abhi" }))).toBe(
+ "Username: abhi",
+ );
+ });
+
+ test("falls back to host when no username", () => {
+ expect(formatMaskedValue(makeView({ host: "example.com" }))).toBe(
+ "example.com",
+ );
+ });
+
+ test("returns type-specific copy for credentials with no username/host", () => {
+ expect(formatMaskedValue(makeView({ type: "api_key" }))).toBe(
+ "API key configured",
+ );
+ expect(formatMaskedValue(makeView({ type: "oauth2" }))).toBe(
+ "Connected via OAuth",
+ );
+ expect(formatMaskedValue(makeView({ type: "user_password" }))).toBe(
+ "Username/password set",
+ );
+ });
+});
+
+describe("groupCredentialsByProvider", () => {
+ test("groups credentials by provider id and sorts groups by display name", () => {
+ const groups = groupCredentialsByProvider([
+ makeCred({ id: "a", provider: "openai" }),
+ makeCred({ id: "b", provider: "github", title: "Personal" }),
+ makeCred({ id: "c", provider: "github", title: "Work" }),
+ ]);
+ expect(groups.map((g) => g.id)).toEqual(["github", "openai"]);
+ expect(groups[0].credentials.map((c) => c.id)).toEqual(["b", "c"]);
+ });
+
+ test("falls back to formatted provider name when title is missing", () => {
+ const groups = groupCredentialsByProvider([
+ makeCred({ provider: "github", title: null }),
+ ]);
+ expect(groups[0].credentials[0].title).toBe("GitHub");
+ });
+});
+
+describe("filterProviders", () => {
+ const providers: ProviderGroupView[] = [
+ {
+ id: "github",
+ name: "GitHub",
+ credentials: [makeView({ id: "g1", title: "Personal" })],
+ },
+ {
+ id: "acai",
+ name: "Açaí",
+ credentials: [makeView({ id: "a1", title: "Smoothie" })],
+ },
+ {
+ id: "openai",
+ name: "OpenAI",
+ credentials: [
+ makeView({ id: "o1", title: "Work key", username: "Abhi" }),
+ ],
+ },
+ ];
+
+ test("returns the full list when query is blank", () => {
+ expect(filterProviders(providers, "")).toEqual(providers);
+ expect(filterProviders(providers, " ")).toEqual(providers);
+ });
+
+ test("matches by provider name case-insensitively", () => {
+ const result = filterProviders(providers, "github");
+ expect(result.map((p) => p.id)).toEqual(["github"]);
+ });
+
+ test("matches accented provider names against unaccented queries (NFKD)", () => {
+ const result = filterProviders(providers, "acai");
+ expect(result.map((p) => p.id)).toEqual(["acai"]);
+ });
+
+ test("matches accented queries against unaccented names (NFKD)", () => {
+ const ascii: ProviderGroupView[] = [
+ { id: "acai", name: "Acai", credentials: [makeView({ id: "x" })] },
+ ];
+ expect(filterProviders(ascii, "Açaí").map((p) => p.id)).toEqual(["acai"]);
+ });
+
+ test("matches inside credential titles when provider name does not match", () => {
+ const result = filterProviders(providers, "personal");
+ expect(result.map((p) => p.id)).toEqual(["github"]);
+ expect(result[0].credentials.map((c) => c.id)).toEqual(["g1"]);
+ });
+
+ test("matches inside credential usernames", () => {
+ const result = filterProviders(providers, "abhi");
+ expect(result.map((p) => p.id)).toEqual(["openai"]);
+ });
+
+ test("returns empty list when nothing matches", () => {
+ expect(filterProviders(providers, "no-such-thing")).toEqual([]);
+ });
+});
diff --git a/autogpt_platform/frontend/src/app/(platform)/settings/integrations/__tests__/main.test.tsx b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/__tests__/main.test.tsx
new file mode 100644
index 0000000000..4b38b8ef87
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/__tests__/main.test.tsx
@@ -0,0 +1,479 @@
+import { describe, expect, test, vi } from "vitest";
+
+import {
+ fireEvent,
+ render,
+ screen,
+ waitFor,
+ within,
+} from "@/tests/integrations/test-utils";
+import { server } from "@/mocks/mock-server";
+import {
+ getDeleteV1DeleteCredentialsMockHandler,
+ getDeleteV1DeleteCredentialsMockHandler401,
+ getGetV1ListCredentialsMockHandler,
+ getGetV1ListCredentialsMockHandler401,
+ getGetV1ListProvidersMockHandler,
+ getPostV1CreateCredentialsMockHandler,
+} from "@/app/api/__generated__/endpoints/integrations/integrations.msw";
+import type { CredentialsMetaResponse } from "@/app/api/__generated__/models/credentialsMetaResponse";
+import type { ProviderMetadata } from "@/app/api/__generated__/models/providerMetadata";
+
+import SettingsIntegrationsPage from "../page";
+
+function makeCred(
+ overrides: Partial<CredentialsMetaResponse> = {},
+): CredentialsMetaResponse {
+ return {
+ id: "cred-1",
+ provider: "github",
+ type: "api_key",
+ title: "Personal Token",
+ scopes: null,
+ username: null,
+ host: null,
+ is_managed: false,
+ ...overrides,
+ };
+}
+
+function makeProvider(
+ overrides: Partial<ProviderMetadata> = {},
+): ProviderMetadata {
+ return {
+ name: "github",
+ description: "Issues and PRs",
+ supported_auth_types: ["oauth2", "api_key"],
+ ...overrides,
+ };
+}
+
+describe("SettingsIntegrationsPage — list", () => {
+ test("renders the header and Connect Service control", async () => {
+ server.use(getGetV1ListCredentialsMockHandler([]));
+
+ render(<SettingsIntegrationsPage />);
+
+ expect(
+ await screen.findByRole("heading", { name: /integrations/i }),
+ ).toBeDefined();
+ const connectButtons = screen.getAllByRole("button", {
+ name: /connect.*service/i,
+ });
+ expect(connectButtons.length).toBeGreaterThan(0);
+ });
+
+ test("renders the empty state when the user has no credentials", async () => {
+ server.use(getGetV1ListCredentialsMockHandler([]));
+
+ render(<SettingsIntegrationsPage />);
+
+ const buttons = await screen.findAllByRole("button", {
+ name: /connect.*service/i,
+ });
+ expect(buttons.length).toBeGreaterThan(0);
+ expect(screen.queryByRole("button", { name: /select.*token/i })).toBeNull();
+ });
+
+ test("groups credentials by provider and renders one row per credential", async () => {
+ server.use(
+ getGetV1ListCredentialsMockHandler([
+ makeCred({
+ id: "g1",
+ provider: "github",
+ title: "Personal",
+ }),
+ makeCred({
+ id: "g2",
+ provider: "github",
+ title: "Work",
+ }),
+ makeCred({
+ id: "o1",
+ provider: "openai",
+ title: "OpenAI key",
+ }),
+ ]),
+ );
+
+ render(<SettingsIntegrationsPage />);
+
+ expect(await screen.findByText("Personal")).toBeDefined();
+ expect(screen.getByText("Work")).toBeDefined();
+ expect(screen.getByText("OpenAI key")).toBeDefined();
+
+ // Provider headers (formatted via formatProviderName).
+ expect(screen.getByText("GitHub")).toBeDefined();
+ expect(screen.getByText("OpenAI")).toBeDefined();
+ });
+
+ test("renders an error card on 401 instead of the empty state", async () => {
+ server.use(getGetV1ListCredentialsMockHandler401());
+
+ render(<SettingsIntegrationsPage />);
+
+ expect(await screen.findByText(/something went wrong/i)).toBeDefined();
+ });
+});
+
+describe("SettingsIntegrationsPage — delete", () => {
+ test("clicking the trash icon opens a confirm dialog naming the credential", async () => {
+ server.use(
+ getGetV1ListCredentialsMockHandler([
+ makeCred({ id: "g1", provider: "github", title: "Personal" }),
+ ]),
+ );
+
+ render(<SettingsIntegrationsPage />);
+
+ fireEvent.click(
+ await screen.findByRole("button", { name: /delete personal/i }),
+ );
+
+ const dialog = await screen.findByRole("dialog");
+ expect(within(dialog).getByText(/remove personal/i)).toBeDefined();
+ expect(
+ within(dialog).getByRole("button", { name: /^remove$/i }),
+ ).toBeDefined();
+ });
+
+ test("cancel in confirm dialog leaves the credential row in place", async () => {
+ server.use(
+ getGetV1ListCredentialsMockHandler([
+ makeCred({ id: "g1", provider: "github", title: "Personal" }),
+ ]),
+ );
+
+ render(<SettingsIntegrationsPage />);
+
+ fireEvent.click(
+ await screen.findByRole("button", { name: /delete personal/i }),
+ );
+ const dialog = await screen.findByRole("dialog");
+ fireEvent.click(within(dialog).getByRole("button", { name: /cancel/i }));
+
+ await waitFor(() => {
+ expect(screen.queryByRole("dialog")).toBeNull();
+ });
+ expect(screen.getByText("Personal")).toBeDefined();
+ });
+
+ test("confirming a delete fires the API and the row is gone after refetch", async () => {
+ server.use(
+ getGetV1ListCredentialsMockHandler([
+ makeCred({ id: "g1", provider: "github", title: "Personal" }),
+ ]),
+ getDeleteV1DeleteCredentialsMockHandler({
+ deleted: true,
+ revoked: null,
+ }),
+ );
+
+ render(<SettingsIntegrationsPage />);
+
+ fireEvent.click(
+ await screen.findByRole("button", { name: /delete personal/i }),
+ );
+ const dialog = await screen.findByRole("dialog");
+
+ // After the delete response, the list refetch returns no rows.
+ server.use(getGetV1ListCredentialsMockHandler([]));
+ fireEvent.click(within(dialog).getByRole("button", { name: /^remove$/i }));
+
+ await waitFor(() => {
+ expect(screen.queryByText("Personal")).toBeNull();
+ });
+ });
+});
+
+describe("SettingsIntegrationsPage — selection bar", () => {
+ test("selecting a credential exposes a bulk delete bar", async () => {
+ server.use(
+ getGetV1ListCredentialsMockHandler([
+ makeCred({ id: "g1", provider: "github", title: "Personal" }),
+ makeCred({ id: "g2", provider: "github", title: "Work" }),
+ ]),
+ );
+
+ render(<SettingsIntegrationsPage />);
+
+ fireEvent.click(
+ await screen.findByRole("checkbox", { name: /select personal/i }),
+ );
+
+ expect(await screen.findByText(/1 selected/i)).toBeDefined();
+ expect(
+ screen.getByRole("button", { name: /delete selected/i }),
+ ).toBeDefined();
+ });
+
+ test("Deselect clears the selection bar", async () => {
+ server.use(
+ getGetV1ListCredentialsMockHandler([
+ makeCred({ id: "g1", provider: "github", title: "Personal" }),
+ ]),
+ );
+
+ render(<SettingsIntegrationsPage />);
+
+ fireEvent.click(
+ await screen.findByRole("checkbox", { name: /select personal/i }),
+ );
+ await screen.findByText(/1 selected/i);
+ fireEvent.click(screen.getByRole("button", { name: /deselect/i }));
+
+ await waitFor(() => {
+ expect(screen.queryByText(/1 selected/i)).toBeNull();
+ });
+ });
+});
+
+describe("SettingsIntegrationsPage — search", () => {
+ test("debounced search filters the list to matches", async () => {
+ vi.useFakeTimers({ shouldAdvanceTime: true });
+ try {
+ server.use(
+ getGetV1ListCredentialsMockHandler([
+ makeCred({ id: "g1", provider: "github", title: "Personal" }),
+ makeCred({ id: "o1", provider: "openai", title: "OpenAI key" }),
+ ]),
+ );
+
+ render(<SettingsIntegrationsPage />);
+
+ await screen.findByText("Personal");
+
+ const input = screen.getByLabelText(/search integrations/i);
+ fireEvent.change(input, { target: { value: "openai" } });
+
+ // Push past the 250ms debounce.
+ vi.advanceTimersByTime(300);
+
+ await waitFor(() => {
+ expect(screen.queryByText("Personal")).toBeNull();
+ });
+ expect(screen.getByText("OpenAI key")).toBeDefined();
+ } finally {
+ vi.useRealTimers();
+ }
+ });
+});
+
+describe("SettingsIntegrationsPage — connect dialog", () => {
+ test("Connect Service opens a dialog with the provider list", async () => {
+ server.use(
+ getGetV1ListCredentialsMockHandler([]),
+ getGetV1ListProvidersMockHandler([
+ makeProvider({ name: "github", description: "Issues and PRs" }),
+ ]),
+ );
+
+ render(<SettingsIntegrationsPage />);
+
+ const connectButtons = await screen.findAllByRole("button", {
+ name: /connect.*service/i,
+ });
+ fireEvent.click(connectButtons[0]);
+
+ const dialog = await screen.findByRole("dialog");
+ expect(within(dialog).getByText(/connect a service/i)).toBeDefined();
+ expect(await within(dialog).findByText(/issues and prs/i)).toBeDefined();
+ });
+
+ test("clicking a provider in the list moves to the detail view with auth tabs", async () => {
+ server.use(
+ getGetV1ListCredentialsMockHandler([]),
+ getGetV1ListProvidersMockHandler([
+ makeProvider({
+ name: "linear",
+ description: "Issues and project tracking",
+ supported_auth_types: ["oauth2", "api_key"],
+ }),
+ ]),
+ );
+
+ render(<SettingsIntegrationsPage />);
+
+ const connectButtons = await screen.findAllByRole("button", {
+ name: /connect.*service/i,
+ });
+ fireEvent.click(connectButtons[0]);
+
+ const dialog = await screen.findByRole("dialog");
+ fireEvent.click(
+ await within(dialog).findByText(/issues and project tracking/i),
+ );
+
+ // Detail view: back arrow + provider name heading + both tab triggers.
+ expect(
+ await within(dialog).findByRole("button", { name: /back to services/i }),
+ ).toBeDefined();
+ expect(
+ within(dialog).getByRole("heading", { name: /linear/i }),
+ ).toBeDefined();
+ expect(within(dialog).getByRole("tab", { name: /oauth/i })).toBeDefined();
+ expect(within(dialog).getByRole("tab", { name: /api key/i })).toBeDefined();
+ });
+
+ test("API key tab: submitting the form posts credentials and closes the dialog", async () => {
+ server.use(
+ getGetV1ListCredentialsMockHandler([]),
+ getGetV1ListProvidersMockHandler([
+ makeProvider({
+ name: "openai",
+ description: "GPT models",
+ supported_auth_types: ["api_key"],
+ }),
+ ]),
+ getPostV1CreateCredentialsMockHandler({
+ id: "new-cred",
+ provider: "openai",
+ type: "api_key",
+ title: "My OpenAI key",
+ scopes: null,
+ username: null,
+ host: null,
+ is_managed: false,
+ }),
+ );
+
+ render(<SettingsIntegrationsPage />);
+
+ const connectButtons = await screen.findAllByRole("button", {
+ name: /connect.*service/i,
+ });
+ fireEvent.click(connectButtons[0]);
+
+ const dialog = await screen.findByRole("dialog");
+ fireEvent.click(await within(dialog).findByText(/gpt models/i));
+
+ // Two text inputs in the API-key form: title (placeholder "My … key") and
+ // the secret (placeholder "sk-...").
+ const titleInput =
+ await within(dialog).findByPlaceholderText(/my openai key/i);
+ const apiKeyInput = within(dialog).getByPlaceholderText(/^sk-\.\.\./);
+ fireEvent.change(titleInput, { target: { value: "My OpenAI key" } });
+ fireEvent.change(apiKeyInput, { target: { value: "sk-test-key-123" } });
+
+ // RHF onChange-mode validation flips formState.isValid asynchronously;
+ // wait until the Save button becomes enabled before clicking.
+ const saveBtn = within(dialog).getByRole("button", {
+ name: /save api key/i,
+ }) as HTMLButtonElement;
+ await waitFor(() => {
+ expect(saveBtn.disabled).toBe(false);
+ });
+ fireEvent.click(saveBtn);
+
+ await waitFor(() => {
+ expect(screen.queryByRole("dialog")).toBeNull();
+ });
+ });
+
+ test("Back from detail view returns to the provider list", async () => {
+ server.use(
+ getGetV1ListCredentialsMockHandler([]),
+ getGetV1ListProvidersMockHandler([
+ makeProvider({
+ name: "github",
+ description: "Issues and PRs",
+ supported_auth_types: ["api_key"],
+ }),
+ ]),
+ );
+
+ render(<SettingsIntegrationsPage />);
+
+ const connectButtons = await screen.findAllByRole("button", {
+ name: /connect.*service/i,
+ });
+ fireEvent.click(connectButtons[0]);
+
+ const dialog = await screen.findByRole("dialog");
+ fireEvent.click(await within(dialog).findByText(/issues and prs/i));
+
+ fireEvent.click(
+ await within(dialog).findByRole("button", { name: /back to services/i }),
+ );
+
+ expect(
+ await within(dialog).findByLabelText(/search services/i),
+ ).toBeDefined();
+ });
+});
+
+describe("SettingsIntegrationsPage — force delete", () => {
+ test("a need_confirmation response opens the force-delete dialog and confirming retries with force=true", async () => {
+ let deleteCalls = 0;
+ server.use(
+ getGetV1ListCredentialsMockHandler([
+ makeCred({ id: "g1", provider: "github", title: "Personal" }),
+ ]),
+ // First call (no force): backend asks for confirmation. Second call
+ // (force=true from the dialog) succeeds.
+ getDeleteV1DeleteCredentialsMockHandler(() => {
+ deleteCalls += 1;
+ if (deleteCalls === 1) {
+ return {
+ deleted: false,
+ need_confirmation: true,
+ message: "Webhook still active — confirm to force-remove.",
+ };
+ }
+ return { deleted: true, revoked: null };
+ }),
+ );
+
+ render(<SettingsIntegrationsPage />);
+
+ fireEvent.click(
+ await screen.findByRole("button", { name: /delete personal/i }),
+ );
+ const firstDialog = await screen.findByRole("dialog");
+ fireEvent.click(
+ within(firstDialog).getByRole("button", { name: /^remove$/i }),
+ );
+
+ // After the first response, the force-delete dialog auto-opens.
+ const forceDialog = await screen.findByRole("dialog", {
+ name: /force remove/i,
+ });
+ expect(within(forceDialog).getByText(/active webhook/i)).toBeDefined();
+
+ // The list refetch after a successful force-delete returns no rows.
+ server.use(getGetV1ListCredentialsMockHandler([]));
+ fireEvent.click(
+ within(forceDialog).getByRole("button", { name: /^force remove$/i }),
+ );
+
+ await waitFor(() => {
+ expect(screen.queryByText("Personal")).toBeNull();
+ });
+ expect(deleteCalls).toBe(2);
+ });
+});
+
+describe("SettingsIntegrationsPage — delete error path", () => {
+ test("a 401 on delete surfaces the failure toast and keeps the row", async () => {
+ server.use(
+ getGetV1ListCredentialsMockHandler([
+ makeCred({ id: "g1", provider: "github", title: "Personal" }),
+ ]),
+ getDeleteV1DeleteCredentialsMockHandler401(),
+ );
+
+ render(<SettingsIntegrationsPage />);
+
+ fireEvent.click(
+ await screen.findByRole("button", { name: /delete personal/i }),
+ );
+ const dialog = await screen.findByRole("dialog");
+ fireEvent.click(within(dialog).getByRole("button", { name: /^remove$/i }));
+
+ // Delete failed → row stays in the DOM after the dialog closes.
+ await waitFor(() => {
+ expect(screen.queryByRole("dialog")).toBeNull();
+ });
+ expect(screen.getByText("Personal")).toBeDefined();
+ });
+});
diff --git a/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ConnectServiceDialog/ConnectServiceDialog.tsx b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ConnectServiceDialog/ConnectServiceDialog.tsx
new file mode 100644
index 0000000000..e178b37174
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ConnectServiceDialog/ConnectServiceDialog.tsx
@@ -0,0 +1,133 @@
+"use client";
+
+import {
+ AnimatePresence,
+ MotionConfig,
+ motion,
+ useReducedMotion,
+} from "framer-motion";
+
+import { Dialog } from "@/components/molecules/Dialog/Dialog";
+import { ErrorCard } from "@/components/molecules/ErrorCard/ErrorCard";
+
+import { ListLoading, ListView } from "./components/ListView";
+import { DetailView } from "./components/DetailView/DetailView";
+import { useConnectServiceDialog } from "./useConnectServiceDialog";
+import { useMeasuredHeight } from "./useMeasuredHeight";
+
+interface Props {
+ open: boolean;
+ onOpenChange: (open: boolean) => void;
+}
+
+const TRANSITION = { duration: 0.15, ease: [0, 0, 0.2, 1] as const };
+const HEIGHT_TRANSITION = {
+ duration: 0.2,
+ ease: [0, 0, 0.2, 1] as const,
+};
+
+const stepVariants = {
+ initial: (direction: number) => ({ x: 16 * direction, opacity: 0 }),
+ active: { x: 0, opacity: 1 },
+ exit: (direction: number) => ({ x: -16 * direction, opacity: 0 }),
+};
+
+const reducedVariants = {
+ initial: { opacity: 0 },
+ active: { opacity: 1 },
+ exit: { opacity: 0 },
+};
+
+export function ConnectServiceDialog({ open, onOpenChange }: Props) {
+ const {
+ query,
+ setQuery,
+ providers,
+ isLoading,
+ isError,
+ error,
+ refetch,
+ view,
+ direction,
+ selectedProvider,
+ handleSelect,
+ handleBack,
+ handleSuccess,
+ } = useConnectServiceDialog({ open, onOpenChange });
+
+ const reduceMotion = useReducedMotion();
+ const variants = reduceMotion ? reducedVariants : stepVariants;
+ const [contentRef, contentHeight] = useMeasuredHeight<HTMLDivElement>();
+
+ return (
+ <Dialog
+ title="Connect a service"
+ styling={{ maxWidth: "40rem" }}
+ controlled={{
+ isOpen: open,
+ set: (next) => onOpenChange(next),
+ }}
+ >
+ <Dialog.Content>
+ <MotionConfig transition={TRANSITION}>
+ <motion.div
+ className="relative overflow-hidden"
+ animate={{ height: contentHeight ?? "auto" }}
+ transition={reduceMotion ? { duration: 0 } : HEIGHT_TRANSITION}
+ >
+ <div ref={contentRef}>
+ <AnimatePresence mode="wait" initial={false} custom={direction}>
+ {view === "list" ? (
+ <motion.div
+ key="list"
+ custom={direction}
+ variants={variants}
+ initial="initial"
+ animate="active"
+ exit="exit"
+ >
+ {isLoading ? (
+ <ListLoading />
+ ) : isError ? (
+ <ErrorCard
+ context="providers"
+ responseError={
+ error instanceof Error
+ ? { message: error.message }
+ : undefined
+ }
+ onRetry={() => refetch()}
+ />
+ ) : (
+ <ListView
+ query={query}
+ setQuery={setQuery}
+ providers={providers}
+ onSelect={handleSelect}
+ />
+ )}
+ </motion.div>
+ ) : (
+ <motion.div
+ key={`detail-${selectedProvider?.id}`}
+ custom={direction}
+ variants={variants}
+ initial="initial"
+ animate="active"
+ exit="exit"
+ >
+ <DetailView
+ provider={selectedProvider!}
+ onBack={handleBack}
+ onSuccess={handleSuccess}
+ />
+ </motion.div>
+ )}
+ </AnimatePresence>
+ </div>
+ </motion.div>
+ </MotionConfig>
+ </Dialog.Content>
+ </Dialog>
+ );
+}
diff --git a/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ConnectServiceDialog/__tests__/helpers.test.ts b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ConnectServiceDialog/__tests__/helpers.test.ts
new file mode 100644
index 0000000000..ec96f1ded5
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ConnectServiceDialog/__tests__/helpers.test.ts
@@ -0,0 +1,111 @@
+import { describe, expect, test } from "vitest";
+
+import type { ProviderMetadata } from "@/app/api/__generated__/models/providerMetadata";
+
+import {
+ filterConnectableProviders,
+ toConnectableProviders,
+ type ConnectableProvider,
+} from "../helpers";
+
+function makeMeta(overrides: Partial<ProviderMetadata> = {}): ProviderMetadata {
+ return {
+ name: "github",
+ description: "Issues and PRs",
+ supported_auth_types: ["oauth2", "api_key"],
+ ...overrides,
+ };
+}
+
+describe("toConnectableProviders", () => {
+ test("formats provider name and preserves description and supported types", () => {
+ const result = toConnectableProviders([
+ makeMeta({ name: "github", description: "Issues and PRs" }),
+ ]);
+ expect(result).toEqual([
+ {
+ id: "github",
+ name: "GitHub",
+ description: "Issues and PRs",
+ supportedAuthTypes: ["oauth2", "api_key"],
+ },
+ ]);
+ });
+
+ test("dedupes by name, sorts alphabetically by display name", () => {
+ const result = toConnectableProviders([
+ makeMeta({ name: "openai", supported_auth_types: ["api_key"] }),
+ makeMeta({ name: "github" }),
+ makeMeta({ name: "openai" }), // duplicate — should be dropped
+ ]);
+ expect(result.map((p) => p.id)).toEqual(["github", "openai"]);
+ });
+
+ test("filters unknown auth types out and tolerates missing supported_auth_types", () => {
+ const result = toConnectableProviders([
+ makeMeta({
+ name: "github",
+ // The `as never` cast simulates an unexpected value coming over the
+ // wire — we want unknowns ignored, not crashing the whole list.
+ supported_auth_types: ["oauth2", "weird_thing" as never],
+ }),
+ makeMeta({ name: "openai", supported_auth_types: undefined }),
+ ]);
+ const github = result.find((p) => p.id === "github");
+ const openai = result.find((p) => p.id === "openai");
+ expect(github?.supportedAuthTypes).toEqual(["oauth2"]);
+ expect(openai?.supportedAuthTypes).toEqual([]);
+ });
+});
+
+describe("filterConnectableProviders", () => {
+ const providers: ConnectableProvider[] = [
+ {
+ id: "github",
+ name: "GitHub",
+ description: "Issues and PRs",
+ supportedAuthTypes: ["oauth2", "api_key"],
+ },
+ {
+ id: "acai-juice",
+ name: "Açaí",
+ description: "Bowls",
+ supportedAuthTypes: ["api_key"],
+ },
+ {
+ id: "linear",
+ name: "Linear",
+ description: "Project tracking",
+ supportedAuthTypes: ["oauth2"],
+ },
+ ];
+
+ test("returns the full list for a blank query", () => {
+ expect(filterConnectableProviders(providers, "")).toEqual(providers);
+ expect(filterConnectableProviders(providers, " ")).toEqual(providers);
+ });
+
+ test("matches by name, slug, and description", () => {
+ expect(
+ filterConnectableProviders(providers, "github").map((p) => p.id),
+ ).toEqual(["github"]);
+ expect(
+ filterConnectableProviders(providers, "linear").map((p) => p.id),
+ ).toEqual(["linear"]);
+ expect(
+ filterConnectableProviders(providers, "tracking").map((p) => p.id),
+ ).toEqual(["linear"]);
+ });
+
+ test("matches accented names against unaccented queries (NFKD)", () => {
+ // The id is "acai-juice" so this query can only match by stripping
+ // diacritics from the name "Açaí".
+ expect(
+ filterConnectableProviders(providers, "acai").map((p) => p.id),
+ ).toEqual(["acai-juice"]);
+ });
+
+ test("returns an empty list when nothing matches", () => {
+ expect(filterConnectableProviders(providers, "nope")).toEqual([]);
+ });
+});
diff --git a/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ConnectServiceDialog/components/DetailView/ApiKeyConnectForm.tsx b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ConnectServiceDialog/components/DetailView/ApiKeyConnectForm.tsx
new file mode 100644
index 0000000000..9242511864
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ConnectServiceDialog/components/DetailView/ApiKeyConnectForm.tsx
@@ -0,0 +1,107 @@
+"use client";
+
+import { Button } from "@/components/atoms/Button/Button";
+import { Input } from "@/components/atoms/Input/Input";
+import {
+ Form,
+ FormControl,
+ FormField,
+ FormItem,
+ FormMessage,
+} from "@/components/molecules/Form/Form";
+
+import { useApiKeyConnectForm } from "./useApiKeyConnectForm";
+
+interface Props {
+ provider: string;
+ providerName: string;
+ onSuccess: () => void;
+}
+
+export function ApiKeyConnectForm({
+ provider,
+ providerName,
+ onSuccess,
+}: Props) {
+ const { form, handleSubmit, isPending } = useApiKeyConnectForm({
+ provider,
+ onSuccess,
+ });
+
+ return (
+ <Form form={form} onSubmit={handleSubmit} className="flex flex-col gap-4">
+ <FormField
+ control={form.control}
+ name="title"
+ render={({ field }) => (
+ <FormItem>
+ <FormControl>
+ <Input
+ {...field}
+ id={field.name}
+ autoComplete="off"
+ label="Name"
+ placeholder={`My ${providerName} key`}
+ wrapperClassName="!mb-0"
+ />
+ </FormControl>
+ <FormMessage />
+ </FormItem>
+ )}
+ />
+
+ <FormField
+ control={form.control}
+ name="apiKey"
+ render={({ field }) => (
+ <FormItem>
+ <FormControl>
+ <Input
+ {...field}
+ id={field.name}
+ type="password"
+ autoComplete="new-password"
+ spellCheck={false}
+ label="API key"
+ placeholder="sk-..."
+ wrapperClassName="!mb-0"
+ />
+ </FormControl>
+ <FormMessage />
+ </FormItem>
+ )}
+ />
+
+ <FormField
+ control={form.control}
+ name="expiresAt"
+ render={({ field }) => (
+ <FormItem>
+ <FormControl>
+ <Input
+ {...field}
+ value={field.value ?? ""}
+ id={field.name}
+ type="date"
+ label="Expires (optional)"
+ hint="Leave blank to keep the key indefinitely"
+ wrapperClassName="!mb-0"
+ />
+ </FormControl>
+ <FormMessage />
+ </FormItem>
+ )}
+ />
+
+ <Button
+ type="submit"
+ variant="primary"
+ size="large"
+ disabled={!form.formState.isValid || isPending}
+ loading={isPending}
+ >
+ Save API key
+ </Button>
+ </Form>
+ );
+}
diff --git a/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ConnectServiceDialog/components/DetailView/DetailView.tsx b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ConnectServiceDialog/components/DetailView/DetailView.tsx
new file mode 100644
index 0000000000..0711a34864
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ConnectServiceDialog/components/DetailView/DetailView.tsx
@@ -0,0 +1,123 @@
+"use client";
+
+import { ArrowLeftIcon } from "@phosphor-icons/react";
+import { motion, useReducedMotion } from "framer-motion";
+
+import { Button } from "@/components/atoms/Button/Button";
+import { Text } from "@/components/atoms/Text/Text";
+import {
+ TabsLine,
+ TabsLineContent,
+ TabsLineList,
+ TabsLineTrigger,
+} from "@/components/molecules/TabsLine/TabsLine";
+
+import { AuthType, ConnectableProvider, type AuthMethod } from "../../helpers";
+import { MethodPanel, TAB_LABEL } from "./MethodPanel";
+import { ProviderAvatar } from "./ProviderAvatar";
+import { UnsupportedNotice } from "./UnsupportedNotice";
+
+interface Props {
+ provider: ConnectableProvider;
+ onBack: () => void;
+ onSuccess: () => void;
+}
+
+const TAB_PRIORITY: AuthMethod[] = [
+ AuthType.oauth2,
+ AuthType.api_key,
+ AuthType.user_password,
+ AuthType.host_scoped,
+];
+
+// Per-provider last-selected tab. Lives in module scope so it survives dialog
+// close/reopen during the same session without surviving a hard refresh.
+const lastTabByProvider = new Map<string, AuthMethod>();
+
+// Standard product-UI ease-out — keep transitions under Emil's 300ms ceiling.
+const PANEL_TRANSITION = { duration: 0.18, ease: [0, 0, 0.2, 1] as const };
+
+export function DetailView({ provider, onBack, onSuccess }: Props) {
+ const description = provider.description;
+ const reduceMotion = useReducedMotion();
+ const tabs = TAB_PRIORITY.filter((method) =>
+ provider.supportedAuthTypes.includes(method),
+ );
+
+ const remembered = lastTabByProvider.get(provider.id);
+ const defaultTab =
+ remembered && tabs.includes(remembered) ? remembered : tabs[0];
+
+ return (
+ <div className="flex flex-col gap-5">
+ <div className="flex items-center gap-3">
+ <Button
+ variant="icon"
+ size="icon"
+ onClick={onBack}
+ aria-label="Back to services"
+ className="size-9"
+ withTooltip={false}
+ >
+ <ArrowLeftIcon size={18} />
+ </Button>
+ <ProviderAvatar id={provider.id} name={provider.name} />
+ <div className="flex min-w-0 flex-col gap-1">
+ <Text variant="h4" as="h2" className="text-[#1F1F20]">
+ {provider.name}
+ </Text>
+ {description ? (
+ <Text variant="small" className="truncate text-[#83838C]">
+ {description}
+ </Text>
+ ) : null}
+ </div>
+ </div>
+
+ {tabs.length === 0 ? (
+ <UnsupportedNotice providerName={provider.name} />
+ ) : tabs.length === 1 ? (
+ <MethodPanel
+ method={tabs[0]}
+ provider={provider}
+ onSuccess={onSuccess}
+ />
+ ) : (
+ <TabsLine
+ defaultValue={defaultTab}
+ onValueChange={(value) => {
+ const next = value as AuthMethod;
+ if (tabs.includes(next)) lastTabByProvider.set(provider.id, next);
+ }}
+ >
+ <TabsLineList>
+ {tabs.map((method) => (
+ <TabsLineTrigger key={method} value={method}>
+ {TAB_LABEL[method]}
+ </TabsLineTrigger>
+ ))}
+ </TabsLineList>
+ {tabs.map((method) => (
+ <TabsLineContent key={method} value={method}>
+ <motion.div
+ initial={
+ reduceMotion
+ ? { opacity: 0 }
+ : { opacity: 0, x: 6, filter: "blur(2px)" }
+ }
+ animate={{ opacity: 1, x: 0, filter: "blur(0px)" }}
+ transition={PANEL_TRANSITION}
+ >
+ <MethodPanel
+ method={method}
+ provider={provider}
+ onSuccess={onSuccess}
+ />
+ </motion.div>
+ </TabsLineContent>
+ ))}
+ </TabsLine>
+ )}
+ </div>
+ );
+}
diff --git a/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ConnectServiceDialog/components/DetailView/MethodPanel.tsx b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ConnectServiceDialog/components/DetailView/MethodPanel.tsx
new file mode 100644
index 0000000000..20d5d1bede
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ConnectServiceDialog/components/DetailView/MethodPanel.tsx
@@ -0,0 +1,52 @@
+"use client";
+
+import {
+ AuthType,
+ type AuthMethod,
+ type ConnectableProvider,
+} from "../../helpers";
+import { ApiKeyConnectForm } from "./ApiKeyConnectForm";
+import { OAuthConnectButton } from "./OAuthConnectButton";
+import { UnsupportedNotice } from "./UnsupportedNotice";
+
+const TAB_LABEL: Record<AuthMethod, string> = {
+ [AuthType.oauth2]: "OAuth",
+ [AuthType.api_key]: "API key",
+ [AuthType.user_password]: "User / password",
+ [AuthType.host_scoped]: "Host",
+};
+
+interface Props {
+ method: AuthMethod;
+ provider: ConnectableProvider;
+ onSuccess: () => void;
+}
+
+export function MethodPanel({ method, provider, onSuccess }: Props) {
+ if (method === AuthType.oauth2) {
+ return (
+ <OAuthConnectButton
+ provider={provider.id}
+ providerName={provider.name}
+ onSuccess={onSuccess}
+ />
+ );
+ }
+ if (method === AuthType.api_key) {
+ return (
+ <ApiKeyConnectForm
+ provider={provider.id}
+ providerName={provider.name}
+ onSuccess={onSuccess}
+ />
+ );
+ }
+ return (
+ <UnsupportedNotice
+ providerName={provider.name}
+ detail={`${TAB_LABEL[method]} sign-in for ${provider.name} is not yet wired up in this dialog.`}
+ />
+ );
+}
+
+export { TAB_LABEL };
diff --git a/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ConnectServiceDialog/components/DetailView/OAuthConnectButton.tsx b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ConnectServiceDialog/components/DetailView/OAuthConnectButton.tsx
new file mode 100644
index 0000000000..144f50a1ef
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ConnectServiceDialog/components/DetailView/OAuthConnectButton.tsx
@@ -0,0 +1,41 @@
+"use client";
+
+import { ArrowSquareOutIcon } from "@phosphor-icons/react";
+
+import { Button } from "@/components/atoms/Button/Button";
+import { Text } from "@/components/atoms/Text/Text";
+
+import { useOAuthConnect } from "./useOAuthConnect";
+
+interface Props {
+ provider: string;
+ providerName: string;
+ onSuccess: () => void;
+}
+
+export function OAuthConnectButton({
+ provider,
+ providerName,
+ onSuccess,
+}: Props) {
+ const { connect, isPending } = useOAuthConnect({ provider, onSuccess });
+
+ return (
+ <div className="flex flex-col gap-3">
+ <Text variant="body" className="text-[#505057]">
+ We&apos;ll open {providerName} in a popup. After approving, you&apos;ll
+ come right back.
+ </Text>
+ <Button
+ type="button"
+ variant="primary"
+ size="large"
+ onClick={connect}
+ loading={isPending}
+ rightIcon={<ArrowSquareOutIcon size={18} />}
+ >
+ Continue with {providerName}
+ </Button>
+ </div>
+ );
+}
diff --git a/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ConnectServiceDialog/components/DetailView/ProviderAvatar.tsx b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ConnectServiceDialog/components/DetailView/ProviderAvatar.tsx
new file mode 100644
index 0000000000..b5ee772a2e
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ConnectServiceDialog/components/DetailView/ProviderAvatar.tsx
@@ -0,0 +1,35 @@
+"use client";
+
+import Image from "next/image";
+import { useState } from "react";
+
+interface Props {
+ id: string;
+ name: string;
+}
+
+export function ProviderAvatar({ id, name }: Props) {
+ const src = `/integrations/${id}.png`;
+ const [brokenSrc, setBrokenSrc] = useState<string | null>(null);
+ if (brokenSrc === src) {
+ return (
+ <div
+ aria-hidden
+ className="flex size-10 shrink-0 items-center justify-center rounded-md bg-zinc-100 text-[16px] font-semibold uppercase text-zinc-600"
+ >
+ {name?.charAt(0) ?? id.charAt(0)}
+ </div>
+ );
+ }
+ return (
+ <Image
+ src={src}
+ alt={`${name} logo`}
+ width={40}
+ height={40}
+ loading="lazy"
+ onError={() => setBrokenSrc(src)}
+ className="size-10 shrink-0 object-contain"
+ />
+ );
+}
diff --git a/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ConnectServiceDialog/components/DetailView/UnsupportedNotice.tsx b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ConnectServiceDialog/components/DetailView/UnsupportedNotice.tsx
new file mode 100644
index 0000000000..12af9cfab9
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ConnectServiceDialog/components/DetailView/UnsupportedNotice.tsx
@@ -0,0 +1,25 @@
+"use client";
+
+import { PlugIcon } from "@phosphor-icons/react";
+
+import { Text } from "@/components/atoms/Text/Text";
+
+interface Props {
+ providerName: string;
+ detail?: string;
+}
+
+export function UnsupportedNotice({ providerName, detail }: Props) {
+ return (
+ <div className="flex flex-col items-center gap-3 rounded-2xl border border-dashed border-[#DADADC] px-6 py-10 text-center">
+ <PlugIcon size={28} className="text-[#83838C]" />
+ <Text variant="body" className="text-[#1F1F20]">
+ No connection method available
+ </Text>
+ <Text variant="small" className="max-w-[360px] text-[#83838C]">
+ {detail ??
+ `${providerName} doesn't currently expose a connection flow you can manage from settings. Add a block that uses ${providerName} to enable this.`}
+ </Text>
+ </div>
+ );
+}
diff --git a/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ConnectServiceDialog/components/DetailView/schema.ts b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ConnectServiceDialog/components/DetailView/schema.ts
new file mode 100644
index 0000000000..b722b40787
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ConnectServiceDialog/components/DetailView/schema.ts
@@ -0,0 +1,35 @@
+import { z } from "zod";
+
+export const apiKeyConnectSchema = z
+ .object({
+ title: z
+ .string()
+ .trim()
+ .min(1, "Name is required")
+ .max(100, "Name must be 100 characters or less"),
+ apiKey: z.string().trim().min(1, "API key is required"),
+ expiresAt: z
+ .string()
+ .trim()
+ .optional()
+ .superRefine((value, ctx) => {
+ if (!value) return;
+ const parsed = Date.parse(value);
+ if (Number.isNaN(parsed)) {
+ ctx.addIssue({
+ code: z.ZodIssueCode.custom,
+ message: "Pick a valid date",
+ });
+ return;
+ }
+ if (parsed <= Date.now()) {
+ ctx.addIssue({
+ code: z.ZodIssueCode.custom,
+ message: "Expiry must be in the future",
+ });
+ }
+ }),
+ })
+ .strict();
+
+export type ApiKeyConnectFormValues = z.infer<typeof apiKeyConnectSchema>;
diff --git a/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ConnectServiceDialog/components/DetailView/useApiKeyConnectForm.ts b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ConnectServiceDialog/components/DetailView/useApiKeyConnectForm.ts
new file mode 100644
index 0000000000..349c85d28e
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ConnectServiceDialog/components/DetailView/useApiKeyConnectForm.ts
@@ -0,0 +1,71 @@
+"use client";
+
+import { useState } from "react";
+import { zodResolver } from "@hookform/resolvers/zod";
+import { useForm } from "react-hook-form";
+import { useQueryClient } from "@tanstack/react-query";
+
+import {
+ getGetV1ListCredentialsQueryKey,
+ postV1CreateCredentials,
+} from "@/app/api/__generated__/endpoints/integrations/integrations";
+import { toast } from "@/components/molecules/Toast/use-toast";
+
+import { apiKeyConnectSchema, type ApiKeyConnectFormValues } from "./schema";
+
+interface Args {
+ provider: string;
+ onSuccess: () => void;
+}
+
+function toUnixSeconds(value: string | undefined): number | undefined {
+ if (!value) return undefined;
+ const ms = Date.parse(value);
+ if (Number.isNaN(ms)) return undefined;
+ return Math.floor(ms / 1000);
+}
+
+export function useApiKeyConnectForm({ provider, onSuccess }: Args) {
+ const queryClient = useQueryClient();
+ const [isPending, setIsPending] = useState(false);
+
+ const form = useForm<ApiKeyConnectFormValues>({
+ resolver: zodResolver(apiKeyConnectSchema),
+ defaultValues: { title: "", apiKey: "", expiresAt: "" },
+ mode: "onChange",
+ });
+
+ async function handleSubmit(values: ApiKeyConnectFormValues) {
+ setIsPending(true);
+ try {
+ // customMutator throws on non-2xx, so reaching this line means success.
+ // Trust HTTP semantics rather than pinning to a specific 2xx code —
+ // proxies / future backend changes can swap 201 ↔ 200 without this
+ // breaking and silently failing in production.
+ await postV1CreateCredentials(provider, {
+ provider,
+ type: "api_key",
+ title: values.title,
+ api_key: values.apiKey,
+ expires_at: toUnixSeconds(values.expiresAt),
+ });
+
+ toast({ title: "API key saved", variant: "success" });
+ await queryClient.invalidateQueries({
+ queryKey: getGetV1ListCredentialsQueryKey(),
+ });
+ onSuccess();
+ } catch (error) {
+ toast({
+ title: "Couldn't save API key",
+ description:
+ error instanceof Error ? error.message : "Unexpected error",
+ variant: "destructive",
+ });
+ } finally {
+ setIsPending(false);
+ }
+ }
+
+ return { form, handleSubmit, isPending };
+}
diff --git a/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ConnectServiceDialog/components/DetailView/useOAuthConnect.ts b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ConnectServiceDialog/components/DetailView/useOAuthConnect.ts
new file mode 100644
index 0000000000..f7f95b7b0b
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ConnectServiceDialog/components/DetailView/useOAuthConnect.ts
@@ -0,0 +1,76 @@
+"use client";
+
+import { useEffect, useRef, useState } from "react";
+import { useQueryClient } from "@tanstack/react-query";
+
+import {
+ getGetV1ListCredentialsQueryKey,
+ getV1InitiateOauthFlow,
+ postV1ExchangeOauthCodeForTokens,
+} from "@/app/api/__generated__/endpoints/integrations/integrations";
+import { toast } from "@/components/molecules/Toast/use-toast";
+import { openOAuthPopup } from "@/lib/oauth-popup";
+
+interface Args {
+ provider: string;
+ onSuccess: () => void;
+}
+
+export function useOAuthConnect({ provider, onSuccess }: Args) {
+ const queryClient = useQueryClient();
+ const [isPending, setIsPending] = useState(false);
+ const abortRef = useRef<(() => void) | null>(null);
+ const isUnmountedRef = useRef(false);
+
+ useEffect(() => {
+ return () => {
+ isUnmountedRef.current = true;
+ abortRef.current?.();
+ };
+ }, []);
+
+ async function connect() {
+ setIsPending(true);
+ try {
+ const initiateResponse = await getV1InitiateOauthFlow(provider);
+ // customMutator rejects non-2xx, so this branch is unreachable at
+ // runtime — it exists only to narrow the discriminated union so the
+ // 200-only LoginResponse shape is accessible below.
+ if (initiateResponse.status !== 200) {
+ throw new Error("Unexpected OAuth initiate response");
+ }
+ const { login_url, state_token } = initiateResponse.data;
+
+ const { promise, cleanup } = openOAuthPopup(login_url, {
+ stateToken: state_token,
+ });
+ abortRef.current = () => cleanup.abort("unmounted");
+
+ const { code, state } = await promise;
+ abortRef.current = null;
+
+ await postV1ExchangeOauthCodeForTokens(provider, {
+ code,
+ state_token: state,
+ });
+
+ toast({ title: "Connected via OAuth", variant: "success" });
+ await queryClient.invalidateQueries({
+ queryKey: getGetV1ListCredentialsQueryKey(),
+ });
+ onSuccess();
+ } catch (error) {
+ if (isUnmountedRef.current) return;
+ toast({
+ title: "OAuth connection failed",
+ description:
+ error instanceof Error ? error.message : "Unexpected error",
+ variant: "destructive",
+ });
+ } finally {
+ setIsPending(false);
+ }
+ }
+
+ return { connect, isPending };
+}
diff --git a/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ConnectServiceDialog/components/ListView.tsx b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ConnectServiceDialog/components/ListView.tsx
new file mode 100644
index 0000000000..f28e28bc7f
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ConnectServiceDialog/components/ListView.tsx
@@ -0,0 +1,83 @@
+"use client";
+
+import { MagnifyingGlassIcon, PlugIcon } from "@phosphor-icons/react";
+
+import { Text } from "@/components/atoms/Text/Text";
+import { Skeleton } from "@/components/atoms/Skeleton/Skeleton";
+import { ScrollArea } from "@/components/ui/scroll-area";
+
+import type { ConnectableProvider } from "../helpers";
+import { ProviderRow } from "./ProviderRow";
+
+interface Props {
+ query: string;
+ setQuery: (next: string) => void;
+ providers: ConnectableProvider[];
+ onSelect: (id: string) => void;
+}
+
+export function ListView({ query, setQuery, providers, onSelect }: Props) {
+ return (
+ <div className="flex flex-col gap-4">
+ <Text variant="body" className="text-[#505057]">
+ Pick a service to connect an API key or authorize with OAuth.
+ </Text>
+
+ <div className="relative w-full">
+ <MagnifyingGlassIcon
+ size={20}
+ className="pointer-events-none absolute left-4 top-1/2 -translate-y-1/2 text-[#83838C]"
+ />
+ <input
+ type="text"
+ value={query}
+ onChange={(e) => setQuery(e.target.value)}
+ placeholder="Search services..."
+ aria-label="Search services"
+ className="h-[46px] w-full rounded-3xl border border-[#DADADC] bg-white pl-12 pr-4 text-sm leading-[22px] text-[#1F1F20] placeholder:text-[#83838C] focus:border-purple-400 focus:outline-none focus:ring-1 focus:ring-purple-400"
+ />
+ </div>
+
+ {providers.length === 0 ? (
+ <div className="flex flex-col items-center justify-center gap-2 rounded-2xl border border-dashed border-[#DADADC] py-10 text-center">
+ <PlugIcon size={24} className="text-[#83838C]" />
+ <Text variant="body" className="text-[#505057]">
+ {query.trim()
+ ? `No services match "${query.trim()}"`
+ : "No services available"}
+ </Text>
+ </div>
+ ) : (
+ <div className="relative">
+ <ScrollArea className="h-[380px] pr-2">
+ <ul className="flex flex-col gap-2 pb-4">
+ {providers.map((provider) => (
+ <li key={provider.id}>
+ <ProviderRow provider={provider} onSelect={onSelect} />
+ </li>
+ ))}
+ </ul>
+ </ScrollArea>
+ <div
+ aria-hidden
+ className="pointer-events-none absolute inset-x-0 bottom-0 h-10 bg-gradient-to-t from-white to-transparent"
+ />
+ </div>
+ )}
+ </div>
+ );
+}
+
+export function ListLoading() {
+ return (
+ <div className="flex flex-col gap-4">
+ <Skeleton className="h-5 w-3/4" />
+ <Skeleton className="h-[46px] w-full rounded-3xl" />
+ <div className="flex flex-col gap-2">
+ {[0, 1, 2, 3, 4].map((i) => (
+ <Skeleton key={i} className="h-16 w-full rounded-xl" />
+ ))}
+ </div>
+ </div>
+ );
+}
diff --git a/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ConnectServiceDialog/components/ProviderRow.tsx b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ConnectServiceDialog/components/ProviderRow.tsx
new file mode 100644
index 0000000000..d6c81ec183
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ConnectServiceDialog/components/ProviderRow.tsx
@@ -0,0 +1,59 @@
+"use client";
+
+import Image from "next/image";
+import { useState } from "react";
+import { PlusIcon } from "@phosphor-icons/react";
+
+import type { ConnectableProvider } from "../helpers";
+
+interface Props {
+ provider: ConnectableProvider;
+ onSelect: (id: string) => void;
+}
+
+export function ProviderRow({ provider, onSelect }: Props) {
+ const src = `/integrations/${provider.id}.png`;
+ const [brokenSrc, setBrokenSrc] = useState<string | null>(null);
+ const broken = brokenSrc === src;
+
+ return (
+ <button
+ type="button"
+ onClick={() => onSelect(provider.id)}
+ className="group flex h-16 w-full items-center gap-3 rounded-xl border border-zinc-200 bg-white px-[0.875rem] py-[0.625rem] text-left transition-colors hover:bg-zinc-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-purple-400 active:bg-zinc-100"
+ >
+ {broken ? (
+ <div
+ aria-hidden
+ className="flex size-9 shrink-0 items-center justify-center rounded-md bg-zinc-100 text-[14px] font-semibold uppercase text-zinc-600"
+ >
+ {provider.name?.charAt(0) ?? provider.id.charAt(0)}
+ </div>
+ ) : (
+ <Image
+ src={src}
+ alt=""
+ width={36}
+ height={36}
+ loading="lazy"
+ className="size-9 shrink-0 object-contain"
+ onError={() => setBrokenSrc(src)}
+ />
+ )}
+ <span className="flex min-w-0 flex-1 flex-col gap-0.5">
+ <span className="truncate text-[14px] font-medium leading-[22px] text-zinc-800">
+ {provider.name}
+ </span>
+ <span className="truncate text-[12px] leading-[20px] text-zinc-500">
+ {provider.description ?? provider.id}
+ </span>
+ </span>
+ <span
+ aria-hidden
+ className="flex size-7 shrink-0 items-center justify-center rounded-lg bg-zinc-700 text-white transition-transform group-hover:bg-zinc-800 group-active:scale-[0.96]"
+ >
+ <PlusIcon size={18} weight="bold" />
+ </span>
+ </button>
+ );
+}
diff --git a/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ConnectServiceDialog/helpers.ts b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ConnectServiceDialog/helpers.ts
new file mode 100644
index 0000000000..8754480c58
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ConnectServiceDialog/helpers.ts
@@ -0,0 +1,63 @@
+import type { ProviderMetadata } from "@/app/api/__generated__/models/providerMetadata";
+import { ProviderMetadataSupportedAuthTypesItem as AuthType } from "@/app/api/__generated__/models/providerMetadataSupportedAuthTypesItem";
+
+import { formatProviderName } from "../../helpers";
+
+export type AuthMethod = (typeof AuthType)[keyof typeof AuthType];
+
+export { AuthType };
+
+export interface ConnectableProvider {
+ id: string;
+ name: string;
+ description?: string | null;
+ supportedAuthTypes: AuthMethod[];
+}
+
+const KNOWN_AUTH_METHODS: ReadonlySet<AuthMethod> = new Set(
+ Object.values(AuthType),
+);
+
+function normalizeAuthTypes(
+ raw: readonly AuthMethod[] | undefined,
+): AuthMethod[] {
+ if (!raw) return [];
+ return raw.filter((t) => KNOWN_AUTH_METHODS.has(t));
+}
+
+export function toConnectableProviders(
+ metadata: ProviderMetadata[],
+): ConnectableProvider[] {
+ const seen = new Set<string>();
+ const result: ConnectableProvider[] = [];
+ for (const item of metadata) {
+ if (seen.has(item.name)) continue;
+ seen.add(item.name);
+ result.push({
+ id: item.name,
+ name: formatProviderName(item.name),
+ description: item.description,
+ supportedAuthTypes: normalizeAuthTypes(item.supported_auth_types),
+ });
+ }
+ result.sort((a, b) => a.name.localeCompare(b.name));
+ return result;
+}
+
+function normalize(text: string): string {
+ return text.normalize("NFKD").replace(/[̀-ͯ]/g, "").toLowerCase();
+}
+
+export function filterConnectableProviders(
+ providers: ConnectableProvider[],
+ query: string,
+): ConnectableProvider[] {
+ const q = normalize(query.trim());
+ if (!q) return providers;
+ return providers.filter((p) => {
+ if (normalize(p.name).includes(q)) return true;
+ if (normalize(p.id).includes(q)) return true;
+ if (p.description && normalize(p.description).includes(q)) return true;
+ return false;
+ });
+}
diff --git a/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ConnectServiceDialog/useConnectServiceDialog.ts b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ConnectServiceDialog/useConnectServiceDialog.ts
new file mode 100644
index 0000000000..dc4a71dc79
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ConnectServiceDialog/useConnectServiceDialog.ts
@@ -0,0 +1,78 @@
+"use client";
+
+import { useEffect, useState } from "react";
+
+import { useGetV1ListProviders } from "@/app/api/__generated__/endpoints/integrations/integrations";
+
+import { useDebouncedValue } from "../hooks/useDebouncedValue";
+import {
+ filterConnectableProviders,
+ toConnectableProviders,
+ type ConnectableProvider,
+} from "./helpers";
+
+interface Args {
+ open: boolean;
+ onOpenChange: (open: boolean) => void;
+}
+
+export function useConnectServiceDialog({ open, onOpenChange }: Args) {
+ const [query, setQuery] = useState("");
+ const debouncedQuery = useDebouncedValue(query, 250);
+ const [selectedId, setSelectedId] = useState<string | null>(null);
+ const [direction, setDirection] = useState<1 | -1>(1);
+
+ const providersQuery = useGetV1ListProviders({
+ query: {
+ enabled: open,
+ select: (response) => (response.status === 200 ? response.data : []),
+ },
+ });
+
+ useEffect(() => {
+ if (!open) {
+ setQuery("");
+ setSelectedId(null);
+ setDirection(1);
+ }
+ }, [open]);
+
+ const allProviders = toConnectableProviders(providersQuery.data ?? []);
+ const providers = filterConnectableProviders(allProviders, debouncedQuery);
+
+ const selectedProvider: ConnectableProvider | null = selectedId
+ ? (allProviders.find((p) => p.id === selectedId) ?? null)
+ : null;
+
+ const view: "list" | "detail" = selectedProvider ? "detail" : "list";
+
+ function handleSelect(providerId: string) {
+ setDirection(1);
+ setSelectedId(providerId);
+ }
+
+ function handleBack() {
+ setDirection(-1);
+ setSelectedId(null);
+ }
+
+ function handleSuccess() {
+ onOpenChange(false);
+ }
+
+ return {
+ query,
+ setQuery,
+ providers,
+ isLoading: providersQuery.isLoading,
+ isError: providersQuery.isError,
+ error: providersQuery.error,
+ refetch: providersQuery.refetch,
+ view,
+ direction,
+ selectedProvider,
+ handleSelect,
+ handleBack,
+ handleSuccess,
+ };
+}
diff --git a/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ConnectServiceDialog/useMeasuredHeight.ts b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ConnectServiceDialog/useMeasuredHeight.ts
new file mode 100644
index 0000000000..9698693c1e
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ConnectServiceDialog/useMeasuredHeight.ts
@@ -0,0 +1,22 @@
+"use client";
+
+import { useLayoutEffect, useRef, useState } from "react";
+
+export function useMeasuredHeight<T extends HTMLElement>() {
+ const ref = useRef<T | null>(null);
+ const [height, setHeight] = useState<number | undefined>(undefined);
+
+ useLayoutEffect(() => {
+ const node = ref.current;
+ if (!node) return;
+ setHeight(node.offsetHeight);
+ const observer = new ResizeObserver((entries) => {
+ const next = entries[0]?.contentRect.height;
+ if (typeof next === "number") setHeight(next);
+ });
+ observer.observe(node);
+ return () => observer.disconnect();
+ }, []);
+
+ return [ref, height] as const;
+}
diff --git a/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/CredentialRow/CredentialRow.tsx b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/CredentialRow/CredentialRow.tsx
new file mode 100644
index 0000000000..26c487e119
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/CredentialRow/CredentialRow.tsx
@@ -0,0 +1,89 @@
+"use client";
+
+import {
+ CheckSquareIcon,
+ SpinnerIcon,
+ SquareIcon,
+ TrashIcon,
+} from "@phosphor-icons/react";
+
+import {
+ formatMaskedValue,
+ typeBadgeLabel,
+ type CredentialView,
+} from "../../helpers";
+
+interface Props {
+ credential: CredentialView;
+ selected: boolean;
+ onToggleSelected: () => void;
+ onDelete: () => void;
+ isDeleting?: boolean;
+}
+
+export function CredentialRow({
+ credential,
+ selected,
+ onToggleSelected,
+ onDelete,
+ isDeleting = false,
+}: Props) {
+ return (
+ <div
+ data-selected={selected}
+ className="flex w-full items-center justify-between py-3 pl-3 pr-5 transition-colors data-[selected=true]:bg-zinc-100"
+ >
+ <div className="flex items-center gap-3">
+ <button
+ type="button"
+ role="checkbox"
+ aria-checked={selected}
+ aria-label={`Select ${credential.title}`}
+ onClick={onToggleSelected}
+ className={`shrink-0 transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-zinc-800 ${
+ selected
+ ? "text-zinc-800 hover:text-zinc-900"
+ : "text-zinc-500 hover:text-zinc-700"
+ }`}
+ >
+ {selected ? (
+ <CheckSquareIcon size={20} weight="fill" />
+ ) : (
+ <SquareIcon size={20} />
+ )}
+ </button>
+
+ <div className="flex flex-col gap-1">
+ <div className="flex items-center gap-3">
+ <span className="text-[14px] font-medium leading-[22px] text-[#1F1F20]">
+ {credential.title}
+ </span>
+ <span className="inline-flex items-center justify-center rounded-[10px] bg-[#EFF1F4] px-2 py-[2px] text-[12px] font-medium leading-[20px] text-[#505057]">
+ {typeBadgeLabel(credential.type)}
+ </span>
+ </div>
+ <div className="flex items-center gap-3 leading-[20px]">
+ <span className="text-[11px] font-medium uppercase tracking-[1.1px] text-[#505057]">
+ {formatMaskedValue(credential)}
+ </span>
+ </div>
+ </div>
+ </div>
+
+ <button
+ type="button"
+ onClick={onDelete}
+ disabled={isDeleting}
+ aria-busy={isDeleting}
+ aria-label={`Delete ${credential.title}`}
+ className="inline-flex size-5 items-center justify-center text-[#1F1F20] transition-colors hover:text-red-500 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-purple-400 disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:text-[#1F1F20]"
+ >
+ {isDeleting ? (
+ <SpinnerIcon size={20} className="animate-spin" />
+ ) : (
+ <TrashIcon size={20} />
+ )}
+ </button>
+ </div>
+ );
+}
diff --git a/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/DeleteConfirmDialog/DeleteConfirmDialog.tsx b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/DeleteConfirmDialog/DeleteConfirmDialog.tsx
new file mode 100644
index 0000000000..0c39ca7c3c
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/DeleteConfirmDialog/DeleteConfirmDialog.tsx
@@ -0,0 +1,97 @@
+"use client";
+
+import { WarningCircleIcon } from "@phosphor-icons/react";
+
+import { Button } from "@/components/atoms/Button/Button";
+import { Text } from "@/components/atoms/Text/Text";
+import { Dialog } from "@/components/molecules/Dialog/Dialog";
+
+interface Props {
+ open: boolean;
+ onOpenChange: (open: boolean) => void;
+ itemNames: string[];
+ isPending?: boolean;
+ onConfirm: () => void;
+ variant?: "remove" | "force";
+}
+
+export function DeleteConfirmDialog({
+ open,
+ onOpenChange,
+ itemNames,
+ isPending = false,
+ onConfirm,
+ variant = "remove",
+}: Props) {
+ const count = itemNames.length;
+ const isBulk = count > 1;
+ const preview = itemNames.slice(0, 3).join(", ");
+ const more = count > 3 ? ` and ${count - 3} more` : "";
+ const isForce = variant === "force";
+ const title = isForce
+ ? isBulk
+ ? `Force remove ${count} integrations?`
+ : `Force remove ${itemNames[0] ?? "this integration"}?`
+ : isBulk
+ ? `Remove ${count} integrations?`
+ : `Remove ${itemNames[0] ?? "this integration"}?`;
+ const message = isForce
+ ? isBulk
+ ? "These credentials are referenced by active webhooks or workflows. Forcing removal may break them."
+ : "This credential is referenced by an active webhook or workflow. Forcing removal may break it."
+ : isBulk
+ ? "This action cannot be undone. Agents using these credentials will lose access immediately."
+ : "This action cannot be undone. Agents using this credential will lose access immediately.";
+ const confirmLabel = isForce ? "Force remove" : "Remove";
+
+ return (
+ <Dialog
+ title={title}
+ styling={{ maxWidth: "28rem" }}
+ controlled={{ isOpen: open, set: onOpenChange }}
+ >
+ <Dialog.Content>
+ <div className="flex flex-col gap-4">
+ <div className="flex items-start gap-3">
+ <WarningCircleIcon
+ size={20}
+ weight="fill"
+ className="mt-0.5 shrink-0 text-red-500"
+ />
+ <div className="flex flex-col gap-1">
+ <Text variant="body" className="text-zinc-800">
+ {message}
+ </Text>
+ {isBulk && preview ? (
+ <Text variant="small" className="text-zinc-500">
+ {preview}
+ {more}
+ </Text>
+ ) : null}
+ </div>
+ </div>
+
+ <div className="flex justify-end gap-2 pt-2">
+ <Button
+ variant="secondary"
+ size="small"
+ onClick={() => onOpenChange(false)}
+ disabled={isPending}
+ >
+ Cancel
+ </Button>
+ <Button
+ variant="destructive"
+ size="small"
+ onClick={onConfirm}
+ loading={isPending}
+ disabled={isPending}
+ >
+ {confirmLabel}
+ </Button>
+ </div>
+ </div>
+ </Dialog.Content>
+ </Dialog>
+ );
+}
diff --git a/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/DeleteConfirmDialog/__tests__/DeleteConfirmDialog.test.tsx b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/DeleteConfirmDialog/__tests__/DeleteConfirmDialog.test.tsx
new file mode 100644
index 0000000000..213d3dd7a7
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/DeleteConfirmDialog/__tests__/DeleteConfirmDialog.test.tsx
@@ -0,0 +1,103 @@
+import { describe, expect, test, vi } from "vitest";
+
+import { fireEvent, render, screen } from "@/tests/integrations/test-utils";
+
+import { DeleteConfirmDialog } from "../DeleteConfirmDialog";
+
+describe("DeleteConfirmDialog", () => {
+ test("does not render when closed", () => {
+ render(
+ <DeleteConfirmDialog
+ open={false}
+ onOpenChange={() => {}}
+ itemNames={["GitHub key"]}
+ onConfirm={() => {}}
+ />,
+ );
+ expect(screen.queryByRole("dialog")).toBeNull();
+ });
+
+ test("single delete: titles the dialog with the credential name", () => {
+ render(
+ <DeleteConfirmDialog
+ open
+ onOpenChange={() => {}}
+ itemNames={["GitHub key"]}
+ onConfirm={() => {}}
+ />,
+ );
+ const dialog = screen.getByRole("dialog");
+ expect(dialog.textContent).toContain("Remove GitHub key");
+ });
+
+ test("bulk delete: titles by count and lists names with overflow indicator", () => {
+ render(
+ <DeleteConfirmDialog
+ open
+ onOpenChange={() => {}}
+ itemNames={["A", "B", "C", "D", "E"]}
+ onConfirm={() => {}}
+ />,
+ );
+ const dialog = screen.getByRole("dialog");
+ expect(dialog.textContent).toContain("Remove 5 integrations?");
+ expect(dialog.textContent).toContain("A, B, C");
+ expect(dialog.textContent).toContain("and 2 more");
+ });
+
+ test("Remove button fires onConfirm; Cancel fires onOpenChange(false)", () => {
+ const onConfirm = vi.fn();
+ const onOpenChange = vi.fn();
+ render(
+ <DeleteConfirmDialog
+ open
+ onOpenChange={onOpenChange}
+ itemNames={["GitHub"]}
+ onConfirm={onConfirm}
+ />,
+ );
+
+ fireEvent.click(screen.getByRole("button", { name: /^remove$/i }));
+ expect(onConfirm).toHaveBeenCalledOnce();
+
+ fireEvent.click(screen.getByRole("button", { name: /cancel/i }));
+ expect(onOpenChange).toHaveBeenCalledWith(false);
+ });
+
+ test("force variant: retitles, swaps the warning copy, and labels the action 'Force remove'", () => {
+ render(
+ <DeleteConfirmDialog
+ open
+ variant="force"
+ onOpenChange={() => {}}
+ itemNames={["GitHub key"]}
+ onConfirm={() => {}}
+ />,
+ );
+ const dialog = screen.getByRole("dialog");
+ expect(dialog.textContent).toContain("Force remove GitHub key");
+ expect(dialog.textContent).toMatch(
+ /referenced by an active webhook or workflow/i,
+ );
+ expect(
+ screen.getByRole("button", { name: /^force remove$/i }),
+ ).toBeDefined();
+ });
+
+ test("when isPending, both buttons are disabled", () => {
+ const onConfirm = vi.fn();
+ render(
+ <DeleteConfirmDialog
+ open
+ isPending
+ onOpenChange={() => {}}
+ itemNames={["GitHub"]}
+ onConfirm={onConfirm}
+ />,
+ );
+ const removeBtn = screen.getByRole("button", { name: /^remove$/i });
+ const cancelBtn = screen.getByRole("button", { name: /cancel/i });
+ expect((removeBtn as HTMLButtonElement).disabled).toBe(true);
+ expect((cancelBtn as HTMLButtonElement).disabled).toBe(true);
+ });
+});
diff --git a/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/IntegrationsHeader/IntegrationsHeader.tsx b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/IntegrationsHeader/IntegrationsHeader.tsx
new file mode 100644
index 0000000000..fc0a00a66f
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/IntegrationsHeader/IntegrationsHeader.tsx
@@ -0,0 +1,45 @@
+"use client";
+
+import { PlusIcon } from "@phosphor-icons/react";
+import { Button } from "@/components/atoms/Button/Button";
+import { Text } from "@/components/atoms/Text/Text";
+
+interface Props {
+ onConnect: () => void;
+}
+
+export function IntegrationsHeader({ onConnect }: Props) {
+ return (
+ <div className="flex flex-col items-start gap-4 pb-6 sm:flex-row sm:items-start sm:justify-between">
+ <div className="flex min-w-0 flex-col">
+ <Text variant="h4" as="h1" className="leading-[28px] text-[#1F1F20]">
+ Third Party Integrations
+ </Text>
+ <Text variant="body" className="mt-4 max-w-[600px] text-[#505057]">
+ Manage the 3rd party accounts you&apos;ve connected to AutoGPT. These
+ are services that can be used by your agents — like Gmail for sending
+ emails, GitHub for code, or Figma for designs.
+ </Text>
+ </div>
+
+ <Button
+ variant="primary"
+ size="small"
+ leftIcon={<PlusIcon size={16} />}
+ onClick={onConnect}
+ className="sm:hidden"
+ >
+ Connect Service
+ </Button>
+ <Button
+ variant="primary"
+ size="large"
+ leftIcon={<PlusIcon size={20} />}
+ onClick={onConnect}
+ className="hidden sm:inline-flex"
+ >
+ Connect Service
+ </Button>
+ </div>
+ );
+}
diff --git a/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/IntegrationsHeader/__tests__/IntegrationsHeader.test.tsx b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/IntegrationsHeader/__tests__/IntegrationsHeader.test.tsx
new file mode 100644
index 0000000000..13a025b4b7
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/IntegrationsHeader/__tests__/IntegrationsHeader.test.tsx
@@ -0,0 +1,26 @@
+import { describe, expect, test, vi } from "vitest";
+
+import { fireEvent, render, screen } from "@/tests/integrations/test-utils";
+
+import { IntegrationsHeader } from "../IntegrationsHeader";
+
+describe("IntegrationsHeader", () => {
+ test("renders the title and intro copy", () => {
+ render(<IntegrationsHeader onConnect={() => {}} />);
+ expect(
+ screen.getByRole("heading", { name: /third party integrations/i }),
+ ).toBeDefined();
+ expect(screen.getByText(/Manage the 3rd party accounts/i)).toBeDefined();
+ });
+
+ test("invokes onConnect when any 'Connect Service' button is clicked", () => {
+ const onConnect = vi.fn();
+ render(<IntegrationsHeader onConnect={onConnect} />);
+ // There are two responsive copies of the button; clicking either should
+ // trigger the same callback. We click the first one we find.
+ const buttons = screen.getAllByRole("button", { name: /connect service/i });
+ expect(buttons.length).toBeGreaterThan(0);
+ fireEvent.click(buttons[0]);
+ expect(onConnect).toHaveBeenCalledTimes(1);
+ });
+});
diff --git a/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/IntegrationsList/IntegrationsList.tsx b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/IntegrationsList/IntegrationsList.tsx
new file mode 100644
index 0000000000..c8237c36ed
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/IntegrationsList/IntegrationsList.tsx
@@ -0,0 +1,167 @@
+"use client";
+
+import { useState } from "react";
+import { AnimatePresence, motion, useReducedMotion } from "framer-motion";
+
+import { ErrorCard } from "@/components/molecules/ErrorCard/ErrorCard";
+
+import { DeleteConfirmDialog } from "../DeleteConfirmDialog/DeleteConfirmDialog";
+import { IntegrationsListEmpty } from "../IntegrationsListEmpty/IntegrationsListEmpty";
+import { IntegrationsSearch } from "../IntegrationsSearch/IntegrationsSearch";
+import { IntegrationsSelectionBar } from "../IntegrationsSelectionBar/IntegrationsSelectionBar";
+import { ProviderGroup } from "../ProviderGroup/ProviderGroup";
+import { IntegrationsListSkeleton } from "./IntegrationsListSkeleton";
+import { useIntegrationsList } from "./useIntegrationsList";
+
+export function IntegrationsList() {
+ const {
+ query,
+ setQuery,
+ providers,
+ isLoading,
+ isError,
+ error,
+ refetch,
+ isEmpty,
+ selection,
+ requestDelete,
+ isDeleting,
+ isDeletingId,
+ buildTargets,
+ } = useIntegrationsList();
+ const reduceMotion = useReducedMotion();
+ const [pendingDeleteIds, setPendingDeleteIds] = useState<string[]>([]);
+ const [pendingForceIds, setPendingForceIds] = useState<string[]>([]);
+
+ function askDelete(ids: string[]) {
+ if (ids.length === 0) return;
+ setPendingDeleteIds(ids);
+ }
+
+ async function confirmDelete() {
+ const ids = pendingDeleteIds;
+ setPendingDeleteIds([]);
+ const { needsConfirmationIds } = await requestDelete(ids);
+ if (needsConfirmationIds.length > 0) {
+ setPendingForceIds(needsConfirmationIds);
+ }
+ }
+
+ async function confirmForceDelete() {
+ const ids = pendingForceIds;
+ setPendingForceIds([]);
+ await requestDelete(ids, true);
+ }
+
+ const pendingNames = buildTargets(pendingDeleteIds).map(
+ (t) => t.name ?? t.provider,
+ );
+ const pendingForceNames = buildTargets(pendingForceIds).map(
+ (t) => t.name ?? t.provider,
+ );
+
+ if (isLoading) {
+ return (
+ <div className="flex w-full flex-col gap-3">
+ <IntegrationsSearch value={query} onChange={setQuery} disabled />
+ <IntegrationsListSkeleton />
+ </div>
+ );
+ }
+
+ if (isError) {
+ return (
+ <div className="flex w-full flex-col gap-3">
+ <IntegrationsSearch value={query} onChange={setQuery} disabled />
+ <ErrorCard
+ context="integrations"
+ responseError={
+ error instanceof Error ? { message: error.message } : undefined
+ }
+ onRetry={() => refetch()}
+ />
+ </div>
+ );
+ }
+
+ return (
+ <div className="flex w-full flex-col gap-3">
+ <div className="sticky top-0 z-10 -mx-1 bg-[#F9F9FA] px-1 pb-1 pt-1">
+ <IntegrationsSearch value={query} onChange={setQuery} />
+ </div>
+
+ <AnimatePresence initial={false}>
+ {selection.selectedCount > 0 && (
+ <motion.div
+ key="integrations-selection-bar"
+ initial={
+ reduceMotion
+ ? { opacity: 0 }
+ : { opacity: 0, height: 0, marginBottom: -12 }
+ }
+ animate={
+ reduceMotion
+ ? { opacity: 1 }
+ : { opacity: 1, height: "auto", marginBottom: 0 }
+ }
+ exit={
+ reduceMotion
+ ? { opacity: 0 }
+ : { opacity: 0, height: 0, marginBottom: -12 }
+ }
+ transition={{ duration: 0.2, ease: [0, 0, 0.2, 1] }}
+ className="sticky top-2 z-20 bg-[#F9F9FA] sm:top-0"
+ style={{ overflow: "hidden" }}
+ >
+ <IntegrationsSelectionBar
+ selectedCount={selection.selectedCount}
+ allSelected={selection.allSelected}
+ onSelectAll={selection.selectAll}
+ onDeselectAll={selection.clear}
+ onDeleteSelected={() => askDelete(selection.selectedIds)}
+ isDeleting={isDeleting}
+ />
+ </motion.div>
+ )}
+ </AnimatePresence>
+
+ {isEmpty ? (
+ <IntegrationsListEmpty query={query} />
+ ) : (
+ <div className="flex flex-col gap-3 pb-4">
+ {providers.map((provider) => (
+ <ProviderGroup
+ key={provider.id}
+ provider={provider}
+ isSelected={selection.isSelected}
+ onToggleSelected={selection.toggle}
+ onDelete={(id) => askDelete([id])}
+ isDeletingId={isDeletingId}
+ />
+ ))}
+ </div>
+ )}
+
+ <DeleteConfirmDialog
+ open={pendingDeleteIds.length > 0}
+ onOpenChange={(open) => {
+ if (!open) setPendingDeleteIds([]);
+ }}
+ itemNames={pendingNames}
+ isPending={isDeleting}
+ onConfirm={confirmDelete}
+ />
+
+ <DeleteConfirmDialog
+ variant="force"
+ open={pendingForceIds.length > 0}
+ onOpenChange={(open) => {
+ if (!open) setPendingForceIds([]);
+ }}
+ itemNames={pendingForceNames}
+ isPending={isDeleting}
+ onConfirm={confirmForceDelete}
+ />
+ </div>
+ );
+}
diff --git a/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/IntegrationsList/IntegrationsListSkeleton.tsx b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/IntegrationsList/IntegrationsListSkeleton.tsx
new file mode 100644
index 0000000000..8383fcf11a
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/IntegrationsList/IntegrationsListSkeleton.tsx
@@ -0,0 +1,43 @@
+import { Skeleton } from "@/components/atoms/Skeleton/Skeleton";
+
+export function IntegrationsListSkeleton() {
+ return (
+ <div
+ className="flex flex-col gap-3"
+ aria-busy="true"
+ aria-label="Loading integrations"
+ >
+ {[0, 1, 2].map((i) => (
+ <div
+ key={i}
+ data-testid="integration-skeleton-item"
+ className="w-full overflow-hidden rounded-lg border border-[#DADADC] bg-white"
+ >
+ {/* Mirrors ProviderGroup accordion trigger row */}
+ <div className="flex items-center justify-between px-3 py-3 pr-5">
+ <div className="flex items-center gap-3">
+ <Skeleton className="size-6 rounded-full" />
+ <Skeleton className="h-[22px] w-32" />
+ <Skeleton className="h-[22px] w-8 rounded-[10px]" />
+ </div>
+ <Skeleton className="size-4 rounded" />
+ </div>
+ {/* Mirrors first credential row inside accordion content */}
+ <div className="flex items-center justify-between border-t border-[#DADADC] py-3 pl-3 pr-5">
+ <div className="flex items-center gap-3">
+ <Skeleton className="size-5 rounded" />
+ <div className="flex flex-col gap-1.5">
+ <div className="flex items-center gap-3">
+ <Skeleton className="h-[22px] w-40" />
+ <Skeleton className="h-[20px] w-14 rounded-[10px]" />
+ </div>
+ <Skeleton className="h-3 w-28" />
+ </div>
+ </div>
+ <Skeleton className="size-5 rounded" />
+ </div>
+ </div>
+ ))}
+ </div>
+ );
+}
diff --git a/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/IntegrationsList/__tests__/IntegrationsListSkeleton.test.tsx b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/IntegrationsList/__tests__/IntegrationsListSkeleton.test.tsx
new file mode 100644
index 0000000000..8b550a7c54
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/IntegrationsList/__tests__/IntegrationsListSkeleton.test.tsx
@@ -0,0 +1,16 @@
+import { describe, expect, test } from "vitest";
+
+import { render, screen, within } from "@/tests/integrations/test-utils";
+
+import { IntegrationsListSkeleton } from "../IntegrationsListSkeleton";
+
+describe("IntegrationsListSkeleton", () => {
+ test("renders 3 placeholder accordion shells with aria-busy", () => {
+ render(<IntegrationsListSkeleton />);
+ const root = screen.getByLabelText(/loading integrations/i);
+ expect(root.getAttribute("aria-busy")).toBe("true");
+ expect(
+ within(root).getAllByTestId("integration-skeleton-item"),
+ ).toHaveLength(3);
+ });
+});
diff --git a/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/IntegrationsList/__tests__/useIntegrationsSelection.test.ts b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/IntegrationsList/__tests__/useIntegrationsSelection.test.ts
new file mode 100644
index 0000000000..d91eaeeb2c
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/IntegrationsList/__tests__/useIntegrationsSelection.test.ts
@@ -0,0 +1,61 @@
+import { act, renderHook } from "@testing-library/react";
+import { describe, expect, test } from "vitest";
+
+import { useIntegrationsSelection } from "../useIntegrationsSelection";
+
+describe("useIntegrationsSelection", () => {
+ test("starts empty with no items selected", () => {
+ const { result } = renderHook(() => useIntegrationsSelection(["a", "b"]));
+ expect(result.current.selectedIds).toEqual([]);
+ expect(result.current.selectedCount).toBe(0);
+ expect(result.current.allSelected).toBe(false);
+ expect(result.current.isSelected("a")).toBe(false);
+ });
+
+ test("toggle adds, then removes the same id", () => {
+ const { result } = renderHook(() => useIntegrationsSelection(["a", "b"]));
+
+ act(() => result.current.toggle("a"));
+ expect(result.current.isSelected("a")).toBe(true);
+ expect(result.current.selectedIds).toEqual(["a"]);
+ expect(result.current.selectedCount).toBe(1);
+ expect(result.current.allSelected).toBe(false);
+
+ act(() => result.current.toggle("a"));
+ expect(result.current.isSelected("a")).toBe(false);
+ expect(result.current.selectedIds).toEqual([]);
+ });
+
+ test("selectAll selects every id and reports allSelected true", () => {
+ const { result } = renderHook(() => useIntegrationsSelection(["a", "b"]));
+ act(() => result.current.selectAll());
+ expect(result.current.selectedCount).toBe(2);
+ expect(result.current.allSelected).toBe(true);
+ expect(result.current.isSelected("a")).toBe(true);
+ expect(result.current.isSelected("b")).toBe(true);
+ });
+
+ test("clear empties the selection", () => {
+ const { result } = renderHook(() => useIntegrationsSelection(["a", "b"]));
+ act(() => result.current.selectAll());
+ act(() => result.current.clear());
+ expect(result.current.selectedCount).toBe(0);
+ expect(result.current.allSelected).toBe(false);
+ });
+
+ test("drops ids that disappear from the available list when allIds shrinks", () => {
+ const { result, rerender } = renderHook(
+ ({ ids }) => useIntegrationsSelection(ids),
+ { initialProps: { ids: ["a", "b", "c"] } },
+ );
+ act(() => result.current.toggle("a"));
+ act(() => result.current.toggle("b"));
+ expect(result.current.selectedCount).toBe(2);
+
+ // 'b' goes away — selection should follow.
+ rerender({ ids: ["a", "c"] });
+ expect(result.current.isSelected("a")).toBe(true);
+ expect(result.current.isSelected("b")).toBe(false);
+ expect(result.current.selectedCount).toBe(1);
+ });
+});
diff --git a/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/IntegrationsList/useIntegrationsList.ts b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/IntegrationsList/useIntegrationsList.ts
new file mode 100644
index 0000000000..48dcde16d8
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/IntegrationsList/useIntegrationsList.ts
@@ -0,0 +1,105 @@
+"use client";
+
+import { useState } from "react";
+
+import { useGetV1ListCredentials } from "@/app/api/__generated__/endpoints/integrations/integrations";
+import { filterSystemCredentials } from "@/components/contextual/CredentialsInput/helpers";
+
+import {
+ filterProviders,
+ groupCredentialsByProvider,
+ type ProviderGroupView,
+} from "../../helpers";
+import {
+ useDeleteIntegration,
+ type DeleteIntegrationTarget,
+} from "../hooks/useDeleteIntegration";
+import { useDebouncedValue } from "../hooks/useDebouncedValue";
+import { useIntegrationsSelection } from "./useIntegrationsSelection";
+
+export function useIntegrationsList() {
+ const [query, setQuery] = useState("");
+ const debouncedQuery = useDebouncedValue(query, 250);
+
+ const credentialsQuery = useGetV1ListCredentials({
+ query: {
+ select: (response) =>
+ response.status === 200 ? filterSystemCredentials(response.data) : [],
+ },
+ });
+
+ const credentials = credentialsQuery.data ?? [];
+ const allProviders: ProviderGroupView[] =
+ groupCredentialsByProvider(credentials);
+ const providers = filterProviders(allProviders, debouncedQuery);
+
+ const allCredentialIds = allProviders.flatMap((p) =>
+ p.credentials.map((c) => c.id),
+ );
+ const selection = useIntegrationsSelection(allCredentialIds);
+ const {
+ remove,
+ isPending: isDeleting,
+ isDeletingId,
+ } = useDeleteIntegration();
+
+ function buildTargets(ids: string[]): DeleteIntegrationTarget[] {
+ const lookup = new Map<string, { provider: string; name: string }>();
+ for (const provider of allProviders) {
+ for (const cred of provider.credentials) {
+ lookup.set(cred.id, { provider: cred.provider, name: cred.title });
+ }
+ }
+ const targets: DeleteIntegrationTarget[] = [];
+ for (const id of ids) {
+ const entry = lookup.get(id);
+ if (entry)
+ targets.push({ id, provider: entry.provider, name: entry.name });
+ }
+ return targets;
+ }
+
+ async function requestDelete(ids: string[], force = false) {
+ const targets = buildTargets(ids);
+ if (targets.length === 0) return { needsConfirmationIds: [] as string[] };
+ const result = await remove(targets, force);
+ const needsConfirmationIds = result.needsConfirmation.map(
+ (c) => c.target.id,
+ );
+ // Keep failed AND needs-confirmation items selected so the user retains
+ // visual context of which credentials still need action.
+ const keepSelected = new Set([
+ ...result.failed.map((t) => t.id),
+ ...needsConfirmationIds,
+ ]);
+ if (keepSelected.size === 0) {
+ selection.clear();
+ return { needsConfirmationIds };
+ }
+ for (const id of ids) {
+ if (!keepSelected.has(id) && selection.isSelected(id)) {
+ selection.toggle(id);
+ }
+ }
+ return { needsConfirmationIds };
+ }
+
+ const isLoading = credentialsQuery.isLoading;
+ const isError = credentialsQuery.isError;
+
+ return {
+ query,
+ setQuery,
+ providers,
+ isLoading,
+ isError,
+ error: credentialsQuery.error,
+ refetch: credentialsQuery.refetch,
+ isEmpty: providers.length === 0,
+ selection,
+ requestDelete,
+ isDeleting,
+ isDeletingId,
+ buildTargets,
+ };
+}
diff --git a/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/IntegrationsList/useIntegrationsSelection.ts b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/IntegrationsList/useIntegrationsSelection.ts
new file mode 100644
index 0000000000..1dd0f30d22
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/IntegrationsList/useIntegrationsSelection.ts
@@ -0,0 +1,58 @@
+"use client";
+
+import { useEffect, useState } from "react";
+
+type SelectionMap = Record<string, true>;
+
+export function useIntegrationsSelection(allIds: string[]) {
+ const [selected, setSelected] = useState<SelectionMap>({});
+
+ useEffect(() => {
+ setSelected((prev) => {
+ const prevKeys = Object.keys(prev);
+ if (prevKeys.length === 0) return prev;
+ const existing = new Set(allIds);
+ const next: SelectionMap = {};
+ let removed = false;
+ for (const id of prevKeys) {
+ if (existing.has(id)) next[id] = true;
+ else removed = true;
+ }
+ return removed ? next : prev;
+ });
+ }, [allIds]);
+
+ function toggle(id: string) {
+ setSelected((prev) => {
+ if (prev[id]) {
+ const next = { ...prev };
+ delete next[id];
+ return next;
+ }
+ return { ...prev, [id]: true };
+ });
+ }
+
+ function selectAll() {
+ const next: SelectionMap = {};
+ for (const id of allIds) next[id] = true;
+ setSelected(next);
+ }
+
+ function clear() {
+ setSelected({});
+ }
+
+ const selectedIds = Object.keys(selected);
+ const selectedCount = selectedIds.length;
+
+ return {
+ selectedIds,
+ selectedCount,
+ allSelected: allIds.length > 0 && selectedCount === allIds.length,
+ isSelected: (id: string) => Boolean(selected[id]),
+ toggle,
+ selectAll,
+ clear,
+ };
+}
diff --git a/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/IntegrationsListEmpty/IntegrationsListEmpty.tsx b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/IntegrationsListEmpty/IntegrationsListEmpty.tsx
new file mode 100644
index 0000000000..9fd34b1255
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/IntegrationsListEmpty/IntegrationsListEmpty.tsx
@@ -0,0 +1,29 @@
+"use client";
+
+import { Text } from "@/components/atoms/Text/Text";
+
+import { IntegrationsMarquee } from "./components/IntegrationsMarquee";
+
+interface Props {
+ query: string;
+}
+
+export function IntegrationsListEmpty({ query }: Props) {
+ const hasQuery = query.trim().length > 0;
+
+ return (
+ <div className="flex flex-col items-center justify-center gap-4 px-6 py-10 text-center">
+ <IntegrationsMarquee />
+ <div className="flex flex-col items-center gap-1">
+ <Text variant="large-medium" as="span" className="text-textBlack">
+ {hasQuery ? "No integrations found" : "No integration connected"}
+ </Text>
+ <Text variant="body" className="max-w-[360px] text-zinc-500">
+ {hasQuery
+ ? `No integrations match "${query.trim()}". Try a different search.`
+ : "Connect a service to let your agents use third-party tools like GitHub, Gmail, or Figma."}
+ </Text>
+ </div>
+ </div>
+ );
+}
diff --git a/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/IntegrationsListEmpty/__tests__/IntegrationsListEmpty.test.tsx b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/IntegrationsListEmpty/__tests__/IntegrationsListEmpty.test.tsx
new file mode 100644
index 0000000000..c38f088b31
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/IntegrationsListEmpty/__tests__/IntegrationsListEmpty.test.tsx
@@ -0,0 +1,30 @@
+import { describe, expect, test } from "vitest";
+
+import { render, screen } from "@/tests/integrations/test-utils";
+
+import { IntegrationsListEmpty } from "../IntegrationsListEmpty";
+
+describe("IntegrationsListEmpty", () => {
+ test("renders connect-a-service copy when there is no active query", () => {
+ render(<IntegrationsListEmpty query="" />);
+ expect(screen.getByText("No integration connected")).toBeDefined();
+ expect(
+ screen.getByText(
+ /Connect a service to let your agents use third-party tools/i,
+ ),
+ ).toBeDefined();
+ });
+
+ test("treats whitespace-only queries as no query", () => {
+ render(<IntegrationsListEmpty query=" " />);
+ expect(screen.getByText("No integration connected")).toBeDefined();
+ });
+
+ test("renders no-results copy and echoes the trimmed query", () => {
+ render(<IntegrationsListEmpty query=" notion " />);
+ expect(screen.getByText("No integrations found")).toBeDefined();
+ expect(
+ screen.getByText(/No integrations match "notion"\. Try a different/i),
+ ).toBeDefined();
+ });
+});
diff --git a/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/IntegrationsListEmpty/components/IntegrationsMarquee.tsx b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/IntegrationsListEmpty/components/IntegrationsMarquee.tsx
new file mode 100644
index 0000000000..3b515c704e
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/IntegrationsListEmpty/components/IntegrationsMarquee.tsx
@@ -0,0 +1,92 @@
+"use client";
+
+import { motion, useReducedMotion } from "framer-motion";
+
+const ROW_A = ["github", "google", "notion", "airtable", "openai", "linear"];
+const ROW_B = [
+ "discord",
+ "anthropic",
+ "hubspot",
+ "reddit",
+ "telegram",
+ "ideogram",
+];
+
+export function IntegrationsMarquee() {
+ const reduceMotion = useReducedMotion();
+
+ return (
+ <div
+ aria-hidden
+ className="relative flex h-[200px] w-[340px] flex-col justify-center gap-3 overflow-hidden"
+ style={{
+ maskImage:
+ "linear-gradient(to right, transparent 0%, black 18%, black 82%, transparent 100%)",
+ WebkitMaskImage:
+ "linear-gradient(to right, transparent 0%, black 18%, black 82%, transparent 100%)",
+ }}
+ >
+ <MarqueeRow
+ providers={ROW_A}
+ direction="left"
+ reduceMotion={!!reduceMotion}
+ />
+ <MarqueeRow
+ providers={ROW_B}
+ direction="right"
+ reduceMotion={!!reduceMotion}
+ />
+ </div>
+ );
+}
+
+function MarqueeRow({
+ providers,
+ direction,
+ reduceMotion,
+}: {
+ providers: string[];
+ direction: "left" | "right";
+ reduceMotion: boolean;
+}) {
+ const animateX = direction === "left" ? ["0%", "-50%"] : ["-50%", "0%"];
+
+ return (
+ <motion.div
+ className="flex w-max gap-3 will-change-transform"
+ animate={reduceMotion ? undefined : { x: animateX }}
+ transition={
+ reduceMotion
+ ? undefined
+ : { duration: 22, ease: "linear", repeat: Infinity }
+ }
+ >
+ {[...providers, ...providers].map((id, i) => (
+ <GhostIntegrationCard key={`${id}-${i}`} id={id} />
+ ))}
+ </motion.div>
+ );
+}
+
+function GhostIntegrationCard({ id }: { id: string }) {
+ return (
+ <div className="flex h-[58px] w-[180px] shrink-0 items-center gap-3 rounded-xl border border-zinc-200/50 bg-white/50 px-3 opacity-70 shadow-[0_1px_2px_rgba(0,0,0,0.03)]">
+ <div className="flex size-8 shrink-0 items-center justify-center rounded-lg bg-zinc-50/60">
+ {/* eslint-disable-next-line @next/next/no-img-element -- decorative tiny logo, no LCP candidate */}
+ <img
+ src={`/integrations/${id}.png`}
+ alt=""
+ width={20}
+ height={20}
+ loading="lazy"
+ decoding="async"
+ className="size-5 rounded-sm object-contain opacity-80"
+ />
+ </div>
+ <div className="flex flex-1 flex-col gap-1.5">
+ <div className="h-2 w-3/4 rounded-full bg-zinc-100/80" />
+ <div className="h-2 w-1/2 rounded-full bg-zinc-100/80" />
+ </div>
+ </div>
+ );
+}
diff --git a/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/IntegrationsSearch/IntegrationsSearch.tsx b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/IntegrationsSearch/IntegrationsSearch.tsx
new file mode 100644
index 0000000000..aa415a81f4
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/IntegrationsSearch/IntegrationsSearch.tsx
@@ -0,0 +1,29 @@
+"use client";
+
+import { MagnifyingGlassIcon } from "@phosphor-icons/react";
+
+interface Props {
+ value: string;
+ onChange: (next: string) => void;
+ disabled?: boolean;
+}
+
+export function IntegrationsSearch({ value, onChange, disabled }: Props) {
+ return (
+ <div className="relative w-full">
+ <MagnifyingGlassIcon
+ size={20}
+ className="pointer-events-none absolute left-4 top-1/2 -translate-y-1/2 text-[#83838C]"
+ />
+ <input
+ type="text"
+ value={value}
+ onChange={(e) => onChange(e.target.value)}
+ placeholder="Search integrations..."
+ aria-label="Search integrations"
+ disabled={disabled}
+ className="h-[46px] w-full rounded-3xl border border-[#DADADC] bg-white pl-12 pr-4 text-sm leading-[22px] text-[#1F1F20] placeholder:text-[#83838C] focus:border-purple-400 focus:outline-none focus:ring-1 focus:ring-purple-400 disabled:cursor-not-allowed disabled:opacity-60"
+ />
+ </div>
+ );
+}
diff --git a/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/IntegrationsSelectionBar/IntegrationsSelectionBar.tsx b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/IntegrationsSelectionBar/IntegrationsSelectionBar.tsx
new file mode 100644
index 0000000000..41960a1c40
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/IntegrationsSelectionBar/IntegrationsSelectionBar.tsx
@@ -0,0 +1,63 @@
+"use client";
+
+import { TrashIcon } from "@phosphor-icons/react";
+import { Button } from "@/components/atoms/Button/Button";
+import { Text } from "@/components/atoms/Text/Text";
+
+interface Props {
+ selectedCount: number;
+ allSelected: boolean;
+ onSelectAll: () => void;
+ onDeselectAll: () => void;
+ onDeleteSelected: () => void;
+ isDeleting?: boolean;
+}
+
+export function IntegrationsSelectionBar({
+ selectedCount,
+ allSelected,
+ onSelectAll,
+ onDeselectAll,
+ onDeleteSelected,
+ isDeleting = false,
+}: Props) {
+ return (
+ <div className="flex w-full items-center justify-between rounded-[4px] border border-zinc-200 bg-zinc-100 px-4 py-2">
+ <div className="flex items-center gap-5">
+ <Text variant="body" as="span" className="text-zinc-700">
+ {selectedCount} selected
+ </Text>
+ {!allSelected && (
+ <button
+ type="button"
+ onClick={onSelectAll}
+ className="rounded focus:outline-none focus-visible:ring-2 focus-visible:ring-zinc-800"
+ >
+ <Text variant="body-medium" as="span" className="text-[#1F1F20]">
+ Select All
+ </Text>
+ </button>
+ )}
+ <button
+ type="button"
+ onClick={onDeselectAll}
+ className="rounded focus:outline-none focus-visible:ring-2 focus-visible:ring-zinc-800"
+ >
+ <Text variant="body-medium" as="span" className="text-[#1F1F20]">
+ Deselect
+ </Text>
+ </button>
+ </div>
+ <Button
+ variant="destructive"
+ size="small"
+ leftIcon={<TrashIcon size={16} />}
+ onClick={onDeleteSelected}
+ loading={isDeleting}
+ disabled={isDeleting}
+ >
+ Delete selected
+ </Button>
+ </div>
+ );
+}
diff --git a/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ProviderGroup/ProviderGroup.tsx b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ProviderGroup/ProviderGroup.tsx
new file mode 100644
index 0000000000..b3f922aff2
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/ProviderGroup/ProviderGroup.tsx
@@ -0,0 +1,96 @@
+"use client";
+
+import { useState } from "react";
+import Image from "next/image";
+import {
+ Accordion,
+ AccordionContent,
+ AccordionItem,
+ AccordionTrigger,
+} from "@/components/molecules/Accordion/Accordion";
+import type { ProviderGroupView } from "../../helpers";
+import { CredentialRow } from "../CredentialRow/CredentialRow";
+
+interface Props {
+ provider: ProviderGroupView;
+ isSelected: (id: string) => boolean;
+ onToggleSelected: (id: string) => void;
+ onDelete: (id: string) => void;
+ isDeletingId?: (id: string) => boolean;
+}
+
+export function ProviderGroup({
+ provider,
+ isSelected,
+ onToggleSelected,
+ onDelete,
+ isDeletingId,
+}: Props) {
+ const count = provider.credentials.length;
+
+ return (
+ <Accordion
+ type="single"
+ collapsible
+ defaultValue={provider.id}
+ className="w-full overflow-hidden rounded-lg border border-[#DADADC] bg-white"
+ >
+ <AccordionItem value={provider.id} className="border-b-0">
+ <AccordionTrigger className="px-3 py-3 pr-5 hover:no-underline [&>svg]:text-[#1F1F20]">
+ <div className="flex items-center gap-3">
+ <ProviderAvatar provider={provider} />
+ <span className="text-[16px] font-medium leading-[26px] tracking-[-0.08px] text-black">
+ {provider.name}
+ </span>
+ <span className="inline-flex items-center justify-center rounded-[10px] bg-[#EFF1F4] px-2 py-[2px] text-[14px] font-medium leading-[22px] text-black">
+ {count}
+ </span>
+ </div>
+ </AccordionTrigger>
+ <AccordionContent className="px-0 pb-0 pt-0">
+ <div className="flex flex-col divide-y divide-[#DADADC] border-t border-[#DADADC]">
+ {provider.credentials.map((credential) => (
+ <CredentialRow
+ key={credential.id}
+ credential={credential}
+ selected={isSelected(credential.id)}
+ onToggleSelected={() => onToggleSelected(credential.id)}
+ onDelete={() => onDelete(credential.id)}
+ isDeleting={isDeletingId?.(credential.id) ?? false}
+ />
+ ))}
+ </div>
+ </AccordionContent>
+ </AccordionItem>
+ </Accordion>
+ );
+}
+
+function ProviderAvatar({ provider }: { provider: ProviderGroupView }) {
+ const [broken, setBroken] = useState(false);
+ const src = provider.logoUrl ?? `/integrations/${provider.id}.png`;
+
+ if (broken) {
+ return (
+ <div
+ aria-hidden="true"
+ className="flex size-6 items-center justify-center rounded-full bg-[#D9D9D9] text-[10px] font-semibold uppercase text-zinc-700"
+ data-testid={`provider-avatar-${provider.id}`}
+ >
+ {provider.name?.charAt(0) ?? provider.id.charAt(0)}
+ </div>
+ );
+ }
+
+ return (
+ <Image
+ src={src}
+ alt={`${provider.name} logo`}
+ width={24}
+ height={24}
+ onError={() => setBroken(true)}
+ className="size-6 rounded-full bg-white object-contain"
+ unoptimized
+ />
+ );
+}
diff --git a/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/hooks/__tests__/useDebouncedValue.test.ts b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/hooks/__tests__/useDebouncedValue.test.ts
new file mode 100644
index 0000000000..eaeff8867f
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/hooks/__tests__/useDebouncedValue.test.ts
@@ -0,0 +1,63 @@
+import { act, renderHook } from "@testing-library/react";
+import { afterEach, beforeEach, describe, expect, test, vi } from "vitest";
+
+import { useDebouncedValue } from "../useDebouncedValue";
+
+describe("useDebouncedValue", () => {
+ beforeEach(() => {
+ vi.useFakeTimers();
+ });
+ afterEach(() => {
+ vi.useRealTimers();
+ });
+
+ test("returns the initial value synchronously", () => {
+ const { result } = renderHook(() => useDebouncedValue("seed", 200));
+ expect(result.current).toBe("seed");
+ });
+
+ test("does not change before the delay elapses", () => {
+ const { result, rerender } = renderHook(
+ ({ value }) => useDebouncedValue(value, 200),
+ { initialProps: { value: "a" } },
+ );
+ rerender({ value: "b" });
+ act(() => {
+ vi.advanceTimersByTime(199);
+ });
+ expect(result.current).toBe("a");
+ });
+
+ test("updates to the latest value once the delay elapses", () => {
+ const { result, rerender } = renderHook(
+ ({ value }) => useDebouncedValue(value, 200),
+ { initialProps: { value: "a" } },
+ );
+ rerender({ value: "b" });
+ act(() => {
+ vi.advanceTimersByTime(200);
+ });
+ expect(result.current).toBe("b");
+ });
+
+ test("only the last rapid change wins (timer is reset on each rerender)", () => {
+ const { result, rerender } = renderHook(
+ ({ value }) => useDebouncedValue(value, 200),
+ { initialProps: { value: "a" } },
+ );
+ rerender({ value: "b" });
+ act(() => {
+ vi.advanceTimersByTime(150);
+ });
+ rerender({ value: "c" });
+ act(() => {
+ vi.advanceTimersByTime(150);
+ });
+ // 300ms total but only 150ms since the last change.
+ expect(result.current).toBe("a");
+ act(() => {
+ vi.advanceTimersByTime(50);
+ });
+ expect(result.current).toBe("c");
+ });
+});
diff --git a/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/hooks/useDebouncedValue.ts b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/hooks/useDebouncedValue.ts
new file mode 100644
index 0000000000..565a9585bd
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/hooks/useDebouncedValue.ts
@@ -0,0 +1,14 @@
+"use client";
+
+import { useEffect, useState } from "react";
+
+export function useDebouncedValue<T>(value: T, delayMs: number): T {
+ const [debounced, setDebounced] = useState(value);
+
+ useEffect(() => {
+ const handle = setTimeout(() => setDebounced(value), delayMs);
+ return () => clearTimeout(handle);
+ }, [value, delayMs]);
+
+ return debounced;
+}
diff --git a/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/hooks/useDeleteIntegration.ts b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/hooks/useDeleteIntegration.ts
new file mode 100644
index 0000000000..6d4f384e36
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/components/hooks/useDeleteIntegration.ts
@@ -0,0 +1,142 @@
+"use client";
+
+import { useState } from "react";
+import { useQueryClient } from "@tanstack/react-query";
+
+import {
+ deleteV1DeleteCredentials,
+ getGetV1ListCredentialsQueryKey,
+} from "@/app/api/__generated__/endpoints/integrations/integrations";
+import { toast } from "@/components/molecules/Toast/use-toast";
+
+export interface DeleteIntegrationTarget {
+ id: string;
+ provider: string;
+ name?: string;
+}
+
+interface RemoveResult {
+ succeeded: DeleteIntegrationTarget[];
+ failed: DeleteIntegrationTarget[];
+ needsConfirmation: { target: DeleteIntegrationTarget; message: string }[];
+}
+
+export function useDeleteIntegration() {
+ const queryClient = useQueryClient();
+ const [isPending, setIsPending] = useState(false);
+ const [pendingIds, setPendingIds] = useState<Record<string, true>>({});
+
+ async function remove(
+ targets: DeleteIntegrationTarget[],
+ force = false,
+ ): Promise<RemoveResult> {
+ const empty: RemoveResult = {
+ succeeded: [],
+ failed: [],
+ needsConfirmation: [],
+ };
+ if (targets.length === 0) return empty;
+
+ setIsPending(true);
+ setPendingIds(() => {
+ const next: Record<string, true> = {};
+ for (const t of targets) next[t.id] = true;
+ return next;
+ });
+ try {
+ const results = await Promise.allSettled(
+ targets.map((t) =>
+ deleteV1DeleteCredentials(
+ t.provider,
+ t.id,
+ force ? { force } : undefined,
+ ),
+ ),
+ );
+
+ const out: RemoveResult = {
+ succeeded: [],
+ failed: [],
+ needsConfirmation: [],
+ };
+
+ results.forEach((r, idx) => {
+ const target = targets[idx];
+ if (r.status === "rejected") {
+ out.failed.push(target);
+ return;
+ }
+ const body = r.value.data;
+ if (body && "need_confirmation" in body && body.need_confirmation) {
+ out.needsConfirmation.push({ target, message: body.message });
+ return;
+ }
+ out.succeeded.push(target);
+ });
+
+ const successCount = out.succeeded.length;
+
+ if (successCount === 1) {
+ const only = out.succeeded[0];
+ toast({
+ title: only.name ? `Removed ${only.name}` : "Integration removed",
+ variant: "success",
+ });
+ } else if (successCount > 1) {
+ const previewNames = out.succeeded
+ .map((t) => t.name)
+ .filter(Boolean)
+ .slice(0, 3)
+ .join(", ");
+ toast({
+ title: `${successCount} integrations removed`,
+ description: previewNames || undefined,
+ variant: "success",
+ });
+ }
+
+ // needsConfirmation is surfaced by the caller as a force-delete dialog,
+ // so we deliberately don't toast here — the dialog *is* the prompt.
+
+ if (out.failed.length > 0) {
+ const failedNames = out.failed
+ .map((t) => t.name ?? `${t.provider}/${t.id.slice(0, 6)}`)
+ .slice(0, 3)
+ .join(", ");
+ const more =
+ out.failed.length > 3 ? ` +${out.failed.length - 3} more` : "";
+ // needsConfirmation items are pending a force-delete prompt, not
+ // failures and not successes — exclude them from the denominator
+ // so "X of Y could not be removed" doesn't imply the rest succeeded.
+ const attemptableCount = targets.length - out.needsConfirmation.length;
+ const allFailedTitle =
+ attemptableCount === 1
+ ? "Failed to remove integration"
+ : `Failed to remove ${attemptableCount} integrations`;
+ toast({
+ title:
+ out.failed.length === attemptableCount
+ ? allFailedTitle
+ : `${out.failed.length} of ${attemptableCount} could not be removed`,
+ description: `${failedNames}${more}. Try again to retry the failed ones.`,
+ variant: "destructive",
+ });
+ }
+
+ await queryClient.invalidateQueries({
+ queryKey: getGetV1ListCredentialsQueryKey(),
+ });
+
+ return out;
+ } finally {
+ setIsPending(false);
+ setPendingIds({});
+ }
+ }
+
+ function isDeletingId(id: string): boolean {
+ return Boolean(pendingIds[id]);
+ }
+
+ return { remove, isPending, isDeletingId };
+}
diff --git a/autogpt_platform/frontend/src/app/(platform)/settings/integrations/helpers.ts b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/helpers.ts
new file mode 100644
index 0000000000..c1e2518ae6
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/helpers.ts
@@ -0,0 +1,132 @@
+import type { CredentialsMetaResponse } from "@/app/api/__generated__/models/credentialsMetaResponse";
+import { CredentialsMetaResponseType } from "@/app/api/__generated__/models/credentialsMetaResponseType";
+
+export type CredentialType = CredentialsMetaResponseType;
+
+export interface CredentialView {
+ id: string;
+ provider: string;
+ type: CredentialType;
+ title: string;
+ username: string | null;
+ host: string | null;
+ isManaged: boolean;
+}
+
+export interface ProviderGroupView {
+ id: string;
+ name: string;
+ logoUrl?: string;
+ credentials: CredentialView[];
+}
+
+const TYPE_LABELS: Record<CredentialType, string> = {
+ api_key: "API Key",
+ oauth2: "OAuth",
+ user_password: "User/Password",
+ host_scoped: "Host-scoped",
+};
+
+export function typeBadgeLabel(type: CredentialType): string {
+ return TYPE_LABELS[type] ?? type;
+}
+
+const PROVIDER_DISPLAY_NAME_OVERRIDES: Record<string, string> = {
+ github: "GitHub",
+ google: "Google",
+ google_maps: "Google Maps",
+ hubspot: "HubSpot",
+ openai: "OpenAI",
+ anthropic: "Anthropic",
+ openweathermap: "OpenWeatherMap",
+ e2b: "E2B",
+ d_id: "D-ID",
+ ideogram: "Ideogram",
+ jina: "Jina",
+ twitter: "X",
+ zerobounce: "ZeroBounce",
+};
+
+export function formatProviderName(slug: unknown): string {
+ if (typeof slug !== "string" || slug.length === 0) return "";
+ if (PROVIDER_DISPLAY_NAME_OVERRIDES[slug]) {
+ return PROVIDER_DISPLAY_NAME_OVERRIDES[slug];
+ }
+ return slug
+ .split(/[_-]/g)
+ .filter(Boolean)
+ .map((part) => part.charAt(0).toUpperCase() + part.slice(1))
+ .join(" ");
+}
+
+export function formatMaskedValue(credential: CredentialView): string {
+ if (credential.username) return `Username: ${credential.username}`;
+ if (credential.host) return credential.host;
+ if (credential.type === "api_key") return "API key configured";
+ if (credential.type === "oauth2") return "Connected via OAuth";
+ if (credential.type === "user_password") return "Username/password set";
+ return "Configured";
+}
+
+function toCredentialView(cred: CredentialsMetaResponse): CredentialView {
+ return {
+ id: cred.id,
+ provider: cred.provider,
+ type: cred.type,
+ title: cred.title ?? formatProviderName(cred.provider),
+ username: cred.username ?? null,
+ host: cred.host ?? null,
+ isManaged: cred.is_managed ?? false,
+ };
+}
+
+export function groupCredentialsByProvider(
+ credentials: CredentialsMetaResponse[],
+): ProviderGroupView[] {
+ const byProvider = new Map<string, CredentialView[]>();
+ for (const cred of credentials) {
+ const list = byProvider.get(cred.provider) ?? [];
+ list.push(toCredentialView(cred));
+ byProvider.set(cred.provider, list);
+ }
+
+ const groups: ProviderGroupView[] = [];
+ for (const [provider, creds] of byProvider) {
+ groups.push({
+ id: provider,
+ name: formatProviderName(provider),
+ credentials: creds,
+ });
+ }
+ groups.sort((a, b) => a.name.localeCompare(b.name));
+ return groups;
+}
+
+function normalizeSearchText(value: string): string {
+ return value.normalize("NFKD").replace(/[̀-ͯ]/g, "").toLowerCase();
+}
+
+export function filterProviders(
+ providers: ProviderGroupView[],
+ query: string,
+): ProviderGroupView[] {
+ const q = normalizeSearchText(query.trim());
+ if (!q) return providers;
+
+ const result: ProviderGroupView[] = [];
+ for (const provider of providers) {
+ if (normalizeSearchText(provider.name).includes(q)) {
+ result.push(provider);
+ continue;
+ }
+ const matched = provider.credentials.filter(
+ (c) =>
+ normalizeSearchText(c.title).includes(q) ||
+ (c.username && normalizeSearchText(c.username).includes(q)),
+ );
+ if (matched.length > 0) {
+ result.push({ ...provider, credentials: matched });
+ }
+ }
+ return result;
+}
diff --git a/autogpt_platform/frontend/src/app/(platform)/settings/integrations/page.tsx b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/page.tsx
index 833bbbbc73..a2f5be7b16 100644
--- a/autogpt_platform/frontend/src/app/(platform)/settings/integrations/page.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/settings/integrations/page.tsx
@@ -1,16 +1,22 @@
"use client";
-import { Text } from "@/components/atoms/Text/Text";
+import { useState } from "react";
+
+import { ConnectServiceDialog } from "./components/ConnectServiceDialog/ConnectServiceDialog";
+import { IntegrationsHeader } from "./components/IntegrationsHeader/IntegrationsHeader";
+import { IntegrationsList } from "./components/IntegrationsList/IntegrationsList";
export default function SettingsIntegrationsPage() {
+ const [isConnectOpen, setIsConnectOpen] = useState(false);
+
return (
<>
- <Text variant="h4" className="text-[#1F1F20]">
- Integrations
- </Text>
- <Text variant="large" className="mt-2 text-zinc-600">
- Coming soon.
- </Text>
+ <IntegrationsHeader onConnect={() => setIsConnectOpen(true)} />
+ <IntegrationsList />
+ <ConnectServiceDialog
+ open={isConnectOpen}
+ onOpenChange={setIsConnectOpen}
+ />
</>
);
}
diff --git a/autogpt_platform/frontend/src/app/(platform)/settings/layout.tsx b/autogpt_platform/frontend/src/app/(platform)/settings/layout.tsx
index d450a60e2a..2d04ee99fb 100644
--- a/autogpt_platform/frontend/src/app/(platform)/settings/layout.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/settings/layout.tsx
@@ -4,6 +4,7 @@ import { ReactNode } from "react";
import { usePathname } from "next/navigation";
import { motion, useReducedMotion } from "framer-motion";
import { ScrollArea } from "@/components/ui/scroll-area";
+import { NAVBAR_HEIGHT_PX } from "@/lib/constants";
import { SettingsSidebar } from "./components/SettingsSidebar/SettingsSidebar";
import { SettingsMobileNav } from "./components/SettingsMobileNav/SettingsMobileNav";
@@ -12,7 +13,10 @@ export default function SettingsLayout({ children }: { children: ReactNode }) {
const reduceMotion = useReducedMotion();
return (
- <div className="flex h-full w-full overflow-hidden bg-[#F9F9FA]">
+ <div
+ className="flex w-full overflow-hidden bg-[#F9F9FA]"
+ style={{ height: `calc(100vh - ${NAVBAR_HEIGHT_PX}px)` }}
+ >
<SettingsSidebar />
<div className="flex flex-1 flex-col overflow-hidden">
<SettingsMobileNav />
diff --git a/autogpt_platform/frontend/src/app/api/openapi.json b/autogpt_platform/frontend/src/app/api/openapi.json
index ea1faed38d..592caec08c 100644
--- a/autogpt_platform/frontend/src/app/api/openapi.json
+++ b/autogpt_platform/frontend/src/app/api/openapi.json
@@ -4564,7 +4564,7 @@
"get": {
"tags": ["v1", "integrations"],
"summary": "List Providers",
- "description": "Get a list of all available provider names.\n\nReturns both statically defined providers (from ProviderName enum)\nand dynamically registered providers (from SDK decorators).\n\nNote: The complete list of provider names is also available as a constant\nin the generated TypeScript client via PROVIDER_NAMES.",
+ "description": "Get metadata for every available provider.\n\nReturns both statically defined providers (from ``ProviderName`` enum) and\ndynamically registered providers (from SDK decorators). Each entry includes\na ``description`` declared via ``ProviderBuilder.with_description(...)`` in\nthe provider's ``_config.py``.\n\nNote: The complete list of provider names is also available as a constant\nin the generated TypeScript client via PROVIDER_NAMES.",
"operationId": "getV1ListProviders",
"responses": {
"200": {
@@ -4572,7 +4572,7 @@
"content": {
"application/json": {
"schema": {
- "items": { "type": "string" },
+ "items": { "$ref": "#/components/schemas/ProviderMetadata" },
"type": "array",
"title": "Response Getv1Listproviders"
}
@@ -14459,6 +14459,33 @@
"title": "ProviderEnumResponse",
"description": "Response containing a provider from the enum."
},
+ "ProviderMetadata": {
+ "properties": {
+ "name": {
+ "type": "string",
+ "title": "Name",
+ "description": "Provider slug (e.g. ``github``)"
+ },
+ "description": {
+ "anyOf": [{ "type": "string" }, { "type": "null" }],
+ "title": "Description",
+ "description": "One-line human-readable summary of what the provider does. Declared via ``ProviderBuilder.with_description(...)`` in the provider's ``_config.py``. ``None`` if not set."
+ },
+ "supported_auth_types": {
+ "items": {
+ "type": "string",
+ "enum": ["api_key", "oauth2", "user_password", "host_scoped"]
+ },
+ "type": "array",
+ "title": "Supported Auth Types",
+ "description": "Credential types this provider accepts. Drives which connection tabs the settings UI renders for the provider. Empty list means no auth types declared."
+ }
+ },
+ "type": "object",
+ "required": ["name"],
+ "title": "ProviderMetadata",
+ "description": "Display metadata for a provider, shown in the settings integrations UI."
+ },
"ProviderNamesResponse": {
"properties": {
"providers": {
diff --git a/autogpt_platform/frontend/src/components/contextual/CredentialsInput/helpers.ts b/autogpt_platform/frontend/src/components/contextual/CredentialsInput/helpers.ts
index 9b0bc9bed1..9950d0803f 100644
--- a/autogpt_platform/frontend/src/components/contextual/CredentialsInput/helpers.ts
+++ b/autogpt_platform/frontend/src/components/contextual/CredentialsInput/helpers.ts
@@ -187,13 +187,13 @@ export function isSystemCredential(credential: {
}
export function filterSystemCredentials<
- T extends { title?: string; is_system?: boolean },
+ T extends { title?: string | null; is_system?: boolean },
>(credentials: T[]): T[] {
return credentials.filter((cred) => !isSystemCredential(cred));
}
export function getSystemCredentials<
- T extends { title?: string; is_system?: boolean },
+ T extends { title?: string | null; is_system?: boolean },
>(credentials: T[]): T[] {
return credentials.filter((cred) => isSystemCredential(cred));
}
diff --git a/autogpt_platform/frontend/src/lib/autogpt-server-api/client.ts b/autogpt_platform/frontend/src/lib/autogpt-server-api/client.ts
index f10f6be545..22169d1c4d 100644
--- a/autogpt_platform/frontend/src/lib/autogpt-server-api/client.ts
+++ b/autogpt_platform/frontend/src/lib/autogpt-server-api/client.ts
@@ -372,8 +372,14 @@ export default class BackendAPI {
);
}
- listProviders(): Promise<string[]> {
- return this._get("/integrations/providers");
+ async listProviders(): Promise<string[]> {
+ // The endpoint returns `ProviderMetadata[]` (`{ name, description }`) but
+ // legacy consumers (e.g. CredentialsProvider) still expect a flat string[]
+ // of provider names. Map down so we keep that contract.
+ const response: Array<{ name: string }> = await this._get(
+ "/integrations/providers",
+ );
+ return response.map((p) => p.name);
}
listSystemProviders(): Promise<string[]> {
diff --git a/autogpt_platform/frontend/src/providers/agent-credentials/helper.ts b/autogpt_platform/frontend/src/providers/agent-credentials/helper.ts
index 49aa6a878e..94661574ff 100644
--- a/autogpt_platform/frontend/src/providers/agent-credentials/helper.ts
+++ b/autogpt_platform/frontend/src/providers/agent-credentials/helper.ts
@@ -1,6 +1,8 @@
// --8<-- [start:CredentialsProviderNames]
// Helper function to convert provider names to display names
-export function toDisplayName(provider: string): string {
+export function toDisplayName(provider: unknown): string {
+ if (typeof provider !== "string" || provider.length === 0) return "";
+
// Special cases that need manual handling
const specialCases: Record<string, string> = {
aiml_api: "AI/ML",