The Value of Activity Tracking
Activity tracking in Prisme.ai provides:Visibility
Diagnostics
Analytics
Logging
Monitoring
Optimization
Understanding the Event System
At the core of Prisme.ai’s Activity tracking is its event-driven architecture:Key Components
Events
- Event type
- Timestamp
- Source identifier
- Payload data
- Request context
Publishers
- Tool execution requests
- Automation processes
- User interactions
- System status changes
Subscribers
- Automation workflows
- Activity monitors
- Logging systems
- Analytics processors
Event Bus
- Reliable message delivery
- Event persistence
- Publisher/subscriber coordination
- Load management
The Execution Lifecycle
Tool execution follows a well-defined lifecycle that generates events at each stage:Request Initiation
tool.request.initiated
tool.parameter.validation.started
- Tool name and parameters
- Request source (conversation ID, user ID)
- Timestamp and request ID
- Context information
Parameter Validation
tool.parameter.validation.completed
tool.parameter.validation.failed
(if issues occur)
- Validation status
- Error details (if any)
- Parameter transformations
- Schema conformance
Execution
tool.execution.started
tool.execution.step.completed
(for multi-step tools)tool.execution.completed
- Execution duration
- Resource utilization
- Intermediate state
- External system interactions
Result Processing
tool.result.processing.started
tool.result.processing.completed
- Raw output data
- Processed results
- Formatting operations
- Output size and structure
Response Delivery
tool.response.delivery.started
tool.response.delivery.completed
- Final response format
- Delivery time
- End-to-end latency
- Response size
Accessing Activity in Prisme.ai
You can monitor and analyze tool execution through several interfaces:- Chronological event listing
- Filtering by event type, status, or date range
- Detailed event inspection
- Real-time monitoring
- Search capabilities
- Navigate to the “Activity” tab in your AI Builder workspace
- Use filtering to focus on relevant events
- Click on events to see detailed information
- Toggle real-time updates for live monitoring

Common Event Types
Prisme.ai’s event system uses a hierarchical naming convention for clarity and filtering:Tool Request Events
Tool Request Events
tool.request.initiated
: Initial request for tool executiontool.request.validated
: Request passed preliminary validationtool.request.rejected
: Request failed preliminary checks
Execution Events
Execution Events
tool.execution.started
: Tool execution has beguntool.execution.step.completed
: A step in multi-step execution completedtool.execution.completed
: Tool execution finished successfullytool.execution.failed
: Tool execution encountered an error
Result Events
Result Events
tool.result.generated
: Raw results from tool executiontool.result.processed
: Results after formatting and preparationtool.result.delivered
: Final delivery to the requester
Error Events
Error Events
tool.error.validation
: Error during parameter validationtool.error.execution
: Error during tool executiontool.error.timeout
: Execution exceeded allocated timetool.error.resource
: Resource limit exceeded
Debugging with Activity
Activity tracking provides powerful capabilities for diagnosing and resolving issues:Identify the Issue
- Search for specific request IDs
- Filter by error event types
- Focus on a specific time range
- Filter by tool name or source
- Search for specific error codes
Trace Execution Flow
- Map the complete event sequence
- Identify missing or unexpected events
- Analyze timing between events
- Examine state changes across events
- Look for execution branches
Examine Event Details
- Parameter values and transformations
- Error details and context
- Performance metrics
- External system interactions
- Resource utilization
Compare with Successful Executions
- Identify parameter differences
- Compare timing patterns
- Analyze resource usage
- Examine external factors
- Look for environmental changes
Implement and Verify Fixes
- Test the same parameters
- Monitor in real-time
- Verify complete event sequence
- Check performance metrics
- Test edge cases
Monitoring Performance with Activity
Activity data is invaluable for performance optimization:Latency Analysis
Latency Analysis
- End-to-end latency: Total time from request to response
- Execution time: Time spent in actual tool execution
- External call latency: Time spent waiting for external services
- Processing overhead: Time spent in non-execution activities
Error Rate Tracking
Error Rate Tracking
- Overall error rate: Percentage of tool executions that fail
- Error breakdown by type: Distribution of different error categories
- Error trends: Changes in error rates over time
- Correlation analysis: Factors associated with higher error rates
Usage Pattern Analysis
Usage Pattern Analysis
- Usage frequency: How often each tool is called
- Parameter distributions: Common values and patterns
- Usage contexts: When and why tools are invoked
- User segmentation: Differences in tool usage across users
Optimizing Tool Execution
Use Activity data to drive execution optimizations:Parameter Optimization
- Add intelligent defaults for common values
- Implement parameter validation improvements
- Optimize parameter extraction from user inputs
- Add preprocessing for frequently used parameter formats
Execution Efficiency
- Identify and optimize slow execution steps
- Implement caching for frequent operations
- Reduce external API latency
- Optimize resource utilization
Error Reduction
- Add robust error handling for common failures
- Implement automatic retries for transient issues
- Improve validation to catch problems early
- Create fallback mechanisms for critical functions
Result Processing
- Optimize result formatting for LLM consumption
- Reduce result size for better context utilization
- Implement progressive result delivery for long operations
- Add enrichment for more valuable outputs
Custom Event Emission
You can emit custom events to enhance visibility into your tools:Custom Event Types
Custom Event Types
custom.finance-assistant.calculation.started
custom.support-agent.ticket.created
custom.inventory-tool.stock.checked
Emitting Custom Events
Emitting Custom Events
- Provides detailed visibility into tool execution stages
- Captures business-specific metrics
- Enables more nuanced performance analysis
- Creates richer debugging context
Event Payload Best Practices
Event Payload Best Practices
- Include identifiers: Always add request IDs, user IDs, and other correlation identifiers
- Add timestamps: Include timing information for performance analysis
- Provide context: Add relevant business context to make events meaningful
- Size appropriately: Include useful data without making events too large
- Structure consistently: Use consistent naming and structure across related events
Real-Time Monitoring
For critical tools, implement real-time monitoring using Activity:Set Up Real-Time Dashboards
- Error rates and types
- Execution latency
- Usage volume
- Resource utilization
- Business-specific metrics
Configure Alerts
- Error rate spikes
- Latency threshold violations
- Abnormal usage patterns
- Resource exhaustion warnings
- Custom business metric anomalies
Implement Event Subscribers
Monitor Service Health
- API response times
- Service availability
- Resource utilization
- Queue lengths
- Error distributions
Activity for Compliance and Audit
Beyond operational uses, Activity provides essential compliance capabilities:Audit Trails
- Complete chronological record of events
- User and system actions
- Parameter and result tracking
- Timing information
- Access evidence
Compliance Reporting
- Data access audit reports
- Processing evidence
- Security monitoring
- Policy enforcement verification
- Chain of custody documentation
Forensic Analysis
- Security incident investigation
- Error root cause analysis
- User behavior auditing
- System interaction reconstruction
- Performance issue diagnostics
Records Retention
- Retention period configuration
- Data archiving strategies
- Privacy compliance
- Data minimization
- Access controls
Best Practices for Activity Utilization
Develop an Event Strategy
Develop an Event Strategy
- Define an event taxonomy: Create a consistent naming and categorization system
- Identify key lifecycle events: Ensure all important state transitions emit events
- Balance detail and volume: Emit enough events for visibility without overwhelming storage
- Consider event consumers: Design with reporting, monitoring, and analysis needs in mind
- Document event types: Maintain clear documentation of all events and their meanings
Implement Effective Filtering
Implement Effective Filtering
- Use consistent metadata: Add standard fields like request IDs to enable correlation
- Include categorization data: Add tags, types, and categories for efficient filtering
- Consider time-based access: Optimize for common time-range queries
- Balance filter granularity: Too granular filters can be as problematic as too broad ones
- Test filter performance: Ensure filtering is efficient at production scale
Design for Scalability
Design for Scalability
- Implement data lifecycle management: Archive older events to control storage growth
- Consider sampling for high-volume events: For very frequent events, consider sampling
- Optimize query patterns: Design queries to use available indexes
- Leverage aggregation: Use pre-aggregated metrics for frequent analyses
- Plan for growth: Design with future scale in mind
Activity in AI Knowledge
For AI Knowledge users, Activity information is accessible through built-in interfaces:Access the Activity Log
- Chronological event listing
- Filtering by event type and date
- Search capabilities
- Drill-down for details
Monitor Tool Usage
- Tool usage frequency
- Success and error rates
- Performance metrics
- Parameter patterns
Analyze Conversation Flows
- Tool usage in conversation context
- User reactions to tool results
- Multi-turn tool interactions
- Conversation paths and patterns
Export Activity Data
- CSV for spreadsheet analysis
- JSON for programmatic processing
- Filtered or complete data sets
- Custom date ranges