Skip to content

Latest commit

Β 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Mediconvo

πŸš€ Next-Generation Voice-Activated EMR Assistant Powered by Agno AI Agents

Revolutionizing healthcare workflows with intelligent, multi-agent voice assistance that understands medical context and automates EMR interactions.

🎯 Project Overview

Mediconvo leverages the Agno framework - a cutting-edge multi-agent system platform - to deliver unprecedented intelligence and performance in healthcare voice assistance. The system uses specialized AI agents that understand medical context and coordinate seamlessly to handle complex EMR workflows.

πŸš€ Agno-Powered Features

  • ⚑ Ultra-Fast Performance: Agent instantiation in ~3ΞΌs (10,000x faster than traditional approaches)
  • 🧠 Advanced Reasoning: Built-in medical decision support with chain-of-thought reasoning
  • πŸ€– Intelligent Agent Teams: Coordinated multi-agent workflows for complex medical tasks
  • πŸ”„ Smart Routing: Automatic command classification and optimal agent selection
  • πŸ“Š Chart Management: Intelligent patient search, chart navigation, and medical record analysis
  • πŸ’Š Order Entry: Sophisticated lab, imaging, and medication order creation with validation
  • πŸ“§ Patient Communication: Professional messaging and specialist referral workflows
  • 🎯 Medical Context: Deep understanding of healthcare terminology and clinical workflows
  • πŸ”Œ EMR Integration: Advanced RESTful API adapters with FHIR compatibility
  • πŸ“ˆ Real-time Analytics: Performance monitoring and clinical decision insights

🎀 Advanced Voice Commands

Simple Commands:

  • "Open John Smith's chart and show me his recent labs"
  • "Order a CBC, CMP, and lipid panel for patient 12345"
  • "Get an urgent chest X-ray for Jane Doe in room 301"
  • "Send appointment reminder to all patients scheduled tomorrow"
  • "Refer patient to cardiology for acute chest pain evaluation"

Complex Multi-Agent Workflows:

  • "Find patient Miller, open their chart, order a stress test, and refer to cardiology"
  • "Search for diabetic patients due for HbA1c, create lab orders, and send reminders"
  • "Review patient 12345's medications, check for interactions, and update prescriptions"

πŸ—οΈ Agno-Powered Architecture

Built on the Agno framework for next-generation multi-agent intelligence:

Core Components

  • πŸŽ™οΈ Voice Recognition: Medical-optimized speech processing (Google Cloud, AWS Transcribe Medical)
  • πŸ€– Specialized Agents: Domain expert AI agents with medical knowledge
    • Chart Agent: Patient search, demographics, medical records
    • Order Agent: Labs, imaging, medications with clinical validation
    • Messaging Agent: Patient communication, specialist referrals
  • 🧠 Agent Team Orchestration: Intelligent coordination and workflow management
  • πŸ”§ Custom EMR Tools: Agno-native tools for seamless EMR integration
  • πŸ“Š Advanced Analytics: Real-time performance monitoring and clinical insights

Agno Framework Benefits

  • ⚑ 10,000x Performance: ~3ΞΌs agent instantiation vs. seconds with traditional LLMs
  • 🧠 Built-in Reasoning: Advanced chain-of-thought with medical context
  • πŸ”„ Team Coordination: Native multi-agent collaboration patterns
  • πŸ“ˆ Production Scale: Enterprise monitoring and optimization tools

πŸš€ Quick Start

Prerequisites

  • Python 3.8+
  • Agno Framework: Automatically installed via requirements
  • OpenAI API key or Anthropic API key (23+ providers supported)
  • (Optional) Google Cloud or AWS credentials for enhanced speech recognition

Installation

  1. Clone and setup:

    git clone <repository-url>
    cd mediconvo
    chmod +x start.sh
    ./start.sh
  2. Configure environment:

    cp .env.example .env
    # Edit .env with your API keys
  3. Run the Agno-powered application:

    # New Agno-powered API server
    python -m uvicorn src.main_v2:app --host 0.0.0.0 --port 8000 --reload
    
    # Agno interactive demo (recommended)
    python demo_agno.py
    
    # Legacy version (for comparison)
    python demo.py

Environment Configuration

Required environment variables in .env:

# Agno Model Configuration (choose one or multiple)
OPENAI_API_KEY=your_openai_api_key_here
ANTHROPIC_API_KEY=your_anthropic_api_key_here
MODEL_PROVIDER=openai  # or anthropic

# EMR Integration
EMR_BASE_URL=https://your-emr-api.com/api/v1
EMR_API_KEY=your_emr_api_key

# Optional: Enhanced Speech Recognition
SPEECH_PROVIDER=local  # or google, aws
GOOGLE_APPLICATION_CREDENTIALS=path/to/google-credentials.json
AWS_ACCESS_KEY_ID=your_aws_access_key
AWS_SECRET_ACCESS_KEY=your_aws_secret_key

πŸ“‹ API Endpoints

Agno-Powered REST API

  • GET / - API information with agent capabilities
  • GET /health - Health check with Agno agent status
  • POST /process-command - Process commands with intelligent agent routing
  • GET /help - Comprehensive agent capabilities and examples
  • GET /capabilities - Detailed agent function listings
  • GET /metrics - Real-time performance analytics
  • POST /demo - Interactive demo endpoint
  • WebSocket /voice - Real-time voice processing with agent coordination

Example API Usage

# Test Agno agent command processing
curl -X POST "http://localhost:8000/process-command" \
  -H "Content-Type: application/json" \
  -d '{"text": "Find patient Smith, order CBC, and send lab notification"}'

# Get comprehensive agent capabilities
curl "http://localhost:8000/capabilities"

# View performance metrics
curl "http://localhost:8000/metrics"

# Try demo commands
curl -X POST "http://localhost:8000/demo" \
  -H "Content-Type: application/json" \
  -d '{"text": "list"}'

πŸ§ͺ Testing

# Run all tests (including Agno agent tests)
pytest

# Test Agno-powered agents
pytest tests/test_agno_agents.py

# Test legacy components
pytest tests/test_voice_recognition.py
pytest tests/test_chart_agent.py
pytest tests/test_integration.py

# Run with coverage
pytest --cov=src tests/

πŸ“ˆ Performance Metrics

Agno Framework Performance Advantages

Metric Traditional LLM Agno-Powered Improvement
Agent Startup 2-5 seconds ~3 microseconds 10,000x faster
Memory Usage High variable ~6.5KiB per agent Minimal footprint
Response Time 3-8 seconds 0.5-2 seconds 4x faster
Reasoning Quality Basic Advanced chain-of-thought Superior
Error Recovery Manual Self-correcting Automatic

Key Performance Indicators

  • ⚑ Agent Performance: Ultra-fast instantiation and execution
  • 🧠 Reasoning Accuracy: Medical decision support quality
  • πŸ”„ Workflow Coordination: Multi-agent task completion rates
  • 🎯 Intent Classification: Command routing accuracy
  • πŸ“Š EMR Integration: Backend API response times

Access real-time metrics via /metrics endpoint with Agno monitoring integration.

πŸ”§ Development

Project Structure

mediconvo/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ agents_v2/       # πŸ€– Agno-powered agents
β”‚   β”œβ”€β”€ tools/          # πŸ”§ Custom EMR tools for Agno
β”‚   β”œβ”€β”€ orchestration_v2/ # 🧠 Agno team coordination
β”‚   β”œβ”€β”€ agents/         # Legacy agent implementation
β”‚   β”œβ”€β”€ voice/          # Speech recognition
β”‚   β”œβ”€β”€ emr/           # EMR integration
β”‚   β”œβ”€β”€ orchestration/ # Legacy command processing
β”‚   └── utils/         # Utilities and metrics
β”œβ”€β”€ tests/             # Test suites (including Agno tests)
β”œβ”€β”€ docs/              # Documentation + Agno architecture
β”œβ”€β”€ demo_agno.py      # πŸš€ Agno-powered demo
β”œβ”€β”€ demo.py           # Legacy demo
β”œβ”€β”€ main_v2.py        # πŸš€ Agno-powered FastAPI app
└── start.sh          # Startup script

Adding New Agno Agents

from agno.agent import Agent
from agno.models.openai import OpenAI
from agno.tools.reasoning import ReasoningTools
from src.tools.emr_tools import EMRTools

# Create specialized medical agent
new_agent = Agent(
    name="Specialized Medical Agent",
    model=OpenAI(id="gpt-4-1106-preview"),
    tools=[
        ReasoningTools(add_instructions=True),
        EMRTools(),
        CustomMedicalTool()
    ],
    instructions="Specialized medical instructions...",
    markdown=True,
    show_tool_calls=True
)

# Add to team
agent_team.team.members.append(new_agent)

See docs/AGNO_ARCHITECTURE.md for comprehensive development guidelines.

πŸ₯ EMR Integration

Mediconvo is designed to integrate with existing EMR systems via REST APIs. The EMR client supports:

  • Patient Search and Retrieval
  • Chart Access and Navigation
  • Order Creation (Labs, Imaging, Medications)
  • Patient Messaging
  • Referral Management

For EMR vendors: Implement the standard REST endpoints documented in the EMR client module.

πŸ”’ Security and Compliance

  • PHI Protection: No patient data logged or cached
  • Authentication: Support for API keys and OAuth 2.0
  • Encryption: All API communications use HTTPS
  • Audit Trails: Complete logging of all EMR actions
  • Role-Based Access: Integration with existing provider credentials

πŸ“ž Support and Contributing

Issues and Feature Requests

  • Report bugs via GitHub Issues
  • Feature requests welcome
  • Include logs and configuration details

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Add tests for new functionality
  4. Submit a pull request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

🎯 Roadmap

Phase 1 βœ… (Current)

  • Voice recognition and basic agent system
  • Chart opening and patient search
  • Order entry for labs, imaging, medications
  • Basic testing and documentation

Phase 2 (Coming Soon)

  • Enhanced speech recognition accuracy
  • Advanced natural language understanding
  • Integration with major EMR systems
  • Real-time collaboration features

Phase 3 (Future)

  • Mobile application support
  • Advanced analytics and insights
  • Multi-language support
  • HIPAA compliance certification

Built with ❀️ for healthcare providers

About

Voice-activated AI medical records assistant using Agno multi-agent framework. Natural language EMR interaction with speech recognition, FHIR-compatible patient chart management & clinical workflow orchestration via FastAPI.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages