Skip to content

AI Integration

Pro Feature

AI context files require a Pro license.

Use AI assistants to analyze your performance data and get optimization suggestions.


GalataJ automatically creates context files that AI assistants can read:

your-project/
├── .galataj/
│ ├── live-performance.md ← Current profiling data
│ └── baseline-live-compare.md ← Comparison with baseline

Point your AI assistant to these files and ask performance questions.


live-performance.md contains real-time profiling data formatted for AI:

  • Top methods by CPU time
  • Call counts and allocations
  • JVM runtime summary
  • Context detection results

AI Prompts

Updates automatically while profiling is active.


baseline-live-compare.md shows how current performance compares to your baseline:

  • Methods that got slower (regressions)
  • Methods that got faster (improvements)
  • Summary statistics

AI Prompts

Updates automatically while profiling is active.


Reference the file directly:

  • Read @.galataj/live-performance.md and suggest optimizations for the slowest methods
  • Read the ‘@.galataj/baseline-live-compare.md’ file and see how performance changes after the latest application.
  1. Copy the content from .galataj/live-performance.md
  2. Paste into the chat
  3. Ask your question

Example:

“Here’s my profiling data. Why is OrderService.findAll so slow?”

“@.galataj/live-performance.md analyze the top 5 slowest methods”


GalataJ includes ready-made prompts optimized for performance analysis.

IntelliJ: Profiler panel → Ask AI dropdown

VS Code: GalataJ panel → Ask AI dropdown

Analyze Regressions

Find performance issues and bottlenecks

Suggest Optimizations

Get specific code-level fixes

Memory Analysis

Identify allocation issues and GC pressure

IO vs CPU

Determine if methods are IO-bound or CPU-bound


Want your own prompts? You can add custom prompts that appear alongside the built-in ones.

IntelliJ: Profiler panel → Ask AIManage Custom Prompts

VS Code: GalataJ panel → Ask AIManage Custom Prompts

Add Custom Prompt


Hover any method in the profiler panel → Add to Chat

This copies the method’s metrics directly to your AI conversation.


Be Specific

Instead of “Why is my app slow?” ask “Why is UserService.findAll taking 200ms when baseline was 20ms?”

Include Context

Mention your tech stack: “This is a Spring Boot 3 app with PostgreSQL”

Verify Suggestions

AI suggestions are starting points. Always profile again after making changes.