An AI-powered assistant that combines real-time weather intelligence and sensitive data redaction in one production-ready workflow.
Built with Python, CrewAI, Flask, and a Telegram integration, this project demonstrates practical AI orchestration with external APIs, tool routing, and multi-channel delivery.
- Solves two real use cases in one agent flow:
- Weather assistance for end users
- PII sanitization for logs and operational text
- Uses tool-enabled agent orchestration instead of hardcoded if-else pipelines
- Exposes a clean API layer for easy integration with web, mobile, or chat clients
- Includes both direct API usage and Telegram bot experience
- Multi-tool AI agent with intelligent tool selection
- Real-time weather retrieval from OpenWeather APIs
- PII redaction integration through an external service endpoint
- Flask REST API for simple integration
- Telegram bot client for conversational usage
- Environment-based configuration for deployment flexibility
flowchart LR
U[User] --> C[Client Channel]
C --> API[Flask API]
API --> CREW[CrewAI Crew]
CREW --> AGENT[Smart Assistant Agent]
AGENT --> WT[Weather Tool]
AGENT --> PT[PII Redact Tool]
WT --> OWM[OpenWeather API]
PT --> PR[PII Redaction API]
AGENT --> API
API --> C
- Python 3.11
- CrewAI
- Flask
- Requests
- Pydantic
- Gemini model via LiteLLM provider routing in CrewAI
- Node.js + Telegraf for Telegram interface
- api_server.py : Flask API entrypoint exposing POST endpoint at /agent/route
- mutliple_tool_crew.py : Main CrewAI orchestration with Weather and PII tools
- weather_crew.py : Weather-only crew variant
- requirements.txt : Python dependencies
- telegram_bot/telegram_bot.js : Telegram bot client integration
- walkthrough.md : Detailed HLD, LLD, execution, and debugging guide
git clone <your-repo-url>
cd CrewAI_Weather_AI_Agentpython3 -m venv .venv
source .venv/bin/activatepip install -r requirements.txtCreate a .env file in project root with:
OPENWEATHER_API_KEY=your_openweather_key
GEMINI_API_KEY=your_gemini_key
PII_API_URL=http://your-pii-service:8000
OLLAMA_BASE_URL=http://localhost:11434python api_server.pyServer starts at:
curl -X POST http://127.0.0.1:1212/agent/route \
-H "Content-Type: application/json" \
-d '{"query":"weather in Berlin today"}'curl -X POST http://127.0.0.1:1212/agent/route \
-H "Content-Type: application/json" \
-d '{"query":"Redact this: User email is jane.doe@mail.com from IP 10.0.0.1"}'cd telegram_bot
npm install
node telegram_bot.jsEnsure the API server is already running locally on port 1212.
- Agentic architecture with tool abstraction and typed input schemas
- External service integration with clean separation of concerns
- API-first backend design that supports multiple client channels
- Practical handling for operational concerns: timeout paths, logging hooks, and runtime configuration
- Easy extensibility for adding more tools and workflows
- Add test suite for tool selection and failure cases
- Add containerization with Docker and deployment manifests
- Add structured observability (request tracing + metrics)
- Add CI pipeline with linting and tests
For an in-depth technical walkthrough including high-level and low-level diagrams, see walkthrough.md.
This project is available for educational and portfolio purposes. Add your preferred license before open-source distribution.