Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/pages/product/_meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module.exports = {
"auth": "Access control",
"apis-integrations": "APIs & integrations",
"workspace": "Workspace",
"agentic-analytics": "Agentic analytics",
"deployment": "Deployment",
"distribution": "Distribution"
}
8 changes: 8 additions & 0 deletions docs/pages/product/agentic-analytics/_meta.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
"spaces-agents-models": "Spaces, agents, models",
"agent-rules": "Agent rules",
"memory-isolation": "Agent memories",
"user-attributes": "User attributes",
"roles-and-permissions": "Roles & permissions",
"changelog": "Product updates",
};
158 changes: 158 additions & 0 deletions docs/pages/product/agentic-analytics/agent-rules.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
# Agent Rules

_Understanding Agent Rules configuration and behavior in Cube._

Agent Rules in Cube provide a powerful way to customize and control how AI agents behave within specific spaces. Rules act as contextual instructions that guide agents' responses and analysis, ensuring consistent behavior aligned with your business logic and domain expertise.

## Rule Types

### Always Rules

**Always Rules** are automatically applied to every agent interaction within the space, regardless of the specific query or context.

**Use Cases:**
- Fundamental business definitions and context
- Consistent calculation methods
- Default analysis approaches
- Domain-specific terminology

**Example Always Rules:**
```
Sales efficiency is deal size divided by sales cycle length
```

```
When analyzing customer data, always consider seasonality patterns from our retail business
```

```
Revenue should be calculated using our standard GAAP accounting principles
```

### Agent Requested Rules

**Agent Requested** rules are conditionally applied when the agent determines they are relevant to the current query or analysis. The agent intelligently selects which rules to use based on the context.

**Use Cases:**
- Specialized analysis techniques
- Context-specific guidance
- Advanced calculation methods
- Scenario-specific instructions

**Example Agent Requested Rules:**
```
If you asked to analyze sales efficiency start with correlation to WSE
```

```
For customer segmentation analysis, use RFM methodology (Recency, Frequency, Monetary)
```

```
When analyzing marketing performance, compare against industry benchmarks where available
```

## Best Practices

### Rule Hierarchy and Organization

- **Start with Always rules** for fundamental business context
- **Use Agent Requested rules** for specialized scenarios
- **Keep rules specific and actionable** rather than vague
- **Test rules** with actual queries to ensure they work as expected

### Writing Effective Rules

✅ **Good Rule Examples:**
- "Customer churn rate should be calculated as customers lost / total customers at start of period"
- "When analyzing quarterly performance, always compare against same quarter previous year"
- "For financial analysis, use our fiscal year starting in October"

❌ **Poor Rule Examples:**
- "Be helpful" (too vague)
- "Always be accurate" (redundant)
- "Consider all factors" (too broad)

### Domain-Specific Rules

**E-commerce Example:**
```
Always Rule: "Customer lifetime value equals average order value × purchase frequency × customer lifespan"
Agent Requested: "For cart abandonment analysis, segment by device type and traffic source"
```

**SaaS Example:**
```
Always Rule: "MRR growth rate should exclude one-time charges and setup fees"
Agent Requested: "When analyzing churn, differentiate between voluntary and involuntary churn"
```

### Contextual Guidance

Rules should provide context that agents might not inherently understand about your business:

```
Always Rule: "Our peak season is Q4, with 40% of annual revenue typically occurring in December"
Agent Requested: "For inventory analysis, consider our 6-week lead time for international suppliers"
```

## Rule Conflicts and Resolution

### How Cube Handles Conflicting Rules

Based on the rule configuration system, when multiple rules could apply to the same query, the conflict resolution strategy would likely include:

1. **Rule type hierarchy** (specific behavior needs verification)
2. **Rule specificity** - more specific rules typically override general ones
3. **Rule order** - the system may consider rule creation order or explicit priority
4. **Agent decision-making** for complementary vs conflicting guidance

### Example Conflict Scenarios

**Scenario 1: Direct Contradiction**
```
Rule A (Always): "Revenue recognition follows monthly billing cycles"
Rule B (Always): "Revenue should be recognized quarterly"

Resolution: The agent will flag this conflict and may ask for clarification
```

**Scenario 2: Complementary Rules**
```
Rule A (Always): "Sales efficiency is deal size divided by sales cycle length"
Rule B (Agent Requested): "When analyzing sales efficiency, include pipeline velocity metrics"

Resolution: Both rules work together - B provides additional context to A
```

**Scenario 3: Specificity Override**
```
Rule A (Always): "Use standard deviation for all variance calculations"
Rule B (Agent Requested): "For customer behavior analysis, use median absolute deviation instead of standard deviation"

Resolution: Rule B takes precedence for customer behavior queries due to higher specificity
```

### Best Practices for Avoiding Conflicts

1. **Review existing rules** before adding new ones
2. **Use specific triggers** in Agent Requested rules
3. **Test rule combinations** with sample queries
4. **Document rule intentions** clearly
5. **Regular rule audits** to identify and resolve conflicts

## Current Limitations

### Current State: Space-Level Rules Only, Always Rules Only

- Rules are currently configured at the **Space level**
- All agents within a space inherit the same set of rules
- Individual agent customization is not yet available

## Getting Started

1. **Assess Your Use Case**: Identify the key business context and calculations your agents need to understand
2. **Start Simple**: Begin with 2-3 Always rules covering your most important business definitions
3. **Add Specificity**: Implement Agent Requested rules for specialized scenarios
4. **Test and Iterate**: Use real queries to validate rule effectiveness
5. **Scale Gradually**: Add more rules based on actual usage patterns and feedback
173 changes: 173 additions & 0 deletions docs/pages/product/agentic-analytics/changelog.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
# Product updates

_New updates and improvements._

## August 25, 2025

### Pivot Tables

Added pivot table functionality for creating multi-dimensional data summaries. Users can click "Pivot" on dimensions in the data sidebar or column header to pivot by that dimension.

### TODO lists for AI Agents

AI agents now include todo list tools for task management and workflow planning. TODO lists helps agents tackle more complicated tasks, e.g. building multiple data models or reports.

### User Impersonation for Admins

Administrators can now impersonate users. It is helpful for testing access policies and troubleshoot issues.

### Visualizations Improvements
- **Updated color palette**: Refreshed visualization color schemes for better clarity and aesthetics
- **Vega spec improvements**: Better conversion from Vega specifications to chart configurations to enable AI agents to customize more chart elements, e.g. data labels.

## August 18, 2025

### New Chart Type: KPI

We've expanded our visualization capabilities with the addition of KPI charts, perfect for displaying key metrics and performance indicators in your dashboards and reports.

### Favorite Workbooks

You can now mark workbooks as favorites for quick access to your most important analytics. This makes it easier to organize and navigate through your growing collection of workbooks.

### Various Improvements

- **Embed session improvements**: Enhanced session exchange for embedded analytics
- **Performance optimizations**: Fixed workbook tracking to reduce unnecessary API calls

## August 11, 2025

### Data Modeling

We're bringing Cube Cloud features into the new interface, unifying the data modeling experience in a single modern workspace.

- **Pre-aggregations management**: View and manage pre-aggregations directly from the modeling page, bringing this essential performance optimization tool from Cube Cloud into the new interface
- **Query history**: Access your complete query history directly in the Cube interface, making debugging and analysis seamless without switching between tools

### User Groups

Enhanced collaboration features with improved user and group management capabilities:
- **User groups management**: Create and manage user groups for easier access control and collaboration
- **Workbook activity tracking**: Timestamps now show when users last viewed workbooks and dashboards
- **Group editing improvements**: Fixed and enhanced the group editing interface for smoother administration

### Home Page & Navigation

The home page now includes a search bar, making it easier to quickly find workbooks, data models, and other resources across your workspace.

### Various Improvements & Fixes

- **Streaming improvements**: More graceful error handling during streaming operations with automatic retries
- **Workbook navigation**: Fixed the "go back" behavior for better navigation flow
- **Chat interface**: Restored the new chat button and improved chat functionality
- **Embed endpoint**: Fixed issues with the embed endpoint for better integration capabilities

## August 4, 2025

### Various Improvements & Fixes

Multiple enhancements have been made to improve the overall experience:

- **GPT-5 support**: Added support for the latest GPT-5 language model for more powerful analytics assistance
- **Streaming Chat API**: Improved chat functionality with session and access token mechanics for real-time responses
- **Save to new workbook**: Easily create new workboks from analytics chat
- **Workbook sharing visibility**: New "shared with" column shows which team members have access to each workbook
- **Deployment settings access**: Deployment configuration is now directly accessible from the modeling page
- **Data model formatting**: Use formats directly from your data models for consistent visualizations
- **File operations**: Improved consistency by always using project root for file handling
- **Member title display**: Fixed display issues with team member titles

## July 28, 2025

### New Home Page Experience

We've redesigned the Cube home page to provide a better starting point for your analytics journey. The new interface offers improved navigation and faster access to your most important workbooks and data assets.

### View-only Dashboard Sharing

You can now share workbook's dashboard with read-only access, allowing you to collaborate and distribute insights without allowing recipients to make edits. This is perfect for sharing analytical findings with stakeholders or providing data access to team members who need to view but not modify your work.

### AI Chat Improvements

Chat functionality has been significantly improved with several new capabilities:
- **Rolling chat history summarization**: Long conversations are now automatically summarized to maintain context while improving performance
- **Chat renaming**: You can now rename your chat sessions for better organization
- **Agent selection improvements**: Enhanced interface for selecting and working with different AI agents

### Workbook Improvements

Managing your workbooks is now more intuitive with these new features:
- **Drag and drop tab ordering**: Reorder report tabs within workbooks by simply dragging them to new positions
- **Improved validation**: Better error messages and validation for workbook filters
- **Search functionality in Data Pane**: Quickly find specific data assets, dimensions, or measures with the new search feature
- **Date grain selection**: Pick specific date granularities directly in the Data Pane for time-based analysis
- **Relative date filters**: Create dynamic date filters using relative expressions like "last 30 days" or "current quarter"
- **Chart fixes**: Resolved various visualization issues for more reliable chart rendering
- **SQL generation**: Fixed issues with time dimension queries and filter suggestions

## July 21, 2025

### Analytics Chat Embed

You can now embed the AI-powered analytics chat directly into your applications! This allows you to provide users with a guided, semantic-layer-aware data assistant anywhere in your product or portal.

Learn more in the [Chat Embed docs](/cube/embed/embed/chat).

### Query Data Sources in Workbook

You can now query your data sources directly in workbooks. Our AI agent researches your data source, helps you build queries, and refines results in real-time.
This capability is particularly useful for prototyping queries and conducting analysis with AI assistance before converting them formal data models.

Learn more in the [Source SQL docs](/cube/workbooks/source-sql).


### Various Improvements

Multiple enhancements have been made to improve the user experience:
- **Display titles option**: You can now choose to display titles on your visualizations and components
- **Enhanced filtering**: Equals and not equals filters now include an "(All)" option for easier bulk selections, plus improved multi-select filter components
- **Better error handling**: Overloaded system errors now provide clearer, user-friendly messages
- **Improved network resilience**: Enhanced connection handling for BYOC deployments and API access fixes
- **UI refinements**: Various layout fixes, better workbook handling, and improved chart functionality

## July 14, 2025

### Dashboards

The biggest addition this week! You can now create interactive dashboards that combine multiple visualizations, filters, and content into comprehensive data applications. Build rich, multi-widget dashboards directly within Cube to tell complete data stories.

Key features include:
- **AI-powered creation**: Dashboards can be created and edited by AI agents
- **Multi-widget layouts**: Combine charts, tables, filters, and text in flexible grid layouts
- **Interactive filters**: Add dashboard-level filters that affect all connected visualizations
- **Text widgets**: Include markdown-formatted text, titles, and explanations
- **Responsive design**: Dashboards automatically adapt to different screen sizes


Learn more in the [Dashboards docs](/cube/workbooks/dashboards).

### Chart Templates

Chart Pane now has quick templates for common visualizations including bar charts, line charts, scatterplots, pie charts, donut charts, and boxplots. These templates make it faster to create charts with the right data fields automatically mapped.

Learn more in the [Chart Templates docs](/cube/workbooks/charts/chart-templates).

### Table Charts

Introducing table charts as a new visualization type! You can now create data tables directly within workbooks and add them to dashboards. Table charts provide a clean, structured way to display your data alongside other visualizations.

Learn more in the [Table Chart docs](/cube/workbooks/charts/table-chart).

### Folders in Data Pane

Organize your data assets better with folder support in the Data Pane. You can now group related semantic views, dimensions, and measures into folders for easier navigation and better organization.

### Chats History for Admins

Admins now can access users chat history in <Btn>Admin → Chats History</Btn>. It's possible to search specific chats by the first message content or chat UUID.

Learn more in the [AI docs](/cube/administration/ai).

### Various Filtering Improvements in Workbooks

Several enhancements to filtering capabilities have been made.
47 changes: 47 additions & 0 deletions docs/pages/product/agentic-analytics/memory-isolation.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Agent Memories

_Learn how Cube enforces memory isolation across tenants, spaces, and users._

Memory in Cube allows Agents to learn from and recall past interactions, user preferences, and contextual information. When users interact with Agents, relevant information is stored as memories that can be retrieved in future conversations, enabling more personalized and context-aware responses. Memories help Agents understand user preferences, remember previous decisions, and provide continuity across sessions.

Memories are scoped and enforced at the Tenant/Space boundary. Cube applies both application-layer and (optionally) infrastructure-layer isolation so one customer's end users cannot see another customer's memories.

## How It Works

### Space-Scoped Memories

Cube memories are stored at the Space level. Agents only learn from and retrieve memories within the current Space, ensuring no cross-Space exposure by design.

### Tenant-Aware Security Context

Every request carries a tenant-bound security context (JWT). Cube maps that context to an app/tenant ID and uses it across caching, orchestration, and query flows. This is the backbone of multi-tenancy isolation.

### RBAC and Policy Guardrails

Role-based access policies gate what entities and content are visible within a tenant. These same guardrails apply to what agents can read and write as memories.

### Data Model and API Isolation

Even when using the SQL API or custom views, hidden members and non-public entities remain inaccessible. Multitenancy configuration ensures queries and artifacts resolve only within the current tenant's scope.

### Optional Infrastructure Isolation

Many customers run in shared multi-tenant regions, but dedicated infrastructure and BYOC (Bring Your Own Cloud) variants are available. These provide stronger blast-radius isolation at the cluster, storage, and key-management levels.

## Practical Implications

- **Tenant Separation**: An end user in Customer A can only create and retrieve memories in Customer A's Spaces
- **Cross-Tenant Protection**: Memories are not retrievable by Customer B's users or agents, because requests from B carry a different security context and resolve to different Space and tenant IDs
- **Intra-Tenant Controls**: Even within a customer, RBAC and policies can further restrict which users or agents can contribute to or benefit from memories

## Technical Implementation

Cube ensures memory isolation through multiple layers of security controls:

1. **Tenant Isolation**: Every request is scoped to a specific tenant via JWT and middleware
2. **User Isolation**: Additional user-level filtering for user-mode memories
3. **Automatic Filtering**: Database queries are automatically filtered by tenant using decorators
4. **Vector Store Security**: All vector searches include tenant and user filters
5. **Container Isolation**: Each tenant gets its own dependency injection container
6. **JWT Security**: All security context comes from cryptographically signed JWT tokens
7. **Memory Mode Controls**: Configurable memory isolation levels (user/space/disabled)
Loading