# How to integrate Gosquared MCP with Autogen

```json
{
  "title": "How to integrate Gosquared MCP with Autogen",
  "toolkit": "Gosquared",
  "toolkit_slug": "gosquared",
  "framework": "AutoGen",
  "framework_slug": "autogen",
  "url": "https://composio.dev/toolkits/gosquared/framework/autogen",
  "markdown_url": "https://composio.dev/toolkits/gosquared/framework/autogen.md",
  "updated_at": "2026-05-12T10:14:15.542Z"
}
```

## Introduction

This guide walks you through connecting Gosquared to AutoGen using the Composio tool router. By the end, you'll have a working Gosquared agent that can list all websites linked to your account, show active chat conversations from today, add a new shared user by email through natural language commands.
This guide will help you understand how to give your AutoGen agent real control over a Gosquared account through Composio's Gosquared MCP server.
Before we dive in, let's take a quick look at the key ideas and tools involved.

## Also integrate Gosquared with

- [OpenAI Agents SDK](https://composio.dev/toolkits/gosquared/framework/open-ai-agents-sdk)
- [Claude Agent SDK](https://composio.dev/toolkits/gosquared/framework/claude-agents-sdk)
- [Claude Code](https://composio.dev/toolkits/gosquared/framework/claude-code)
- [Claude Cowork](https://composio.dev/toolkits/gosquared/framework/claude-cowork)
- [Codex](https://composio.dev/toolkits/gosquared/framework/codex)
- [OpenClaw](https://composio.dev/toolkits/gosquared/framework/openclaw)
- [Hermes](https://composio.dev/toolkits/gosquared/framework/hermes-agent)
- [CLI](https://composio.dev/toolkits/gosquared/framework/cli)
- [Google ADK](https://composio.dev/toolkits/gosquared/framework/google-adk)
- [LangChain](https://composio.dev/toolkits/gosquared/framework/langchain)
- [Vercel AI SDK](https://composio.dev/toolkits/gosquared/framework/ai-sdk)
- [Mastra AI](https://composio.dev/toolkits/gosquared/framework/mastra-ai)
- [LlamaIndex](https://composio.dev/toolkits/gosquared/framework/llama-index)
- [CrewAI](https://composio.dev/toolkits/gosquared/framework/crew-ai)

## TL;DR

Here's what you'll learn:
- Get and set up your OpenAI and Composio API keys
- Install the required dependencies for Autogen and Composio
- Initialize Composio and create a Tool Router session for Gosquared
- Wire that MCP URL into Autogen using McpWorkbench and StreamableHttpServerParams
- Configure an Autogen AssistantAgent that can call Gosquared tools
- Run a live chat loop where you ask the agent to perform Gosquared operations

## What is AutoGen?

Autogen is a framework for building multi-agent conversational AI systems from Microsoft. It enables you to create agents that can collaborate, use tools, and maintain complex workflows.
Key features include:
- Multi-Agent Systems: Build collaborative agent workflows
- MCP Workbench: Native support for Model Context Protocol tools
- Streaming HTTP: Connect to external services through streamable HTTP
- AssistantAgent: Pre-built agent class for tool-using assistants

## What is the Gosquared MCP server, and what's possible with it?

The Gosquared MCP server is an implementation of the Model Context Protocol that connects your AI agent and assistants like Claude, Cursor, etc directly to your Gosquared account. It provides structured and secure access to your real-time web analytics and customer engagement data, so your agent can perform actions like managing team members, analyzing chat conversations, retrieving site data, and handling customer profiles on your behalf.
- Team member management: Seamlessly add or remove shared users from your GoSquared projects, making it easy to control who has access to your analytics and engagement tools.
- Insightful chat analytics: Retrieve chat conversations, messages, and conversation feeds, enabling your agent to analyze customer interactions and surface important chat history.
- Project and site listing: Quickly list all sites and projects accessible to your account, so your assistant can pull structured data about your web properties.
- API key validation and security checks: Verify API key validity and scopes to ensure secure, authorized access before performing sensitive operations.
- Customer profile management: Delete person records, including all associated data, when you need to manage your user database or enforce data privacy requests.

## Supported Tools

| Tool slug | Name | Description |
|---|---|---|
| `GOSQUARED_ACCOUNT_ADD_SHARED_USER` | Add Shared User | Tool to add a new shared user to a project. Use when inviting team members via their email address. |
| `GOSQUARED_ACCOUNT_REMOVE_SHARED_USER` | Remove shared user | Removes a shared user from a GoSquared project by their email address, revoking their access to the site. Requires owner-level API key permissions. Use GOSQUARED_ACCOUNT_SHARED_USERS first to list current shared users. |
| `GOSQUARED_ACCOUNT_SHARED_USERS` | Account Shared Users | Retrieves all team members who have access to the current GoSquared project. Returns each user's ID, email, access state (owner/active/pending), and role (owner/admin/member). Requires an API key with owner-level permissions for the project. Use this to audit project access or verify team member invitations. |
| `GOSQUARED_ACCOUNT_SITES` | List Account Sites | List all projects/sites accessible to the authenticated account. Requires 'read_account' API key scope. Use 'grouped' format to see owned vs shared sites, or 'flat' for a simple list. |
| `GOSQUARED_AUTH_TOKEN_INFO` | Check API Token Validity and Scopes | Tool to check whether an API key is valid and retrieve its enabled scopes. Use when verifying API credentials before making further API calls. |
| `GOSQUARED_BLOCK_VISITOR` | Block Visitor | Tool to block a specific visitor from being tracked. Use when you need to prevent tracking for a particular visitor ID. |
| `GOSQUARED_CHAT_CHAT` | Retrieve Chat Conversation | Retrieve detailed information about a chat conversation by its ID. Use this tool when you need to: - Get the current state of a chat conversation (agent assignment, read status) - View the latest message in a conversation - Check visitor presence and contact details - Determine if a chat is archived or active Prerequisites: Obtain a valid chatID from GOSQUARED_CHAT_CHATS or use a person_id from GOSQUARED_LIST_PEOPLE. Note: To retrieve the full conversation history with all messages, use GOSQUARED_CHAT_FEED instead. This endpoint returns summary information and only the latest message. |
| `GOSQUARED_CHAT_CHAT_MESSAGES` | Retrieve Chat Messages | Retrieve messages from a GoSquared chat conversation by chat ID. Use this tool to: - Fetch message history from a specific chat conversation - Page through chat messages with offset and limit - Filter messages by date range - Get the total count of messages via the cardinality field Prerequisites: - Obtain a valid chatID from GOSQUARED_CHAT_CHATS or GOSQUARED_CHAT_CHAT actions - The chatID corresponds to the person_id of the visitor Returns: - A list of messages with timestamp, sender, and text content - Cardinality field showing the total message count |
| `GOSQUARED_CHAT_CHATS` | Retrieve Chat Conversations | Tool to retrieve chat data for reporting purposes. Use when you need to list active chat conversations within a specific time window. |
| `GOSQUARED_CHAT_FEED` | Retrieve Chat Feed | Retrieve the complete feed of messages and events from a chat conversation. Use this action to: - Fetch chat history and conversation timeline for a specific person - Review messages exchanged between agents, bots, and visitors - Access internal/private agent notes and public messages - Track chat events like archiving, status changes, etc. - Retrieve messages with rich content including emojis and Unicode text The chat_id corresponds to a person_id from the GoSquared People API. You can obtain valid person_id values by first calling the List People action. Supports pagination and date filtering to retrieve specific portions of the chat history. Feed items are typically returned in reverse chronological order. |
| `GOSQUARED_CREATE_ACCOUNT_WEBHOOK` | Create Account Webhook | Tool to create a webhook to receive notifications about events in a GoSquared project. Use when you need to register a new webhook endpoint for real-time event notifications. |
| `GOSQUARED_CREATE_WEBHOOK_TRIGGER` | Create Webhook Trigger | Tool to add a trigger to an existing GoSquared webhook. Use when configuring webhook alerts for traffic spikes, traffic dips, chat messages, or smart group events. |
| `GOSQUARED_DELETE_ACCOUNT_WEBHOOK` | Delete Account Webhook | Tool to delete a webhook from a GoSquared account. Use when you need to remove an existing webhook by its ID. |
| `GOSQUARED_DELETE_PERSON` | Delete person | Tool to delete a person profile and all associated data. Use when you need to permanently remove a person's record and optionally blacklist them. |
| `GOSQUARED_END_VISITOR_SESSIONS` | Timeout Visitor Sessions | Tool to end all tracking sessions for a specified visitor in GoSquared. Use when you need to manually terminate a visitor's session, such as when a user logs out or closes their browser. Optionally specify a page index to timeout only a specific session. |
| `GOSQUARED_GET_ACCOUNT_BLOCKED` | Get Account Blocked Items | Tool to retrieve a list of blocked IP addresses, bots, and visitors for a project. Use when you need to see all blocked items across all categories. |
| `GOSQUARED_GET_ACCOUNT_BLOCKED_BOTS` | Get Account Blocked Bots | Tool to retrieve the bot blocking status for a GoSquared project. Use when you need to check whether automatic bot blocking is enabled. |
| `GOSQUARED_GET_ACCOUNT_BLOCKED_IPS` | Get Blocked IP Addresses | Tool to retrieve the list of blocked IP addresses for the account. Use when you need to view which IP addresses are currently blocked from tracking or accessing the site. |
| `GOSQUARED_GET_ACCOUNT_BLOCKED_VISITORS` | Get Account Blocked Visitors | Tool to retrieve visitor IDs that have been blocked for a project. Use when you need to list visitors who were blocked (typically via the 'Ignore' button in the visitor widget). |
| `GOSQUARED_GET_ACCOUNT_SITE` | Get Account Site Details | Tool to retrieve detailed information about a specific site/project by its site_token. Use when you need to fetch configuration details, ownership info, or metadata for a particular GoSquared project. |
| `GOSQUARED_GET_ACCOUNT_SITES_USAGE` | Get Account Sites Usage | Tool to retrieve all sites and their pageview counts for the authenticated account. Use when you need to get usage statistics across all sites. Optionally filter by date range using 'from' and 'to' parameters. |
| `GOSQUARED_GET_ACCOUNT_TAGGED_VISITORS` | Get Account Tagged Visitors | Tool to retrieve the list of tagged visitors from the account. Use when you need to see which visitors have been tagged and their associated tags. |
| `GOSQUARED_GET_ACCOUNT_TRIGGER_TYPE` | Get Account Trigger Type | Tool to retrieve details of a specific trigger type from GoSquared. Use when you need to understand the payload structure and fields for a particular trigger type before setting up automation workflows or webhooks. |
| `GOSQUARED_GET_ACCOUNT_TRIGGER_TYPES` | Get Account Trigger Types | Tool to retrieve available types of triggers in GoSquared. Use when you need to discover what trigger types are supported for automation workflows or webhook configurations. |
| `GOSQUARED_GET_ACCOUNT_WEBHOOK` | Get Account Webhook | Tool to retrieve a specific webhook by ID from a GoSquared account. Use when you need to fetch details about an existing webhook configuration. |
| `GOSQUARED_GET_ACCOUNT_WEBHOOKS` | Get Account Webhooks | Retrieves a list of webhooks configured for the GoSquared project. Returns webhook details including ID, URL, event type, and active status. Use this to audit configured webhooks or verify webhook integrations. |
| `GOSQUARED_GET_ACCOUNT_WEBHOOK_TRIGGERS` | Get Account Webhook Triggers | Retrieves all triggers for a webhook. Use when you need to view which events are configured to fire a specific webhook. |
| `GOSQUARED_GET_CHAT_CHAT_MESSAGE` | Get Specific Chat Message | Retrieve a specific chat message by its message ID from a chat conversation. Use this tool when you need to fetch details of a particular message, such as its content, sender, and timestamp. Requires both the chat ID (same as person_id) and the specific message ID (UUID format). |
| `GOSQUARED_GET_NOW_BROWSERS` | Get Real-Time Visitor Browsers | Tool to retrieve browsers used by currently online visitors, sorted by visitor count. Use when you need real-time breakdown of which browsers active visitors are using. |
| `GOSQUARED_GET_NOW_CAMPAIGNS` | Get Real-Time Campaigns | Tool to retrieve currently running campaigns with real-time visitor counts. Use when you need to see which campaigns are actively driving visitors to the site right now. |
| `GOSQUARED_GET_NOW_COUNTRIES` | Get Real-Time Visitor Countries | Tool to retrieve countries where currently online visitors are located, sorted by visitor count. Use when you need real-time geographic distribution of active site visitors. |
| `GOSQUARED_GET_NOW_ENGAGEMENT` | Get Real-Time Engagement | Tool to retrieve engagement information of currently online users. Use when you need real-time metrics about visitor behavior including time on site and visit depth. |
| `GOSQUARED_GET_NOW_GEO` | Get Real-Time Visitor Geo Locations | Tool to retrieve real-time geographic coordinates for currently online visitors. Returns latitude/longitude coordinates with visitor counts for each location. Use when you need to visualize or analyze the geographic distribution of active site visitors. |
| `GOSQUARED_GET_NOW_LANGUAGES` | Get Real-Time Visitor Languages | Tool to retrieve languages for currently online visitors sorted by visitor count. Use when you need a real-time breakdown of active visitor languages. |
| `GOSQUARED_GET_NOW_NOTIFICATIONS` | Get Now Notifications | Tool to retrieve notifications stored in GoSquared. Use when you need to access Traffic Alerts, RSS feed items, or Milestones. |
| `GOSQUARED_GET_NOW_ORGANISATIONS` | Get Real-Time Organisations | Tool to retrieve internet organisations currently being used by online visitors, sorted by visitor count. Use when you need real-time data about which ISPs or network providers your visitors are using. |
| `GOSQUARED_GET_NOW_SOURCES_BY_SECTION` | Get Now Sources By Section | Tool to retrieve a specific group of real-time traffic sources such as 'site', 'organic', or 'social'. Use when you need up-to-the-minute data about a particular source category driving visitors to your site. |
| `GOSQUARED_GET_NOW_TIME` | Get Current Time | Tool to retrieve the current time according to GoSquared infrastructure. Use when you need a synchronized timestamp from GoSquared's servers. |
| `GOSQUARED_GET_NOW_VISITOR` | Get Specific Visitor | Retrieves real-time session information for a specific online visitor. Use this tool after obtaining a visitorID from GOSQUARED_NOW_VISITORS to get detailed information about a visitor including their location, browser, engagement score, and event history. Returns a 409 status if the visitor is no longer online. |
| `GOSQUARED_GET_PEOPLE_EVENT_TYPES` | Get People Event Types | Retrieve all event types tracked in GoSquared People CRM, ordered by frequency. Use this to discover available events for filtering or building Smart Groups. |
| `GOSQUARED_GET_PEOPLE_PROPERTY_TYPES` | Get People Property Types | Retrieve property types (schema definitions) from GoSquared People CRM. Use this tool to: - Discover all available profile properties and their data types - Get custom property definitions - Look up a specific property's schema by its identifier Properties use dot notation for nested fields (e.g., 'last.location.country'). |
| `GOSQUARED_GET_PERSON` | Get Person Profile | Retrieve a specific person's profile from GoSquared People CRM by their unique ID. Use this tool when you need to: - Fetch detailed profile information for a known person - Look up custom properties set via tracking for a specific user - Verify a person exists before performing other operations Prerequisites: - Requires a valid person_id (obtain from List People or tracking events) - API key must have 'read_people' scope Returns the complete person profile including standard fields and custom properties. |
| `GOSQUARED_GET_PERSON_FEED` | GoSquared - Get Person Feed | Retrieve a person's complete event feed from GoSquared People CRM. Returns a chronologically ordered list of all events (custom events and session events) for a specific person. Use this tool to: - View a person's activity history and engagement timeline - Track specific events by name using the query parameter - Filter by event type (custom events vs session events) - Paginate through large event histories Prerequisites: - Requires a valid personID (obtain from List People or tracking events) - API key must have 'read_people' scope |
| `GOSQUARED_GET_TRENDS_BROWSER` | Get Browser Metrics | Tool to retrieve summarised browser metrics over a specified time period. Use when analyzing which browsers were used to access the site during a specific date range. |
| `GOSQUARED_GET_TRENDS_CAMPAIGN_CONTENT` | Get Campaign Content Metrics | Retrieve UTM content metrics (utm_content) aggregated over a specified date range. Use this to analyze which content variations (e.g., banner ads, sidebar links, footer CTAs) are driving traffic to your site. |
| `GOSQUARED_GET_TRENDS_CAMPAIGN_NAME` | Get Campaign Name Metrics | Retrieve UTM campaign name metrics (utm_campaign) aggregated over a specified date range. Use this to analyze which marketing campaigns (e.g., 'spring_sale', 'newsletter_2024') are driving traffic to your site. |
| `GOSQUARED_GET_TRENDS_CAMPAIGN_SOURCE` | Get Campaign Source Metrics | Retrieve UTM source metrics (utm_source) aggregated over a specified date range. Use this to analyze which traffic sources (e.g., google, facebook, newsletter) are driving visitors to your site. |
| `GOSQUARED_GET_TRENDS_CAMPAIGN_TERM` | Get Campaign Term Metrics | Retrieve UTM term metrics (utm_term) aggregated over a specified date range. Use this to analyze which specific keywords or terms are driving traffic to your site. |
| `GOSQUARED_GET_TRENDS_CATEGORY` | Get Category Metrics | Tool to retrieve summarised category metrics over a specified time period. Use when analyzing which content categories were accessed during a specific date range. |
| `GOSQUARED_GET_TRENDS_COUNTRY` | Get Country Metrics | Retrieve country-level visit metrics aggregated over a specified date range. Use this to analyze which countries are driving traffic to your site during a specific period. |
| `GOSQUARED_GET_TRENDS_LANGUAGE` | Get Language Metrics | Retrieve summarised language metrics over a given time period. Use this to analyze which languages your visitors are using based on browser settings. Returns a ranked list of languages by visitor count within the specified date range. |
| `GOSQUARED_GET_TRENDS_ORGANISATION` | Get Organisation Metrics | Tool to retrieve summarised organisation metrics over a given time period. Use when analyzing which internet organisations (ISPs, network providers, companies) are driving traffic to your site during a specific date range. |
| `GOSQUARED_GET_TRENDS_OS` | Get Operating System Metrics | Tool to retrieve summarised operating system metrics over a specified time period. Use when analyzing which operating systems were used to access the site during a specific date range. |
| `GOSQUARED_GET_TRENDS_PRODUCT` | Get Product Metrics | Tool to retrieve summarised product metrics over a specified time period. Use when analyzing ecommerce product performance, revenue, and transaction data during a specific date range. |
| `GOSQUARED_GET_TRENDS_SCREEN_DIMENSIONS` | Get Screen Dimensions Metrics | Tool to retrieve summarised screen dimensions metrics over a specified time period. Use when analyzing which screen dimensions (resolutions) were used to access the site during a specific date range. |
| `GOSQUARED_GET_TRENDS_SOURCES` | Get Traffic Sources Metrics | Tool to retrieve a historical list of traffic sources that referred visitors to the site over a specified period. Sources are grouped by category: direct, organic (search engines), site (referrals), social, and internal. Use when analyzing which sources drove traffic during a specific date range. |
| `GOSQUARED_GET_TRENDS_SOURCES_BY_TYPE` | Get Trends Sources By Type | Tool to retrieve a historical list of sources for the given section type. Use when analyzing which sources (referring websites, social media, search engines, or internal) drove traffic during a specific time period. |
| `GOSQUARED_GET_TRENDS_TRANSACTION` | Get Transaction Metrics | Tool to retrieve summarised transaction metrics over a specified time period. Use when analyzing transaction data including revenue and quantity during a specific date range. |
| `GOSQUARED_LIST_PEOPLE` | List People | Search and filter tracked people in GoSquared People CRM. Use this tool to: - List all tracked people or search by text query - Filter people by properties (email, name, etc.) or tracked events - Sort results by any property (default: most recently seen first) - Paginate through large result sets - Export results as JSON or CSV format - Get total count of matching people via 'cardinality' field Returns a structured response with 'list' (array of people), 'cardinality' (total count), and optional pagination links. Each person includes their ID, tracked properties, events, and links to related resources. |
| `GOSQUARED_NOW_CONCURRENTS` | Get current concurrent visitors | Tool to retrieve the number of concurrent visitors currently on your site. Use when you need live, real-time visitor metrics. |
| `GOSQUARED_NOW_PAGES` | Get Real-Time Popular Pages | Retrieve the most popular pages currently being viewed on your site in real-time. Returns pages ordered by visitor count. Use this tool when you need to know which pages are currently active and how many visitors are on each page right now. |
| `GOSQUARED_NOW_PLATFORMS` | Get Real-Time Visitor Platforms | Tool to retrieve platforms used by online visitors sorted by visitor count. Use when you need a real-time breakdown of active visitor platforms. |
| `GOSQUARED_NOW_V3_OVERVIEW` | Get Real-Time Overview | Tool to retrieve a summary of real-time data for the site. Use when a snapshot of current online visitor metrics and summary statistics is needed. |
| `GOSQUARED_NOW_V3_SOURCES` | Now Sources | Tool to retrieve the most influential traffic sources currently driving visitors to your site. Use when you need an up-to-the-minute breakdown of referrer sources. |
| `GOSQUARED_NOW_V3_TIME_SERIES` | Get Visitor Time Series | Retrieves time series data showing the number of concurrent visitors to your site over time. Use this tool when you need to analyze visitor traffic patterns, identify peak hours, or track historical visitor trends. Returns data points at regular intervals (configurable, default 5 minutes) within the specified time range. |
| `GOSQUARED_NOW_VISITORS` | Get Real-Time Online Visitors | Tool to retrieve a list of current online visitors. Use when you need detailed real-time visitor information. |
| `GOSQUARED_PEOPLE_DEVICES` | GoSquared - List All Devices | Retrieve a paginated list of all devices tracked in GoSquared People CRM. This tool returns information about every device that has ever been tracked, including platform (OS), browser, screen size, ISP, geographic location, and visit counts. Use this when you need an overview of all devices accessing your site/app or for device analytics. Note: Requires API key with 'read_people' scope. |
| `GOSQUARED_PEOPLE_SMARTGROUP_FEED` | Export Smart Group Feed | Export all pageview activity for users in a Smart Group to a downloadable CSV file. Returns a time-limited URL (valid for 15 minutes) to download the CSV. Supports filtering by date range (max 60 days). Use this when you need bulk export of user pageview data for analytics or reporting purposes. |
| `GOSQUARED_PEOPLE_SMARTGROUP_PEOPLE` | Smart Group People | Retrieve people (user profiles) from a specific Smart Group in GoSquared People CRM. Smart Groups are saved user segments defined by property or event filters. Use this action to list users matching a Smart Group's criteria, with optional search filtering and pagination. Prerequisites: - Requires a valid group_id. Get available Smart Group IDs using the 'List People Smart Groups' action first. - Requires 'read_people' API key scope. Returns user profiles with properties like id, email, name, and any custom properties tracked in People CRM. |
| `GOSQUARED_PEOPLE_SMART_GROUPS` | List People Smart Groups | Retrieve all Smart Groups for a GoSquared People CRM project. Smart Groups are saved user segments based on property or event filters. Use this action to list all configured Smart Groups and their filter criteria. The returned group IDs can be used with other People API endpoints to query users within specific segments. Requires the 'read_people' API key scope. |
| `GOSQUARED_POST_ACCOUNT_SITES` | Add Account Site | Creates a new site/project in the GoSquared account for analytics tracking. Returns the site_token needed to configure tracking on the new site. Requires: API key with 'write_account' scope (not supported by demo key). |
| `GOSQUARED_POST_CHAT_CHAT_ARCHIVE` | Archive Chat Conversation | Archives a chat conversation in GoSquared Inbox. Use this action to close out completed chat sessions, move resolved conversations out of the active inbox, or organize chat history. Archived chats can be retrieved later using the archived chats endpoint or unarchived using the 'Unarchive Chat Conversation' action. |
| `GOSQUARED_POST_CHAT_CHAT_MESSAGE` | Send Chat Message | Send a message to a visitor in a GoSquared chat conversation. Use this tool to: - Send messages as an agent to website visitors - Send automated bot responses - Send messages on behalf of a client (requires auth signature) Prerequisites: Obtain a valid chatID from GOSQUARED_CHAT_CHATS or GOSQUARED_CHAT_CHAT first. For client messages, generate a Person Signature using SHA-256 HMAC with the Secure Mode Secret. |
| `GOSQUARED_POST_CHAT_CHAT_NOTE` | Leave Chat Note | Adds an internal note to a GoSquared chat conversation. Notes are visible only to agents in the Inbox and are useful for leaving context, follow-up reminders, or team coordination messages. The chatID corresponds to the person_id of the visitor/client. |
| `GOSQUARED_POST_CHAT_CHAT_UNARCHIVE` | Unarchive Chat Conversation | Unarchives a chat conversation in GoSquared Inbox. Use this action to restore an archived chat back to active state, making it visible in the active inbox again. This is useful when you need to resume conversations that were previously archived using the 'Archive Chat Conversation' action or archived manually in the GoSquared interface. |
| `GOSQUARED_POST_PEOPLE_SMARTGROUPS` | Create People SmartGroup | Create a new Smart Group in GoSquared People CRM to segment users by custom criteria. Smart Groups are dynamic user segments based on property filters (like email, name, status) or event-based filters. Filters can use various operators including 'contains', 'eq' (equals), 'gt'/'lt' (greater/less than), '~' (is/equals), and '><' (date range). Use this when you need to: - Create user segments based on properties (e.g., email domain, subscription status) - Filter users by date ranges (e.g., created in last 7 days) - Combine multiple filter criteria (filters work as AND logic) - Organize users for targeted campaigns or analysis |
| `GOSQUARED_SEND_TRACKING_PING` | Send Tracking Ping | Sends a ping to keep the visitor session active in GoSquared. Must be received at least once every 30 seconds to maintain the session, otherwise the session will time out. Use this when implementing custom tracking libraries or advanced tracking processes. |
| `GOSQUARED_TAG_VISITOR` | Tag Visitor | Tool to add a tag to an identified visitor in GoSquared. Use when you need to categorize, segment, or label visitors for organizational purposes or marketing campaigns. |
| `GOSQUARED_TRACKING_EVENT` | Track GoSquared Event | Track custom events in GoSquared analytics. Use to record user actions like signups, purchases, button clicks, or any custom event. Events are associated with visitors/people and appear in their activity feeds and analytics dashboards. |
| `GOSQUARED_TRACKING_IDENTIFY` | Identify User | Identify a user in GoSquared and set their profile properties. Links anonymous visitor activity to a known user identity and creates/updates their profile in the People dashboard. Requires 'write_tracking' API scope. |
| `GOSQUARED_TRACKING_PAGEVIEW` | Track Pageview | Tracks a pageview event in GoSquared Analytics. Use this to record when a visitor views a page on your site. Requires visitor_id (unique identifier for the visitor) and page URL. Optionally include additional visitor data like screen size, browser info, campaign attribution, and more. |
| `GOSQUARED_TRACKING_TRANSACTION` | Track GoSquared Transaction | Track e-commerce transactions in GoSquared analytics. Use this when a customer completes a purchase to record the transaction details including items purchased, revenue, and customer identification. The transaction ID must be unique - GoSquared uses this to prevent duplicate transactions. If the same transaction ID is sent again, the duplicate will be ignored. Transaction data appears in the GoSquared Ecommerce dashboard and can be associated with People profiles for customer analytics. |
| `GOSQUARED_TRACK_PROPERTIES` | Track User Properties | Track user properties for a visitor in GoSquared. Use to set or update profile information for identified users or anonymous visitors. Properties include email, name, company details, and custom fields. Requires either person_id or visitor_id. |
| `GOSQUARED_TRENDS_AGGREGATE` | Retrieve Aggregate Metrics | Retrieve aggregate web analytics metrics for a specified time period. Returns key metrics like pageviews, unique visitors, visits, bounce rate, engaged time, and e-commerce data, grouped by hour, day, or month. Use this tool to analyze overall website traffic trends and performance over time. |
| `GOSQUARED_TRENDS_CAMPAIGN_MEDIUM` | Get Campaign Medium Metrics | Retrieve UTM medium metrics (utm_medium) aggregated over a specified date range. Use this to analyze which marketing mediums (e.g., email, social, cpc, organic) are driving traffic to your site. |
| `GOSQUARED_TRENDS_EVENT` | Retrieve Event Counts | Retrieve counts of tracked event triggers over a specified time period. Use this tool to analyze how frequently custom events have been triggered on your site. Events must first be tracked using the GoSquared tracking API before they appear in results. Note: The 'data' property passed when tracking events is not included in this endpoint; use the Feed API to access event metadata. |
| `GOSQUARED_TRENDS_PAGE` | Get Page Metrics | Retrieve page-level visit metrics over a specified time period. Returns a ranked list of pages by visit count within the date range. Use this to analyze which pages received the most traffic during a specific period. |
| `GOSQUARED_TRENDS_PATH1` | Get Base Path Metrics | Retrieves base path metrics (first URL path segments) over a time period. Use this to analyze which top-level URL paths (e.g., '/blog', '/products', '/wiki') receive the most traffic. Useful for understanding site structure usage and identifying popular content sections. Requires 'read_trends' scope in your API key. |
| `GOSQUARED_UPDATE_ACCOUNT_BLOCKED_BOTS` | Update Account Blocked Bots | Tool to update the automatic bot blocking feature for a project. Use when you need to enable or disable bot filtering for analytics tracking. |
| `GOSQUARED_UPDATE_ACCOUNT_BLOCKED_IPS` | Update Account Blocked IPs | Tool to update the list of IP addresses to be blocked for a GoSquared project. Use when you need to block specific IP addresses from being tracked in analytics. |

## Supported Triggers

None listed.

## Creating MCP Server - Stand-alone vs Composio SDK

The Gosquared MCP server is an implementation of the Model Context Protocol that connects your AI agents and assistants directly to Gosquared. Instead of manually wiring Gosquared APIs, OAuth, and scopes yourself, you get a structured, tool-based interface that an LLM can call safely.
With Composio's managed implementation, you don't have to create your own developer app. For production, if you're building an end product, we recommend using your own credentials. The managed server helps you prototype fast and go from 0-1 faster.

## Step-by-step Guide

### 1. Prerequisites

You will need:
- A Composio API key
- An OpenAI API key (used by Autogen's OpenAIChatCompletionClient)
- A Gosquared account you can connect to Composio
- Some basic familiarity with Autogen and Python async

### 1. Getting API Keys for OpenAI and Composio

OpenAI API Key
- Go to the [OpenAI dashboard](https://platform.openai.com/settings/organization/api-keys) and create an API key. You'll need credits to use the models, or you can connect to another model provider.
- Keep the API key safe.
Composio API Key
- Log in to the [Composio dashboard](https://dashboard.composio.dev?utm_source=toolkits&utm_medium=framework_docs).
- Navigate to your API settings and generate a new API key.
- Store this key securely as you'll need it for authentication.

### 2. Install dependencies

Install Composio, Autogen extensions, and dotenv.
What's happening:
- composio connects your agent to Gosquared via MCP
- autogen-agentchat provides the AssistantAgent class
- autogen-ext-openai provides the OpenAI model client
- autogen-ext-tools provides MCP workbench support
```bash
pip install composio python-dotenv
pip install autogen-agentchat autogen-ext-openai autogen-ext-tools
```

### 3. Set up environment variables

Create a .env file in your project folder.
What's happening:
- COMPOSIO_API_KEY is required to talk to Composio
- OPENAI_API_KEY is used by Autogen's OpenAI client
- USER_ID is how Composio identifies which user's Gosquared connections to use
```bash
COMPOSIO_API_KEY=your-composio-api-key
OPENAI_API_KEY=your-openai-api-key
USER_ID=your-user-identifier@example.com
```

### 4. Import dependencies and create Tool Router session

What's happening:
- load_dotenv() reads your .env file
- Composio(api_key=...) initializes the SDK
- create(...) creates a Tool Router session that exposes Gosquared tools
- session.mcp.url is the MCP endpoint that Autogen will connect to
```python
import asyncio
import os
from dotenv import load_dotenv
from composio import Composio

from autogen_agentchat.agents import AssistantAgent
from autogen_ext.models.openai import OpenAIChatCompletionClient
from autogen_ext.tools.mcp import McpWorkbench, StreamableHttpServerParams

load_dotenv()

async def main():
    # Initialize Composio and create a Gosquared session
    composio = Composio(api_key=os.getenv("COMPOSIO_API_KEY"))
    session = composio.create(
        user_id=os.getenv("USER_ID"),
        toolkits=["gosquared"]
    )
    url = session.mcp.url
```

### 5. Configure MCP parameters for Autogen

Autogen expects parameters describing how to talk to the MCP server. That is what StreamableHttpServerParams is for.
What's happening:
- url points to the Tool Router MCP endpoint from Composio
- timeout is the HTTP timeout for requests
- sse_read_timeout controls how long to wait when streaming responses
- terminate_on_close=True cleans up the MCP server process when the workbench is closed
```python
# Configure MCP server parameters for Streamable HTTP
server_params = StreamableHttpServerParams(
    url=url,
    timeout=30.0,
    sse_read_timeout=300.0,
    terminate_on_close=True,
    headers={"x-api-key": os.getenv("COMPOSIO_API_KEY")}
)
```

### 6. Create the model client and agent

What's happening:
- OpenAIChatCompletionClient wraps the OpenAI model for Autogen
- McpWorkbench connects the agent to the MCP tools
- AssistantAgent is configured with the Gosquared tools from the workbench
```python
# Create model client
model_client = OpenAIChatCompletionClient(
    model="gpt-5",
    api_key=os.getenv("OPENAI_API_KEY")
)

# Use McpWorkbench as context manager
async with McpWorkbench(server_params) as workbench:
    # Create Gosquared assistant agent with MCP tools
    agent = AssistantAgent(
        name="gosquared_assistant",
        description="An AI assistant that helps with Gosquared operations.",
        model_client=model_client,
        workbench=workbench,
        model_client_stream=True,
        max_tool_iterations=10
    )
```

### 7. Run the interactive chat loop

What's happening:
- The script prompts you in a loop with You:
- Autogen passes your input to the model, which decides which Gosquared tools to call via MCP
- agent.run_stream(...) yields streaming messages as the agent thinks and calls tools
- Typing exit, quit, or bye ends the loop
```python
print("Chat started! Type 'exit' or 'quit' to end the conversation.\n")
print("Ask any Gosquared related question or task to the agent.\n")

# Conversation loop
while True:
    user_input = input("You: ").strip()

    if user_input.lower() in ["exit", "quit", "bye"]:
        print("\nGoodbye!")
        break

    if not user_input:
        continue

    print("\nAgent is thinking...\n")

    # Run the agent with streaming
    try:
        response_text = ""
        async for message in agent.run_stream(task=user_input):
            if hasattr(message, "content") and message.content:
                response_text = message.content

        # Print the final response
        if response_text:
            print(f"Agent: {response_text}\n")
        else:
            print("Agent: I encountered an issue processing your request.\n")

    except Exception as e:
        print(f"Agent: Sorry, I encountered an error: {str(e)}\n")
```

## Complete Code

```python
import asyncio
import os
from dotenv import load_dotenv
from composio import Composio

from autogen_agentchat.agents import AssistantAgent
from autogen_ext.models.openai import OpenAIChatCompletionClient
from autogen_ext.tools.mcp import McpWorkbench, StreamableHttpServerParams

load_dotenv()

async def main():
    # Initialize Composio and create a Gosquared session
    composio = Composio(api_key=os.getenv("COMPOSIO_API_KEY"))
    session = composio.create(
        user_id=os.getenv("USER_ID"),
        toolkits=["gosquared"]
    )
    url = session.mcp.url

    # Configure MCP server parameters for Streamable HTTP
    server_params = StreamableHttpServerParams(
        url=url,
        timeout=30.0,
        sse_read_timeout=300.0,
        terminate_on_close=True,
        headers={"x-api-key": os.getenv("COMPOSIO_API_KEY")}
    )

    # Create model client
    model_client = OpenAIChatCompletionClient(
        model="gpt-5",
        api_key=os.getenv("OPENAI_API_KEY")
    )

    # Use McpWorkbench as context manager
    async with McpWorkbench(server_params) as workbench:
        # Create Gosquared assistant agent with MCP tools
        agent = AssistantAgent(
            name="gosquared_assistant",
            description="An AI assistant that helps with Gosquared operations.",
            model_client=model_client,
            workbench=workbench,
            model_client_stream=True,
            max_tool_iterations=10
        )

        print("Chat started! Type 'exit' or 'quit' to end the conversation.\n")
        print("Ask any Gosquared related question or task to the agent.\n")

        # Conversation loop
        while True:
            user_input = input("You: ").strip()

            if user_input.lower() in ['exit', 'quit', 'bye']:
                print("\nGoodbye!")
                break

            if not user_input:
                continue

            print("\nAgent is thinking...\n")

            # Run the agent with streaming
            try:
                response_text = ""
                async for message in agent.run_stream(task=user_input):
                    if hasattr(message, 'content') and message.content:
                        response_text = message.content

                # Print the final response
                if response_text:
                    print(f"Agent: {response_text}\n")
                else:
                    print("Agent: I encountered an issue processing your request.\n")

            except Exception as e:
                print(f"Agent: Sorry, I encountered an error: {str(e)}\n")

if __name__ == "__main__":
    asyncio.run(main())
```

## Conclusion

You now have an Autogen assistant wired into Gosquared through Composio's Tool Router and MCP. From here you can:
- Add more toolkits to the toolkits list, for example notion or hubspot
- Refine the agent description to point it at specific workflows
- Wrap this script behind a UI, Slack bot, or internal tool
Once the pattern is clear for Gosquared, you can reuse the same structure for other MCP-enabled apps with minimal code changes.

## How to build Gosquared MCP Agent with another framework

- [OpenAI Agents SDK](https://composio.dev/toolkits/gosquared/framework/open-ai-agents-sdk)
- [Claude Agent SDK](https://composio.dev/toolkits/gosquared/framework/claude-agents-sdk)
- [Claude Code](https://composio.dev/toolkits/gosquared/framework/claude-code)
- [Claude Cowork](https://composio.dev/toolkits/gosquared/framework/claude-cowork)
- [Codex](https://composio.dev/toolkits/gosquared/framework/codex)
- [OpenClaw](https://composio.dev/toolkits/gosquared/framework/openclaw)
- [Hermes](https://composio.dev/toolkits/gosquared/framework/hermes-agent)
- [CLI](https://composio.dev/toolkits/gosquared/framework/cli)
- [Google ADK](https://composio.dev/toolkits/gosquared/framework/google-adk)
- [LangChain](https://composio.dev/toolkits/gosquared/framework/langchain)
- [Vercel AI SDK](https://composio.dev/toolkits/gosquared/framework/ai-sdk)
- [Mastra AI](https://composio.dev/toolkits/gosquared/framework/mastra-ai)
- [LlamaIndex](https://composio.dev/toolkits/gosquared/framework/llama-index)
- [CrewAI](https://composio.dev/toolkits/gosquared/framework/crew-ai)

## Related Toolkits

- [Firecrawl](https://composio.dev/toolkits/firecrawl) - Firecrawl automates large-scale web crawling and data extraction. It helps organizations efficiently gather, index, and analyze content from online sources.
- [Tavily](https://composio.dev/toolkits/tavily) - Tavily offers powerful search and data retrieval from documents, databases, and the web. It helps teams locate and filter information instantly, saving hours on research.
- [Exa](https://composio.dev/toolkits/exa) - Exa is a data extraction and search platform for gathering and analyzing information from websites, APIs, or databases. It helps teams quickly surface insights and automate data-driven workflows.
- [Serpapi](https://composio.dev/toolkits/serpapi) - SerpApi is a real-time API for structured search engine results. It lets you automate SERP data collection, parsing, and analysis for SEO and research.
- [Peopledatalabs](https://composio.dev/toolkits/peopledatalabs) - Peopledatalabs delivers B2B data enrichment and identity resolution APIs. Supercharge your apps with accurate, up-to-date business and contact data.
- [Snowflake](https://composio.dev/toolkits/snowflake) - Snowflake is a cloud data warehouse built for elastic scaling, secure data sharing, and fast SQL analytics across major clouds.
- [Posthog](https://composio.dev/toolkits/posthog) - PostHog is an open-source analytics platform for tracking user interactions and product metrics. It helps teams refine features, analyze funnels, and reduce churn with actionable insights.
- [Amplitude](https://composio.dev/toolkits/amplitude) - Amplitude is a digital analytics platform for product and behavioral data insights. It helps teams analyze user journeys and make data-driven decisions quickly.
- [Bright Data MCP](https://composio.dev/toolkits/brightdata_mcp) - Bright Data MCP is an AI-powered web scraping and data collection platform. Instantly access public web data in real time with advanced scraping tools.
- [Browseai](https://composio.dev/toolkits/browseai) - Browseai is a web automation and data extraction platform that turns any website into an API. It's perfect for monitoring websites and retrieving structured data without manual scraping.
- [ClickHouse](https://composio.dev/toolkits/clickhouse) - ClickHouse is an open-source, column-oriented database for real-time analytics and big data processing using SQL. Its lightning-fast query performance makes it ideal for handling large datasets and delivering instant insights.
- [Coinmarketcal](https://composio.dev/toolkits/coinmarketcal) - CoinMarketCal is a community-powered crypto calendar for upcoming events, announcements, and releases. It helps traders track market-moving developments and stay ahead in the crypto space.
- [Control d](https://composio.dev/toolkits/control_d) - Control d is a customizable DNS filtering and traffic redirection platform. It helps you manage internet access, enforce policies, and monitor usage across devices and networks.
- [Databox](https://composio.dev/toolkits/databox) - Databox is a business analytics platform that connects your data from any tool and device. It helps you track KPIs, build dashboards, and discover actionable insights.
- [Databricks](https://composio.dev/toolkits/databricks) - Databricks is a unified analytics platform for big data and AI on the lakehouse architecture. It empowers data teams to collaborate, analyze, and build scalable solutions efficiently.
- [Datagma](https://composio.dev/toolkits/datagma) - Datagma delivers data intelligence and analytics for business growth and market discovery. Get actionable market insights and track competitors to inform your strategy.
- [Delighted](https://composio.dev/toolkits/delighted) - Delighted is a customer feedback platform based on the Net Promoter System®. It helps you quickly gather, track, and act on customer sentiment.
- [Dovetail](https://composio.dev/toolkits/dovetail) - Dovetail is a research analysis platform for transcript review and insight generation. It helps teams code interviews, analyze feedback, and create actionable research summaries.
- [Dub](https://composio.dev/toolkits/dub) - Dub is a short link management platform with analytics and API access. Use it to easily create, manage, and track branded short links for your business.
- [Elasticsearch](https://composio.dev/toolkits/elasticsearch) - Elasticsearch is a distributed, RESTful search and analytics engine for all types of data. It delivers fast, scalable search and powerful analytics across massive datasets.

## Frequently Asked Questions

### What are the differences in Tool Router MCP and Gosquared MCP?

With a standalone Gosquared MCP server, the agents and LLMs can only access a fixed set of Gosquared tools tied to that server. However, with the Composio Tool Router, agents can dynamically load tools from Gosquared and many other apps based on the task at hand, all through a single MCP endpoint.

### Can I use Tool Router MCP with Autogen?

Yes, you can. Autogen fully supports MCP integration. You get structured tool calling, message history handling, and model orchestration while Tool Router takes care of discovering and serving the right Gosquared tools.

### Can I manage the permissions and scopes for Gosquared while using Tool Router?

Yes, absolutely. You can configure which Gosquared scopes and actions are allowed when connecting your account to Composio. You can also bring your own OAuth credentials or API configuration so you keep full control over what the agent can do.

### How safe is my data with Composio Tool Router?

All sensitive data such as tokens, keys, and configuration is fully encrypted at rest and in transit. Composio is SOC 2 Type 2 compliant and follows strict security practices so your Gosquared data and credentials are handled as safely as possible.

---
[See all toolkits](https://composio.dev/toolkits) · [Composio docs](https://docs.composio.dev/llms.txt)
