Skip to main content

Integrations

Not OnPrem

This guide demonstrates how to create, configure, and use integrations and action tools on the aiXplain platform. Integrations allow you to securely connect external services like Slack, Gmail, or Airtable to your agents, enabling real-world task execution through natural language prompts.

Get a Connection

To use a third-party integration like Slack through Composio, you'll need to get a connection using it's ID.

connection = ModelFactory.get("67eff5c0e05614297caeef98")
connection

This registers your authenticated integration and makes it available as a tool for agents.

Using Integrations in Agents

Once your connector is ready, you can filter down to specific actions and pass the tool to an agent for execution.

Filter the connector to specific actions

connection.action_scope = [action for action in connection.actions if action.code == "SLACK_CHAT_POST_MESSAGE"]

Inspect Required Inputs

Before using an action, you can check which fields are required:

action = connection.action_scope[0]
connection.get_action_inputs(action)

This will show you the required inputs like channel_id, text, etc., to properly execute the action.

Create and run an agent

from aixplain.factories import AgentFactory

agent = AgentFactory.create(
name="Test Agent",
description="This agent sends messages to Slack.",
instructions="You are a helpful assistant that can send messages to Slack.",
llm_id="669a63646eb56306647e1091",
tools=[
connection,
AgentFactory.create_model_tool(model="6736411cf127849667606689")
],
)

response = agent.run("""Brazil, June 2nd, 2025
Tell Thiago on his Slack channel ('U022Q9LSLRM') the last AI news in the country""")
print(response.data.output)
Show output

Listing Available Integrations

Use IntegrationFactory to list all available integrations:

from aixplain.factories import IntegrationFactory

IntegrationFactory.list()
Show output

This helps you explore what integrations are available (e.g., Gmail, Notion, Airtable) and find their corresponding connector IDs.