Studio By Ai21 Labs Integration for AI Agents

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with Studio By Ai21 Labs MCP or direct API to generate text, summarize content, classify language, and extract information through natural language.
Studio By Ai21 Labs Logo
Gradient Top
Gradient Middle
Gradient Bottom
divider

Try Studio By Ai21 Labs now

Enter a prompt below to test the integration in our Tool Router playground. You'll be redirected to sign in and try it live.

Supported Tools

Tools
Check Can IframeTool to check if a URL can be embedded in an iframe.
Compare TextTool to compare two text strings and identify differences.
Create Aftersales Parts Classification BatchTool to create a batch job for Fnac Aftersales parts classification.
Create Assistant RouteTool to create a new route for an AI21 Studio assistant.
Create AssistantTool to create a new AI assistant in AI21 Studio.
Create Assistant PlanTool to create a new plan for an AI21 Studio assistant.
Create DemoTool to create a new demo in AI21 Studio.
Generate RequirementsTool to generate requirements from a query or task description.
Generate Thread NameTool to generate a thread name from a query or conversation context.
Create Kirsh Grant Compliance PreviewTool to preview grant compliance for Kirsh grants.
Kirsh Grant Metadata PreviewTool to retrieve grant metadata from the Kirsh preview endpoint.
Create MCP StorageTool to create MCP (Model Context Protocol) storage in AI21 Studio.
Create SecretTool to save a secret in AI21 Studio.
Check Kirsh Grant ComplianceTool to check compliance for Kirsh grant IDs.
Create Website ConnectorTool to create a website connector in AI21 Studio.
Delete AssistantTool to delete an assistant by its unique ID.
Delete Assistant RouteTool to delete a route from an AI21 Studio assistant.
Delete DemoTool to delete a demo by its unique ID.
Delete MCP StorageTool to delete an MCP (Model Context Protocol) storage configuration by its unique ID.
Delete SecretTool to delete a secret by its unique ID.
Delete Website ConnectorPermanently delete a website connector by its unique identifier.
Download Modified DocumentTool to download a modified document from AI21 Labs Studio.
Get AssistantTool to retrieve an assistant by its unique identifier.
Get Assistant RouteTool to retrieve details of a specific route for an AI21 Studio assistant.
Get Assistants By MCPTool to retrieve all assistants associated with a specific MCP (Model Context Protocol) storage configuration.
Get Batch Prediction StatusTool to check the status of a Fnac Aftersales parts classification batch prediction job.
Get DemoTool to retrieve a demo by its unique ID.
Grant Kirsh MetadataTool to retrieve Kirsh grant metadata by grant ID.
Get Library Batch StatusTool to get the ingestion status of a library batch.
Get MCP StorageTool to retrieve a specific MCP (Model Context Protocol) storage configuration by its unique ID.
Get Output ExplanationTool to get output explanation for an execution (cached or generated).
Get PlanTool to retrieve a specific plan from an AI21 Studio assistant.
Get Website Connector By IDTool to retrieve details of a specific website connector by its ID.
Get Website Connector StatusTool to retrieve the status of a website connector ingestion.
Get Website Connector URL StatusTool to retrieve the status of a specific URL in the website connector.
Ingest Website ConnectorTool to ingest website content via sitemap URL in AI21 Studio.
Ingest Website Connector URLTool to ingest a website URL into AI21 Studio's website connector.
List AssistantsTool to retrieve all assistants from AI21 Studio.
List Website ConnectorsTool to retrieve website connector information from AI21 Studio.
List DemosTool to retrieve all demos from AI21 Studio.
List Library FilesTool to list files in the workspace library with optional filtering.
List MCP StorageTool to retrieve all MCP (Model Context Protocol) storage configurations from AI21 Studio.
List ModelsTool to retrieve information about all available AI21 models.
List PlansTool to list all plans for a specific assistant.
List SecretsTool to retrieve all secrets from AI21 Studio secret storage.
List Workspace ModelsTool to retrieve all workspace models by organization from AI21 Studio.
List Available ModelsTool to retrieve all available models from AI21 Studio settings.
Modify AssistantTool to modify an existing AI21 Studio assistant.
Modify Assistant RouteTool to modify an existing route within an assistant.
Modify Assistant PlanTool to modify an existing assistant plan in AI21 Studio.
Retry Ingest WebsiteTool to retry ingestion of a website in AI21 Studio.
Run AssistantTool to run an AI21 Studio assistant with conversational input.
Sync Website ConnectorTool to sync a website connector in AI21 Studio.
Update DemoTool to update an existing demo in Studio by AI21 Labs.
Update MCP StorageTool to update an existing MCP (Model Context Protocol) storage configuration in AI21 Studio.
Update SecretTool to update an existing secret in AI21 Studio.
Validate PlanTool to validate Python code for an AI21 Studio assistant plan.
Python
TypeScript

Install Composio

python
pip install composio claude-agent-sdk
Install the Composio SDK for Python or TypeScript

Initialize Client and Create Tool Router Session

python
from composio import Composio
from claude_agent_sdk import ClaudeSDKClient, ClaudeAgentOptions

composio = Composio(api_key='your-composio-api-key')
session = composio.create(user_id='your-user-id')
url = session.mcp.url
Import and initialize the Composio client, then create a Tool Router session for Studio By Ai21 Labs

Connect to AI Agent

python
import asyncio

options = ClaudeAgentOptions(
    permission_mode='bypassPermissions',
    mcp_servers={
        'tool_router': {
            'type': 'http',
            'url': url,
            'headers': {
                'x-api-key': 'your-composio-api-key'
            }
        }
    },
    system_prompt='You are a helpful assistant with access to Studio By Ai21 Labs tools.',
    max_turns=10
)

async def main():
    async with ClaudeSDKClient(options=options) as client:
        await client.query('Summarize this article: [paste article text here]')
        async for message in client.receive_response():
            if hasattr(message, 'content'):
                for block in message.content:
                    if hasattr(block, 'text'):
                        print(block.text)

asyncio.run(main())
Use the MCP server with your AI agent (Anthropic Claude or Mastra)

Why Use Composio?

AI Native Studio By Ai21 Labs Integration

  • Supports both Studio By Ai21 Labs MCP and direct API based integrations
  • Structured, LLM-friendly schemas for reliable tool execution
  • Rich coverage for reading, writing, and querying your Studio By Ai21 Labs data

Managed Auth

  • Built-in OAuth handling with automatic token refresh and rotation
  • Central place to manage, scope, and revoke Studio By Ai21 Labs access
  • Per user and per environment credentials instead of hard-coded keys

Agent Optimized Design

  • Tools are tuned using real error and success rates to improve reliability over time
  • Comprehensive execution logs so you always know what ran, when, and on whose behalf

Enterprise Grade Security

  • Fine-grained RBAC so you control which agents and users can access Studio By Ai21 Labs
  • Scoped, least privilege access to Studio By Ai21 Labs resources
  • Full audit trail of agent actions to support review and compliance

Frequently Asked Questions

Do I need my own developer credentials to use Studio By Ai21 Labs with Composio?

Yes, Studio By Ai21 Labs requires you to configure your own API key credentials. Once set up, Composio handles secure credential storage and API request handling for you.

Can I use multiple toolkits together?

Yes! Composio's Tool Router enables agents to use multiple toolkits. Learn more.

Is Composio secure?

Composio is SOC 2 and ISO 27001 compliant with all data encrypted in transit and at rest. Learn more.

What if the API changes?

Composio maintains and updates all toolkit integrations automatically, so your agents always work with the latest API versions.

Used by agents from

Context
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai
Context
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai
Context
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai

Never worry about agent reliability

We handle tool reliability, observability, and security so you never have to second-guess an agent action.