Metadata-Version: 2.4
Name: MongoAgent
Version: 0.1.2
Summary: An Applicaiton help to communicate with mongo using chatgpt and AI
Author: Drjslab
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: pymongo
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# MongoAgent 🧠🔍

**MongoAgent** is an AI-powered assistant that helps generate and execute MongoDB queries using OpenAI. It supports intelligent querying, CRUD operations, collection/documentation exploration, and metadata generation.

## ✨ Features

- Connect to MongoDB
- Auto-generate queries using OpenAI (GPT-3.5)
- CRUD operations on collections and documents
- Smart prompt handling for listing collections
- Auto-inferred schema from sample documents
- Optional verbose logging for debugging
- Extendable for aggregation and custom operations

## How to install

```
pip install MongoAgent
```
## How to use?
```
from  MongoAgent import MongoAgent

agent = MongoAgent(mongoURL=..., openAI_token=..., db_name=...)
ai_query = agent.execute(prompt="show last 3 entries in logs table")
print("\n🤖 AI Response:\n", ai_query)
result = agent.execute_from_ai_query(ai_query)
print(result)
```
