A deep agent for extracting metrics from raw result files using LangGraph and intelligent parsing
Project description
🎯 Results Parser Agent
A powerful, intelligent agent for extracting metrics from raw result files using LangGraph and AI-powered parsing. The agent automatically analyzes unstructured result files and extracts specific metrics into structured JSON output with high accuracy.
🚀 Features
- 🤖 AI-Powered Parsing: Uses advanced LLMs (OpenAI GPT-4o, GROQ, Anthropic, Google Gemini, Ollama) for intelligent metric extraction
- 📁 Flexible Input: Process single files or entire directories of result files
- 🎯 Pattern Recognition: Automatically detects and adapts to different file formats and structures
- ⚙️ Simple Configuration: Environment variable-based configuration with sensible defaults
- 📊 Structured Output: Direct output in Pydantic schemas for easy integration
- 🛠️ Professional CLI: Simple, intuitive command-line interface
- 🔧 Python API: Easy integration into existing Python applications
- 🔄 Error Recovery: Robust error handling and retry mechanisms
📦 Installation
Quick Install (Recommended)
pip install result-parser-agent
Development Install
# Clone the repository
git clone https://github.com/Infobellit-Solutions-Pvt-Ltd/result-parser-agent.git
cd result-parser-agent
# Install with uv (recommended)
curl -LsSf https://astral.sh/uv/install.sh | sh
uv sync
uv pip install -e .
# Or install with pip
pip install -e .
📋 Configuration
Environment Variables
Create a .env file in your project directory:
# API Keys - Set only the one you need
OPENAI_API_KEY=your_openai_api_key_here
GROQ_API_KEY=your_groq_api_key_here
ANTHROPIC_API_KEY=your_anthropic_api_key_here
GOOGLE_API_KEY=your_google_api_key_here
# Optional: Override default LLM settings
LLM_PROVIDER=openai
LLM_MODEL=gpt-4o
🎯 Quick Start
1. Set up your API key
# For OpenAI (default - recommended)
export OPENAI_API_KEY="your-openai-api-key-here"
# For GROQ
export GROQ_API_KEY="your-groq-api-key-here"
# For Anthropic
export ANTHROPIC_API_KEY="your-anthropic-api-key-here"
# For Google Gemini
export GOOGLE_API_KEY="your-google-api-key-here"
2. Use the CLI
# Parse all files in a directory (uses default metrics)
result-parser ./benchmark_results
# Parse with specific metrics
result-parser ./benchmark_results --metrics "RPS,latency,throughput"
# Parse a single file
result-parser ./results.txt --metrics "accuracy,precision"
# Custom output file
result-parser ./results/ --output my_results.json
# Verbose output
result-parser ./results/ --verbose
# Show setup instructions
result-parser setup
3. Use the Python API
from result_parser_agent import ResultsParserAgent, settings
import os
# Set your API key
os.environ["OPENAI_API_KEY"] = "your-api-key-here"
# Get default configuration
config = settings
# Initialize agent
agent = ResultsParserAgent(config)
# Parse results (file or directory)
results = await agent.parse_results(
input_path="./benchmark_results", # or "./results.txt"
metrics=["RPS", "latency", "throughput"]
)
# Output structured data
print(results.json(indent=2))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file result_parser_agent-0.3.1.tar.gz.
File metadata
- Download URL: result_parser_agent-0.3.1.tar.gz
- Upload date:
- Size: 97.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d02b7efa7368ac8158212e421bbf88913cb05231d3bfc3303f445326d9ff8520
|
|
| MD5 |
ee9c5e9ce7615c527d03b99cf18b4b3b
|
|
| BLAKE2b-256 |
89049f522b87bad0247309e0c208c62b93dd842d92aa86df184759e34017573a
|
File details
Details for the file result_parser_agent-0.3.1-py3-none-any.whl.
File metadata
- Download URL: result_parser_agent-0.3.1-py3-none-any.whl
- Upload date:
- Size: 26.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e73f42bfa6479348eb425e956f8a2cd278e2d869ff6f0e6694600caa588699a5
|
|
| MD5 |
c4869b951e52c62e2221d3599918b438
|
|
| BLAKE2b-256 |
ebd0164bd5da85a9dcf3912283b99b67db75ef9c9463fa10cbda3e9407273699
|