GovCortexAI V2
GovCortexAI V2 is a anakytics agent that saves it learning as python notebooks which get approved by data team.
Core trick
Saves agent-generated analytics as approved Python notebook cells, replayed from memory so two chat lanes converge on one answer.
Description
GovCortexAI V2 is a anakytics agent that saves it learning as python notebooks which get approved by data team.
It uses CrewAI for agent orchestration, FastAPI for backend APIs/streaming events, Streamlit for the UI, Composio + Snowflake for schema/query execution, and controlled SQL/Python “notebook memory” cells to enforce approved analytics logic and traceability. Skyfire for data buying for complex issues
README excerpt
# GovCortexAI (V2 Plan)
Governed analytics agent with dual-chat comparison:
- Memory OFF: same agent asked the same question in two lanes, can diverge in approach/style.
- Memory ON: same agent uses approved notebook memory and should converge to the canonical answer.
This document describes the planned V2 architecture. V2 is not implemented yet.
## V2 Current Implementation Slice
Implemented now:
- `src_v2/api/main.py`: dual-lane V2 API with:
- `POST /api/v2/chat/turn`
- `POST /api/v2/chat/turns/dual`
- `GET /api/v2/chat/events/{session_id}/{lane_id}`
- `GET /api/v2/chat/stream/{session_id}/{lane_id}`
- `GET /api/v2/chat/session/{session_id}`
- `GET /api/v2/library/cells`
- `GET /api/v2/library/notebooks`
- `GET /api/v2/library/notebooks/{template_id}`
- `GET /api/v2/library/examples`
- `POST /api/v2/library/evaluate-lane` (mock accuracy + pending approval persistence)
- `src_v2/orchestrator/react_agent.py`: mode-gated ReAct turn runner.
- `src_v2/orchestrator/tools.py`: schema explorer, guarded SQL runner, notebook runner, python runner.
- `src_v2/ui/Home.py`: side-by-side dual-lane Streamlit UI with unified live timeline, cell status labels, and evaluate/send workflow.
- `src_v2/ui/pages/1_Memory_Library.py`: separate Memory Library page for approved notebook/cell memory and pending approvals.
Supporting scripts:
- `scripts/seed_v2_demo_cells.py`: seed additional approved V2 demo cells.
- `scripts/check_composio_snowflake.py`: verify Composio Snowf