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)
Release files for MongoAgent 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mongoagent-0.1.2.tar.gz | 3.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mongoagent-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.7 kB
Release files / mongoagent-0.1.2.tar.gz
| Download URL | mongoagent-0.1.2.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
784963fe6f0f479126993e6a5a1298d11b7a869e65f0efa8040d04acee5e08d8
|
|
BLAKE2b-256 checksum How to use checksums |
a7169019b8d5527764439f06f970f5f577dbaac52893b33bd661ef1fc872a2d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.4
|
Release files / mongoagent-0.1.2-py3-none-any.whl
| Download URL | mongoagent-0.1.2-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8d645e9f5eea3525c8466466d71eeda7690ef19c0fb239e6981eb9fed3eb8ced
|
|
BLAKE2b-256 checksum How to use checksums |
a4c730cdddf7d0d359a13b97aa8b3d95d7038d75f9f1df636e648471b6e27af8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.4
|