Jaiqu  by AgentOps-AI

AI agent for JSON schema transformation

created 1 year ago
333 stars

Top 83.6% on sourcepulse

GitHubView on GitHub
Project Summary

Jaiqu is an AI-powered agent designed to automatically transform JSON data between arbitrary schemas using natural language prompts and the jq query language. It is targeted at developers building AI agents or anyone needing to programmatically restructure JSON data, offering a way to generate repeatable jq queries without manual coding.

How It Works

Jaiqu leverages GPT-4 to iteratively generate jq query syntax. It takes a source JSON, a target schema (defined using JSON Schema), and optional hints to guide the AI. The agent maps keys semantically, handling variations like "datetime" vs. "date_time", and validates the generated jq query against the input JSON and target schema. This approach automates a complex and often tedious data transformation process, reducing manual effort and potential errors.

Quick Start & Requirements

  • Install: pip install jaiqu
  • Prerequisites: Python 3.9 or 3.10. Requires an OpenAI API key (implicitly used by GPT-4).
  • Demo: AgentOps Live Demo Video
  • CLI Usage: jaiqu -s schema.json -d data.json

Highlighted Details

  • Automatically generates jq queries from natural language descriptions of target schemas.
  • Supports fuzzy key matching based on semantic similarity.
  • Includes schema validation to ensure required data is present.
  • Can be used programmatically via Python API or via a CLI.

Maintenance & Community

Licensing & Compatibility

  • License: MIT License.
  • Compatibility: Permissive MIT license allows for commercial use and integration into closed-source projects.

Limitations & Caveats

  • Currently limited to Python 3.9 and 3.10.
  • Relies on GPT-4, which incurs API costs and may have variable performance.
  • The CLI example shows a high number of retries for validation and translation, indicating potential instability or complexity in query generation for certain inputs.
Health Check
Last commit

4 months ago

Responsiveness

1+ week

Pull Requests (30d)
0
Issues (30d)
0
Star History
6 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.