Skip to main content

A powerful toolkit for interacting with large language models featuring vision capabilities and customizable agents.

Project description

mindful-agents

A powerful toolkit for interacting with large language models featuring vision capabilities and customizable agents.

Installation

pip install mindful-agents

Key Features

  • 🤖 Multimodal Conversations
    • Text and image-based chat
    • Support for multiple images
    • Customizable system prompts
  • 🔄 Flexible Integration
    • Interactive CLI chat
    • REST API server
    • Python library
  • 💾 History Management
    • Save conversations (JSON/TXT/Markdown)
    • Load and continue chats
    • Organized by date and session

Usage

Python Library

from mindful_agents import MindfulAgents

# Initialize
mindful = MindfulAgents(
    mode='default', # Mode (default/chat/api)
    log_on=True, # Enable logging
    log_to='logs', # Log directory
    model='omni', # Model selection
    save_to='outputs', # History save path
    save_as='json', # Save format (json/txt/md)
    timeout=60 # Request timeout
)

# Text chat
response, history = mindful.get_completions(
    prompt="Your question here",
    agent='default',          # Agent type
    instruction=None,         # Custom system prompt
    history=None,            # Optional chat history
    chat_id=None             # Optional chat ID
)

# Image analysis
response, history = mindful.get_completions(
    prompt="Analyze this image",
    image_path="image.jpg", # Single image
    # OR
    image_path=["img1.jpg", "img2.jpg"],  # Multiple images
    agent='default', # Agent type
    instruction=None, # Custom system prompt
    history=None, # Optional chat history
    chat_id=None # Optional chat ID
)

# Load chat history
history = mindful.load_history("path/to/history.json")

Interactive CLI

Start the chat interface:

from mindful_agents import MindfulAgents
MindfulAgents(mode='chat')
# OR
mindful = MindfulAgents()
mindful.start_chat(
    agent='default', # Agent type
    instruction=None # Custom system prompt
)

Available commands:

  • /exit - Exit chat
  • /reset - Reset conversation
  • /image "path" "question" - Send image
  • /image ["path1", "path2"] "question" - Send multiple images
  • /instruction "new prompt" - Change system prompt
  • /load "history.json" - Load chat history
  • /help - Show commands

REST API

Start the Flask API server:

from mindful_agents import MindfulAgents
MindfulAgents(mode='api')
# OR
mindful = MindfulAgents()
mindful.start_api(
    host="0.0.0.0", # Server host
    port=5000, # Server port
    debug=False # Enable debug mode
)

API Endpoints

  • POST /v1/api/get/completions

Configuration

Save Formats

  • json (default) - Complete conversation data
  • txt - Plain text format
  • md - Markdown format with images

Chat History

Chat histories are automatically saved and organized:

{save_to}/
  └── YYYY-MM-DD/
      └── YYYYMMDD_HHMMSS_UUID8.{format}

License

See LICENSE for details.

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

mindful_agents-25.3.2.tar.gz (30.4 kB view details)

Uploaded Source

Built Distribution

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

mindful_agents-25.3.2-py3-none-any.whl (30.2 kB view details)

Uploaded Python 3

File details

Details for the file mindful_agents-25.3.2.tar.gz.

File metadata

  • Download URL: mindful_agents-25.3.2.tar.gz
  • Upload date:
  • Size: 30.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.11

File hashes

Hashes for mindful_agents-25.3.2.tar.gz
Algorithm Hash digest
SHA256 0ca6cd1e8f0bd9e8b6fdaad6c906270d0a24341c003d906185f52d407777a7d7
MD5 a6d85e275d4e1199e06e8e53da74dc49
BLAKE2b-256 40f200d8bc6de1f5ad4e0f60d3347cb3c3722789ffb81cbeef376fcb5e824def

See more details on using hashes here.

File details

Details for the file mindful_agents-25.3.2-py3-none-any.whl.

File metadata

File hashes

Hashes for mindful_agents-25.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0180ff5284806ea19d4ad1d34879b2cc0e542d5c372578ea9d4fb58a07045bf6
MD5 3255ba10fc49afba2e6778978eea94ce
BLAKE2b-256 12158e64cad62b8aec1a1f32a8d117afa6f22ccfa64b8ffee4a4991338e45984

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