LouieAI Python Client
Welcome to the LouieAI Python client library documentation.
LouieAI is Graphistry's genAI-native investigation platform. This library allows Python applications to interact with LouieAI via its API, leveraging Graphistry authentication.
Video: Louie <> Graphistry - Python edition!
Install & Go
pip install louieai
import graphistry
import louieai
# Configure servers and authenticate
graphistry.register(
api=3,
server="hub.graphistry.com", # Your Graphistry server
username="alice@example.com",
password="<your_password>"
)
# Create Louie interface with server configuration
lui = louieai(server_url="https://den.louie.ai") # Your Louie server
# Start analyzing
lui("Show me patterns in customer behavior")
print(lui.text) # Natural language insights
df = lui.df # Data as pandas DataFrame
Powerful Options
# Choose your authentication method
import louieai
# Option 1: Environment variables (great for notebooks)
# export GRAPHISTRY_USERNAME="your_username"
# export GRAPHISTRY_PASSWORD="your_password"
lui = louieai() # Auto-detects credentials
# Option 2: Specific servers and organizations
g = graphistry.register(
api=3,
server="hub.graphistry.com", # or "your-company.graphistry.com"
username="your_username",
password="your_password",
org_name="your-org" # Optional: specify organization
)
lui = louieai(g, server_url="https://den.louie.ai") # or your enterprise URL
# Control data visibility
lui = louieai(share_mode="Organization") # Share within your org
lui("Analyze sales trends", share_mode="Private") # Override per query
# Enable AI reasoning traces
lui.traces = True
lui("Complex analysis requiring step-by-step reasoning")
# Access conversation history
previous_result = lui[-1] # Last response
older_df = lui[-2].df # DataFrame from 2 queries ago
Need more options? See our guides:
- Authentication Guide - All authentication methods including API keys, multi-tenant usage
- Getting Started - Complete walkthrough with examples
- Agent Selection - Use specialized agents for databases and visualizations
Key Features
- Notebook-friendly API: Streamlined
lui()interface for Jupyter notebooks - Thread-based conversations: Maintain context across multiple queries
- Multiple response types: Handle text, DataFrames, visualizations, and more
- 40+ Specialized Agents: Choose from database-specific, visualization, and analysis agents
- Real-time streaming: See responses as they're generated in Jupyter notebooks
- Natural language interface: Access all Louie capabilities through simple prompts
- Auto-refresh authentication: Automatically handles JWT token expiration
- Multiple auth methods: Works with existing Graphistry sessions or direct credentials
Available Agents with Semantic Understanding
LouieAI provides specialized agents that learn and understand your data:
- General Purpose: LouieAgent (default), TextAgent, CodeAgent
- Databases with Semantic Layer: DatabricksAgent, PostgresAgent, MySQLAgent, SnowflakeAgent, BigQueryAgent
- Agents learn your schema, relationships, and business context
- Generate complex queries from natural language using semantic understanding
- Search & Analytics: SplunkAgent, OpenSearchAgent, KustoAgent
- Visualizations: GraphAgent, PerspectiveAgent, KeplerAgent, MermaidAgent
- Direct Execution: PassthroughAgent variants for each database (no AI interpretation)
# Use the default conversational agent
lui("Analyze security incidents from last week")
# Database agent with semantic understanding
lui("Show me customer churn trends", agent="DatabricksAgent")
# The agent understands your schema and business definitions of "churn"
# Natural language leveraging learned semantics
lui("Which products have anomalous return rates?", agent="PostgresAgent")
# Agent knows your product hierarchy, return policies, and what's "anomalous"
# Direct SQL when you need exact control
lui("SELECT * FROM auth_logs WHERE status='failed'", agent="PostgresPassthroughAgent")
See the complete Agents Reference for all available agents and usage examples.
Getting Started
New to LouieAI? Start here:
- Installation - Install the LouieAI Python client
- Authentication - Set up authentication with PyGraphistry
- Quick Start - Make your first queries and explore features
User Guides
Ready to dive deeper? These guides cover common use cases and advanced features:
- Examples - Practical examples for both notebook and client APIs
- Query Patterns - Advanced query techniques and best practices
- Authentication Guide - Multi-tenant usage, API keys, and troubleshooting
- Agent Selection - How to choose and use different agents
- Interactive Notebooks - Hands-on Jupyter notebook examples
API Reference
Complete technical documentation:
- API Overview - Overview of the LouieAI API
- LouieClient Reference - Complete LouieClient documentation
- Response Types - Understanding LouieAI response formats
- Available Agents - Complete list of 40+ specialized agents
Developer Resources
Contributing to LouieAI or setting up for development:
- Architecture - How LouieAI and Graphistry integrate
- Development Guide - Local development setup
- Testing - Running and writing tests
- Publishing - Release process documentation
Support
- GitHub Issues - Report bugs or request features
- Graphistry Community - PyGraphistry support and community