- Python 3.8+
- pip package manager
# Navigate to SDK directory
cd /Volumes/Cody/projects/AINative/developer-tools/sdks/python
# Install in development mode (recommended)
pip install --break-system-packages -e .
# Or install from local package
pip install --break-system-packages .ainative --version
ainative --helpBefore using the CLI, configure your API credentials:
# Set your API key (required)
ainative config set api_key YOUR_API_KEY
# Set base URL (optional - defaults to production)
ainative config set base_url https://api.ainative.studio
# View current configuration
ainative config showainative [OPTIONS] COMMAND [ARGS]...
Global Options:
--version Show the version and exit
-v, --verbose Enable verbose output
--help Show this message and exitManage CLI configuration settings.
# Set configuration values
ainative config set api_key YOUR_API_KEY
ainative config set api_secret YOUR_SECRET # Optional for enhanced security
ainative config set base_url https://api.ainative.studio
ainative config set organization_id ORG_ID # For multi-tenant scenarios
# View current configuration
ainative config showAvailable config keys:
api_key- Your AINative API key (required)api_secret- API secret for enhanced security (optional)base_url- API base URL (default: https://api.ainative.studio)organization_id- Organization ID for multi-tenant usage
Check API connectivity and health status.
# Basic health check
ainative health
# Verbose health check with detailed output
ainative -v healthManage ZeroDB projects for data organization.
# List all projects
ainative projects list
# Create a new project
ainative projects create "My Project" "Project description"
ainative projects create "Vector Search App" "AI-powered search application"
# Get detailed project information
ainative projects get PROJECT_ID
# Suspend a project (temporarily disable)
ainative projects suspend PROJECT_ID
# Activate a suspended project
ainative projects activate PROJECT_ID
# Delete a project (permanent - use with caution)
ainative projects delete PROJECT_IDExamples:
# Create a project for a chatbot
ainative projects create "Customer Support Bot" "AI chatbot for customer service"
# List all projects to see the new one
ainative projects list
# Get details for a specific project
ainative projects get proj_12345Manage vector data for semantic search and AI operations.
# Search vectors by text query
ainative vectors search --query "machine learning algorithms" --top-k 5
ainative vectors search --query "customer support" --top-k 10 --project-id PROJECT_ID
# Upsert vectors from JSON file
ainative vectors upsert vectors_data.json --project-id PROJECT_ID
# Get vector index statistics
ainative vectors stats --project-id PROJECT_IDJSON file format for upsert:
{
"vectors": [
{
"id": "doc_1",
"vector": [0.1, 0.2, 0.3, ...],
"metadata": {
"title": "Document Title",
"category": "documentation"
}
}
]
}Examples:
# Search for AI-related content
ainative vectors search --query "artificial intelligence trends" --top-k 3
# Upload vectors from a file
ainative vectors upsert my_embeddings.json --project-id proj_12345
# Check vector database statistics
ainative vectors stats --project-id proj_12345Manage memory entries for AI context and knowledge storage.
# List all memory entries
ainative memory list
ainative memory list --project-id PROJECT_ID
# Create a new memory entry
ainative memory create --content "Important customer feedback about feature X"
ainative memory create --content "Meeting notes from Q4 planning" --tags "meeting,planning,q4"
ainative memory create --content "Bug report: login issue" --tags "bug,login" --priority high
# Search memory entries
ainative memory search --query "customer feedback"
ainative memory search --query "bug reports" --project-id PROJECT_IDPriority levels: low, medium, high, urgent
Examples:
# Create high-priority memory
ainative memory create --content "Critical security update needed" --tags "security,urgent" --priority urgent
# Search for planning-related memories
ainative memory search --query "quarterly planning"
# List all memories with verbose output
ainative -v memory listOrchestrate and manage AI agent swarms for complex task automation.
# Start an agent swarm from configuration file
ainative swarm start agents_config.json --project-id PROJECT_ID
# Orchestrate a task within an active swarm
ainative swarm orchestrate --task "Analyze customer feedback and generate report" --swarm-id SWARM_ID
# Get swarm status and metrics
ainative swarm status --swarm-id SWARM_ID
# List available agent types
ainative swarm agent-types
# Stop a running swarm
ainative swarm stop --swarm-id SWARM_IDAgent configuration file format:
{
"agents": [
{
"type": "data_analyst",
"config": {
"specialization": "customer_data",
"max_concurrent_tasks": 3
}
},
{
"type": "report_generator",
"config": {
"format": "markdown",
"include_charts": true
}
}
],
"orchestration": {
"max_agents": 5,
"coordination_model": "hierarchical"
}
}Examples:
# Start a swarm for data analysis
ainative swarm start data_analysis_agents.json --project-id proj_12345
# Orchestrate a complex task
ainative swarm orchestrate --task "Process customer survey data and create insights report" --swarm-id swarm_abc123
# Check what agent types are available
ainative swarm agent-types
# Monitor swarm performance
ainative swarm status --swarm-id swarm_abc123Access usage analytics, cost tracking, and performance metrics.
# Get usage analytics
ainative analytics usage --project-id PROJECT_ID
ainative analytics usage --project-id PROJECT_ID --days 30
# Get cost analysis
ainative analytics costs --project-id PROJECT_ID
ainative analytics costs --project-id PROJECT_ID --days 7
# Get trend data for specific metrics
ainative analytics trends --metric "api_requests" --days 30
ainative analytics trends --metric "vector_searches" --days 7 --project-id PROJECT_IDAvailable metrics for trends:
api_requests- Total API requestsvector_searches- Vector search operationsmemory_operations- Memory read/write operationsagent_tasks- Agent task executionsstorage_usage- Storage utilizationcompute_time- Compute resource usage
Examples:
# Check last 30 days usage
ainative analytics usage --project-id proj_12345 --days 30
# Get cost breakdown for current month
ainative analytics costs --project-id proj_12345 --days 30
# View API request trends
ainative analytics trends --metric "api_requests" --days 14Add -v or --verbose to any command for detailed output:
ainative -v projects list
ainative -v vectors search --query "example"
ainative -v swarm status --swarm-id SWARM_IDSet configuration via environment variables:
export AINATIVE_API_KEY="your_api_key"
export AINATIVE_BASE_URL="https://api.ainative.studio"
export AINATIVE_ORG_ID="your_org_id"Many commands support JSON output for scripting:
ainative projects list --format json
ainative analytics usage --project-id PROJECT_ID --format json-
Command not found:
# Reinstall the package pip install --break-system-packages -e /path/to/sdk -
Authentication errors:
# Check your API key configuration ainative config show # Reset API key ainative config set api_key YOUR_NEW_KEY
-
Connection errors:
# Test connectivity ainative health # Check base URL ainative config show
Use verbose flag for debugging:
ainative -v health
ainative -v projects list# Setup
ainative config set api_key YOUR_KEY
ainative health
# Projects
ainative projects list
ainative projects create "Name" "Description"
# Vectors
ainative vectors search --query "search term" --top-k 5
# Memory
ainative memory create --content "Important note"
ainative memory search --query "search term"
# Analytics
ainative analytics usage --project-id PROJECT_IDVectors JSON:
{
"vectors": [
{
"id": "unique_id",
"vector": [0.1, 0.2, 0.3],
"metadata": {"key": "value"}
}
]
}Agents JSON:
{
"agents": [
{
"type": "agent_type",
"config": {"setting": "value"}
}
]
}-
Set up your first project:
ainative projects create "My First Project" "Learning the AINative CLI"
-
Upload some vectors:
ainative vectors upsert my_data.json --project-id YOUR_PROJECT_ID
-
Start exploring:
ainative vectors search --query "your search term" --top-k 3
For more information, visit the AINative Documentation or use ainative COMMAND --help for command-specific help.