AI agent framework with email, file, and voice processing
Project description
AgentFather
A comprehensive AI agent framework with email, file, and voice processing capabilities built on top of LangChain.
Features
- ๐ค AI Agent Framework: Built on LangChain for intelligent automation
- ๐ง Email Processing: Advanced email handling and automation
- ๐ File Management: Comprehensive file operations and processing
- ๐ค Voice Processing: Speech recognition and text-to-speech capabilities
- ๐ง Modular Design: Easy to extend and customize
- ๐ Production Ready: Includes testing, documentation, and deployment tools
Installation
From PyPI (Recommended)
pip install agentfather
From Source
git clone https://github.com/yourusername/agentfather.git
cd agentfather
pip install -e .
Development Installation
git clone https://github.com/yourusername/agentfather.git
cd agentfather
pip install -e ".[dev,test,docs]"
Quick Start
Basic Usage
from agentfather import AgentFather
# Initialize the agent
agent = AgentFather()
# Process an email
result = agent.process_email("user@example.com", "Hello, I need help with my order")
# Process a file
result = agent.process_file("document.pdf")
# Process voice input
result = agent.process_voice("audio.wav")
Command Line Interface
# Run the agent interactively
agentfather
# Process specific tasks
agentfather email --input "user@example.com"
agentfather file --input "document.pdf"
agentfather voice --input "audio.wav"
Project Structure
agentfather/
โโโ agentfather/ # Main package
โ โโโ __init__.py
โ โโโ core/ # Core functionality
โ โ โโโ __init__.py
โ โ โโโ agent.py
โ โ โโโ config.py
โ โโโ email/ # Email processing
โ โ โโโ __init__.py
โ โ โโโ email_functions.py
โ โ โโโ Email.py
โ โโโ files/ # File processing
โ โ โโโ __init__.py
โ โ โโโ path_functions.py
โ โ โโโ path.py
โ โโโ voice/ # Voice processing
โ โ โโโ __init__.py
โ โ โโโ voice_functions.py
โ โ โโโ Vosk.py
โ โ โโโ eleven_labs.py
โ โโโ utils/ # Utilities
โ โ โโโ __init__.py
โ โ โโโ langchain_imports.py
โ โ โโโ rag_functions.py
โ โ โโโ file_functions.py
โ โโโ cli.py # Command line interface
โโโ DummyData/ # Sample data
โโโ tests/ # Test suite
โโโ docs/ # Documentation
โโโ setup.py # Package setup
โโโ pyproject.toml # Modern package configuration
โโโ README.md # This file
โโโ LICENSE # License file
โโโ CHANGELOG.md # Version history
โโโ .gitignore # Git ignore rules
โโโ requirements.txt # Dependencies
โโโ requirements-dev.txt # Development dependencies
โโโ MANIFEST.in # Package manifest
Configuration
Create a .env file in your project root:
# OpenAI Configuration
OPENAI_API_KEY=your_openai_api_key_here
# Email Configuration
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_USER=your_email@gmail.com
EMAIL_PASSWORD=your_app_password
# Voice Configuration
ELEVENLABS_API_KEY=your_elevenlabs_api_key
VOSK_MODEL_PATH=/path/to/vosk/model
# Database Configuration
DATABASE_URL=postgresql://user:password@localhost/dbname
# Redis Configuration
REDIS_URL=redis://localhost:6379
Usage Examples
Email Processing
from agentfather.email import EmailProcessor
processor = EmailProcessor()
# Process incoming emails
emails = processor.fetch_emails()
for email in emails:
response = processor.process_email(email)
processor.send_response(email.sender, response)
File Processing
from agentfather.files import FileProcessor
processor = FileProcessor()
# Process different file types
processor.process_pdf("document.pdf")
processor.process_docx("document.docx")
processor.process_image("image.png")
Voice Processing
from agentfather.voice import VoiceProcessor
processor = VoiceProcessor()
# Speech to text
text = processor.speech_to_text("audio.wav")
# Text to speech
processor.text_to_speech("Hello, world!", "output.wav")
RAG (Retrieval-Augmented Generation)
from agentfather.utils import RAGProcessor
rag = RAGProcessor()
# Add documents to knowledge base
rag.add_documents(["doc1.pdf", "doc2.txt"])
# Query the knowledge base
response = rag.query("What is the main topic?")
Development
Setting up Development Environment
# Clone the repository
git clone https://github.com/yourusername/agentfather.git
cd agentfather
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install development dependencies
pip install -e ".[dev,test,docs]"
# Install pre-commit hooks
pre-commit install
Running Tests
# Run all tests
pytest
# Run with coverage
pytest --cov=agentfather
# Run specific test categories
pytest -m unit
pytest -m integration
pytest -m "not slow"
Code Quality
# Format code
black agentfather/
isort agentfather/
# Lint code
flake8 agentfather/
mypy agentfather/
# Security check
bandit -r agentfather/
safety check
Building Documentation
# Build docs
cd docs
make html
# Serve docs locally
python -m http.server 8000
Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Development Guidelines
- Follow PEP 8 style guidelines
- Write comprehensive tests for new features
- Update documentation for any API changes
- Use type hints for all function parameters and return values
- Write clear commit messages
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
- ๐ง Email: support@agentfather.com
- ๐ฌ Discord: Join our community
- ๐ Documentation: Read the docs
- ๐ Issues: Report a bug
Changelog
See CHANGELOG.md for a list of changes and version history.
Acknowledgments
- LangChain for the AI framework
- OpenAI for language models
- ElevenLabs for voice synthesis
- Vosk for speech recognition
Roadmap
- Web UI interface
- Mobile app support
- Multi-language support
- Advanced analytics dashboard
- Plugin system
- Cloud deployment templates
- Enterprise features
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agentfather-1.0.0.tar.gz.
File metadata
- Download URL: agentfather-1.0.0.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
82bdc9d055361ea79d192e2e9688e6333c173fd523a6162b4fbd4c3e748c3d5e
|
|
| MD5 |
b451227880dd5c1ea645f7726624af7b
|
|
| BLAKE2b-256 |
c85f19d3b99f0c808688cea4866d34fac20adc50b9ec550243d457409dad72df
|
File details
Details for the file agentfather-1.0.0-py3-none-any.whl.
File metadata
- Download URL: agentfather-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5bce038c5ec6544cc4c70a082fb85596175a1acd43515a1db1ce4345191d9fa
|
|
| MD5 |
eef4fe106aa3b1ac0e253ed187458f20
|
|
| BLAKE2b-256 |
febdb121b7ab3fe78737c4c2b4bac80a625ad218720b38364ef1364ee1951ebb
|