Skip to main content

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.

Release files for mindful-agents 25.3.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 mindful-agents 25.3.2
File Size Uploaded
mindful_agents-25.3.2.tar.gz 30.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mindful-agents 25.3.2
File Interpreter ABI Platform
mindful_agents-25.3.2-py3-none-any.whl Python 3 none any Details

Total release size: 60.7 kB

Release files / mindful_agents-25.3.2.tar.gz

Download URL mindful_agents-25.3.2.tar.gz
Size 30.4 kB
Tags Source
SHA-256 checksum
How to use checksums
0ca6cd1e8f0bd9e8b6fdaad6c906270d0a24341c003d906185f52d407777a7d7
BLAKE2b-256 checksum
How to use checksums
40f200d8bc6de1f5ad4e0f60d3347cb3c3722789ffb81cbeef376fcb5e824def
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.10.11

Release files / mindful_agents-25.3.2-py3-none-any.whl

Download URL mindful_agents-25.3.2-py3-none-any.whl
Size 30.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0180ff5284806ea19d4ad1d34879b2cc0e542d5c372578ea9d4fb58a07045bf6
BLAKE2b-256 checksum
How to use checksums
12158e64cad62b8aec1a1f32a8d117afa6f22ccfa64b8ffee4a4991338e45984
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.10.11

Release history Release notifications | RSS feed

This release

25.3.2 This release

2 release files

25.3.1

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