Skip to main content

MergeAgentHandlerTool

The MergeAgentHandlerTool enables CrewAI agents to securely access third-party integrations through Merge’s Agent Handler platform. Agent Handler provides pre-built, secure connectors to popular tools like Linear, GitHub, Slack, Notion, and hundreds more—all with built-in authentication, permissions, and monitoring.

Installation

Requirements

  • Merge Agent Handler account with a configured Tool Pack
  • Agent Handler API key
  • At least one registered user linked to your Tool Pack
  • Third-party integrations configured in your Tool Pack

Getting Started with Agent Handler

  1. Sign up for a Merge Agent Handler account at ah.merge.dev/signup
  2. Create a Tool Pack and configure the integrations you need
  3. Register users who will authenticate with the third-party services
  4. Get your API key from the Agent Handler dashboard
  5. Set environment variable: export AGENT_HANDLER_API_KEY='your-key-here'
  6. Start building with the MergeAgentHandlerTool in CrewAI

Notes

  • Tool Pack IDs and Registered User IDs can be found in your Agent Handler dashboard or created via API
  • The tool uses the Model Context Protocol (MCP) for communication with Agent Handler
  • Session IDs are automatically generated but can be customized for context persistence
  • All tool calls are logged and auditable through the Agent Handler platform
  • Tool parameters are dynamically discovered from the Agent Handler API and validated automatically

Usage

Single Tool Usage

Here’s how to use a specific tool from your Tool Pack:

Loading Multiple Tools from a Tool Pack

You can load all available tools from your Tool Pack at once:

Loading Specific Tools Only

Load only the tools you need:

Tool Arguments

from_tool_name() Method

from_tool_pack() Method

Environment Variables

Advanced Usage

Multi-Agent Workflow with Different Tool Access

Custom Session Management

Maintain context across multiple tool calls using session IDs:

Use Cases

Unified Integration Access

  • Access hundreds of third-party tools through a single unified API without managing multiple SDKs
  • Enable agents to work with Linear, GitHub, Slack, Notion, Jira, Asana, and more from one integration point
  • Reduce integration complexity by letting Agent Handler manage authentication and API versioning

Secure Enterprise Workflows

  • Leverage built-in authentication and permission management for all third-party integrations
  • Maintain enterprise security standards with centralized access control and audit logging
  • Enable agents to access company tools without exposing API keys or credentials in code

Cross-Platform Automation

  • Build workflows that span multiple platforms (e.g., create GitHub issues from Linear tasks, sync Notion pages to Slack)
  • Enable seamless data flow between different tools in your tech stack
  • Create intelligent automation that understands context across different platforms

Dynamic Tool Discovery

  • Load all available tools at runtime without hardcoding integration logic
  • Enable agents to discover and use new tools as they’re added to your Tool Pack
  • Build flexible agents that can adapt to changing tool availability

User-Specific Tool Access

  • Different users can have different tool permissions and access levels
  • Enable multi-tenant workflows where agents act on behalf of specific users
  • Maintain proper attribution and permissions for all tool actions

Available Integrations

Merge Agent Handler supports hundreds of integrations across multiple categories:
  • Project Management: Linear, Jira, Asana, Monday.com, ClickUp
  • Code Management: GitHub, GitLab, Bitbucket
  • Communication: Slack, Microsoft Teams, Discord
  • Documentation: Notion, Confluence, Google Docs
  • CRM: Salesforce, HubSpot, Pipedrive
  • And many more…
Visit the Merge Agent Handler documentation for a complete list of available integrations.

Error Handling

The tool provides comprehensive error handling:
  • Authentication Errors: Invalid or missing API keys
  • Permission Errors: User lacks permission for the requested action
  • API Errors: Issues communicating with Agent Handler or third-party services
  • Validation Errors: Invalid parameters passed to tool methods
All errors are wrapped in MergeAgentHandlerToolError for consistent error handling.