Skip to main content

An Applicaiton help to communicate with mongo using chatgpt and AI

Project description

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)

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

mongoagent-0.1.1.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

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

mongoagent-0.1.1-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file mongoagent-0.1.1.tar.gz.

File metadata

  • Download URL: mongoagent-0.1.1.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for mongoagent-0.1.1.tar.gz
Algorithm Hash digest
SHA256 558beeec1c84f8d5482b4a66dac299cfd7af11f946ae5592608d43e18f692ef3
MD5 c53b10c7a3b3808b3daee7e28a8744ce
BLAKE2b-256 8dd05fa62189b61879fde77f42fe16fe52b13d527fabe4cfc046ee1c4f5e7825

See more details on using hashes here.

File details

Details for the file mongoagent-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: mongoagent-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for mongoagent-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9bd7662091db6a87a41b0ed06f08ca6e42bb012af5b2d90907aba44dd77654ec
MD5 6026a2008f5e26a9cecc9f6b9ae5ea1e
BLAKE2b-256 7af01f6824bd7431bcbf2ef3a3e5d986170b2ca915d6254453886776c996c4c2

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