Skip to main content

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)

Source distribution for MongoAgent 0.1.2
File Size Uploaded
mongoagent-0.1.2.tar.gz 3.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for MongoAgent 0.1.2
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page