Skip to main content
Guardian
Docs
ChangelogFAQContact
Download
Guardian

Release-driven governance platform for engineering teams. Maintain code quality and security at scale.

Product

  • Changelog
  • Docs
  • FAQ
  • Contact

Resources

  • Getting Started
  • Security
  • Configuration
  • Guru AI
  • Monitoring

Legal

  • Privacy Policy

© 2026 Guardian Project. All rights reserved.

Designed & Developed bySenol Dogan

Guru: AI Assistant | Guardian

Sections

Features

Guru: AI Assistant
Project MonitoringReviews & Fix Proposals

General

Getting Started

Operations

InstallationAuthenticationUpdatesConfigurationMigration Guide

Security

Security

Support

Troubleshooting
Documentation

Guru: AI Assistant

How to use the AI assistant for code analysis, explanations, and fix suggestions.

What is Guru?

Guru is Guardian's built-in AI assistant. It provides context-aware explanations of code issues, suggests fixes, and helps you understand your codebase better.

Key Features

FeatureDescription
Context-Aware AnalysisUnderstands your codebase structure
Fix SuggestionsProvides actionable code changes
ExplanationsDescribes why an issue matters
Web SearchCan search the web for additional context

Using Guru

Opening the Chat

The Guru chat panel is accessible from the main interface. Simply type your question in the chat input at the bottom of the screen.

Asking Questions

Guru understands natural language queries:

"Why is this function flagged as a security issue?"
"How can I fix the N+1 query problem here?"
"What's the best way to refactor this class?"
"Explain the architectural impact of this change"

Web Search

Guardian can use Tavily to pull up-to-date information from the web. Web search is opt-in and requires a Tavily API key.

Enable it in Settings > Web Search. You can also force web search for a single message by adding /web or @web:

"/web What are the latest React best practices?"
"Explain the latest TypeScript 5 features @web"

How It Works

  • If no Tavily key is stored, web search requests will fail (web search is optional; you can keep it off).
  • If your message includes a URL, Guardian prefers Tavily Extract (focused extraction from the page).
  • Otherwise Guardian uses Tavily Search (top results + short answer).
  • The Tavily request contains your question (not your code). The extracted/search results are appended into the Guru context so your AI provider can cite them.

Search Depth

You can control depth in Settings > Web Search:

  • Basic: best default (fast and relevant)
  • Advanced: highest recall (slower)
  • Fast / Ultra-fast: quickest response (smaller result set)
  • Auto: Guardian picks depth from your query (for example, “latest”, “pricing”, “CVE”, “security advisory” tends to trigger advanced depth)

Best Practices (Better Results, Lower Cost)

  1. Keep queries short and specific (Guardian truncates Tavily queries to ~400 characters).
  2. Split complex questions into a few focused requests instead of one long prompt.
  3. Use site:example.com to restrict sources when you already know the best domain.
  4. Prefer a URL + a clear instruction when you want one page summarized (Extract is tighter than broad Search).

Applying Fixes

When Guru suggests a fix, prefer receiving the FULL updated file content (no diff markers and no markdown). Then:

  • Use the FIX action in the Monitor view when a proposed fix is available.
  • Or write the proposal to .guardian-proposals/fix_proposals.jsonl and use Reviews to apply and track it.

Tip: Always review fixes before applying. Guru is helpful but suggestions should be verified.

Guru Capabilities

Code Analysis

Guru can analyze code for:

  • Security vulnerabilities
  • Architectural patterns
  • Performance issues
  • Code style problems

Explanations

Ask Guru to explain:

  • Why a pattern is problematic
  • The impact of an issue
  • Alternative approaches
  • Best practices for your stack

Refactoring

Guru can suggest:

  • Function extraction
  • Interface improvements
  • Dependency patterns
  • Test structure improvements

Configuration

Provider Settings

Navigate to Settings to configure Guru:

SettingDescription
ProviderAI model provider (Ollama, OpenAI, etc.)
ModelSpecific model version
API KeyYour provider API key

Web Search Settings

In Settings, you can configure Tavily for web search:

SettingDescription
Tavily API KeyEnable web search capabilities

Chat History

Guru maintains conversation history per project:

  • Conversations persist across sessions
  • Use Clear Chat to start fresh
  • History helps Guru understand context

Best Practices

Effective Prompting

Good prompts are specific:

"Explain why the useEffect in UserProfile.tsx causes a memory leak"

Avoid vague prompts:

"What's wrong with my code?"

Workflow Integration

  1. Review Phase: Use Guru to understand issues
  2. Fix Phase: Apply suggested fixes or use as reference
  3. Verify Phase: Check if the fix resolves the issue

Learning from Guru

Guru explanations are educational:

  • Read the "why" explanations
  • Understand the principles behind suggestions
  • Apply learnings to new code proactively

Semantic Search

Guardian includes semantic search to find similar code patterns across your codebase:

How It Works

When you scan your project, Guardian creates semantic embeddings of findings and stores them locally. This enables similarity-based retrieval.

Using Semantic Search

Trigger semantic search by using these keywords in your query:

"Find similar issues to this"
"Show me critical patterns like this"
"Are there semantic matches for this vulnerability?"

Search Triggers

Guru automatically uses semantic search when you include:

  • English: "similar", "like this", "resemble", "pattern", "semantic"

What You'll See

When semantic matches are found, Guru includes them in the context:

### Semantic Similarity Matches
- `src/auth.ts` [Critical] similarity=0.87 (openai:text-embedding-3-small)
  - preview: SQL injection in user input validation
- `src/db.rs` [Critical] similarity=0.82 (openai:text-embedding-3-small)
  - preview: Raw SQL concatenation with user input

Embedding Providers

Guardian supports multiple embedding strategies:

ProviderModelUse Case
Auto (default)openai:text-embedding-3-small or ollama:nomic-embed-textUses OpenAI when a valid key exists; otherwise starts with Ollama and falls back to local hash
OpenAItext-embedding-3-smallBest quality, requires API key
Ollamanomic-embed-textLocal/offline option
Local HashDeterministic fallbackOffline mode, no external calls

Configure via environment variables:

GUARDIAN_EMBED_MODE=ollama  # or "openai", "local", "auto"
GUARDIAN_EMBED_PROVIDER=openai  # legacy alias
GUARDIAN_EMBED_MODEL=text-embedding-3-small
GUARDIAN_EMBED_MODEL_OLLAMA=nomic-embed-text
GUARDIAN_OFFLINE=1  # Forces local hash fallback

Privacy

  • Embeddings are stored locally in ~/.guardian/memory.db
  • No code leaves your machine for embedding generation (local hash mode)
  • OpenAI/Ollama modes send only the analyzed code snippet

Limitations

Guru is powerful but has limits:

LimitationWorkaround
Large files may be truncatedFocus on specific sections
May not know proprietary patternsProvide context in prompts
Suggestions need reviewAlways verify before applying
Rate limits applyConfigure provider limits
Semantic search requires prior scansRun a scan first to build the index

Privacy Considerations

When using Guru:

  • Code snippets are sent to your configured AI provider
  • Choose providers with appropriate data policies
  • Avoid sending secrets or PII in prompts
  • Review provider terms for your compliance needs

Troubleshooting

IssueSolution
No responseCheck API key in Settings
Generic answersInclude more context in your question
Slow responsesTry a faster model
Incorrect suggestionsProvide more specific context

On This Page

What is Guru?Key FeaturesUsing GuruOpening the ChatAsking QuestionsWeb SearchHow It WorksSearch DepthBest Practices (Better Results, Lower Cost)Applying FixesGuru CapabilitiesCode AnalysisExplanationsRefactoringConfigurationProvider SettingsWeb Search SettingsChat HistoryBest PracticesEffective PromptingWorkflow IntegrationLearning from GuruSemantic SearchHow It WorksUsing Semantic SearchSearch TriggersWhat You'll SeeSemantic Similarity MatchesEmbedding ProvidersPrivacyLimitationsPrivacy ConsiderationsTroubleshooting