Agentic EV Charging Intelligence & Operations Platform
Live application: https://chargeops-ai.vercel.app
API documentation: https://chargeops-api.onrender.com/docs
Source: https://github.com/zrasooli94/ChargeOps-AI
Portfolio note: The public deployment uses portfolio-friendly cloud infrastructure. The Render API may require a short warm-up after a period of inactivity.
ChargeOps AI requires authentication.
A restricted Viewer account is available for portfolio review. The live login page is configured with the demo account so reviewers can explore the application without receiving operator or administrative privileges.
Demo email: [email protected]
The Viewer role can explore:
- station intelligence
- agent workflows
- demand forecasting
- incidents
- knowledge retrieval
- system architecture
Privileged write operations, observability administration, knowledge management, and user management remain protected by RBAC.
ChargeOps AI is a production-style Generative AI and Agentic AI platform for EV charging operations.
It combines:
- a modern Next.js + React + TypeScript frontend
- a secure FastAPI backend
- LangGraph agent orchestration
- PostgreSQL + pgvector retrieval
- machine-learning demand forecasting
- human-in-the-loop operational controls
- multi-agent standards research
- authentication and RBAC
- observability and evaluation
- Prometheus-compatible monitoring
- Docker and CI/CD
- production cloud deployment across Vercel, Render, and Neon
The core engineering goal is to demonstrate how an AI agent can operate against trusted application state and real tools rather than behave as a standalone chatbot.
ChargeOps is designed around the concerns that matter in production AI engineering:
- Agentic AI with tool selection, conditional routing, persistent memory, and multi-step workflows
- Retrieval-Augmented Generation using OpenAI embeddings and PostgreSQL/pgvector
- Human-in-the-loop safety for protected operational changes
- Deterministic authentication and RBAC outside the LLM
- Multi-agent delegation for standards and research workflows
- Model Context Protocol (MCP) integrations for external reference access
- Machine-learning forecasting for EV charging demand
- Observability and evaluation for model and tool behavior
- Production monitoring through health checks, correlated logs, and Prometheus-compatible metrics
- Secure frontend/backend separation through a server-side Next.js API proxy
- Cloud deployment with automated GitHub, Vercel, Render, and Neon workflows
The ChargeOps agent can reason over charging-station context and choose tools including:
get_station_detailsget_recent_incidentsget_station_weathersearch_knowledge_basediagnose_charging_issuechange_station_status- demand-forecasting tools
- standards-specialist delegation
The agent uses trusted runtime context rather than asking the LLM to invent operational state.
It can combine multiple tools in a single workflow. For example, the agent can retrieve station metadata, inspect recent incidents, check weather, query internal knowledge, and then produce an operational recommendation.
ChargeOps uses LangGraph for stateful agent execution.
The graph supports:
- persistent threads
- checkpoint-backed memory
- conditional tool routing
- multi-step tool execution
- resumable workflows
- human approval interrupts
- protected write operations
- execution telemetry
Conceptually:
User Request
β
ChargeOps Agent
β
Intent + Context Evaluation
β
Tool Selection / Delegation
β
Trusted Application Tools
β
Optional Human Approval
β
Final Grounded Response
ChargeOps includes a production-style knowledge pipeline:
Document Upload
β
Validation
β
Text Extraction
β
Normalization
β
Chunking
β
OpenAI Embeddings
β
Neon PostgreSQL + pgvector
β
Semantic Retrieval
β
Grounded Agent Answer
Knowledge features include:
- PDF, TXT, and Markdown ingestion
- OpenAI
text-embedding-3-small - 1536-dimensional embeddings
- pgvector HNSW cosine-similarity indexing
- retrieval similarity thresholds
- result deduplication and diversity controls
- source labels and citations
- duplicate-document protection
- admin-only ingestion and deletion
The public application exposes retrieval results and supporting sources so the RAG workflow is visible rather than hidden behind a generic chat interface.
ChargeOps includes an EV demand forecasting subsystem built with scikit-learn.
The forecasting pipeline combines:
- historical charging demand
- temporal features
- weather features
- spatial/station features
- mobility signals
- lagged demand features
The frontend provides:
- 24-hour demand forecasts
- predicted hourly energy demand
- peak demand
- total forecast demand
- average hourly demand
- operational risk classification
Data disclosure: The current public portfolio deployment uses simulated demonstration demand history to validate the forecasting and operational-intelligence pipeline. It should not be interpreted as production utility telemetry.
ChargeOps exposes station incidents through the operations interface.
Capabilities include:
- station-specific incident history
- operational context for agent reasoning
- incident lifecycle visibility
- operator/admin status updates
- integration with agent diagnosis workflows
RBAC prevents Viewer accounts from performing privileged incident updates.
Protected station-status changes are never executed simply because an LLM requested them.
User Request
β
Agent Identifies Protected Action
β
Server-side Authorization
β
LangGraph Interrupt
β
Human Approval Required
β
Approve / Reject
β
Resume Workflow
β
Database Write Only If Authorized + Approved
The LLM cannot grant itself access.
This separates AI reasoning from application authorization and creates a deterministic safety boundary around operational writes.
ChargeOps implements deterministic server-side authentication and authorization.
- PostgreSQL-backed users
- Argon2 password hashing
- JWT access tokens
- configurable token expiry
- active-account validation
- database role/account state checked on authenticated requests
- no public registration
- password hashes never returned by API responses
- access token stored by the Next.js server proxy in an HttpOnly cookie
- browser clients do not store FastAPI bearer tokens in
localStorage
| Capability | Viewer | Operator | Admin |
|---|---|---|---|
| View stations | β | β | β |
| View incidents | β | β | β |
| Search knowledge | β | β | β |
| View indexed documents | β | β | β |
| Safe agent queries | β | β | β |
| Generate demand forecasts | β | β | β |
| Update incident status | β | β | β |
| Run operational diagnosis/write tools | β | β | β |
| Resume protected HITL operations | β | β | β |
| View observability | β | β | β |
| Run direct analysis endpoint | β | β | β |
| Upload knowledge documents | β | β | β |
| Delete knowledge documents | β | β | β |
| Manage users | β | β | β |
The Next.js interface hides unavailable controls for usability, while FastAPI remains the authoritative security boundary.
The public demo uses the Viewer role so recruiters can explore the system safely without receiving write or administrative privileges.
ChargeOps includes a selective multi-agent architecture.
The main operations agent can delegate standards-related questions to a specialist agent, which can access external references through an MCP client.
ChargeOps Supervisor
β
Standards Specialist
β
External MCP Client
β
MCP Fetch Server
β
External Standards / Reference Sources
External content is treated as untrusted reference material and does not bypass application authorization or operational safety controls.
ChargeOps stores execution telemetry in PostgreSQL, including:
- run ID
- thread ID
- station ID
- user request
- model
- tools used
- execution trace
- latency
- status
- human-approval state
- final answer
The Next.js dashboard includes an observability interface and run inspector for authorized roles.
The observability interface surfaces information such as:
- completed agent runs
- average latency
- tool-call counts
- protected/human-approval runs
- recent execution history
- run-level inspection
ChargeOps integrates LangSmith for AI tracing and evaluation.
Evaluation workflows cover:
- deterministic tool selection
- required tool ordering
- protected-action behavior
- station context handling
- semantic answer quality
- RAG groundedness
- retrieval relevance
- citation validity
- citation faithfulness
The API exposes a protected Prometheus-compatible /metrics endpoint with:
- HTTP request counts
- route/status tracking
- request-latency histograms
- in-flight request gauges
- unhandled exception counters
- standard Python/process metrics
Production monitoring also uses:
- Render health checks
- Render service metrics
- correlated request logs
- application request IDs
- deployment/failure notifications
- Neon database monitoring
The current ChargeOps frontend is built with Next.js 16, React 19, and TypeScript using the App Router.
It replaces the original Streamlit portfolio interface with a responsive product-style control plane.
Key frontend capabilities include:
- animated landing experience
- responsive desktop/mobile navigation
- shared charging-station context
- role-aware navigation and controls
- Agent workspace with persistent thread IDs
- human approval/resume flows
- demand forecasting interface
- incident management views
- semantic knowledge search
- admin document upload/delete
- observability run explorer
- admin user/RBAC management
- system architecture view
- server-side authentication proxy
- HttpOnly session handling
flowchart TB
User["Operator / Admin / Demo Viewer"]
UI["Next.js 16 + React 19 Frontend<br/>Vercel"]
Proxy["Next.js Server-side API Proxy<br/>HttpOnly Session Cookie"]
API["FastAPI Application<br/>Render"]
Auth["Authentication + RBAC"]
Agent["ChargeOps Agent<br/>LangGraph"]
Forecast["EV Demand Forecasting<br/>scikit-learn"]
Knowledge["RAG / Knowledge Service"]
Weather["Live Weather"]
Standards["Standards Specialist Agent"]
MCP["External MCP Client"]
HITL["Human Approval Gate"]
Monitoring["Observability + Monitoring"]
DB[("Neon PostgreSQL + pgvector")]
OpenAI["OpenAI APIs"]
External["External Reference Sources"]
LangSmith["LangSmith"]
User --> UI
UI --> Proxy
Proxy --> API
API --> Auth
API --> Agent
API --> Forecast
API --> Knowledge
API --> Monitoring
Agent --> Weather
Agent --> Knowledge
Agent --> Forecast
Agent --> Standards
Agent --> HITL
Standards --> MCP
MCP --> External
Agent --> OpenAI
Knowledge --> OpenAI
Auth --> DB
Agent --> DB
Knowledge --> DB
Forecast --> DB
Monitoring --> DB
Agent --> LangSmith
The current public portfolio environment is deployed as:
Browser
β HTTPS
Vercel
Next.js Frontend
β Server-side Proxy
Render
FastAPI Backend
β TLS
Neon
PostgreSQL + pgvector
| Service | Platform | URL |
|---|---|---|
| Frontend | Vercel | https://chargeops-ai.vercel.app |
| API | Render | https://chargeops-api.onrender.com |
| API Docs | Render | https://chargeops-api.onrender.com/docs |
| API Liveness | Render | https://chargeops-api.onrender.com/health/live |
| API Readiness | Render | https://chargeops-api.onrender.com/health/ready |
| Database | Neon | Private connection |
The browser communicates with the Next.js application. Authenticated API traffic is proxied server-side to FastAPI, and database credentials, AI secrets, and access tokens remain outside browser-accessible storage.
| Layer | Technologies |
|---|---|
| AI / Agents | OpenAI Responses API, Structured Outputs, Function Calling, LangGraph |
| RAG | OpenAI Embeddings, PostgreSQL, pgvector, HNSW |
| Multi-Agent / Integration | Specialist agent, MCP |
| Machine Learning | scikit-learn, pandas, NumPy |
| Backend | Python 3.11, FastAPI, Pydantic |
| Database | Neon PostgreSQL, SQLAlchemy Async, Alembic |
| Security | JWT, PyJWT, pwdlib/Argon2, RBAC, HttpOnly cookies, CORS/HSTS hardening |
| Frontend | Next.js 16, React 19, TypeScript 5.8, App Router |
| Observability | LangSmith, PostgreSQL run telemetry, Prometheus client |
| Testing | Pytest, Ruff |
| DevOps | Docker, Docker Compose, GitHub Actions |
| Cloud | Vercel, Render, Neon |
ChargeOps-AI/
βββ .github/
β βββ workflows/
β βββ ci-cd.yml
βββ alembic/
β βββ env.py
β βββ versions/
βββ app/
β βββ agents/
β β βββ chargeops_graph.py
β β βββ standards_specialist.py
β βββ api/
β β βββ agent.py
β β βββ analysis.py
β β βββ auth.py
β β βββ chat.py
β β βββ forecast.py
β β βββ health.py
β β βββ incidents.py
β β βββ knowledge.py
β β βββ observability.py
β β βββ stations.py
β β βββ users.py
β β βββ weather.py
β βββ core/
β β βββ auth_dependencies.py
β β βββ checkpointing.py
β β βββ config.py
β β βββ database.py
β β βββ monitoring.py
β β βββ production_security.py
β β βββ security.py
β β βββ security_headers.py
β βββ mcp/
β βββ ml/
β β βββ forecasting/
β βββ models/
β βββ schemas/
β βββ services/
β βββ main.py
βββ frontend-next/
β βββ app/
β β βββ api/
β β βββ dashboard/
β β βββ globals.css
β β βββ layout.tsx
β β βββ page.tsx
β βββ components/
β β βββ auth/
β β βββ dashboard/
β β βββ hero/
β βββ lib/
β β βββ api.ts
β β βββ types.ts
β βββ package.json
β βββ next.config.ts
β βββ tsconfig.json
βββ frontend/
β βββ app.py # legacy Streamlit frontend
βββ docs/
β βββ DEMO.md
β βββ diagrams/
β βββ screenshots/
βββ evals/
βββ scripts/
βββ tests/
βββ Dockerfile
βββ docker-compose.yml
βββ alembic.ini
βββ requirements.txt
βββ README.md
git clone https://github.com/zrasooli94/ChargeOps-AI.git
cd ChargeOps-AIpython3.11 -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txtcp .env.example .envAdd your local backend configuration and secrets to .env.
Never commit
.env, API keys, JWT secrets, monitoring tokens, database credentials, or production secrets.
docker compose up -d
docker compose pspython -m alembic upgrade headpython -m scripts.train_demand_forecast --generate-demouvicorn app.main:app --reloadBackend:
http://127.0.0.1:8000
API documentation:
http://127.0.0.1:8000/docs
Open a second terminal:
cd frontend-next
cp .env.example .env.localExample local frontend environment:
CHARGEOPS_API_URL=http://127.0.0.1:8000
CHARGEOPS_DEMO_EMAIL=[email protected]
CHARGEOPS_DEMO_PASSWORD=replace-with-your-local-demo-passwordnpm install
npm run devFrontend:
http://localhost:3000
The Next.js server proxies authenticated API traffic to FastAPI.
Build the backend application image:
docker build -t chargeops-ai:local .Or start the local backend/database stack:
docker compose up --build -d
docker compose psThe container startup flow prepares database migrations and demonstration forecasting assets before starting the API service.
The production Next.js frontend is deployed independently through Vercel.
Run Ruff:
python -m ruff check .Run the test suite:
python -m pytest -qCheck migrations:
python -m alembic currentcd frontend-next
npm run buildCheck whitespace before committing:
git diff --checkChargeOps uses automated validation and cloud deployment.
Push / Pull Request
β
GitHub Actions
β
Ruff + Pytest
β
PostgreSQL / pgvector integration
β
Alembic migration validation
β
Docker build
β
Backend Deployment β Render
β
Frontend Deployment β Vercel
β
Database β Neon
The Next.js project is deployed from the frontend-next/ root directory on Vercel.
- Open https://chargeops-ai.vercel.app.
- Sign in with the restricted Viewer demo account.
- Select a charging station.
- Ask the Agent for station status and operational concerns.
- Ask for current weather and its operational impact.
- Generate a 24-hour demand forecast.
- Ask an OCPP or EV-charging troubleshooting question to exercise RAG.
- Review station incidents and operational context.
- Explore knowledge retrieval and supporting sources.
- Review the System page for architecture and platform design.
Privileged features such as operator actions, human-approved write workflows, observability, knowledge administration, and user management are role protected.
For an extended walkthrough, see docs/DEMO.md.
ChargeOps intentionally follows several production-oriented rules:
- authorization is deterministic and server-side
- LLM output never grants access
- protected writes require human approval
- secrets stay out of source control and browser configuration
- bearer tokens are not stored in browser
localStorage - external reference content is treated as untrusted
- RAG answers expose supporting knowledge sources
- agent executions are observable and evaluable
- health/readiness are distinct from business logic
- metrics avoid unbounded high-cardinality labels
- synthetic demonstration data is clearly labeled as synthetic
- public demo access uses a restricted account rather than administrative credentials
- frontend failures do not define backend authorization state
- The forecasting subsystem currently uses simulated demonstration demand history rather than utility production telemetry.
- The Render API may cold-start after inactivity depending on hosting configuration.
- External services remain subject to their own availability and rate limits.
- The public demo account intentionally has restricted permissions.
- ChargeOps demonstrates EV charging operations intelligence; it is not connected to live charging hardware or a production charging network.
- β Software + AI foundation
- β Structured GenAI
- β External integrations
- β PostgreSQL operational intelligence
- β RAG and document ingestion
- β LangGraph agent orchestration
- β Persistent memory/checkpointing
- β Human-in-the-loop workflows
- β LangSmith observability and evaluation
- β Authentication and RBAC
- β Security hardening
- β Production reliability
- β MCP integrations
- β Selective multi-agent architecture
- β EV demand forecasting
- β Docker containerization
- β CI/CD
- β FastAPI cloud deployment on Render
- β PostgreSQL + pgvector migration to Neon
- β Next.js frontend migration
- β Vercel production deployment
- β Production monitoring
- β Portfolio release
- real-world EV charging dataset validation
- richer forecasting/model comparison and evaluation
- production monitoring dashboards and alerting
- additional OCPP/charging-network integrations
- richer multi-station operational analytics
- expanded automated agent evaluation datasets
Please do not report sensitive credentials or personal data through public GitHub issues.
The public demo account is deliberately restricted and is not an administrative credential.
Production secrets are supplied through deployment environment variables and are not committed to the repository.
ChargeOps is a portfolio/research system and should not be used to control real charging infrastructure without additional security review, operational validation, and production hardening.
A project license has not yet been selected.
Zaker Hussain Rasooli
Full-Stack Developer Β· AI Engineering Β· Agentic AI
GitHub: https://github.com/zrasooli94
If you are reviewing this project for an AI / GenAI / Agentic AI engineering role, recommended starting points are:
app/agents/chargeops_graph.pyβ LangGraph orchestrationapp/services/agent_tools.pyβ operational tool layerapp/mcp/β MCP integrationsapp/ml/forecasting/β EV demand forecastingapp/core/β authentication, security, reliability, and monitoringfrontend-next/β production Next.js frontend and server-side API proxyevals/β evaluation assetstests/β regression, security, and agent tests
ββββββββββββββββββββββββββββββββββββββββββββββ
β Vercel β
β Next.js 16 + React 19 + TypeScript β
β UI + HttpOnly-cookie server API proxy β
ββββββββββββββββββββββββ¬ββββββββββββββββββββββ
β HTTPS
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββ
β Render β
β FastAPI Backend β
β Auth Β· Agents Β· RAG Β· Forecast Β· Metrics β
ββββββββββββββββββββββββ¬ββββββββββββββββββββββ
β TLS
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββ
β Neon β
β PostgreSQL 17 + pgvector 0.8 β
β Users Β· Incidents Β· RAG Β· Agent Memory β
ββββββββββββββββββββββββββββββββββββββββββββββ





