Deco
Guides

Integrations

Learn how to connect external services and APIs in deco

One of the most powerful aspects of deco is how easily you can connect to external services – this could be anything from a SaaS API to a database or file storage. Integrations allow your agent to do things like: send emails, query your company database, fetch documents from Google Drive, or incorporate knowledge from PDFs and websites.

Connecting External APIs

Many common integrations are available out-of-the-box in deco’s integration library (for example, Slack, Gmail, Notion, Stripe, etc.). These can be added via the deco UI (under the “Tools” or “Integrations” section). When you “Add Integration” and configure it (often OAuth or API keys), those integration’s tools become available in your environment object Env . For instance, after adding Gmail and granting access, your Cloudflare Worker can call env.GMAIL.sendEmail as we saw earlier. The deco.gen.ts will have the types for GMAIL.sendEmail (and any other Gmail tools provided).

If there isn’t a built-in integration for what you need, you have two options:

  • Use HTTP directly in a custom tool: Because Cloudflare Workers can fetch external URLs, you can write a tool that calls any REST API using fetch . You’d manually handle auth (store an API key as an environment variable or secret in wrangler.toml ) and parse the response. This is straightforward for simple APIs.

  • Build a custom integration: The deco platform allows publishing custom integrations that can be reused across tools, either for everyone to use or to the private team registry.

Built-in Integrations

deco comes with a comprehensive set of built-in integrations that are automatically available to your agents. These integrations are organized into two categories:

Global Integrations

These integrations are accessible at the organization/team level and provide foundational capabilities that work across all your projects:

Team Management

  • TEAMS_GET, TEAMS_CREATE, TEAMS_UPDATE, TEAMS_DELETE: Manage team creation, configuration, and membership
  • TEAMS_LIST: List all teams you have access to
  • TEAMS_GET_THEME: Access workspace theming and branding settings
  • PROJECTS_LIST: List all projects within an organization

User & Member Management

  • Member Management: Invite team members, manage roles and permissions, handle team invitations
  • Profile Management: Update user profiles and personal settings
  • Role Management: Create custom roles with granular tool and resource permissions

Integration Management (Global)

  • INTEGRATIONS_CALL_TOOL: Execute tools from any installed integration
  • INTEGRATIONS_LIST_TOOLS: Discover available tools from integrations
  • Registry Access: Browse and discover new integrations from the deco marketplace

Project Integrations

These integrations operate within the context of a specific project/workspace and provide the core functionality for building and managing AI agents:

Agent Management

  • AGENTS_LIST, AGENTS_GET, AGENTS_CREATE, AGENTS_UPDATE, AGENTS_DELETE: Complete agent lifecycle management
  • Configure agent personalities, instructions, tool access, and behavior

Integration Management (Project-scoped)

  • INTEGRATIONS_GET, INTEGRATIONS_CREATE, INTEGRATIONS_UPDATE, INTEGRATIONS_DELETE: Manage project-specific integrations
  • OAuth Integration Setup: Handle OAuth flows for third-party service connections
  • Integration Discovery: Search and install new integrations from marketplace

Thread & Conversation Management

  • THREADS_LIST, THREADS_GET: Access conversation history and thread management
  • Thread Metadata: Update thread titles and manage conversation context
  • Message History: Retrieve and analyze past conversations

Application Hosting

  • Deployment Management: Deploy your agents as web applications with custom domains
  • App Lifecycle: Create, update, and manage hosted applications
  • Domain Management: Configure custom domains for your deployed agents
  • Workflow Execution: Run and monitor background workflows

Registry & Marketplace

  • App Discovery: Browse available apps and integrations in the registry
  • Publishing: Publish your own apps and integrations for others to use
  • Version Management: Manage different versions of published applications

Automation & Triggers

  • TRIGGERS_CREATE, TRIGGERS_UPDATE, TRIGGERS_DELETE: Set up automated workflows
  • Cron Scheduling: Schedule recurring tasks and workflows
  • Webhook Triggers: Create webhook endpoints for external system integrations
  • Event-driven Automation: Respond to system events and external triggers

Knowledge Base Management

  • KNOWLEDGE_BASE_CREATE, KNOWLEDGE_BASE_DELETE: Manage knowledge bases for RAG
  • KNOWLEDGE_BASE_REMEMBER, KNOWLEDGE_BASE_FORGET: Add and remove information
  • KNOWLEDGE_BASE_SEARCH: Semantic search across your knowledge bases
  • File Processing: Upload and process documents, PDFs, and other file types

File System Management

  • FS_READ, FS_WRITE, FS_DELETE: Read, write and manage files in workspace storage
  • File Metadata: Access file information and properties
  • Presigned URLs: Generate secure URLs for file access

Database Management

  • DATABASES_RUN_SQL: Execute SQL queries against workspace databases
  • Database Migration: Manage schema changes and data migrations
  • Workspace Database: Each workspace gets its own isolated database

AI & Model Management

  • AI_GENERATE, AI_GENERATE_OBJECT: Access language model capabilities
  • Custom Models: Configure and manage custom AI models
  • Model Access Control: Control which models agents can access

Financial & Usage Tracking

  • Wallet Management: Track usage credits and billing
  • Usage Analytics: Monitor agent performance and resource consumption
  • Billing History: Access detailed usage and cost reports

Access Control & Security

  • API Key Management: Generate and manage API keys for external access
  • Role-based Permissions: Fine-grained access control for tools and resources
  • Policy Management: Define and enforce security policies

All these integrations work seamlessly together, allowing you to build sophisticated AI agents that can interact with external services, manage data, automate workflows, and provide rich user experiences. The built-in integrations handle authentication, error handling, and resource management automatically, so you can focus on building your agent’s core functionality.

Using External Services in Workflows

Note that you might chain multiple different integrations in one workflow. For instance, a workflow could:

  • Use a database integration to fetch some data in step 1,
  • Use an LLM tool (like OpenAI integration) to summarize that data in step 2,
  • Use an email integration to send the summary to a user in step 3.

This is a multi-service orchestration. The platform encourages such usage – it’s the reason we have workflows! Just be careful to handle failures at each step (perhaps via branching) and not exceed any rate limits of those services.

Finally, always test your integrations. For any integration you configure, try calling it directly (maybe via a simple tool or the provided integration test buttons in the UI) to ensure credentials are correct. Integration issues are a common source of runtime errors, so if something isn’t working, double-check that the integration is connected and authorized (e.g., Is the API key correct?).

We’ll provide detailed how-tos for popular integrations in dedicated sections, but the above gives you a general idea of how to connect just about anything to your deco agents.

Found an error or want to improve this page?

Edit this page