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:

mindful = 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:

mindful = MindfulAgents(mode='api')
# OR
mindful = MindfulAgents()
mindful.start_api(
    host="0.0.0.0", # Server host
    port=6463, # 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.1.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.1-py3-none-any.whl (30.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mindful_agents-25.3.1.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.1.tar.gz
Algorithm Hash digest
SHA256 0db68fbfe81901c22c0eb12c8502f825897a8ef137e94648a5719d858135ea87
MD5 1fec1d652139a54ce6cbd74796f92493
BLAKE2b-256 6628c96fb6763937eea18caa820acac24585e935a70eac7efd9929eff8b29adc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mindful_agents-25.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e77da505d7d4ac5837adc2479d17bb2b061719150fe655087c869edf42327005
MD5 e2a488acfa97713a360ccf045d3030c1
BLAKE2b-256 aef6ddc28f689ac75c0249180e91abbeeab81c5c196a0685fa0cafaef26bd7dd

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