EcoMobilityAssistant is an AI-powered service that helps citizens choose sustainable transport solutions and provides general information about mobility facilities available in the Open Data Hub. The project leverages AI agents to assist users in making informed decisions about eco-friendly transportation options, promoting sustainable mobility practices.
The primary goal of EcoMobilityAssistant is to empower individuals and communities to adopt sustainable transportation habits by providing intelligent, data-driven recommendations. By integrating with Open Data Hub mobility facilities and utilizing advanced AI reasoning agents, the system offers personalized transport suggestions that consider environmental impact, efficiency, and user preferences.
The project follows Clean Architecture principles, organized into several layers and modules:
-
Contracts (
src/Contracts/EcoMob.Contracts): Defines shared interfaces, enums, and models used across the application. This includes service contracts likeIIntentAgent,IReasoningAgent, andIValidatorAgent, as well as data models for intent context and validation results. -
Core (
src/Core/EcoMob.Core): Contains the core business logic and domain services. The main service here isEcoMobilityService, which orchestrates the eco-mobility assistance functionality. -
Infrastructure (
src/Infrastructure/EcoMob.Infra): Handles external dependencies and infrastructure concerns. This includes:- AI agents:
ContextValidatorAgent,IntentClassifierAgent,ReasoningAgent - Logging extensions
- Configuration settings
- Helper utilities
- AI agents:
-
UI (
src/UI/EcoMob.Cli): Provides the command-line interface for interacting with the EcoMobilityAssistant service.
The MCP (Model Context Protocol) Server components are located under src/McpServer/src/:
- EcoMob.McpServer.Contracts: Server-specific contracts and interfaces
- EcoMob.McpServer.Core: Core server logic and configuration
- EcoMob.McpServer.Infra: Server infrastructure components
- EcoMob.McpServer.Entry: Server entry point
- EcoMob.McpSseServer.WebApp: Web application for the MCP server with SSE (Server-Sent Events) support
- Tests (
src/Tests/EcoMob.Tests): Contains unit tests and architectural tests to ensure code quality and adherence to design principles.
- .NET 8.0 or later
- Docker and Docker Compose (for containerized deployment)
- Git
To run the EcoMobilityAssistant CLI locally:
- Ensure you have .NET 8.0+ installed
- Make the run script executable (Linux/Mac):
chmod +x run.sh
- Execute the script:
./run.sh
The script will:
- Clean previous builds
- Build the CLI project in Release configuration
- Run the EcoMobilityAssistant CLI
To run the complete system with MCP server and Redis using Docker Compose:
- Ensure Docker and Docker Compose are installed
- From the repository root, run:
docker-compose up --build
This will:
- Build and start a Redis container (port 6379)
- Build and start the MCP server container (port 5000)
- The MCP server will be available at http://localhost:5000
To run in detached mode:
docker-compose up -d --buildTo stop the services:
docker-compose downIf you prefer to build manually:
-
Navigate to the web app directory:
cd src/McpServer/src/EcoMob.McpSseServer.WebApp -
Build the Docker image:
docker build -t eco-mcpserver . -
Run the container:
docker run -d -p 5000:80 --name eco-mcpserver eco-mcpserver
To build all projects:
dotnet build EcoMobilityAssistant.slndotnet test EcoMobilityAssistant.slnThe project follows Clean Architecture with clear separation of concerns:
- Contracts: Define what the system does
- Core: Implement the business logic
- Infrastructure: Handle external concerns (AI agents, logging, etc.)
- UI: Provide user interfaces (CLI, Web)
The MCP Server extends this architecture to provide AI-powered mobility assistance through a web interface.
Please see CONTRIBUTING.md for guidelines on how to contribute to this project.
[Add license information here]