Overview
The aiXplain platform provides a comprehensive tooling system that allows developers to create powerful AI agents with specialized capabilities. Tools are modular software components that enable agents to execute 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 200+ models from aiXplain's marketplace 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)
# View tool parameters
search_tool.to_dict()
# Configure tool parameters (optional)
search_tool.exclude_domains = ["wikipedia.com"]
# 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()
Adding an AI Model
# Get model from marketplace
llm_model = aix.Model.get("openai/gpt-4o")
# View model parameters
print(llm_model.to_dict())
# Configure model parameters (optional)
llm_model.temperature = 0.7
llm_model.max_tokens = 20000
# Test model (optional)
# llm_model.run(text="Test").data
# Add to agent
agent.tools.append(llm_model)
agent.save()
Running Your Agent
response = agent.run(query="Find me an animal shelter in San Jose")
print(response.data.output) # View output
# print(response.data.intermediate_steps) # Debug agent reasoning
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.
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:
| Integration | Purpose |
|---|---|
| Python Sandbox | Deploy secure, sandboxed Python functions with your custom business logic |
| PostgreSQL & SQLite Database | Query and interact with your PostgreSQL and SQLite databases |
| MCP Server | Connect 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=Falsefor read-only operations when possible - Custom Code — Validate and sanitize code inputs before execution
- Database Access — Limit table access using the
tablesparameter where available
Troubleshooting
Debugging Tools
# View agent execution steps
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")
Common Issues
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.
# View agent tools
agent.tools
# Remove duplicate tool
agent.tools.remove(agent.tools[X]) # Replace X with index
agent.save()
# Prevent duplicates when adding tools
if search_tool not in agent.tools:
agent.tools.append(search_tool)
agent.save()
Related Documentation
- aiXplain Marketplace — Browse available AI models, ready-to-use tools, and integrations
- Studio Platform — Manage your agents and integrations
- aiXplain Documentation — Full platform documentation
Support
For additional help:
- Browse available assets at aiXplain Marketplace
- Visit the aiXplain Documentation
- Contact support through the platform