Spaces:
Running
Running
File size: 2,418 Bytes
c2ea5ed |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
"""
Input Processing and Analysis
This module handles the first stage of the agent monitoring pipeline:
- Trace uploading and validation
- Content analysis and log type detection
- Boundary detection and semantic analysis
- Text chunking and preprocessing
Functional Organization:
- trace_management: Trace operations and lifecycle management
- content_analysis: Log type detection, boundary detection, semantic analysis
- text_processing: Text chunking, splitting strategies, and preprocessing
Usage:
from agentgraph.input.trace_management import analyze_trace_characteristics
from agentgraph.input.content_analysis import LogTypeDetector
from agentgraph.input.text_processing import ChunkingService
"""
# Import main components
from .trace_management import (
analyze_trace_characteristics, display_trace_summary, preprocess_content_for_cost_optimization
)
from .content_analysis import (
LogType, LogTypeDetector, DetectionResult,
BoundaryDetector, AgentBoundary, BoundaryType, BoundaryConfidence,
BaseBoundaryDetector, FrameworkSpecificDetector, GenericAgentPatternDetector, StructuralDetector,
SemanticAnalyzer, SemanticBreakpoint, SemanticSegment
)
from .text_processing import (
ChunkingService,
TextChunk, BaseSplitter, CharacterSplitter, JSONSplitter,
AgentAwareSemanticSplitter, PromptInteractionSplitter
)
from .parsers import (
BaseTraceParser, LangSmithParser, ParsedMetadata,
create_parser, detect_trace_source, parse_trace_with_context,
get_context_documents_for_source
)
__all__ = [
# Trace analysis
'analyze_trace_characteristics', 'display_trace_summary', 'preprocess_content_for_cost_optimization',
# Content analysis
'LogType', 'LogTypeDetector', 'DetectionResult',
'BoundaryDetector', 'AgentBoundary', 'BoundaryType', 'BoundaryConfidence',
'BaseBoundaryDetector', 'FrameworkSpecificDetector', 'GenericAgentPatternDetector', 'StructuralDetector',
'SemanticAnalyzer', 'SemanticBreakpoint', 'SemanticSegment',
# Text processing
'ChunkingService',
'TextChunk', 'BaseSplitter', 'CharacterSplitter', 'JSONSplitter',
'AgentAwareSemanticSplitter', 'PromptInteractionSplitter',
# Platform-specific parsers
'BaseTraceParser', 'LangSmithParser', 'ParsedMetadata',
'create_parser', 'detect_trace_source', 'parse_trace_with_context',
'get_context_documents_for_source'
] |