Create isolated database environments for different AI agents or agent workflows. Use GibsonAI's natural language database management to set up separate schemas and data access for different agent applications.

Key Features

Project-Based Isolation

  • Separate Projects: Create different GibsonAI projects for different agents
  • Independent Schemas: Each project has its own database schema
  • Isolated Data: Complete data separation between agent applications
  • Individual APIs: Each project gets its own REST API endpoints

Natural Language Management

  • Schema Creation: Define database schemas using natural language
  • Table Management: Add and modify tables with simple prompts
  • Relationship Building: Define relationships between tables naturally
  • Data Type Selection: Automatically choose appropriate data types

Implementation Examples

Creating Separate Agent Databases

# Using Gibson CLI to create database for Agent A
# gibson modify user_sessions "Create a user sessions table for chatbot conversations"
# gibson modify conversation_history "Create conversation history with user_id, message, response, timestamp"
# gibson code models
# gibson merge

# For Agent B (different project)
# gibson modify product_catalog "Create a product catalog table with name, description, price, category"
# gibson modify user_preferences "Create user preferences table with user_id, preferred_categories, budget_range"
# gibson code models
# gibson merge

Text-to-SQL for Different Agents

# Agent A: Chatbot querying conversation data
import requests

query_request = {
    "query": "Show me all conversations from today where users asked about pricing"
}

response = requests.post(
    "https://api.gibsonai.com/v1/-/query",
    json=query_request,
    headers={"Authorization": "Bearer agent_a_api_key"}
)

# Agent B: E-commerce agent querying product data
query_request = {
    "query": "Find all products under $50 in electronics category"
}

response = requests.post(
    "https://api.gibsonai.com/v1/-/query",
    json=query_request,
    headers={"Authorization": "Bearer agent_b_api_key"}
)

Using Different API Endpoints

# Agent A accessing conversation data
response = requests.get(
    "https://api.gibsonai.com/v1/-/conversation-history",
    headers={"Authorization": "Bearer agent_a_api_key"}
)

# Agent B accessing product data
response = requests.get(
    "https://api.gibsonai.com/v1/-/product-catalog",
    headers={"Authorization": "Bearer agent_b_api_key"}
)

# Creating new records for different agents
# Agent A creates new conversation
new_conversation = {
    "user_id": "user123",
    "message": "What are your pricing plans?",
    "response": "We offer three plans: Basic, Pro, and Enterprise...",
    "timestamp": "2024-01-15T10:30:00Z"
}

response = requests.post(
    "https://api.gibsonai.com/v1/-/conversation-history",
    json=new_conversation,
    headers={"Authorization": "Bearer agent_a_api_key"}
)

Use Cases

Agent Specialization

Perfect for scenarios where different agents need different data:

  • Customer Service Agent: Stores conversation history and user issues
  • E-commerce Agent: Manages product catalog and purchase history
  • Content Agent: Handles articles, media, and content recommendations
  • Analytics Agent: Tracks metrics, performance, and insights

Development Environments

Create separate databases for:

  • Development: Test new agent features
  • Staging: Validate agent behavior before production
  • Production: Live agent operations
  • Training: Historical data for agent training

Agent Collaboration

Enable agents to:

  • Share specific data through controlled interfaces
  • Maintain their own specialized datasets
  • Query each other's data when needed
  • Maintain data consistency across workflows

Schema Management

Independent Schema Evolution

# Agent A evolving its schema
# gibson modify conversation_history "Add sentiment_score column to track user satisfaction"
# gibson modify user_sessions "Add session_duration and interaction_count fields"
# gibson code models
# gibson merge

# Agent B evolving its schema independently
# gibson modify product_catalog "Add inventory_count and supplier_info columns"
# gibson modify user_preferences "Add notification_settings and purchase_history_summary"
# gibson code models
# gibson merge

Data Model Generation

Each agent gets its own Python models:

  • SQLAlchemy Models: For database operations
  • Pydantic Schemas: For data validation
  • Independent Updates: Models update independently per agent

MCP Server Integration

Connect different AI tools to different databases:

  • Agent-Specific Access: Each agent connects to its own database
  • Natural Language Operations: Use natural language for database operations
  • Contextual Queries: AI tools understand the specific agent context
  • Secure Separation: Each agent operates within its own data boundaries

Benefits for Multi-Agent Applications

  • Data Isolation: Complete separation between agent data
  • Independent Development: Agents can evolve independently
  • Specialized Schemas: Each agent has optimal data structure
  • Scalable Architecture: Add new agents without affecting existing ones
  • Natural Language Control: Manage all databases using natural language
  • Automatic APIs: Each agent gets its own REST API endpoints

Getting Started

  1. Create Projects: Set up separate GibsonAI projects for each agent
  2. Define Schemas: Use natural language to create database schemas
  3. Generate Models: Create Python models for each agent
  4. Connect Agents: Connect each agent to its specific database
  5. Iterate: Evolve each agent's database as needs change