File size: 3,321 Bytes
b7f1fa3
 
 
 
 
 
 
 
 
48a5851
fd06b5a
48a5851
 
 
 
 
 
 
 
 
 
fd06b5a
48a5851
fd06b5a
48a5851
 
 
 
 
 
fd06b5a
48a5851
fd06b5a
48a5851
fd06b5a
48a5851
 
fd06b5a
48a5851
 
fd06b5a
 
 
48a5851
 
fd06b5a
48a5851
fd06b5a
48a5851
fd06b5a
48a5851
fd06b5a
 
48a5851
 
fd06b5a
 
 
 
 
48a5851
fd06b5a
48a5851
 
 
 
fd06b5a
48a5851
fd06b5a
 
48a5851
 
 
 
 
 
fd06b5a
 
48a5851
fd06b5a
48a5851
 
fd06b5a
 
 
 
48a5851
 
fd06b5a
48a5851
fd06b5a
 
48a5851
fd06b5a
 
 
 
 
 
 
 
 
 
48a5851
fd06b5a
48a5851
 
 
fd06b5a
48a5851
fd06b5a
48a5851
 
 
 
fd06b5a
48a5851
fd06b5a
48a5851
 
 
 
fd06b5a
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
---
title: Multi Agent Chat
emoji: πŸ€–
colorFrom: blue
colorTo: indigo
sdk: docker
pinned: false
app_port: 7860
---
# πŸ€– Multi-Agent AI System

**Production-ready AI backend (FastAPI + LangGraph) with a modern React.js chat frontend.**
## Try on Huggingface Space
<p>
<a href="https://sibikrish-cr-agent.hf.space/"><img src="https://img.shields.io/badge/Huggingface-white?style=flat&logo=huggingface&logoSize=amd" alt="huggingface" width="160" height="50"></a>
</p>

## API SwaggerUI
<a href="https://sibikrish-cr-agent.hf.space/docs"><img src="https://img.shields.io/badge/Huggingface-white?style=flat&logo=swagger&logoSize=amd" alt="huggingface" width="160" height="50"></a>
</p>
---

## Features

- **React Frontend**: Gradient UI, chat memory
- **Four AI Agents**: Weather, Documents (RAG), Meetings, SQL
- **Vector Store RAG**: ChromaDB semantic search
- **Reliable Tool Execution**: Deterministic tool calls
- **File Upload**: PDF, TXT, MD, DOCX support
- **One-Command Start**: `start.bat` or `start.sh`

## Quick Start

**Windows:**
```powershell
./start.bat
```

**Linux/Mac:**
```bash
chmod +x start.sh && ./start.sh
```

Frontend: [http://localhost:3000](http://localhost:3000)
Backend: [http://localhost:7860](http://localhost:7860)

## Manual Setup

**Backend:**
```powershell
uvicorn main:app --reload
```

**Frontend:**
```bash
cd frontend
npm install
npm start
```

## Usage Examples

- **Weather:** "What's the weather in Chennai?"
- **Documents:** Upload PDF β†’ Ask "What is the policy?"
- **Meetings:** "Schedule team meeting tomorrow at 2pm"
- **Database:** "Show all meetings scheduled tomorrow"

## Architecture

```
React UI (3000) β†’ FastAPI (7860) β†’ LangGraph
                                 ↓
           β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”
           β”‚ Weather  β”‚ Docs   β”‚ Meeting β”‚  SQL   β”‚
           β”‚  Agent   β”‚ +RAG   β”‚  Agent  β”‚ Agent  β”‚
           β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”˜
```

## Configuration (.env)

```env
GITHUB_TOKEN=ghp_...              # Optional (GitHub search)
OPENWEATHERMAP_API_KEY=...        # Required for weather
```

Get tokens:
- [GitHub](https://github.com/settings/tokens)
- [OpenWeather](https://openweathermap.org/api)

## Project Structure

```
cr-agent/
β”œβ”€β”€ agents.py              # AI agents
β”œβ”€β”€ main.py                # FastAPI server
β”œβ”€β”€ tools.py               # Tool implementations
β”œβ”€β”€ vector_store.py        # ChromaDB RAG
β”œβ”€β”€ start.bat              # One-command startup
└── frontend/              # React UI
    β”œβ”€β”€ src/App.js
    └── package.json
```

## Documentation

- [COMPLETE_SETUP.md](docs/COMPLETE_SETUP.md): Full setup guide
- [FRONTEND_SETUP.md](docs/FRONTEND_SETUP.md): Frontend details
- [TOOL_CALLING_ISSUE.md](docs/TOOL_CALLING_ISSUE.md): Technical analysis

## Test Results

- Weather Agent: βœ… Working
- Document RAG: βœ… Working (similarity: 0.59-0.70)
- SQL Agent: βœ… Working
- Meeting Agent: βœ… Working

## Tech Stack

- FastAPI, LangGraph, ChromaDB
- React 18, Axios
- sentence-transformers
- Docling

---

**Made with ❀️ using FastAPI, LangGraph, React, and ChromaDB**