Spaces:
Configuration error
Configuration error
|
Download docs/development.md from Darshankumarr03/JanSahayak: direct link, hf CLI and curl.
- Browser
- Download file 1.57 kB
-
https://huggingface.co/spaces/Darshankumarr03/JanSahayak/resolve/main/docs/development.md
- Command line
-
hf download hf://spaces/Darshankumarr03/JanSahayak/docs/development.md
-
curl -L -o development.md https://huggingface.co/spaces/Darshankumarr03/JanSahayak/resolve/main/docs/development.md
1.57 kB
JanSahayak Development & Setup
This guide provides instructions for developers to set up the JanSahayak MAS environment and run the system locally.
Prerequisite Tools
- Python 3.10+: Core language.
- Ollama: For local LLM (defaults to
smollm2:1.7b). - Arize Phoenix: For local observability (installed via
arize-phoenix).
Setup Instructions
- Clone the repository and enter the directory.
- Install dependencies:
pip install -r requirements.txt. - Set up environment variables in
.env:GOOGLE_API_KEY=your_key LLAMA_CLOUD_API_KEY=your_key TELEGRAM_BOT_TOKEN=your_token OLLAMA_MODEL=smollm2:1.7b - Initialize the vector database:
python src/tools/rag.py.
Running the System
1. Flask Web Interface
python src/app.py
Port: 5001
2. Telegram Bot
python src/telegram_bot.py
Local Observability (Arize Phoenix)
To view real-time traces:
- Both
app.pyandtelegram_bot.pyautomatically launch the Phoenix server. - Open your browser and navigate to:
http://localhost:6006. - Here you can see:
- Detailed agent hand-offs.
- Tool execution latency.
- Guardrail triggers (Input/Output).
- RAG context snippets used by each agent.
Project Structure
src/graph.py: Main LangGraph MAS workflow.src/agents/: Specialized agent subgraphs.src/tools/: Custom citizen advocacy tools.src/utils/validators.py: Custom Guardrails AI validators.src/core/observability.py: Tracing configuration.