Skip to main content

A flexible multi-agent AI framework

Project description

MedhaAI

MedhaAI is an advanced AI agent framework with minimal abstraction, designed for easy integration of language models and web scraping capabilities.

Features

  • Support for multiple LLM providers (OpenAI and Anthropic)
  • Advanced web scraping tool
  • Flexible agent system for complex task execution
  • Built-in error handling and logging
  • Easy configuration management

Installation

pip install medhaai

Quick Start

import asyncio
from medhaai import MedhaConfig, MedhaLLM, MedhaAgent, ToolKit

async def main():
    config = MedhaConfig(
        openai_api_key="your_openai_api_key_here",
        model_name="gpt-3.5-turbo"
    )
    llm = MedhaLLM(config)
    toolkit = ToolKit()
    agent = MedhaAgent(llm, toolkit)
    
    result = await agent.run("Research the latest advancements in quantum computing")
    print(result)

asyncio.run(main())

Documentation

For full documentation, visit docs.medhaai.com.

Advanced Usage

Using Different LLM Providers

MedhaAI supports both OpenAI and Anthropic models. Here's how to use an Anthropic model:

config = MedhaConfig(
    anthropic_api_key="your_anthropic_api_key_here",
    model_name="claude-2"
)
llm = MedhaLLM(config)

Custom Web Scraping

You can use the web scraping tool directly:

from medhaai import AdvancedWebScraperTool

scraper = AdvancedWebScraperTool()
result = await scraper.scrape("https://example.com")
print(result)

Error Handling

MedhaAI provides custom exceptions for better error handling:

from medhaai.exceptions import MedhaAIException

try:
    result = await agent.run("Some task")
except MedhaAIException as e:
    print(f"An error occurred: {str(e)}")

Contributing

Contributions are welcome! Please see our Contributing Guide for more details.

License

This project is licensed under the MIT License - see the LICENSE file 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

medhaai-0.1.0.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

medhaai-0.1.0-py3-none-any.whl (14.0 kB view details)

Uploaded Python 3

File details

Details for the file medhaai-0.1.0.tar.gz.

File metadata

  • Download URL: medhaai-0.1.0.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.4

File hashes

Hashes for medhaai-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5ddb91534490ee891e78acecf23849cd38ec95e1f63232ea4395870583f0129d
MD5 9b12ec3b378296efdeb452702bea4d0c
BLAKE2b-256 51cde4cd015ab4e15c0d281ae0eab2c34dc3ef4c5026216bd760b61b4964adc8

See more details on using hashes here.

File details

Details for the file medhaai-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: medhaai-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.4

File hashes

Hashes for medhaai-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7658fce798789e5bd90afe371a1ee78246e23846d77b6576fb072fe08f8ca7ec
MD5 7943777e609eb86159114db7af30f836
BLAKE2b-256 6f8ddef2d9894bba7f05483269b959c86dd88c965f54f04927944d0389649288

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page