Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

result_parser_agent-0.3.2.tar.gz (97.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

result_parser_agent-0.3.2-py3-none-any.whl (26.0 kB view details)

Uploaded Python 3

File details

Details for the file result_parser_agent-0.3.2.tar.gz.

File metadata

  • Download URL: result_parser_agent-0.3.2.tar.gz
  • Upload date:
  • Size: 97.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for result_parser_agent-0.3.2.tar.gz
Algorithm Hash digest
SHA256 3cc28c4c35d1a9dd2f631dc4f6fc128c0a630a70acd4a224ff20614184031b5f
MD5 7d94e328af920a5d206de96f9058a406
BLAKE2b-256 3f91b4826a6bca179d4086515edc0f808ef3cb62261657d12936a4b2538d2db4

See more details on using hashes here.

File details

Details for the file result_parser_agent-0.3.2-py3-none-any.whl.

File metadata

File hashes

Hashes for result_parser_agent-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c0e160e29fbb199c03a4642fd8add8b0a196708a753bb0c02485cc944dd199c1
MD5 030acb4c747d63447c361473474c4ec9
BLAKE2b-256 3a5f12db26fda432a28f69169f42dee020cfb657c0b241a219152a73c0ad0a94

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page