Skip to content
| Marketplace
Sign in
Visual Studio Code>Data Science>U_Agentix Data ExplorerNew to Visual Studio Code? Get it now.
U_Agentix Data Explorer

U_Agentix Data Explorer

CAMPINTL

| (0) | Free
Interactive data analysis and visualization for PostgreSQL, MongoDB, CSV files, and ML models
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

U_Agentix Data Explorer Extension

Interactive data analysis and visualization VS Code extension for PostgreSQL, MongoDB, and CSV files.

Overview

The U_Agentix Data Explorer Extension provides a comprehensive data analysis toolkit directly within VS Code. It enables data analysts and developers to explore databases, visualize data, and validate CSV files without leaving their development environment.

Features

Database Explorer

  • PostgreSQL Integration: Connect to PostgreSQL databases, browse tables, view schemas
  • MongoDB Integration: Connect to MongoDB, browse collections, query documents
  • Visual Query Builder: Build SQL queries with autocomplete and syntax highlighting
  • Schema Visualization: View table relationships and database structure
  • Export Data: Export query results to CSV, JSON, or Excel formats

Chart Builder

  • Multiple Chart Types: Create line, bar, pie, and scatter charts
  • Battle Performance Charts: Visualize agent battle performance over time
  • User Engagement Graphs: Track user activity and engagement metrics
  • Revenue Analytics: Analyze revenue trends and patterns
  • Interactive Charts: Powered by Chart.js with responsive design

CSV Operations

  • Import Historical Data: Load CSV files into databases
  • Data Cleaning Tools: Remove duplicates, handle missing values, standardize formats
  • Merge Datasets: Combine multiple CSV files
  • Data Validation: Check data quality and integrity
  • Preview Mode: View CSV data before importing

Installation

Prerequisites

  • VS Code 1.85.0 or higher
  • Node.js 18.0 or higher
  • PostgreSQL 14+ (optional)
  • MongoDB 6+ (optional)

Install from VSIX

  1. Download the latest .vsix file from releases
  2. Open VS Code
  3. Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
  4. Click "..." menu → "Install from VSIX..."
  5. Select the downloaded file

Install from Marketplace

# Search for "U_Agentix Data Explorer" in VS Code Extensions Marketplace
# Click Install

Build from Source

# Clone repository
git clone https://github.com/u-agentix/data-explorer-extension.git
cd u-agentix-data-explorer-extension

# Install dependencies
npm install

# Build extension
npm run compile

# Package extension (optional)
npm run package

Configuration

Database Connection Settings

Access settings via File → Preferences → Settings → Extensions → Data Explorer

{
  "dataExplorer.postgres.defaultHost": "localhost",
  "dataExplorer.postgres.defaultPort": 5432,
  "dataExplorer.mongodb.defaultHost": "localhost",
  "dataExplorer.mongodb.defaultPort": 27017,
  "dataExplorer.query.maxRows": 1000,
  "dataExplorer.query.timeout": 30000,
  "dataExplorer.csv.maxFileSize": 104857600,
  "dataExplorer.cache.enabled": true,
  "dataExplorer.cache.ttl": 300000
}

PostgreSQL Connection

  1. Click the Database icon in the sidebar
  2. Click "Connect to PostgreSQL"
  3. Enter connection details:
    • Host: localhost
    • Port: 5432
    • Database: u_agentix
    • User: postgres
    • Password: your_password

MongoDB Connection

  1. Click the Database icon in the sidebar
  2. Click "Connect to MongoDB"
  3. Enter connection URI:
    mongodb://localhost:27017/u_agentix_battles
    

Usage Guide

Querying Databases

Open Query Editor

  1. Click "Open Query Editor" in the Saved Queries panel
  2. Write your SQL query:
    SELECT * FROM users_progress
    WHERE lessons_completed > 10
    ORDER BY total_score DESC
    LIMIT 100;
    
  3. Click "Execute" or press Ctrl+Enter
  4. View results in the data table

Browse Tables

  1. Expand PostgreSQL or MongoDB connection in sidebar
  2. See all available tables/collections
  3. Right-click a table → "Open Query Editor" for quick queries
  4. Right-click a table → "Export Data" to export entire table

Creating Charts

From Query Results

  1. Execute a query that returns numerical data
  2. Click "Create Chart" button in results panel
  3. Select chart type (line, bar, pie, scatter)
  4. Configure axes and labels
  5. View interactive chart

Battle Performance Chart Example

// Query battle data
SELECT
  DATE(created_at) as date,
  AVG(win_rate) as avg_win_rate,
  COUNT(*) as battles
FROM agent_battle_results
WHERE created_at >= NOW() - INTERVAL '30 days'
GROUP BY DATE(created_at)
ORDER BY date;

// Create line chart showing win rate trend

CSV Operations

Import CSV File

  1. Click "Import CSV" in the Data Explorer panel
  2. Select CSV file from your computer
  3. Preview data in import wizard:
    • View first 100 rows
    • Check column types
    • See data quality warnings
  4. Configure import options:
    • Target table name
    • Skip duplicates
    • Create new table if needed
  5. Click "Import to Database"
  6. Wait for import completion

Validate CSV Data

  1. Click "Validate CSV Data"
  2. Select CSV file
  3. View validation report:
    • Schema consistency check
    • Missing value detection
    • Duplicate header warnings
    • Data type validation
  4. Fix issues and re-validate

Merge CSV Files

  1. Select multiple CSV files
  2. Click "Merge Datasets"
  3. Choose merge strategy:
    • Append rows (union)
    • Join on key column
  4. Specify output file path
  5. Review merged data

Database Schemas

PostgreSQL Tables

users_progress

CREATE TABLE users_progress (
  id SERIAL PRIMARY KEY,
  user_id VARCHAR(255) UNIQUE NOT NULL,
  lessons_completed INTEGER DEFAULT 0,
  total_score INTEGER DEFAULT 0,
  achievements JSONB DEFAULT '[]',
  current_level INTEGER DEFAULT 1,
  last_active TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
  updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

lesson_completions

CREATE TABLE lesson_completions (
  id SERIAL PRIMARY KEY,
  user_id VARCHAR(255) NOT NULL,
  lesson_id VARCHAR(255) NOT NULL,
  completed_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
  time_spent INTEGER,
  score INTEGER,
  perfect_score BOOLEAN DEFAULT false,
  UNIQUE(user_id, lesson_id)
);

agent_battle_results

CREATE TABLE agent_battle_results (
  id SERIAL PRIMARY KEY,
  battle_id VARCHAR(255) NOT NULL,
  user_id VARCHAR(255) NOT NULL,
  agent_name VARCHAR(255) NOT NULL,
  opponent_name VARCHAR(255) NOT NULL,
  result VARCHAR(50),
  profit_loss DECIMAL(10,2),
  win_rate DECIMAL(5,2),
  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

MongoDB Collections

battles

{
  _id: ObjectId,
  battleId: String,
  userId: String,
  agents: [{
    agentId: String,
    agentName: String,
    position: Number
  }],
  status: String, // "pending", "in_progress", "completed"
  startTime: Date,
  endTime: Date,
  winner: String,
  results: {
    totalTrades: Number,
    profitLoss: Number,
    winRate: Number,
    sharpeRatio: Number,
    maxDrawdown: Number
  },
  createdAt: Date,
  updatedAt: Date
}

MCP Integration

The extension integrates with U_Agentix MCPs:

Data Ops MCP

  • Database queries
  • User progress tracking
  • Battle data retrieval

Analytics MCP

  • ML model access
  • Performance metrics
  • Churn prediction

Redis MCP

  • Query result caching
  • Real-time data updates

Examples

Example 1: Analyze User Engagement

-- Get top 10 most engaged users
SELECT
  user_id,
  lessons_completed,
  total_score,
  EXTRACT(DAY FROM NOW() - last_active) as days_inactive
FROM users_progress
ORDER BY total_score DESC
LIMIT 10;

Create a bar chart showing top users by score.

Example 2: Battle Performance Analysis

-- Agent win rates over last 30 days
SELECT
  agent_name,
  COUNT(*) as total_battles,
  SUM(CASE WHEN result = 'win' THEN 1 ELSE 0 END) as wins,
  ROUND(100.0 * SUM(CASE WHEN result = 'win' THEN 1 ELSE 0 END) / COUNT(*), 2) as win_rate
FROM agent_battle_results
WHERE created_at >= NOW() - INTERVAL '30 days'
GROUP BY agent_name
ORDER BY win_rate DESC;

Example 3: CSV Import - Historical Market Data

  1. Download market data CSV:

    date,open,high,low,close,volume
    2025-01-01,100.50,102.30,99.80,101.75,1000000
    2025-01-02,101.75,103.50,101.20,103.00,1200000
    
  2. Import via extension

  3. Query imported data:

    SELECT * FROM market_data
    WHERE date >= '2025-01-01'
    ORDER BY date DESC;
    

Keyboard Shortcuts

  • Ctrl+Shift+D (Cmd+Shift+D on Mac): Open Data Explorer
  • Ctrl+Enter: Execute current query
  • Ctrl+S: Save query
  • Ctrl+Shift+E: Export current results
  • Ctrl+Shift+C: Create chart from results

Troubleshooting

Cannot Connect to PostgreSQL

Issue: "Failed to connect: Connection refused"

Solutions:

  1. Verify PostgreSQL is running: psql -U postgres -c "SELECT 1"
  2. Check host and port are correct
  3. Ensure firewall allows connections
  4. Verify credentials are correct

MongoDB Connection Timeout

Issue: "MongoDB connection timeout"

Solutions:

  1. Check MongoDB is running: mongosh --eval "db.version()"
  2. Verify connection URI is correct
  3. Check network connectivity
  4. Ensure MongoDB is accepting connections

CSV Import Failed

Issue: "CSV import validation failed"

Solutions:

  1. Check CSV file format (UTF-8 encoding)
  2. Ensure headers are present
  3. Verify no duplicate column names
  4. Check file size is within limit (100MB default)

Query Timeout

Issue: "Query exceeded timeout"

Solutions:

  1. Increase timeout in settings
  2. Optimize query with indexes
  3. Add LIMIT clause to large queries
  4. Use pagination for large datasets

Performance Tips

Query Optimization

  1. Use LIMIT: Always limit large result sets

    SELECT * FROM large_table LIMIT 100;
    
  2. Create Indexes: Index frequently queried columns

    CREATE INDEX idx_user_id ON users_progress(user_id);
    
  3. Use Pagination: For large datasets

    SELECT * FROM battles LIMIT 100 OFFSET 0;
    

Caching

  • Enable query result caching in settings
  • Cached results expire after 5 minutes (default)
  • Clear cache to see latest data

CSV Operations

  • Keep files under 100MB for best performance
  • Use data cleaning before import
  • Validate data before importing large files

Development

Build Extension

npm install
npm run compile

Watch Mode

npm run watch

Run Tests

npm test

Package Extension

npm run package

Architecture

src/
├── extension.ts              # Main entry point
├── providers/
│   ├── postgresProvider.ts   # PostgreSQL connection
│   ├── mongoProvider.ts      # MongoDB connection
│   ├── csvProvider.ts        # CSV operations
│   └── databaseTreeProvider.ts # Tree view
├── services/
│   ├── queryExecutor.ts      # Query execution
│   ├── chartService.ts       # Chart creation
│   └── dataValidator.ts      # Data validation
├── models/
│   ├── queryResult.ts        # Query result model
│   └── dataset.ts            # Dataset model
└── utils/
    ├── sqlBuilder.ts         # SQL query builder
    ├── dataTransformer.ts    # Data transformation
    └── logger.ts             # Logging utility

Contributing

  1. Fork the repository
  2. Create feature branch
  3. Make changes
  4. Add tests
  5. Submit pull request

License

Proprietary License — All Rights Reserved. See LICENSE file.

Support

  • Documentation: See MCP_VSCODE_ENHANCEMENT_ANALYSIS.md
  • Issues: GitHub Issues
  • Contact: U_Agentix Spec Team

Version History

1.0.0 (2025-10-18)

  • Initial release
  • PostgreSQL and MongoDB support
  • CSV import/export
  • Chart visualization
  • ML model integration
  • Data validation
  • Query builder
  • 20+ comprehensive tests

Credits

Built by the U_Agentix Spec Team - Backend Developer Powered by Chart.js, PostgreSQL, MongoDB, and csv-parse


U_Agentix Data Explorer - Interactive data analysis for developers

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft