Skip to main content
Version: v2.0

Overview

The aiXplain platform provides a comprehensive tooling system that allows developers to create powerful AI agents with specialized capabilities. The catalog includes 900+ AI models, tools, and integrations across vendors. Tools are modular software components that enable agents to run tasks, such as web search, database queries, or model inference, based on user intent.

Tool Types

Tools in aiXplain fall into three categories:

1. AI Models

Access models from multiple vendors across domains like LLMs, classifiers, translators, OCR, summarization, ASR/TTS, and more—deployable via unified APIs.

2. Ready-to-Use Tools

Pre-built tools for common tasks including web search, site scraping, PDF parsing, embedding generation, and other domain-specific capabilities.

3. Integrations

Connect to external systems and data sources:

  • Core Integrations — Built-in connectors including MCP Server, PostgreSQL, SQLite Database, and Python Sandbox—developed and maintained by aiXplain. The goal is to allow expanding the range of tools by bringing your own data and logic.
  • Commercial Integrations — Connect to 230+ external systems via Composio including databases (MySQL, MongoDB), CRMs (Salesforce, HubSpot), cloud storage (S3, Google Drive, SharePoint), communication tools (Slack, Teams), and project management platforms (Jira, Asana, Trello).

Setup

from aixplain import Aixplain

aix = Aixplain(
api_key="<AIXPLAIN_API_KEY>"
)

# Create a simple agent to test tools
agent = aix.Agent(
name="Tools Agent",
description="A helpful assistant that answers questions"
)

Adding AI Models and Ready-to-Use Tools

Browse aiXplain's Marketplace to find AI models and ready-to-use tools. Copy the asset path of any tool you want to use.

All tools ship with agent-friendly descriptions by default; you can override them to improve agent-tool interaction.

An agent sees each tool's name, description, and full parameter metadata (name, type, description) in XML format.

Adding a Ready-to-Use Tool

# Get tool from marketplace using asset path
TAVILY_SEARCH_API = "tavily/tavily-search-api"
search_tool = aix.Tool.get(TAVILY_SEARCH_API)

# Test tool (optional)
# search_tool.run(data={
# "query": "What are the latest news in the region?",
# "num_results": "2"
# }).data

# Add to agent
agent.tools.append(search_tool)
agent.save()

Configuring action inputs

Use the .actions proxy to set input values for specific actions before attaching a tool or integration to an agent. Action names are case-insensitive.

tool = aix.Tool.get("tool_id")

# Set a single action input — dot or dict notation
tool.actions['SLACK_SEND_MESSAGE'].channel = '#general'
tool.actions['SLACK_SEND_MESSAGE']['text'] = 'Hello'

# Bulk-set inputs across multiple actions at once
tool.set_inputs({
'SLACK_SEND_MESSAGE': {'channel': '#general', 'text': 'Hello'},
'SLACK_UPLOAD_FILE': {'channels': '#general'},
})

# Inspect action inputs
proxy = tool.actions['SLACK_SEND_MESSAGE']
print(proxy.keys()) # available input codes
print(dict(proxy.items())) # current values

# Reset inputs
proxy.reset_input('channel') # single input
proxy.reset_all_inputs() # all inputs for this action
Show output

Listing action inputs

list_inputs() returns Action objects, each with an .inputs list. Use .datatype to read the type of each input.

action_specs = tool.list_inputs("ACTION_NAME")
for spec in action_specs:
for inp in spec.inputs:
print(f" {inp.name}: {inp.datatype} required={inp.required}")
Show output

Adding an AI Model

# Get model from marketplace
llm_model = aix.Model.get("openai/gpt-4o")

# Configure parameters via the .inputs proxy
llm_model.inputs.temperature = 0.7 # dot notation
llm_model.inputs['max_tokens'] = 20000 # dict notation
llm_model.inputs.update(temperature=0.2, max_tokens=1200) # bulk

# Inspect parameters
print(llm_model.inputs.keys()) # all parameter names
print(llm_model.inputs.get_required_parameters()) # required-only
print(llm_model.inputs.get_all_parameters()) # current values as dict

# Reset parameters
llm_model.inputs.reset_parameter("temperature") # single
llm_model.inputs.reset_all_parameters() # all

# Test model (optional)
# llm_model.run(text="Test").data

# Add to agent
agent.tools.append(llm_model)
agent.save()
Show output
note

Models do not have .actions. Use model.inputs directly to configure parameters.

Running Your Agent

Use this after you have built and saved an agent (see above), or load an existing agent by id:

from aixplain import Aixplain

aix = Aixplain(api_key="YOUR_API_KEY") # or Aixplain() if TEAM_API_KEY is set
agent = aix.Agent.get("YOUR_SAVED_AGENT_ID")
response = agent.run(query="Find me an animal shelter in San Jose")

print(response.data.output) # View output
Show output

Working with Integrations

Integrations allow you to connect agents to external systems and data sources. Once connected, integrations become tools that your agents can use.

Each integration comes with actions for read/write/destructive operations and can be scoped for safety and security.

Integrations share the same .actions proxy as tools for configuring action inputs:

integration = aix.Integration.get("integration_id")
integration.actions['JIRA_CREATE_ISSUE'].project_key = 'ENG'
integration.set_inputs({'JIRA_CREATE_ISSUE': {'project_key': 'ENG', 'summary': 'Bug report'}})

You can also pass an integration ID string directly when creating a tool:

tool = aix.Tool(
name="My Tool",
description="...",
integration="688779d8bfb8e46c273982ca", # string ID accepted directly
code="def run(data): return data",
).save()

Core Integrations

Core integrations are developed and maintained by aiXplain to expand the range of tools by allowing you to bring your own data and logic:

IntegrationPurpose
Python SandboxDeploy secure, sandboxed Python functions with your custom business logic
PostgreSQL & SQLite DatabaseQuery and interact with your PostgreSQL and SQLite databases
MCP ServerConnect to Model Context Protocol servers to extend tool capabilities

Commercial Integrations

Access 230+ external systems via Composio:

  • Communication — Slack, Microsoft Teams, Discord
  • CRM — Salesforce, HubSpot, Zoho
  • Project Management — Jira, Asana, Trello, Monday.com
  • Cloud Storage — AWS S3, Google Drive, SharePoint, Dropbox
  • Databases — MySQL, MongoDB, PostgreSQL
  • Calendars — Google Calendar, Outlook Calendar
  • And 220+ more services

Best Practices

Tool Design Principles

  • Use descriptive names and descriptions — Name your tools clearly so agents and teammates understand their purpose at a glance.

  • Scope integration tools to essential actions — Selecting too many actions adds unnecessary parameters, which can affect agent performance, increase context usage, and slow down planning.

  • Always test your tools before assigning them to an agent — Ensure they return expected outputs and handle errors gracefully.

  • For custom tools, include clear docstrings and type hints — This helps agents correctly understand the tool's inputs and outputs, improving accuracy and reducing trial-and-error during execution.

Security Considerations

  • Composio Credential Security — All credentials for Composio integrations are securely stored by Composio; aiXplain never accesses or stores your authentication data.
  • SQL Tools — Use enable_commit=False for read-only operations when possible
  • Custom Code — Validate and sanitize code inputs before execution
  • Database Access — Limit table access using the tables parameter where available

Troubleshooting

Debugging Tools

from aixplain import Aixplain

aix = Aixplain(api_key="YOUR_API_KEY")
agent = aix.Agent.get("YOUR_AGENT_ID")
response = agent.run(query="test query")

# Inspect steps if present on the response
if hasattr(response.data, "steps") and response.data.steps is not None:
print(response.data.steps)

# List all tools in your agent
for tool in agent.tools:
print(f"\nType: {type(tool).__name__}")
print(f"Name: {tool.name}")
print(f"Description: {tool.description}")
print(f"Status: {tool.status}") # DRAFT | ONBOARDED

# Check if tool has an ID
tool_id = getattr(tool, 'id', None) or getattr(tool, 'assetId', None)
if tool_id:
print(f"Tool ID: {tool_id}")
else:
print("⚠️ Tool has no ID or assetId")
Show output

Common Issues

Error: ImportError: cannot import name 'Input' from 'aixplain.v2' (or Inputs, Action, Actions)

Input, Inputs, Action, and Actions are no longer exported from aixplain.v2. All action and input functionality is accessed through the .actions and .inputs proxies — no imports needed.

# Use proxies directly on the object instead
tool.actions['ACTION_NAME'].param = 'value'
model.inputs.temperature = 0.7

Error: Duplicate tool names found: [Tool Name]. Make sure all tool names are unique.

This means two or more tools with the same name are added to the agent.

# List tools on the agent
print(agent.tools)
Show output
# Remove a tool by list index (example: remove index 1), then save
# agent.tools.pop(1)
# agent.save()

# When adding a tool, avoid duplicates by asset id if already present
def tool_ids(tools):
return {getattr(t, "id", None) for t in tools if getattr(t, "id", None)}

# if search_tool.id not in tool_ids(agent.tools):
# agent.tools.append(search_tool)
# agent.save()


Support

For additional help: