hexaeight-mcp-client


Namehexaeight-mcp-client JSON
Version 1.6.802 PyPI version JSON
download
home_pageNone
SummaryFramework-agnostic MCP client integration for HexaEight agents
upload_time2025-07-15 10:51:40
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords mcp agent hexaeight multi-agent identity security autogen crewai langchain
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # HexaEight MCP Client

🚀 **Framework-agnostic MCP integration with secure LLM configuration, automatic multi-agent coordination, and military-grade encryption.**

Build sophisticated multi-agent systems with minimal code while maintaining complete security and framework choice.

## 🌟 Key Features

- 🔐 **Secure LLM Configuration** - Encrypt API keys and endpoints with HexaEight's military-grade encryption
- 🤖 **Framework Integration** - AutoGen, CrewAI, LangChain with encrypted LLM configs  
- 🛠️ **Multi-Agent Types** - LLM agents, Tool agents, User agents with automatic coordination
- 🌐 **Automatic Discovery** - Dynamic capability discovery and intelligent message routing
- 📡 **PubSub Coordination** - Seamless agent communication and task delegation
- ⚡ **One-Line Setup** - From configuration to production-ready agents instantly
- 🎯 **Business Logic** - Write your actual API/database code once in tool agents
- 🔒 **Production Security** - Zero plain-text secrets, secure agent identity management

## 📋 Requirements

### Core Requirements

1. **HexaEight License** 
   - Purchase from [store.hexaeight.com](https://store.hexaeight.com)
   - Install on your development/production machine
   - Enables creation of **1 parent configuration** + **unlimited child configurations**

2. **HexaEight Agentic IAM Server** *(Releasing Soon)*
   - Create CLIENT Application (CLIENTID) 
   - Provisions PubSub server bonded to your CLIENTID
   - Enables seamless agent communication

3. **Python Environment**
   - Python 3.8+
   - .NET SDK (for agent creation)

### Agent Licensing Model

| Agent Type | License Requirement | Expiry Behavior |
|------------|--------------------|-----------------| 
| **Parent Agents** | ✅ Active HexaEight license required | ❌ Stop working when license expires |
| **Child Agents** | ✅ Created with valid license | ✅ Continue working after license expires |

**Note**: All agents (parent and child) are tied to your CLIENT Application (CLIENTID).

## 🚀 Installation

```bash
# Basic installation
pip install hexaeight-mcp-client

# With framework support
pip install hexaeight-mcp-client[autogen]    # For AutoGen
pip install hexaeight-mcp-client[crewai]     # For CrewAI
pip install hexaeight-mcp-client[langchain]  # For LangChain
pip install hexaeight-mcp-client[all]        # All frameworks
```

### Prerequisites

```bash
# Core HexaEight agent package
pip install hexaeight-agent

# Optional: Framework packages
pip install pyautogen  # For AutoGen integration
pip install crewai     # For CrewAI integration  
pip install langchain  # For LangChain integration
```

## 🔐 Secure LLM Configuration

### Encrypt Your LLM Configuration

```python
from hexaeight_mcp_client import HexaEightAutoConfig, quick_autogen_llm

# Your sensitive LLM configuration
llm_config = {
    "provider": "openai",
    "api_key": "sk-your-actual-openai-api-key-here",  # Real API key
    "model": "gpt-4",
    "temperature": 0.7,
    "max_tokens": 1000
}

# Create agent for encryption capabilities
agent = await quick_autogen_llm('parent_config.json')

# Encrypt and protect your configuration
protector = HexaEightAutoConfig.create_llm_config_protector(agent.hexaeight_agent)
protector.save_protected_config(llm_config, "secure_openai.enc")

print("✅ API keys encrypted and secured!")
```

### Supported LLM Providers

| Provider | Configuration Example |
|----------|----------------------|
| **OpenAI** | `{"provider": "openai", "api_key": "sk-...", "model": "gpt-4"}` |
| **Azure OpenAI** | `{"provider": "azure_openai", "api_key": "...", "azure_endpoint": "https://..."}` |
| **Anthropic** | `{"provider": "anthropic", "api_key": "sk-ant-...", "model": "claude-3-sonnet"}` |
| **Local Ollama** | `{"provider": "ollama", "base_url": "http://localhost:11434", "model": "llama2"}` |

## 🤖 Framework Integration with Secure LLM Config

### AutoGen Integration

```python
from hexaeight_mcp_client import HexaEightAutoConfig, create_autogen_agent_with_hexaeight

# Create AutoGen agent with encrypted LLM configuration
autogen_agent, hexaeight_agent = await create_autogen_agent_with_hexaeight(
    config_file="parent_config.json",
    agent_type="parentLLM",
    name="IntelligentCoordinator",
    system_message="You can coordinate with multiple specialized agents and services."
)

# AutoGen agent now has:
# ✅ Encrypted LLM configuration (your API keys secure)
# ✅ HexaEight coordination tools
# ✅ Automatic capability discovery
# ✅ Multi-agent coordination via PubSub
```

### CrewAI Integration

```python
from hexaeight_mcp_client import create_crewai_agent_with_hexaeight

# Create CrewAI agent with encrypted LLM configuration
crewai_agent, hexaeight_agent = await create_crewai_agent_with_hexaeight(
    config_file="parent_config.json",
    agent_type="parentLLM", 
    role="Multi-Agent Coordinator",
    goal="Coordinate complex workflows using available tools and services",
    backstory="Expert in orchestrating multi-agent systems with secure communication"
)

# CrewAI agent now has:
# ✅ Encrypted LLM configuration
# ✅ Role-based coordination capabilities
# ✅ Access to dynamic tool discovery
# ✅ Secure multi-agent communication
```

### LangChain Integration

```python
from hexaeight_mcp_client import HexaEightAutoConfig

# Create LangChain setup with encrypted LLM configuration
hexaeight_agent = await HexaEightAutoConfig.create_llm_agent_with_protected_config(
    agent_type="parentLLM",
    config_file="parent_config.json",
    encrypted_llm_config_file="secure_openai.enc",
    framework="langchain"
)

# Access decrypted LLM config for LangChain
llm_config = hexaeight_agent.llm_config

# Use with LangChain
from langchain.chat_models import ChatOpenAI
from langchain.agents import initialize_agent

llm = ChatOpenAI(
    model=llm_config["model"],
    openai_api_key=llm_config["api_key"],  # Securely decrypted
    temperature=llm_config["temperature"]
)

# LangChain agent with HexaEight tools
tools = hexaeight_agent.get_available_tools()
agent = initialize_agent(tools, llm, agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION)
```

## 🛠️ Multi-Agent Architecture

### Agent Types

| Agent Type | Purpose | Verification | Broadcasts | Use Case |
|------------|---------|--------------|------------|----------|
| **parentLLM** | LLM coordination | ✅ Required | ✅ Receives all | Main intelligence and coordination |
| **childLLM** | LLM task execution | ✅ Required | ✅ Receives all | Specialized LLM workers |
| **parentTOOL** | Service provision | ❌ Not required | ❌ Ignores broadcasts | API services, databases |
| **childTOOL** | Specialized services | ❌ Not required | ❌ Ignores broadcasts | Specific tool implementations |
| **USER** | Human interaction | ❌ Not required | ❌ Broadcasts to LLMs only | User interfaces |

### Quick Agent Creation

```python
from hexaeight_mcp_client import quick_autogen_llm, quick_tool_agent, quick_user_agent

# LLM Agent (Intelligence Layer)
llm_agent = await quick_autogen_llm(
    config_file="parent_config.json",
    agent_type="parentLLM"
)

# Tool Agent (Business Logic Layer) 
weather_agent = await quick_tool_agent(
    config_file="weather_config.json",
    service_formats=["weather_request", "forecast_request"],
    agent_type="parentTOOL"
)

# User Agent (Interface Layer)
user_agent = await quick_user_agent(
    config_file="user_config.json"
)
```

## 🔧 Implementing Business Logic (Tool Agents)

### Weather Service Example

```python
class WeatherService:
    async def initialize(self):
        # Create tool agent
        self.agent = await quick_tool_agent(
            config_file="weather_config.json",
            service_formats=["weather_request", "location_query"],
            agent_type="parentTOOL"
        )
        
        # Register your business logic
        self.agent.register_service_handler("weather_request", self.handle_weather)
    
    async def handle_weather(self, content, event, tracker):
        """YOUR ACTUAL BUSINESS LOGIC GOES HERE"""
        
        # Parse request
        request = json.loads(content)
        location = request.get("location", "London")
        
        # 🌍 CALL YOUR ACTUAL WEATHER API
        weather_data = await self.call_openweather_api(location)
        
        # Process and enhance data
        enhanced_data = self.process_weather_data(weather_data)
        
        # Send structured response
        response = {
            "type": "weather_response",
            "location": location,
            "data": enhanced_data,
            "processed_by": self.agent.agent_name
        }
        
        await self.agent.hexaeight_agent.publish_to_agent(
            self.agent.pubsub_url,
            "internal_id",
            event.sender_internal_id,
            json.dumps(response),
            "weather_response"
        )
        
        return True
    
    async def call_openweather_api(self, location):
        """Your actual API integration"""
        # Real API call to OpenWeatherMap, WeatherAPI, etc.
        api_key = "your-weather-api-key"
        url = f"http://api.openweathermap.org/data/2.5/weather?q={location}&appid={api_key}"
        # ... implement actual API call
        pass
```

### Database Service Example

```python
class DatabaseService:
    async def initialize(self):
        self.agent = await quick_tool_agent(
            config_file="db_config.json",
            service_formats=["database_query", "customer_lookup"],
            agent_type="parentTOOL"
        )
        
        self.agent.register_service_handler("database_query", self.handle_query)
    
    async def handle_query(self, content, event, tracker):
        """YOUR ACTUAL DATABASE LOGIC"""
        
        # Parse database request
        query_data = json.loads(content)
        
        # 🗄️ EXECUTE REAL DATABASE OPERATIONS
        results = await self.execute_sql_query(query_data)
        
        # Send results back
        response = {
            "type": "database_response",
            "results": results,
            "processed_by": self.agent.agent_name
        }
        
        await self.send_response(response, event)
        return True
    
    async def execute_sql_query(self, query_data):
        """Your actual database operations"""
        # Real database connection and queries
        # PostgreSQL, MongoDB, MySQL, etc.
        pass
```

## 🌐 Automatic Coordination & Discovery

### Capability Discovery

```python
# LLM agents automatically discover available tools
llm_agent = await quick_autogen_llm("parent_config.json")

# Discover what services are available
capabilities = await llm_agent.capability_discovery.discover_ecosystem_capabilities()

print("Available Services:")
for service_id, info in capabilities["tool_capabilities"].items():
    service_name = info["capabilities"]["service_name"]
    endpoints = info["capabilities"]["endpoints"]
    print(f"  🔧 {service_name}: {endpoints}")
```

### User Interaction

```python
# User requests are automatically routed to appropriate agents
user_agent = await quick_user_agent("user_config.json")

# This broadcast only reaches LLM agents
await user_agent.broadcast_to_llms("Get me the weather in Tokyo and customer data for account 1001")

# LLM agents will:
# 1. Understand the request
# 2. Discover available weather and database services  
# 3. Coordinate with appropriate tool agents
# 4. Aggregate results and respond to user
```

## 📡 Complete System Example

```python
import asyncio
from hexaeight_mcp_client import *

async def create_intelligent_system():
    """Create a complete multi-agent system"""
    
    # 1. Setup secure LLM configuration
    llm_config = {
        "provider": "openai",
        "api_key": "sk-your-key",
        "model": "gpt-4"
    }
    
    agent = await quick_autogen_llm('parent_config.json')
    protector = HexaEightAutoConfig.create_llm_config_protector(agent.hexaeight_agent)
    protector.save_protected_config(llm_config, "secure_llm.enc")
    
    # 2. Create LLM coordinator with encrypted config
    coordinator = await HexaEightAutoConfig.create_llm_agent_with_protected_config(
        agent_type="parentLLM",
        config_file="parent_config.json",
        encrypted_llm_config_file="secure_llm.enc",
        framework="autogen"
    )
    
    # 3. Create specialized tool agents
    weather_service = await quick_tool_agent(
        "weather_config.json",
        ["weather_request", "forecast_request"],
        "parentTOOL"
    )
    
    database_service = await quick_tool_agent(
        "db_config.json", 
        ["database_query", "customer_lookup"],
        "parentTOOL"
    )
    
    # 4. Create user interface
    user_interface = await quick_user_agent("user_config.json")
    
    # 5. Register business logic with tool agents
    # (Your actual API calls, database operations, etc.)
    
    # 6. System automatically coordinates!
    # - User sends requests to LLM agents
    # - LLM agents discover available tools
    # - Tool agents process specialized requests
    # - Results are coordinated and returned
    
    print("🚀 Intelligent multi-agent system ready!")
    
    # Example user interaction
    await user_interface.broadcast_to_llms(
        "What's the weather in London and show me premium customer data?"
    )

# Run the system
asyncio.run(create_intelligent_system())
```

## 🎯 Use Cases

### Enterprise AI Assistants
- **LLM Agents**: Understand user requests, coordinate responses
- **Tool Agents**: CRM data, financial systems, inventory management
- **User Agents**: Employee interfaces, customer portals

### Data Analysis Platforms  
- **LLM Agents**: Interpret analysis requests, generate insights
- **Tool Agents**: Database queries, API data feeds, visualization
- **User Agents**: Analyst interfaces, report generation

### Customer Service Automation
- **LLM Agents**: Natural language understanding, response generation  
- **Tool Agents**: Ticketing systems, knowledge bases, payment processing
- **User Agents**: Customer chat interfaces, agent dashboards

### IoT and Smart Systems
- **LLM Agents**: Command interpretation, system orchestration
- **Tool Agents**: Device control, sensor data, automation rules
- **User Agents**: Mobile apps, voice interfaces, dashboards

## 🔒 Security Features

- **🔐 API Key Encryption**: Zero plain-text secrets using HexaEight's military-grade encryption
- **🛡️ Secure Agent Identity**: Cryptographic agent authentication and authorization  
- **📡 Encrypted Communication**: All agent messages encrypted via HexaEight PubSub
- **🎯 Message Filtering**: Agents only process relevant messages based on type and format
- **🔍 Capability Isolation**: Tool agents expose only intended service capabilities
- **⚡ Automatic Locking**: Single-attempt message locking prevents processing conflicts

## 📊 Configuration Examples

### Parent Agent Configuration (parent_config.json)
```json
{
  "agent_type": "parentLLM",
  "client_id": "your-client-id",
  "description": "Main LLM coordination agent",
  "framework": "autogen"
}
```

### Tool Agent Configuration (weather_config.json)
```json
{
  "agent_type": "parentTOOL",
  "client_id": "your-client-id", 
  "service_name": "WeatherAPI",
  "description": "Weather data service"
}
```

### Encrypted LLM Configuration (secure_llm.enc)
```
# This file contains encrypted LLM configuration
# Generated by: protector.save_protected_config(llm_config, "secure_llm.enc")
[Encrypted binary data - your API keys are secure!]
```

## 🚀 Getting Started Checklist

- [ ] Purchase HexaEight License from [store.hexaeight.com](https://store.hexaeight.com)
- [ ] Install license on your development machine
- [ ] Create CLIENT Application via HexaEight Agentic IAM Server *(when available)*
- [ ] Install hexaeight-mcp-client: `pip install hexaeight-mcp-client[all]`
- [ ] Create your first LLM configuration and encrypt it
- [ ] Build your first tool agent with actual business logic
- [ ] Test multi-agent coordination
- [ ] Deploy to production with real PubSub server

## 🛠️ Development Tools

```python
from hexaeight_mcp_client import *

# Check package info and framework availability
print_package_info()

# Setup development environment with example configs
setup_development_environment()

# Discover available configuration files
config_files = discover_config_files()
print("Available configs:", config_files)

# Validate agent types and configurations  
is_valid = validate_agent_type("parentLLM")
agent_info = get_agent_type_info("parentLLM")
```

## 📚 API Reference

### Core Classes
- `HexaEightMCPClient` - Base MCP client functionality
- `HexaEightLLMAgent` - LLM agents with coordination capabilities
- `HexaEightToolAgent` - Tool agents for business logic
- `HexaEightUserAgent` - User agents for human interaction
- `LLMConfigProtector` - Encrypt/decrypt LLM configurations

### Framework Adapters
- `AutogenAdapter` - Microsoft AutoGen integration
- `CrewAIAdapter` - CrewAI framework integration  
- `LangChainAdapter` - LangChain framework integration
- `GenericFrameworkAdapter` - Custom framework integration

### Quick Setup Functions
- `quick_autogen_llm()` - Create AutoGen LLM agent
- `quick_crewai_llm()` - Create CrewAI LLM agent
- `quick_tool_agent()` - Create tool agent
- `quick_user_agent()` - Create user agent

## 🆘 Troubleshooting

### Common Issues

**Q: "Failed to encrypt LLM configuration"**  
A: Ensure you have a valid HexaEight agent loaded before creating the config protector.

**Q: "Tool agent not receiving messages"**  
A: Verify your service_formats match the message types being sent by LLM agents.

**Q: "LLM verification failed"**  
A: Make sure your agent_type is "parentLLM" or "childLLM" and provide appropriate verification responses.

**Q: "Connection to PubSub failed"**  
A: Check that your CLIENT Application is properly configured and PubSub server is running.

## 🔗 Links & Resources

- **🏪 HexaEight Store**: [store.hexaeight.com](https://store.hexaeight.com) - Purchase licenses
- **📖 Documentation**: [GitHub Repository](https://github.com/HexaEightTeam/hexaeight-mcp-client)
- **🐛 Issues**: [GitHub Issues](https://github.com/HexaEightTeam/hexaeight-mcp-client/issues)
- **📦 HexaEight Agent**: [hexaeight-agent on PyPI](https://pypi.org/project/hexaeight-agent/)
- **💬 Support**: Contact support for licensing and technical issues

## 📄 License

MIT License - see LICENSE file for details.

---

**🌟 Ready to build intelligent multi-agent systems with enterprise-grade security?**

Start with `pip install hexaeight-mcp-client[all]` and create your first encrypted LLM agent today!

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "hexaeight-mcp-client",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "mcp, agent, hexaeight, multi-agent, identity, security, autogen, crewai, langchain",
    "author": null,
    "author_email": "HexaEight <support@hexaeight.com>",
    "download_url": "https://files.pythonhosted.org/packages/54/a4/09509ae4eb0c828bbc49fa58b6588dbd3de59758ec67e642c6a01a61bf6d/hexaeight_mcp_client-1.6.802.tar.gz",
    "platform": null,
    "description": "# HexaEight MCP Client\n\n\ud83d\ude80 **Framework-agnostic MCP integration with secure LLM configuration, automatic multi-agent coordination, and military-grade encryption.**\n\nBuild sophisticated multi-agent systems with minimal code while maintaining complete security and framework choice.\n\n## \ud83c\udf1f Key Features\n\n- \ud83d\udd10 **Secure LLM Configuration** - Encrypt API keys and endpoints with HexaEight's military-grade encryption\n- \ud83e\udd16 **Framework Integration** - AutoGen, CrewAI, LangChain with encrypted LLM configs  \n- \ud83d\udee0\ufe0f **Multi-Agent Types** - LLM agents, Tool agents, User agents with automatic coordination\n- \ud83c\udf10 **Automatic Discovery** - Dynamic capability discovery and intelligent message routing\n- \ud83d\udce1 **PubSub Coordination** - Seamless agent communication and task delegation\n- \u26a1 **One-Line Setup** - From configuration to production-ready agents instantly\n- \ud83c\udfaf **Business Logic** - Write your actual API/database code once in tool agents\n- \ud83d\udd12 **Production Security** - Zero plain-text secrets, secure agent identity management\n\n## \ud83d\udccb Requirements\n\n### Core Requirements\n\n1. **HexaEight License** \n   - Purchase from [store.hexaeight.com](https://store.hexaeight.com)\n   - Install on your development/production machine\n   - Enables creation of **1 parent configuration** + **unlimited child configurations**\n\n2. **HexaEight Agentic IAM Server** *(Releasing Soon)*\n   - Create CLIENT Application (CLIENTID) \n   - Provisions PubSub server bonded to your CLIENTID\n   - Enables seamless agent communication\n\n3. **Python Environment**\n   - Python 3.8+\n   - .NET SDK (for agent creation)\n\n### Agent Licensing Model\n\n| Agent Type | License Requirement | Expiry Behavior |\n|------------|--------------------|-----------------| \n| **Parent Agents** | \u2705 Active HexaEight license required | \u274c Stop working when license expires |\n| **Child Agents** | \u2705 Created with valid license | \u2705 Continue working after license expires |\n\n**Note**: All agents (parent and child) are tied to your CLIENT Application (CLIENTID).\n\n## \ud83d\ude80 Installation\n\n```bash\n# Basic installation\npip install hexaeight-mcp-client\n\n# With framework support\npip install hexaeight-mcp-client[autogen]    # For AutoGen\npip install hexaeight-mcp-client[crewai]     # For CrewAI\npip install hexaeight-mcp-client[langchain]  # For LangChain\npip install hexaeight-mcp-client[all]        # All frameworks\n```\n\n### Prerequisites\n\n```bash\n# Core HexaEight agent package\npip install hexaeight-agent\n\n# Optional: Framework packages\npip install pyautogen  # For AutoGen integration\npip install crewai     # For CrewAI integration  \npip install langchain  # For LangChain integration\n```\n\n## \ud83d\udd10 Secure LLM Configuration\n\n### Encrypt Your LLM Configuration\n\n```python\nfrom hexaeight_mcp_client import HexaEightAutoConfig, quick_autogen_llm\n\n# Your sensitive LLM configuration\nllm_config = {\n    \"provider\": \"openai\",\n    \"api_key\": \"sk-your-actual-openai-api-key-here\",  # Real API key\n    \"model\": \"gpt-4\",\n    \"temperature\": 0.7,\n    \"max_tokens\": 1000\n}\n\n# Create agent for encryption capabilities\nagent = await quick_autogen_llm('parent_config.json')\n\n# Encrypt and protect your configuration\nprotector = HexaEightAutoConfig.create_llm_config_protector(agent.hexaeight_agent)\nprotector.save_protected_config(llm_config, \"secure_openai.enc\")\n\nprint(\"\u2705 API keys encrypted and secured!\")\n```\n\n### Supported LLM Providers\n\n| Provider | Configuration Example |\n|----------|----------------------|\n| **OpenAI** | `{\"provider\": \"openai\", \"api_key\": \"sk-...\", \"model\": \"gpt-4\"}` |\n| **Azure OpenAI** | `{\"provider\": \"azure_openai\", \"api_key\": \"...\", \"azure_endpoint\": \"https://...\"}` |\n| **Anthropic** | `{\"provider\": \"anthropic\", \"api_key\": \"sk-ant-...\", \"model\": \"claude-3-sonnet\"}` |\n| **Local Ollama** | `{\"provider\": \"ollama\", \"base_url\": \"http://localhost:11434\", \"model\": \"llama2\"}` |\n\n## \ud83e\udd16 Framework Integration with Secure LLM Config\n\n### AutoGen Integration\n\n```python\nfrom hexaeight_mcp_client import HexaEightAutoConfig, create_autogen_agent_with_hexaeight\n\n# Create AutoGen agent with encrypted LLM configuration\nautogen_agent, hexaeight_agent = await create_autogen_agent_with_hexaeight(\n    config_file=\"parent_config.json\",\n    agent_type=\"parentLLM\",\n    name=\"IntelligentCoordinator\",\n    system_message=\"You can coordinate with multiple specialized agents and services.\"\n)\n\n# AutoGen agent now has:\n# \u2705 Encrypted LLM configuration (your API keys secure)\n# \u2705 HexaEight coordination tools\n# \u2705 Automatic capability discovery\n# \u2705 Multi-agent coordination via PubSub\n```\n\n### CrewAI Integration\n\n```python\nfrom hexaeight_mcp_client import create_crewai_agent_with_hexaeight\n\n# Create CrewAI agent with encrypted LLM configuration\ncrewai_agent, hexaeight_agent = await create_crewai_agent_with_hexaeight(\n    config_file=\"parent_config.json\",\n    agent_type=\"parentLLM\", \n    role=\"Multi-Agent Coordinator\",\n    goal=\"Coordinate complex workflows using available tools and services\",\n    backstory=\"Expert in orchestrating multi-agent systems with secure communication\"\n)\n\n# CrewAI agent now has:\n# \u2705 Encrypted LLM configuration\n# \u2705 Role-based coordination capabilities\n# \u2705 Access to dynamic tool discovery\n# \u2705 Secure multi-agent communication\n```\n\n### LangChain Integration\n\n```python\nfrom hexaeight_mcp_client import HexaEightAutoConfig\n\n# Create LangChain setup with encrypted LLM configuration\nhexaeight_agent = await HexaEightAutoConfig.create_llm_agent_with_protected_config(\n    agent_type=\"parentLLM\",\n    config_file=\"parent_config.json\",\n    encrypted_llm_config_file=\"secure_openai.enc\",\n    framework=\"langchain\"\n)\n\n# Access decrypted LLM config for LangChain\nllm_config = hexaeight_agent.llm_config\n\n# Use with LangChain\nfrom langchain.chat_models import ChatOpenAI\nfrom langchain.agents import initialize_agent\n\nllm = ChatOpenAI(\n    model=llm_config[\"model\"],\n    openai_api_key=llm_config[\"api_key\"],  # Securely decrypted\n    temperature=llm_config[\"temperature\"]\n)\n\n# LangChain agent with HexaEight tools\ntools = hexaeight_agent.get_available_tools()\nagent = initialize_agent(tools, llm, agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION)\n```\n\n## \ud83d\udee0\ufe0f Multi-Agent Architecture\n\n### Agent Types\n\n| Agent Type | Purpose | Verification | Broadcasts | Use Case |\n|------------|---------|--------------|------------|----------|\n| **parentLLM** | LLM coordination | \u2705 Required | \u2705 Receives all | Main intelligence and coordination |\n| **childLLM** | LLM task execution | \u2705 Required | \u2705 Receives all | Specialized LLM workers |\n| **parentTOOL** | Service provision | \u274c Not required | \u274c Ignores broadcasts | API services, databases |\n| **childTOOL** | Specialized services | \u274c Not required | \u274c Ignores broadcasts | Specific tool implementations |\n| **USER** | Human interaction | \u274c Not required | \u274c Broadcasts to LLMs only | User interfaces |\n\n### Quick Agent Creation\n\n```python\nfrom hexaeight_mcp_client import quick_autogen_llm, quick_tool_agent, quick_user_agent\n\n# LLM Agent (Intelligence Layer)\nllm_agent = await quick_autogen_llm(\n    config_file=\"parent_config.json\",\n    agent_type=\"parentLLM\"\n)\n\n# Tool Agent (Business Logic Layer) \nweather_agent = await quick_tool_agent(\n    config_file=\"weather_config.json\",\n    service_formats=[\"weather_request\", \"forecast_request\"],\n    agent_type=\"parentTOOL\"\n)\n\n# User Agent (Interface Layer)\nuser_agent = await quick_user_agent(\n    config_file=\"user_config.json\"\n)\n```\n\n## \ud83d\udd27 Implementing Business Logic (Tool Agents)\n\n### Weather Service Example\n\n```python\nclass WeatherService:\n    async def initialize(self):\n        # Create tool agent\n        self.agent = await quick_tool_agent(\n            config_file=\"weather_config.json\",\n            service_formats=[\"weather_request\", \"location_query\"],\n            agent_type=\"parentTOOL\"\n        )\n        \n        # Register your business logic\n        self.agent.register_service_handler(\"weather_request\", self.handle_weather)\n    \n    async def handle_weather(self, content, event, tracker):\n        \"\"\"YOUR ACTUAL BUSINESS LOGIC GOES HERE\"\"\"\n        \n        # Parse request\n        request = json.loads(content)\n        location = request.get(\"location\", \"London\")\n        \n        # \ud83c\udf0d CALL YOUR ACTUAL WEATHER API\n        weather_data = await self.call_openweather_api(location)\n        \n        # Process and enhance data\n        enhanced_data = self.process_weather_data(weather_data)\n        \n        # Send structured response\n        response = {\n            \"type\": \"weather_response\",\n            \"location\": location,\n            \"data\": enhanced_data,\n            \"processed_by\": self.agent.agent_name\n        }\n        \n        await self.agent.hexaeight_agent.publish_to_agent(\n            self.agent.pubsub_url,\n            \"internal_id\",\n            event.sender_internal_id,\n            json.dumps(response),\n            \"weather_response\"\n        )\n        \n        return True\n    \n    async def call_openweather_api(self, location):\n        \"\"\"Your actual API integration\"\"\"\n        # Real API call to OpenWeatherMap, WeatherAPI, etc.\n        api_key = \"your-weather-api-key\"\n        url = f\"http://api.openweathermap.org/data/2.5/weather?q={location}&appid={api_key}\"\n        # ... implement actual API call\n        pass\n```\n\n### Database Service Example\n\n```python\nclass DatabaseService:\n    async def initialize(self):\n        self.agent = await quick_tool_agent(\n            config_file=\"db_config.json\",\n            service_formats=[\"database_query\", \"customer_lookup\"],\n            agent_type=\"parentTOOL\"\n        )\n        \n        self.agent.register_service_handler(\"database_query\", self.handle_query)\n    \n    async def handle_query(self, content, event, tracker):\n        \"\"\"YOUR ACTUAL DATABASE LOGIC\"\"\"\n        \n        # Parse database request\n        query_data = json.loads(content)\n        \n        # \ud83d\uddc4\ufe0f EXECUTE REAL DATABASE OPERATIONS\n        results = await self.execute_sql_query(query_data)\n        \n        # Send results back\n        response = {\n            \"type\": \"database_response\",\n            \"results\": results,\n            \"processed_by\": self.agent.agent_name\n        }\n        \n        await self.send_response(response, event)\n        return True\n    \n    async def execute_sql_query(self, query_data):\n        \"\"\"Your actual database operations\"\"\"\n        # Real database connection and queries\n        # PostgreSQL, MongoDB, MySQL, etc.\n        pass\n```\n\n## \ud83c\udf10 Automatic Coordination & Discovery\n\n### Capability Discovery\n\n```python\n# LLM agents automatically discover available tools\nllm_agent = await quick_autogen_llm(\"parent_config.json\")\n\n# Discover what services are available\ncapabilities = await llm_agent.capability_discovery.discover_ecosystem_capabilities()\n\nprint(\"Available Services:\")\nfor service_id, info in capabilities[\"tool_capabilities\"].items():\n    service_name = info[\"capabilities\"][\"service_name\"]\n    endpoints = info[\"capabilities\"][\"endpoints\"]\n    print(f\"  \ud83d\udd27 {service_name}: {endpoints}\")\n```\n\n### User Interaction\n\n```python\n# User requests are automatically routed to appropriate agents\nuser_agent = await quick_user_agent(\"user_config.json\")\n\n# This broadcast only reaches LLM agents\nawait user_agent.broadcast_to_llms(\"Get me the weather in Tokyo and customer data for account 1001\")\n\n# LLM agents will:\n# 1. Understand the request\n# 2. Discover available weather and database services  \n# 3. Coordinate with appropriate tool agents\n# 4. Aggregate results and respond to user\n```\n\n## \ud83d\udce1 Complete System Example\n\n```python\nimport asyncio\nfrom hexaeight_mcp_client import *\n\nasync def create_intelligent_system():\n    \"\"\"Create a complete multi-agent system\"\"\"\n    \n    # 1. Setup secure LLM configuration\n    llm_config = {\n        \"provider\": \"openai\",\n        \"api_key\": \"sk-your-key\",\n        \"model\": \"gpt-4\"\n    }\n    \n    agent = await quick_autogen_llm('parent_config.json')\n    protector = HexaEightAutoConfig.create_llm_config_protector(agent.hexaeight_agent)\n    protector.save_protected_config(llm_config, \"secure_llm.enc\")\n    \n    # 2. Create LLM coordinator with encrypted config\n    coordinator = await HexaEightAutoConfig.create_llm_agent_with_protected_config(\n        agent_type=\"parentLLM\",\n        config_file=\"parent_config.json\",\n        encrypted_llm_config_file=\"secure_llm.enc\",\n        framework=\"autogen\"\n    )\n    \n    # 3. Create specialized tool agents\n    weather_service = await quick_tool_agent(\n        \"weather_config.json\",\n        [\"weather_request\", \"forecast_request\"],\n        \"parentTOOL\"\n    )\n    \n    database_service = await quick_tool_agent(\n        \"db_config.json\", \n        [\"database_query\", \"customer_lookup\"],\n        \"parentTOOL\"\n    )\n    \n    # 4. Create user interface\n    user_interface = await quick_user_agent(\"user_config.json\")\n    \n    # 5. Register business logic with tool agents\n    # (Your actual API calls, database operations, etc.)\n    \n    # 6. System automatically coordinates!\n    # - User sends requests to LLM agents\n    # - LLM agents discover available tools\n    # - Tool agents process specialized requests\n    # - Results are coordinated and returned\n    \n    print(\"\ud83d\ude80 Intelligent multi-agent system ready!\")\n    \n    # Example user interaction\n    await user_interface.broadcast_to_llms(\n        \"What's the weather in London and show me premium customer data?\"\n    )\n\n# Run the system\nasyncio.run(create_intelligent_system())\n```\n\n## \ud83c\udfaf Use Cases\n\n### Enterprise AI Assistants\n- **LLM Agents**: Understand user requests, coordinate responses\n- **Tool Agents**: CRM data, financial systems, inventory management\n- **User Agents**: Employee interfaces, customer portals\n\n### Data Analysis Platforms  \n- **LLM Agents**: Interpret analysis requests, generate insights\n- **Tool Agents**: Database queries, API data feeds, visualization\n- **User Agents**: Analyst interfaces, report generation\n\n### Customer Service Automation\n- **LLM Agents**: Natural language understanding, response generation  \n- **Tool Agents**: Ticketing systems, knowledge bases, payment processing\n- **User Agents**: Customer chat interfaces, agent dashboards\n\n### IoT and Smart Systems\n- **LLM Agents**: Command interpretation, system orchestration\n- **Tool Agents**: Device control, sensor data, automation rules\n- **User Agents**: Mobile apps, voice interfaces, dashboards\n\n## \ud83d\udd12 Security Features\n\n- **\ud83d\udd10 API Key Encryption**: Zero plain-text secrets using HexaEight's military-grade encryption\n- **\ud83d\udee1\ufe0f Secure Agent Identity**: Cryptographic agent authentication and authorization  \n- **\ud83d\udce1 Encrypted Communication**: All agent messages encrypted via HexaEight PubSub\n- **\ud83c\udfaf Message Filtering**: Agents only process relevant messages based on type and format\n- **\ud83d\udd0d Capability Isolation**: Tool agents expose only intended service capabilities\n- **\u26a1 Automatic Locking**: Single-attempt message locking prevents processing conflicts\n\n## \ud83d\udcca Configuration Examples\n\n### Parent Agent Configuration (parent_config.json)\n```json\n{\n  \"agent_type\": \"parentLLM\",\n  \"client_id\": \"your-client-id\",\n  \"description\": \"Main LLM coordination agent\",\n  \"framework\": \"autogen\"\n}\n```\n\n### Tool Agent Configuration (weather_config.json)\n```json\n{\n  \"agent_type\": \"parentTOOL\",\n  \"client_id\": \"your-client-id\", \n  \"service_name\": \"WeatherAPI\",\n  \"description\": \"Weather data service\"\n}\n```\n\n### Encrypted LLM Configuration (secure_llm.enc)\n```\n# This file contains encrypted LLM configuration\n# Generated by: protector.save_protected_config(llm_config, \"secure_llm.enc\")\n[Encrypted binary data - your API keys are secure!]\n```\n\n## \ud83d\ude80 Getting Started Checklist\n\n- [ ] Purchase HexaEight License from [store.hexaeight.com](https://store.hexaeight.com)\n- [ ] Install license on your development machine\n- [ ] Create CLIENT Application via HexaEight Agentic IAM Server *(when available)*\n- [ ] Install hexaeight-mcp-client: `pip install hexaeight-mcp-client[all]`\n- [ ] Create your first LLM configuration and encrypt it\n- [ ] Build your first tool agent with actual business logic\n- [ ] Test multi-agent coordination\n- [ ] Deploy to production with real PubSub server\n\n## \ud83d\udee0\ufe0f Development Tools\n\n```python\nfrom hexaeight_mcp_client import *\n\n# Check package info and framework availability\nprint_package_info()\n\n# Setup development environment with example configs\nsetup_development_environment()\n\n# Discover available configuration files\nconfig_files = discover_config_files()\nprint(\"Available configs:\", config_files)\n\n# Validate agent types and configurations  \nis_valid = validate_agent_type(\"parentLLM\")\nagent_info = get_agent_type_info(\"parentLLM\")\n```\n\n## \ud83d\udcda API Reference\n\n### Core Classes\n- `HexaEightMCPClient` - Base MCP client functionality\n- `HexaEightLLMAgent` - LLM agents with coordination capabilities\n- `HexaEightToolAgent` - Tool agents for business logic\n- `HexaEightUserAgent` - User agents for human interaction\n- `LLMConfigProtector` - Encrypt/decrypt LLM configurations\n\n### Framework Adapters\n- `AutogenAdapter` - Microsoft AutoGen integration\n- `CrewAIAdapter` - CrewAI framework integration  \n- `LangChainAdapter` - LangChain framework integration\n- `GenericFrameworkAdapter` - Custom framework integration\n\n### Quick Setup Functions\n- `quick_autogen_llm()` - Create AutoGen LLM agent\n- `quick_crewai_llm()` - Create CrewAI LLM agent\n- `quick_tool_agent()` - Create tool agent\n- `quick_user_agent()` - Create user agent\n\n## \ud83c\udd98 Troubleshooting\n\n### Common Issues\n\n**Q: \"Failed to encrypt LLM configuration\"**  \nA: Ensure you have a valid HexaEight agent loaded before creating the config protector.\n\n**Q: \"Tool agent not receiving messages\"**  \nA: Verify your service_formats match the message types being sent by LLM agents.\n\n**Q: \"LLM verification failed\"**  \nA: Make sure your agent_type is \"parentLLM\" or \"childLLM\" and provide appropriate verification responses.\n\n**Q: \"Connection to PubSub failed\"**  \nA: Check that your CLIENT Application is properly configured and PubSub server is running.\n\n## \ud83d\udd17 Links & Resources\n\n- **\ud83c\udfea HexaEight Store**: [store.hexaeight.com](https://store.hexaeight.com) - Purchase licenses\n- **\ud83d\udcd6 Documentation**: [GitHub Repository](https://github.com/HexaEightTeam/hexaeight-mcp-client)\n- **\ud83d\udc1b Issues**: [GitHub Issues](https://github.com/HexaEightTeam/hexaeight-mcp-client/issues)\n- **\ud83d\udce6 HexaEight Agent**: [hexaeight-agent on PyPI](https://pypi.org/project/hexaeight-agent/)\n- **\ud83d\udcac Support**: Contact support for licensing and technical issues\n\n## \ud83d\udcc4 License\n\nMIT License - see LICENSE file for details.\n\n---\n\n**\ud83c\udf1f Ready to build intelligent multi-agent systems with enterprise-grade security?**\n\nStart with `pip install hexaeight-mcp-client[all]` and create your first encrypted LLM agent today!\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Framework-agnostic MCP client integration for HexaEight agents",
    "version": "1.6.802",
    "project_urls": {
        "Documentation": "https://github.com/HexaEightTeam/hexaeight-mcp-client/blob/main/README.md",
        "Homepage": "https://github.com/HexaEightTeam/hexaeight-mcp-client",
        "Issues": "https://github.com/HexaEightTeam/hexaeight-mcp-client/issues",
        "Repository": "https://github.com/HexaEightTeam/hexaeight-mcp-client.git"
    },
    "split_keywords": [
        "mcp",
        " agent",
        " hexaeight",
        " multi-agent",
        " identity",
        " security",
        " autogen",
        " crewai",
        " langchain"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "e4cc9ac6df9c7b6d0b63ccb27a733fbb19cd154c03adc04ba84812e31d8cb953",
                "md5": "5065e2aa372a3c45f4920adc7f536f5b",
                "sha256": "910fed3415d5c1a2013df31f95453b860efb3bf5eeaadbb99a65625b10e6789a"
            },
            "downloads": -1,
            "filename": "hexaeight_mcp_client-1.6.802-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5065e2aa372a3c45f4920adc7f536f5b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 30616,
            "upload_time": "2025-07-15T10:51:39",
            "upload_time_iso_8601": "2025-07-15T10:51:39.243711Z",
            "url": "https://files.pythonhosted.org/packages/e4/cc/9ac6df9c7b6d0b63ccb27a733fbb19cd154c03adc04ba84812e31d8cb953/hexaeight_mcp_client-1.6.802-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "54a409509ae4eb0c828bbc49fa58b6588dbd3de59758ec67e642c6a01a61bf6d",
                "md5": "82245c87acf0732a02044193afd2cc13",
                "sha256": "ef3b83bed458471d3afe99306bdd044eeb7ced5e6a5418bb1e956aac91af7cd4"
            },
            "downloads": -1,
            "filename": "hexaeight_mcp_client-1.6.802.tar.gz",
            "has_sig": false,
            "md5_digest": "82245c87acf0732a02044193afd2cc13",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 33967,
            "upload_time": "2025-07-15T10:51:40",
            "upload_time_iso_8601": "2025-07-15T10:51:40.030374Z",
            "url": "https://files.pythonhosted.org/packages/54/a4/09509ae4eb0c828bbc49fa58b6588dbd3de59758ec67e642c6a01a61bf6d/hexaeight_mcp_client-1.6.802.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-15 10:51:40",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "HexaEightTeam",
    "github_project": "hexaeight-mcp-client",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "hexaeight-mcp-client"
}
        
Elapsed time: 0.61969s