LogoLogo
PlatformConnectivityFlowsLearn
  • Getting Started
    • Welcome to Fastn
    • How Fastn Works
  • Your First Automation
  • Customer-Facing Integrations
    • Introduction to Embedded Integrations
    • Custom Webhooks: Automatic Triggers
    • Configuring the Embedded Experience
    • Workspace Management
  • Analytics & Monitoring
  • Building Flows
    • Flow Setup Essentials
    • Designing a Flow
    • Using Templates
  • Connecting Apps
    • Connector Types & Setup
    • Managing & Using Connectors
  • Data & Storage
    • Connect to the Fastn DB
    • Connecting External Databases
  • UCL - Unified Command Layer
    • About Fastn UCL
    • Getting Started with UCL
  • Multitenancy
  • Embedding Fastn UCL onto your AI Agent
  • UCL Monitoring
  • Fastn UCL Use Cases
    • Create a Google Doc and Share it to Slack - using Fastn UCL
    • Connect Fastn UCL to AI Assistant Preview for task Assignment in Jira
    • Connect Fastn UCL to Cursor and access data from Notion
  • Tutorials
    • Setting Up a HubSpot Integration in Your Platform
  • Additional Resources
    • Glossary
    • FAQs
Powered by GitBook
On this page
  • Real-World Example: Document Management Workflow
  • How Embedding Works?
  • Step 1: Creating Your Fastn UCL Account
  • Step 2: Enabling Connectors & Selecting Actions
  • Step 3: Setting Up Your Environment
  • Environment via Code Editor
  • Step 4: Implementation
  • Environment via Codespaces - Alternative Method
  • Conclusion
  • Next Steps:

Was this helpful?

Embedding Fastn UCL onto your AI Agent

This guide will take you through each step, from setting up your environment to seamlessly integrating your tools into your environment.

Embedding refers to integrating Fastn UCL directly into your AI agent’s environment so it can take real actions, like sending messages, updating records, or triggering workflows, using your connected tools.

When you’re integrating Connectors into your SaaS product, Fastn Unified Command Layer (UCL) makes it easy to connect 1000+ tools (Actions), manage customer environments, and orchestrate real-world actions from a single command layer.

In this guide, we will walk you through step by step from setting up your space to fully embedding your tools into your environment, including but not limited to:

  • Setting up your account on Fastn UCL

  • Enabling your connectors and actions

  • Connecting your Fastn MCP server

  • Implementing it onto your application/product

Real-World Example: Document Management Workflow

When a marketing team creates a new campaign brief, a single Fastn UCL command automatically:

  • Creates a new project document in Notion

  • Shares the brief via Gmail to stakeholders

  • Sets up a dedicated Slack channel for discussions

  • Creates a collaborative Google Doc for content drafts

How Embedding Works?

Embedding via Fastn UCL refers to the process of integrating the UCL functionality directly into your product or AI agent's codebase. This allows your application to seamlessly interact with external tools and services through Fastn's unified interface.

This is how your AI agent looks with and without Fastn UCL embedding:

The embedding process enables you to:

  • Execute commands across multiple tools without managing individual integrations

  • Handle authentication and permissions across different customer workspaces

  • Maintain secure tenant separation while accessing various third-party services

  • Manage API connections and token storage through a single interface

Let's further understand embedding via a use case example below:

Step 1: Creating Your Fastn UCL Account

  1. After you log in, you can select a workspace, after which you'll be directed to the next page to set up your integrations.

When you first log in to Fastn UCL, a workspace titled "My Workspace" is created by default.

If you have more than one workspace, you will be provided with an option to choose your respective

Step 2: Enabling Connectors & Selecting Actions

  1. Navigate to the Connect setup section to choose from more than a hundred apps (e.g., Slack, Google Docs, Jira, Notion, Salesforce) and 1000+ actions (e.g., send email, create task, update database, generate report, schedule meeting).

  1. Select your desired connector (or app) and allow the respective authorization.

  2. Once you have connected, you will see the “Connected” button highlighted in green as shown below:

Tip: You can connect and disconnect with your desired connector anytime.

Once you have selected your connectors, selected your desired actions and click on the confirmation button below as shown.

Think of actions as commands that allow the agent to perform your desired task.

  1. For each app you connect, UCL automatically provides a set of supported actions.

  2. Fastn UCL handles all OAuth and API token management in the background.

Step 3: Setting Up Your Environment

Within this step, we’ll focus on setting up your codebase environment where you can embed Fastn UCL easily, to ensure an easy-to-follow process, you can find an example environment repository to clone below:

If you wish to run the code locally on your code editor, simply follow the README documentation within the GitHub repository.

Environment via Code Editor

Please ensure that you've read the ReadMe file in the GitHub repository before starting.

  • Click on the code button to download the ZIP file.

  • After downloading, open the file in your respective code editor.

Setting up your Keys and IDs

  • Once you've set up your code environment, you'll see a .env file that consists of three environment variables:

OPENAI_API_KEY

FASTN_MCP_SERVER_URL

FASTN_SPACE_ID
  • Head back to the .env file and insert your generated API key within the OPENAI_API_KEY environment variable.

  • Click on the Integrate section, copy the command, and paste it into the FASTN_MCP_SERVER_URL:

  • Scroll to the bottom of the Integrate page and you will see an assets section which contains the Space ID and an API key:

  • Head back to the .env file in the code editor and copy paste the SPACE ID and paste in the FASTN_SPACE_ID variable.

Keep in mind that each workspace has a unique Space ID

  • Then head over to your code editor and in the lib folder, you will find a file named config.ts, simply place the same Space ID in the config.ts file as shown below:

Setting up your Agent Connect UI

  • The next step is to integrate the Agent Connect UI onto your app, which is primarily an npm package provided by Fastn UCL that allows you to plug and play your connectors and tools easily.

You can easily access the agent connect code on our Fastn UCL Integrate section as shown below:

However, for tutorial purposes, you'll find the Agent Connect UI code within the components folder, already implemented in your environment.

As shown below in the file:

Step 4: Implementation

Now that you've set up everything, you'll now see Fastn UCL embedded in action, simply follow the steps below:

  • Head over to your code editor, open your terminal, write and execute command:

npm run dev

Once you have executed the command, you will see a local host site showcasing UCL embedded within an AI agent, where you can put your connectors and tools to test as shown below:

You'll see your connectors embedded on the web app as per the connectors that you have enabled in the Fastn UCL "setup" section.

Additionally, in the Tools section of the demo app, you can also see the actions that you have enabled for each connector as shown below:

Environment via Codespaces - Alternative Method

Alternatively, if you do not want to use your code editor, you can simply set up everything via GitHub Codespaces.

Codespaces provides a complete, pre-configured development environment in the cloud, allowing you to start coding instantly without worrying about local setup or dependencies.

  • Simply access the repository → Click on Code → Then click on “Create codespace on main”

  • After creating a codespace environment you’ll see a live code editor waiting for you

Conclusion

Fastn UCL simplifies the process of embedding AI capabilities into your applications by providing a unified layer for connecting tools and managing multi-tenant workflows. Through its MCP server and Agent Connect component, developers can quickly implement secure, scalable integrations across different customer workspaces while maintaining proper isolation and authentication.

Next Steps:

PreviousMultitenancyNextUCL Monitoring

Last updated 15 hours ago

Was this helpful?

Go to and sign up for an account.

Then head over to and generate your API key. This API key will ensure that an LLM is integrated with your MCP.

From here on, you can simply follow the same steps as described in the section above.

Explore

Or for advanced onboarding

ucl.dev
https://platform.openai.com/api-keys
Fastn Docs
request a demo
code editor
GitHub - fastnai/embedded-multitenant-ai-assistantGitHub
Logo