AI-powered research, OSINT, verification and report synthesis CLI
Project description
๐ SuperInfo - AI-Powered Research Tool
A production-grade, modular research platform combining:
- ๐ฌ Research Agent โ web search + RAG + evidence-grounded answers
- ๐ต๏ธ OSINT Agent โ public digital footprint analysis
- โ Verification Agent โ claim fact-checking against authoritative sources
- ๐ Report Agent โ structured report synthesis
Available as both a CLI tool and FastAPI backend.
Architecture
User Input
โ
โผ
Intent / CLI / API
โ
โผ
Agent Router
โ
โโโบ Search (Brave/Bing/SerpAPI)
โ โ
โ โผ
โ Fetch & Clean HTML
โ โ
โ โผ
โ Chunk + Embed (SentenceTransformers / Grok)
โ โ
โ โผ
โ FAISS Vector Store โโโโโ Persistent
โ โ
โ โผ
โ Top-K Retrieval
โ โ
โ โผ
โโโบ Grok LLM (reasoning + synthesis)
โ โ
โ โผ
โโโบ Structured Output
โ
โโโบ PostgreSQL (history + reports)
โโโบ Redis (cache + dedup)
โโโบ JSON / Markdown report
Quick Start
1. Install
git clone <repo>
cd superinfo
pip install -r requirements.txt
# Or install CLI globally
pip install -e .
2. Configure
cp .env.example .env
# Edit .env with your API keys:
# - GROK_API_KEY
# - SEARCH_API_KEY
# - DATABASE_URL (optional, for persistence)
# - REDIS_URL (optional, for caching)
3. Run CLI
# Research a topic
python superinfo.py research "What is retrieval-augmented generation?"
# Research with arXiv papers
python superinfo.py research "transformer architecture" --arxiv
# OSINT - username
python superinfo.py osint self --username johndoe
# OSINT - organization/domain
python superinfo.py osint org --domain openai.com
# Verify a claim
python superinfo.py verify "The Great Wall of China is visible from space"
# Generate report from saved outputs
python superinfo.py report --input research_output.json --title "My Report"
# Start API server
python superinfo.py serve --port 8000
4. Deploy with Docker
docker-compose up -d
# API available at http://localhost:8000
# Docs at http://localhost:8000/docs
API Reference
POST /research
{
"question": "What is quantum computing?",
"include_arxiv": false,
"top_k": 5
}
POST /osint
{"username": "johndoe"}
POST /osint/domain
{"domain": "example.com"}
POST /verify
{"claim": "Coffee is the most consumed beverage in the world."}
POST /report
{
"agent_outputs": [{...research output...}, {...verify output...}],
"title": "Quarterly Research Report"
}
Tech Stack
| Component | Technology |
|---|---|
| API Framework | FastAPI + Uvicorn |
| CLI | Typer + Rich |
| LLM | Grok API (OpenAI-compatible) |
| Embeddings | SentenceTransformers / Grok |
| Vector Store | FAISS (IndexFlatL2, persistent) |
| Search | Brave / Bing / SerpAPI |
| Academic | arXiv API |
| Database | PostgreSQL (async SQLAlchemy) |
| Cache | Redis |
| HTTP | httpx (async) |
| HTML Parsing | BeautifulSoup4 + readability-lxml |
| Validation | Pydantic v2 |
| Logging | Loguru |
Folder Structure
superinfo/
โโโ app/
โ โโโ agents/
โ โ โโโ research.py # Research agent
โ โ โโโ osint.py # OSINT agent
โ โ โโโ verification.py # Verification agent
โ โ โโโ report.py # Report synthesis agent
โ โโโ api/
โ โ โโโ app.py # FastAPI app + endpoints
โ โ โโโ schemas.py # Pydantic request/response models
โ โโโ cli/
โ โ โโโ main.py # Typer CLI commands
โ โโโ core/
โ โ โโโ config.py # Settings (pydantic-settings)
โ โ โโโ llm.py # Grok LLM client
โ โ โโโ embeddings.py # Embedding service
โ โ โโโ rag.py # RAG pipeline
โ โ โโโ logging.py # Loguru setup
โ โโโ db/
โ โ โโโ models.py # SQLAlchemy async models
โ โ โโโ cache.py # Redis cache layer
โ โ โโโ vector_store.py # FAISS vector store
โ โโโ utils/
โ โโโ text.py # Chunking, cleaning, fetching
โ โโโ search.py # Search abstraction (Brave/Bing/SerpAPI)
โโโ tests/
โ โโโ test_core.py # Unit tests
โโโ superinfo.py # Entry point
โโโ requirements.txt
โโโ pyproject.toml
โโโ Dockerfile
โโโ docker-compose.yml
โโโ .env.example
RAG Implementation
- Chunk size: 1000 tokens (~4000 chars)
- Overlap: 150 tokens (~600 chars)
- Embedding:
all-MiniLM-L6-v2(384-dim) or Grok embeddings - Index: FAISS
IndexFlatL2, persistent to disk - Retrieval: Top-k L2 similarity
- LLM constraint: All answers grounded in retrieved chunks with
[CHUNK-N]citations
Running Tests
pytest tests/ -v
Configuration Reference
| Variable | Default | Description |
|---|---|---|
GROK_API_KEY |
required | Grok API key |
GROK_BASE_URL |
https://api.x.ai/v1 |
Grok API base URL |
GROK_CHAT_MODEL |
grok-beta |
Chat model name |
EMBEDDING_BACKEND |
sentence_transformers |
grok or sentence_transformers |
SEARCH_PROVIDER |
brave |
brave, bing, or serpapi |
SEARCH_API_KEY |
required | Search provider API key |
DATABASE_URL |
postgres URL | PostgreSQL connection string |
REDIS_URL |
redis://localhost:6379/0 |
Redis URL |
CHUNK_SIZE |
1000 |
Tokens per chunk |
CHUNK_OVERLAP |
150 |
Overlap tokens |
TOP_K |
5 |
RAG retrieval count |
Extending the System
Add a new agent:
- Create
app/agents/my_agent.pywithrun()async method - Add Pydantic schemas in
app/api/schemas.py - Register endpoint in
app/api/app.py - Add CLI command in
app/cli/main.py
Add a search provider:
Add a new _search_<provider>() function in app/utils/search.py and register in search_web().
Constraints
- โ No browser automation
- โ No login scraping
- โ Public HTTP GET only
- โ No hidden endpoints
- โ No inference beyond visible data
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
superinfo_tool-1.0.0.tar.gz
(31.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file superinfo_tool-1.0.0.tar.gz.
File metadata
- Download URL: superinfo_tool-1.0.0.tar.gz
- Upload date:
- Size: 31.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
324d7871e987cac6030e1cc1b5d36d259adaf14ccd4651e80d93f9682dc66a87
|
|
| MD5 |
3c6d1107ea3d4ae38d53a5d76d413fc9
|
|
| BLAKE2b-256 |
c89feb76c321f241d13b7378126ff030bf0207938a1941f4452729a1d05b360b
|
File details
Details for the file superinfo_tool-1.0.0-py3-none-any.whl.
File metadata
- Download URL: superinfo_tool-1.0.0-py3-none-any.whl
- Upload date:
- Size: 34.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e19c5594e9e7330cb6ad2c54c005b40f9a02dd2baff944ed30eb689c48be412a
|
|
| MD5 |
13f0cc063cf1de1adaaebf398816b907
|
|
| BLAKE2b-256 |
4d6b98f3d290ee98d20ea38be56a6b58236ec21ab80d788ab495f383c17aaa6b
|