Our Python SDK got smarter. We developed a Typscript SDK too. We are updating our SDK code blocks. Python SDKhere.Typscript SDKhere.
Description

Percival Chat

Interactive AI assistant for trace exploration and system analysis

Percival Chat is your intelligent AI debugging companion that can analyze traces, identify issues, and suggest fixes through natural conversation. Think of it as having a senior engineer who has analyzed millions of traces sitting next to you, ready to help debug your AI systems instantly.

Percival Chat takes the power of Percival's trace analysis and makes it conversational. Instead of clicking through spans and logs, simply ask "Why did this trace fail?" or "What's causing the performance bottleneck?" and get immediate, actionable answers supercharged with ML-powered insights.

How Percival Chat works

Percival Chat is a multi-agent conversational system that understands your traces at three distinct levels - from high-level insights down to individual log entries. It automatically selects the right analysis depth based on your question and seamlessly switches between specialized agents to provide the most relevant answers. The system maintains conversation context, tracks analyzed resources, and learns from your interactions to provide increasingly accurate insights.

Why we created Percival Chat

We observed teams spending hours in back-and-forth conversations trying to understand trace failures, copying span IDs into different tools, and manually correlating logs with errors. Percival Chat eliminates this friction by providing a single conversational interface where you can ask questions naturally and get instant answers. Whether you're debugging a production issue at 3 AM or optimizing system performance, Percival Chat gives you the insights you need in seconds, not hours.

How to access Percival Chat

You can start chatting with Percival from multiple entry points:

  1. Direct access: Navigate to https://chat.patronus.ai/
  2. From the navigation bar: Click "Chat with Percival" in the platform's main navigation
  3. From a specific trace: Navigate to Traces → Select a trace → In the opened side panel, click the "Chat with Percival" button in the top right corner

Supercharged with Percival Insights

Every conversation leverages Percival's ML-powered analysis that detects dozens of failure modes, clusters errors, and suggests prompt fixes. The system learns from your traces over time, providing increasingly accurate insights specific to your system's patterns and behaviors. While Percival Insights enhance the high and mid-level analysis, the chat can also work directly with low-level tools when insights aren't available or when you need precise debugging.

Three-level trace exploration

Percival Chat analyzes your traces at three levels of detail, automatically choosing the right depth for your needs:

High-level: Insight-powered analysis

At the highest level, Percival Chat leverages Percival Insights to provide rapid understanding of system behavior:

  • Automatic pattern recognition: ML-powered analysis identifies recurring issues and patterns across traces.
  • Error clustering: Groups similar errors together for systematic resolution.
  • Performance bottleneck detection: Identifies slow operations and optimization opportunities.
  • Prompt optimization suggestions: Provides recommendations for improving prompts.
  • System-wide trend analysis: Discovers patterns across multiple traces and time periods.

Mid-level: Span analysis with insights

The mid-level provides structured exploration of trace components with insight enhancement:

  • Span relationship mapping: Understand call chains and dependencies.
  • Error span detection: Quickly identify and categorize failing operations.
  • Performance analysis: Measure and compare span execution times.
  • Resource usage tracking: Monitor tool calls and API usage patterns.

This level combines structural analysis with Percival Insights for comprehensive understanding.

Low-level: Pinpoint inspection

For detailed debugging, Percival Chat offers granular inspection capabilities:

  • Individual span attributes: Examine specific fields and values within spans.
  • Log correlation: Connect logs to their corresponding spans and traces.
  • Raw data extraction: Access unprocessed trace data for detailed analysis.
  • Field-level inspection: Use wildcards and filters to find specific attributes.
  • Sub-span analysis: Deep dive into LLM calls, database queries, and API requests.

This level provides the precision needed for root cause analysis and detailed debugging.

Key features

Memory files

Memory files allow Percival to remember information between chat sessions, making repeat analysis much faster and more effective. Instead of rediscovering trace structures and patterns each time, you can store context that guides Percival's exploration.

What to store in memory files:

  • Trace context and what your system processes are doing
  • Structure of log bodies and important span attributes
  • Analysis guidance and preferred tool call sequences
  • System-specific debugging approaches

How they work: Memory files are applied by selecting them in the user prompt input box. Once selected, the content becomes part of the chat context, helping Percival understand your system without having to analyze structures from scratch each time.

Scopes:

  • Private: Your personal knowledge base
  • Account: Shared team resources for collaborative debugging

Teams often create shared account-scoped memory files for common system types, building institutional knowledge around debugging different services or trace patterns. With basic version control, you can update memory files as your understanding evolves and revert changes when needed.

Chat sharing

Once you've finished a conversation, share your debugging session with others:

To share a chat:

  1. Hover over any agent response in your conversation.
  2. Click the "Share conversation" button that appears in the action bar at the bottom.
  3. In the modal, select visibility:
    • Account: Only team members can access.
    • Public: Anyone with the link can view.
  4. Copy and share the generated link.

To manage shared chats:

  • Quick access: Use the search bar (⌘K/Ctrl+K) and type "Shared Chats".
  • Settings: Click settings and navigate to "Shared Chats" to view and manage all your shared conversations.

Shared chats help team members learn from each other's debugging sessions and build collective knowledge around common issues.

How to get started

Start by asking Percival to list your last 10 traces and analyze the longest one. From there, you can dive deeper into specific issues, explore patterns across traces, or ask about performance bottlenecks.