cite-agent 1.0.4__py3-none-any.whl → 1.2.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of cite-agent might be problematic. Click here for more details.
- cite_agent/__init__.py +1 -1
- cite_agent/account_client.py +19 -46
- cite_agent/agent_backend_only.py +30 -4
- cite_agent/cli.py +397 -64
- cite_agent/cli_conversational.py +294 -0
- cite_agent/cli_workflow.py +276 -0
- cite_agent/enhanced_ai_agent.py +3222 -117
- cite_agent/session_manager.py +215 -0
- cite_agent/setup_config.py +5 -21
- cite_agent/streaming_ui.py +252 -0
- cite_agent/updater.py +50 -17
- cite_agent/workflow.py +427 -0
- cite_agent/workflow_integration.py +275 -0
- cite_agent-1.2.3.dist-info/METADATA +442 -0
- cite_agent-1.2.3.dist-info/RECORD +54 -0
- {cite_agent-1.0.4.dist-info → cite_agent-1.2.3.dist-info}/top_level.txt +1 -0
- src/__init__.py +1 -0
- src/services/__init__.py +132 -0
- src/services/auth_service/__init__.py +3 -0
- src/services/auth_service/auth_manager.py +33 -0
- src/services/graph/__init__.py +1 -0
- src/services/graph/knowledge_graph.py +194 -0
- src/services/llm_service/__init__.py +5 -0
- src/services/llm_service/llm_manager.py +495 -0
- src/services/paper_service/__init__.py +5 -0
- src/services/paper_service/openalex.py +231 -0
- src/services/performance_service/__init__.py +1 -0
- src/services/performance_service/rust_performance.py +395 -0
- src/services/research_service/__init__.py +23 -0
- src/services/research_service/chatbot.py +2056 -0
- src/services/research_service/citation_manager.py +436 -0
- src/services/research_service/context_manager.py +1441 -0
- src/services/research_service/conversation_manager.py +597 -0
- src/services/research_service/critical_paper_detector.py +577 -0
- src/services/research_service/enhanced_research.py +121 -0
- src/services/research_service/enhanced_synthesizer.py +375 -0
- src/services/research_service/query_generator.py +777 -0
- src/services/research_service/synthesizer.py +1273 -0
- src/services/search_service/__init__.py +5 -0
- src/services/search_service/indexer.py +186 -0
- src/services/search_service/search_engine.py +342 -0
- src/services/simple_enhanced_main.py +287 -0
- cite_agent/__distribution__.py +0 -7
- cite_agent-1.0.4.dist-info/METADATA +0 -234
- cite_agent-1.0.4.dist-info/RECORD +0 -23
- {cite_agent-1.0.4.dist-info → cite_agent-1.2.3.dist-info}/WHEEL +0 -0
- {cite_agent-1.0.4.dist-info → cite_agent-1.2.3.dist-info}/entry_points.txt +0 -0
- {cite_agent-1.0.4.dist-info → cite_agent-1.2.3.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Simple Enhanced Main Application - Working version with core capabilities
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
import asyncio
|
|
6
|
+
import logging
|
|
7
|
+
import os
|
|
8
|
+
import time
|
|
9
|
+
from datetime import datetime, timezone
|
|
10
|
+
from fastapi import FastAPI, Request, HTTPException
|
|
11
|
+
from fastapi.middleware.cors import CORSMiddleware
|
|
12
|
+
from fastapi.responses import JSONResponse
|
|
13
|
+
from pydantic import BaseModel
|
|
14
|
+
from typing import Optional, Dict, Any
|
|
15
|
+
|
|
16
|
+
# Import our enhanced services
|
|
17
|
+
from services.reasoning_engine.reasoning_engine import ReasoningEngine
|
|
18
|
+
from services.tool_framework.tool_manager import ToolManager
|
|
19
|
+
from services.context_manager.advanced_context import AdvancedContextManager
|
|
20
|
+
|
|
21
|
+
# Configure logging
|
|
22
|
+
logging.basicConfig(level=logging.INFO)
|
|
23
|
+
logger = logging.getLogger(__name__)
|
|
24
|
+
|
|
25
|
+
# Initialize FastAPI app
|
|
26
|
+
app = FastAPI(
|
|
27
|
+
title="Nocturnal Archive API - Enhanced",
|
|
28
|
+
description="Production-grade AI-powered research platform with advanced reasoning capabilities",
|
|
29
|
+
version="3.0.0",
|
|
30
|
+
docs_url="/docs",
|
|
31
|
+
redoc_url="/redoc"
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def _utc_timestamp() -> str:
|
|
36
|
+
return datetime.now(timezone.utc).isoformat()
|
|
37
|
+
|
|
38
|
+
# Add CORS middleware
|
|
39
|
+
app.add_middleware(
|
|
40
|
+
CORSMiddleware,
|
|
41
|
+
allow_origins=["*"], # Configure for production
|
|
42
|
+
allow_credentials=True,
|
|
43
|
+
allow_methods=["*"],
|
|
44
|
+
allow_headers=["*"],
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
# Initialize enhanced services
|
|
48
|
+
tool_manager = ToolManager()
|
|
49
|
+
context_manager = AdvancedContextManager()
|
|
50
|
+
reasoning_engine = ReasoningEngine()
|
|
51
|
+
|
|
52
|
+
# Pydantic models for request/response
|
|
53
|
+
class ChatRequest(BaseModel):
|
|
54
|
+
message: str
|
|
55
|
+
session_id: Optional[str] = None
|
|
56
|
+
use_advanced_reasoning: Optional[bool] = True
|
|
57
|
+
|
|
58
|
+
class ResearchRequest(BaseModel):
|
|
59
|
+
topic: str
|
|
60
|
+
max_results: Optional[int] = 10
|
|
61
|
+
use_advanced_reasoning: Optional[bool] = True
|
|
62
|
+
|
|
63
|
+
class ReasoningRequest(BaseModel):
|
|
64
|
+
problem_description: str
|
|
65
|
+
context: Optional[Dict[str, Any]] = None
|
|
66
|
+
user_id: Optional[str] = None
|
|
67
|
+
|
|
68
|
+
class ToolExecutionRequest(BaseModel):
|
|
69
|
+
tool_name: Optional[str] = None
|
|
70
|
+
task_description: str
|
|
71
|
+
context: Optional[Dict[str, Any]] = None
|
|
72
|
+
auto_select_tool: Optional[bool] = True
|
|
73
|
+
|
|
74
|
+
# Health check endpoints
|
|
75
|
+
@app.get("/")
|
|
76
|
+
async def root():
|
|
77
|
+
"""Root endpoint with service information."""
|
|
78
|
+
return {
|
|
79
|
+
"service": "Nocturnal Archive API - Enhanced",
|
|
80
|
+
"version": "3.0.0",
|
|
81
|
+
"status": "healthy",
|
|
82
|
+
"environment": os.getenv("ENVIRONMENT", "development"),
|
|
83
|
+
"capabilities": [
|
|
84
|
+
"Advanced Reasoning Engine",
|
|
85
|
+
"Dynamic Tool Framework",
|
|
86
|
+
"Code Execution Environment",
|
|
87
|
+
"Advanced Context Management",
|
|
88
|
+
"Academic Research & Synthesis",
|
|
89
|
+
"Multi-LLM Integration"
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
@app.get("/health")
|
|
94
|
+
async def health_check():
|
|
95
|
+
"""Health check endpoint."""
|
|
96
|
+
return {
|
|
97
|
+
"status": "healthy",
|
|
98
|
+
"timestamp": _utc_timestamp(),
|
|
99
|
+
"services": {
|
|
100
|
+
"reasoning_engine": "operational",
|
|
101
|
+
"tool_framework": "operational",
|
|
102
|
+
"context_manager": "operational"
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
@app.get("/api/status")
|
|
107
|
+
async def api_status():
|
|
108
|
+
"""API status endpoint."""
|
|
109
|
+
return {
|
|
110
|
+
"status": "operational",
|
|
111
|
+
"services": {
|
|
112
|
+
"reasoning": "operational",
|
|
113
|
+
"tools": "operational",
|
|
114
|
+
"context": "operational"
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
# Enhanced Reasoning Endpoints
|
|
119
|
+
@app.post("/api/reasoning/solve")
|
|
120
|
+
async def solve_problem(request: ReasoningRequest):
|
|
121
|
+
"""Solve complex problems using advanced reasoning."""
|
|
122
|
+
try:
|
|
123
|
+
# Solve the problem using reasoning engine
|
|
124
|
+
result = await reasoning_engine.solve_problem(
|
|
125
|
+
problem_description=request.problem_description,
|
|
126
|
+
context=request.context,
|
|
127
|
+
user_id=request.user_id
|
|
128
|
+
)
|
|
129
|
+
|
|
130
|
+
return {
|
|
131
|
+
"status": "success",
|
|
132
|
+
"result": result
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
except Exception as e:
|
|
136
|
+
logger.error(f"Reasoning error: {str(e)}")
|
|
137
|
+
raise HTTPException(status_code=500, detail=f"Reasoning failed: {str(e)}")
|
|
138
|
+
|
|
139
|
+
# Enhanced Tool Framework Endpoints
|
|
140
|
+
@app.post("/api/tools/execute")
|
|
141
|
+
async def execute_tool(request: ToolExecutionRequest):
|
|
142
|
+
"""Execute a tool with dynamic selection."""
|
|
143
|
+
try:
|
|
144
|
+
# Execute tool
|
|
145
|
+
if request.auto_select_tool:
|
|
146
|
+
result = await tool_manager.execute_with_auto_selection(
|
|
147
|
+
task_description=request.task_description,
|
|
148
|
+
context=request.context
|
|
149
|
+
)
|
|
150
|
+
else:
|
|
151
|
+
if not request.tool_name:
|
|
152
|
+
raise HTTPException(status_code=400, detail="Tool name required when auto_select_tool is False")
|
|
153
|
+
|
|
154
|
+
result = await tool_manager.execute_tool(
|
|
155
|
+
tool_name=request.tool_name,
|
|
156
|
+
task_description=request.task_description,
|
|
157
|
+
context=request.context
|
|
158
|
+
)
|
|
159
|
+
|
|
160
|
+
return {
|
|
161
|
+
"status": "success",
|
|
162
|
+
"result": result
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
except Exception as e:
|
|
166
|
+
logger.error(f"Tool execution error: {str(e)}")
|
|
167
|
+
raise HTTPException(status_code=500, detail=f"Tool execution failed: {str(e)}")
|
|
168
|
+
|
|
169
|
+
@app.get("/api/tools/available")
|
|
170
|
+
async def get_available_tools():
|
|
171
|
+
"""Get list of available tools."""
|
|
172
|
+
try:
|
|
173
|
+
tools = tool_manager.get_available_tools()
|
|
174
|
+
tool_capabilities = {}
|
|
175
|
+
|
|
176
|
+
for tool in tools:
|
|
177
|
+
tool_capabilities[tool] = tool_manager.get_tool_capabilities(tool)
|
|
178
|
+
|
|
179
|
+
return {
|
|
180
|
+
"status": "success",
|
|
181
|
+
"tools": tools,
|
|
182
|
+
"capabilities": tool_capabilities
|
|
183
|
+
}
|
|
184
|
+
except Exception as e:
|
|
185
|
+
logger.error(f"Failed to get available tools: {str(e)}")
|
|
186
|
+
raise HTTPException(status_code=500, detail=f"Failed to get available tools: {str(e)}")
|
|
187
|
+
|
|
188
|
+
# Enhanced Context Management Endpoints
|
|
189
|
+
@app.post("/api/context/process")
|
|
190
|
+
async def process_context(request: ChatRequest):
|
|
191
|
+
"""Process interaction and update context."""
|
|
192
|
+
try:
|
|
193
|
+
session_id = request.session_id or "default_session"
|
|
194
|
+
|
|
195
|
+
# Generate response (this would integrate with existing chat logic)
|
|
196
|
+
response = f"Enhanced response to: {request.message}"
|
|
197
|
+
|
|
198
|
+
# Process interaction in context manager
|
|
199
|
+
result = await context_manager.process_interaction(
|
|
200
|
+
user_input=request.message,
|
|
201
|
+
response=response,
|
|
202
|
+
session_id=session_id,
|
|
203
|
+
user_id="anonymous"
|
|
204
|
+
)
|
|
205
|
+
|
|
206
|
+
return {
|
|
207
|
+
"status": "success",
|
|
208
|
+
"response": response,
|
|
209
|
+
"context_result": result
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
except Exception as e:
|
|
213
|
+
logger.error(f"Context processing error: {str(e)}")
|
|
214
|
+
raise HTTPException(status_code=500, detail=f"Context processing failed: {str(e)}")
|
|
215
|
+
|
|
216
|
+
@app.get("/api/context/retrieve")
|
|
217
|
+
async def retrieve_context(query: str, session_id: Optional[str] = None):
|
|
218
|
+
"""Retrieve relevant context for a query."""
|
|
219
|
+
try:
|
|
220
|
+
result = await context_manager.retrieve_relevant_context(
|
|
221
|
+
query=query,
|
|
222
|
+
session_id=session_id,
|
|
223
|
+
user_id="anonymous"
|
|
224
|
+
)
|
|
225
|
+
|
|
226
|
+
return {
|
|
227
|
+
"status": "success",
|
|
228
|
+
"result": result
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
except Exception as e:
|
|
232
|
+
logger.error(f"Context retrieval error: {str(e)}")
|
|
233
|
+
raise HTTPException(status_code=500, detail=f"Context retrieval failed: {str(e)}")
|
|
234
|
+
|
|
235
|
+
# Enhanced Chat Endpoint with Advanced Reasoning
|
|
236
|
+
@app.post("/api/enhanced-chat")
|
|
237
|
+
async def enhanced_chat_endpoint(request: ChatRequest):
|
|
238
|
+
"""Enhanced chat endpoint with advanced reasoning capabilities."""
|
|
239
|
+
try:
|
|
240
|
+
session_id = request.session_id or "enhanced_session"
|
|
241
|
+
|
|
242
|
+
# Use advanced reasoning if requested
|
|
243
|
+
if request.use_advanced_reasoning:
|
|
244
|
+
# Solve as a reasoning problem
|
|
245
|
+
reasoning_result = await reasoning_engine.solve_problem(
|
|
246
|
+
problem_description=request.message,
|
|
247
|
+
context={"session_id": session_id, "user_id": "anonymous"},
|
|
248
|
+
user_id="anonymous"
|
|
249
|
+
)
|
|
250
|
+
|
|
251
|
+
response = reasoning_result.get("solution", "No solution generated")
|
|
252
|
+
else:
|
|
253
|
+
# Use simple response
|
|
254
|
+
response = f"Standard response to: {request.message}"
|
|
255
|
+
|
|
256
|
+
# Process interaction in context manager
|
|
257
|
+
await context_manager.process_interaction(
|
|
258
|
+
user_input=request.message,
|
|
259
|
+
response=str(response),
|
|
260
|
+
session_id=session_id,
|
|
261
|
+
user_id="anonymous"
|
|
262
|
+
)
|
|
263
|
+
|
|
264
|
+
return {
|
|
265
|
+
"response": response,
|
|
266
|
+
"session_id": session_id,
|
|
267
|
+
"timestamp": _utc_timestamp(),
|
|
268
|
+
"mode": "enhanced_reasoning" if request.use_advanced_reasoning else "standard"
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
except Exception as e:
|
|
272
|
+
logger.error(f"Enhanced chat error: {str(e)}")
|
|
273
|
+
raise HTTPException(status_code=500, detail=f"Chat failed: {str(e)}")
|
|
274
|
+
|
|
275
|
+
# Error handling
|
|
276
|
+
@app.exception_handler(Exception)
|
|
277
|
+
async def global_exception_handler(request: Request, exc: Exception):
|
|
278
|
+
"""Global exception handler."""
|
|
279
|
+
logger.error(f"Unhandled exception: {str(exc)}")
|
|
280
|
+
return JSONResponse(
|
|
281
|
+
status_code=500,
|
|
282
|
+
content={"detail": "Internal server error"}
|
|
283
|
+
)
|
|
284
|
+
|
|
285
|
+
if __name__ == "__main__":
|
|
286
|
+
import uvicorn
|
|
287
|
+
uvicorn.run(app, host="127.0.0.1", port=8003)
|
cite_agent/__distribution__.py
DELETED
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: cite-agent
|
|
3
|
-
Version: 1.0.4
|
|
4
|
-
Summary: AI Research Assistant - Backend-Only Distribution
|
|
5
|
-
Home-page: https://github.com/Spectating101/cite-agent
|
|
6
|
-
Author: Cite-Agent Team
|
|
7
|
-
Author-email: contact@citeagent.dev
|
|
8
|
-
Classifier: Development Status :: 4 - Beta
|
|
9
|
-
Classifier: Intended Audience :: Science/Research
|
|
10
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
-
Requires-Python: >=3.9
|
|
16
|
-
Description-Content-Type: text/markdown
|
|
17
|
-
License-File: LICENSE
|
|
18
|
-
Requires-Dist: requests>=2.31.0
|
|
19
|
-
Requires-Dist: aiohttp>=3.9.0
|
|
20
|
-
Requires-Dist: python-dotenv>=1.0.0
|
|
21
|
-
Requires-Dist: pydantic>=2.5.0
|
|
22
|
-
Requires-Dist: rich>=13.7.0
|
|
23
|
-
Requires-Dist: keyring>=24.3.0
|
|
24
|
-
Dynamic: author
|
|
25
|
-
Dynamic: author-email
|
|
26
|
-
Dynamic: classifier
|
|
27
|
-
Dynamic: description
|
|
28
|
-
Dynamic: description-content-type
|
|
29
|
-
Dynamic: home-page
|
|
30
|
-
Dynamic: license-file
|
|
31
|
-
Dynamic: requires-dist
|
|
32
|
-
Dynamic: requires-python
|
|
33
|
-
Dynamic: summary
|
|
34
|
-
|
|
35
|
-
# Cite-Agent
|
|
36
|
-
|
|
37
|
-
> A fast, affordable AI research assistant with built-in citation capabilities
|
|
38
|
-
|
|
39
|
-
**Cite-Agent** is a terminal-based AI assistant designed for research and finance, offering 70B model access at half the cost of comparable services.
|
|
40
|
-
|
|
41
|
-
---
|
|
42
|
-
|
|
43
|
-
## 🎯 What is Cite-Agent?
|
|
44
|
-
|
|
45
|
-
Cite-Agent is an AI-powered research tool that:
|
|
46
|
-
- Answers complex questions using state-of-the-art 70B language models
|
|
47
|
-
- Provides accurate, source-grounded responses (hence "cite")
|
|
48
|
-
- Executes code (Python, R, SQL) for data analysis
|
|
49
|
-
- Operates through a beautiful terminal interface
|
|
50
|
-
- Costs $10/month (vs $20+ for Claude/ChatGPT)
|
|
51
|
-
|
|
52
|
-
---
|
|
53
|
-
|
|
54
|
-
## ✨ Key Features
|
|
55
|
-
|
|
56
|
-
### 🧠 **Powerful AI**
|
|
57
|
-
- Access to Llama 3.3 70B via Cerebras & Groq
|
|
58
|
-
- Multi-provider fallback for 99.9% uptime
|
|
59
|
-
- 50 queries/day (50,000 tokens)
|
|
60
|
-
- 2-5 second response times
|
|
61
|
-
|
|
62
|
-
### 🎓 **Truth-Seeking**
|
|
63
|
-
- Explicitly designed to correct user errors
|
|
64
|
-
- Admits uncertainty instead of guessing
|
|
65
|
-
- Cites sources and reasoning
|
|
66
|
-
- Anti-appeasement prompts
|
|
67
|
-
|
|
68
|
-
### 💻 **Code Execution**
|
|
69
|
-
- Python, R, and SQL support
|
|
70
|
-
- Data analysis and visualization
|
|
71
|
-
- Financial calculations
|
|
72
|
-
- Research automation
|
|
73
|
-
|
|
74
|
-
### 🔒 **Secure & Private**
|
|
75
|
-
- API keys never leave the backend
|
|
76
|
-
- JWT-based authentication
|
|
77
|
-
- Rate limiting per user
|
|
78
|
-
- HTTPS-only communication
|
|
79
|
-
|
|
80
|
-
### 📊 **Analytics**
|
|
81
|
-
- Track your usage
|
|
82
|
-
- Monitor token consumption
|
|
83
|
-
- View query history
|
|
84
|
-
- Download statistics
|
|
85
|
-
|
|
86
|
-
---
|
|
87
|
-
|
|
88
|
-
## 💰 Pricing
|
|
89
|
-
|
|
90
|
-
| Plan | Price | Queries/Day | Features |
|
|
91
|
-
|------|-------|-------------|----------|
|
|
92
|
-
| **Student** | $10/month (300 NTD) | 50 | Full access |
|
|
93
|
-
| **Public** | $10/month (400 NTD) | 50 | Full access |
|
|
94
|
-
|
|
95
|
-
**Beta**: First 50 users get 3 months free
|
|
96
|
-
|
|
97
|
-
---
|
|
98
|
-
|
|
99
|
-
## 🚀 Quick Start
|
|
100
|
-
|
|
101
|
-
### For Users
|
|
102
|
-
|
|
103
|
-
1. **Download** for your OS:
|
|
104
|
-
- [Windows](https://cite-agent-api.herokuapp.com/api/downloads/windows)
|
|
105
|
-
- [macOS](https://cite-agent-api.herokuapp.com/api/downloads/macos)
|
|
106
|
-
- [Linux](https://cite-agent-api.herokuapp.com/api/downloads/linux)
|
|
107
|
-
|
|
108
|
-
2. **Install** the downloaded package
|
|
109
|
-
|
|
110
|
-
3. **Run** `cite-agent` in your terminal
|
|
111
|
-
|
|
112
|
-
4. **Register** with email + password
|
|
113
|
-
|
|
114
|
-
5. **Start asking questions!**
|
|
115
|
-
|
|
116
|
-
### For Developers
|
|
117
|
-
|
|
118
|
-
See [DEVELOPMENT.md](./docs/DEVELOPMENT.md) for setup instructions.
|
|
119
|
-
|
|
120
|
-
---
|
|
121
|
-
|
|
122
|
-
## 🏗️ Architecture
|
|
123
|
-
|
|
124
|
-
```
|
|
125
|
-
User's Machine Backend (Heroku) AI Providers
|
|
126
|
-
┌─────────────┐ ┌──────────────┐ ┌──────────┐
|
|
127
|
-
│ │ │ │ │ │
|
|
128
|
-
│ Terminal │─────────────▶│ FastAPI │─────────────▶│ Cerebras │
|
|
129
|
-
│ UI │ │ API │ │ (70B) │
|
|
130
|
-
│ │◀─────────────│ │◀─────────────│ │
|
|
131
|
-
│ (cite_ │ │ - Auth │ └──────────┘
|
|
132
|
-
│ agent/) │ │ - Rate │
|
|
133
|
-
│ │ │ Limiting │ ┌──────────┐
|
|
134
|
-
└─────────────┘ │ - Analytics │ │ │
|
|
135
|
-
│ - Proxy │─────────────▶│ Groq │
|
|
136
|
-
│ │ │ (70B) │
|
|
137
|
-
└──────────────┘ │ │
|
|
138
|
-
│ └──────────┘
|
|
139
|
-
┌──────────────┐
|
|
140
|
-
│ PostgreSQL │
|
|
141
|
-
│ Database │
|
|
142
|
-
└──────────────┘
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
### Components
|
|
146
|
-
|
|
147
|
-
**Frontend (cite_agent/)**
|
|
148
|
-
- Terminal UI using `rich` library
|
|
149
|
-
- JWT authentication
|
|
150
|
-
- Query management
|
|
151
|
-
- Local session storage
|
|
152
|
-
|
|
153
|
-
**Backend (cite-agent-api/)**
|
|
154
|
-
- FastAPI REST API
|
|
155
|
-
- User authentication & rate limiting
|
|
156
|
-
- Multi-provider LLM routing
|
|
157
|
-
- Analytics & tracking
|
|
158
|
-
- PostgreSQL database
|
|
159
|
-
|
|
160
|
-
**AI Providers**
|
|
161
|
-
- **Primary**: Cerebras (14,400 RPD × 3 keys = 43,200/day)
|
|
162
|
-
- **Backup**: Groq (1,000 RPD × 3 keys = 3,000/day)
|
|
163
|
-
- **Total capacity**: ~46,000 queries/day
|
|
164
|
-
|
|
165
|
-
---
|
|
166
|
-
|
|
167
|
-
## 📖 Documentation
|
|
168
|
-
|
|
169
|
-
- **[DEVELOPMENT.md](./docs/DEVELOPMENT.md)** - Developer setup guide
|
|
170
|
-
- **[DEPLOYMENT.md](./DEPLOYMENT.md)** - How to deploy (Heroku)
|
|
171
|
-
- **[API_REFERENCE.md](./docs/API_REFERENCE.md)** - API endpoints
|
|
172
|
-
- **[ARCHITECTURE.md](./ARCHITECTURE.md)** - System design details
|
|
173
|
-
- **[ROADMAP.md](./ROADMAP.md)** - Future plans
|
|
174
|
-
|
|
175
|
-
---
|
|
176
|
-
|
|
177
|
-
## 🛠️ Tech Stack
|
|
178
|
-
|
|
179
|
-
**Frontend**
|
|
180
|
-
- Python 3.13+
|
|
181
|
-
- `rich` for terminal UI
|
|
182
|
-
- `httpx` for async HTTP
|
|
183
|
-
- `pydantic` for data validation
|
|
184
|
-
|
|
185
|
-
**Backend**
|
|
186
|
-
- FastAPI
|
|
187
|
-
- PostgreSQL
|
|
188
|
-
- JWT authentication
|
|
189
|
-
- Multi-provider LLM integration
|
|
190
|
-
|
|
191
|
-
**AI Providers**
|
|
192
|
-
- Cerebras Inference API
|
|
193
|
-
- Groq Cloud
|
|
194
|
-
- Cloudflare Workers AI (fallback)
|
|
195
|
-
- OpenRouter (fallback)
|
|
196
|
-
|
|
197
|
-
**Deployment**
|
|
198
|
-
- Heroku (backend + database)
|
|
199
|
-
- GitHub Releases (installers)
|
|
200
|
-
|
|
201
|
-
---
|
|
202
|
-
|
|
203
|
-
## 🤝 Contributing
|
|
204
|
-
|
|
205
|
-
We're not accepting contributions yet (private beta), but stay tuned!
|
|
206
|
-
|
|
207
|
-
---
|
|
208
|
-
|
|
209
|
-
## 📜 License
|
|
210
|
-
|
|
211
|
-
Proprietary - All rights reserved
|
|
212
|
-
|
|
213
|
-
---
|
|
214
|
-
|
|
215
|
-
## 📧 Support
|
|
216
|
-
|
|
217
|
-
- **Email**: s1133958@mail.yzu.edu.tw
|
|
218
|
-
- **Issues**: Coming soon
|
|
219
|
-
- **Documentation**: See `/docs` directory
|
|
220
|
-
|
|
221
|
-
---
|
|
222
|
-
|
|
223
|
-
## 🙏 Acknowledgments
|
|
224
|
-
|
|
225
|
-
- **Cerebras** for generous free tier (14,400 RPD)
|
|
226
|
-
- **Groq** for fast 70B inference
|
|
227
|
-
- **GitHub Student Pack** for free hosting credits
|
|
228
|
-
- **FastAPI** for excellent async framework
|
|
229
|
-
|
|
230
|
-
---
|
|
231
|
-
|
|
232
|
-
**Built with ❤️ for researchers and analysts**
|
|
233
|
-
|
|
234
|
-
*Cite-Agent - Because accuracy matters more than agreeableness*
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
cite_agent/__distribution__.py,sha256=U7-p-qBMX7WrQD6WWjRC5b-PswXnlrqAox7EYnLogqI,178
|
|
2
|
-
cite_agent/__init__.py,sha256=n12qGnmZ0th2OJTn5kBK-kzIEn_1EZgZ1qujT4-ZMeU,1643
|
|
3
|
-
cite_agent/account_client.py,sha256=kvILYFKGm6ktCdi7iKSP5dkOp7iOAcBEQ7giHOh711w,6723
|
|
4
|
-
cite_agent/agent_backend_only.py,sha256=Rmi3cUCcTMSHRxZu6MK2rZwme5SCfilxqn0BsoIds_U,5375
|
|
5
|
-
cite_agent/ascii_plotting.py,sha256=lk8BaECs6fmjtp4iH12G09-frlRehAN7HLhHt2crers,8570
|
|
6
|
-
cite_agent/auth.py,sha256=CYBNv8r1_wfdhsx-YcWOiXCiKvPBymaMca6w7JV__FQ,9809
|
|
7
|
-
cite_agent/backend_only_client.py,sha256=WqLF8x7aXTro2Q3ehqKMsdCg53s6fNk9Hy86bGxqmmw,2561
|
|
8
|
-
cite_agent/cli.py,sha256=T2zSv2ET3IKh1_ENfFIkW292KWC1lt-yUSdYn51Urw4,18564
|
|
9
|
-
cite_agent/cli_enhanced.py,sha256=EAaSw9qtiYRWUXF6_05T19GCXlz9cCSz6n41ASnXIPc,7407
|
|
10
|
-
cite_agent/dashboard.py,sha256=VGV5XQU1PnqvTsxfKMcue3j2ri_nvm9Be6O5aVays_w,10502
|
|
11
|
-
cite_agent/enhanced_ai_agent.py,sha256=Rmi3cUCcTMSHRxZu6MK2rZwme5SCfilxqn0BsoIds_U,5375
|
|
12
|
-
cite_agent/rate_limiter.py,sha256=-0fXx8Tl4zVB4O28n9ojU2weRo-FBF1cJo9Z5jC2LxQ,10908
|
|
13
|
-
cite_agent/setup_config.py,sha256=fUVBxJ0CK7e5cGG4jBDpHbB2seC1RqEteneq-WslAw8,17064
|
|
14
|
-
cite_agent/telemetry.py,sha256=55kXdHvI24ZsEkbFtihcjIfJt2oiSXcEpLzTxQ3KCdQ,2916
|
|
15
|
-
cite_agent/ui.py,sha256=r1OAeY3NSeqhAjJYmEBH9CaennBuibFAz1Mur6YF80E,6134
|
|
16
|
-
cite_agent/updater.py,sha256=kL2GYL1AKoZ9JoTXxFT5_AkvYvObcCrO2sIVyBw9JgU,7057
|
|
17
|
-
cite_agent/web_search.py,sha256=j-BRhT8EBC6BEPgACQPeVwB1SVGKDz4XLM7sowacvSc,6587
|
|
18
|
-
cite_agent-1.0.4.dist-info/licenses/LICENSE,sha256=XJkyO4IymhSUniN1ENY6lLrL2729gn_rbRlFK6_Hi9M,1074
|
|
19
|
-
cite_agent-1.0.4.dist-info/METADATA,sha256=QklMsGqAD-NCLM1S4LHzCUSaeH58ld-IXG06NO24Bsw,6856
|
|
20
|
-
cite_agent-1.0.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
21
|
-
cite_agent-1.0.4.dist-info/entry_points.txt,sha256=bJ0u28nFIxQKH1PWQ2ak4PV-FAjhoxTC7YADEdDenFw,83
|
|
22
|
-
cite_agent-1.0.4.dist-info/top_level.txt,sha256=NNfD8pxDZzBK8tjDIpCs2BW9Va-OQ5qUFbEx0SgmyIE,11
|
|
23
|
-
cite_agent-1.0.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|