Spaces:
Running
Running
metadata
title: DCI-Agent Demo
emoji: ๐ฎ
colorFrom: purple
colorTo: indigo
sdk: docker
app_port: 7860
pinned: false
DCI-Agent Search
A Prestige Purple-themed Hugging Face Spaces app for autonomous document search over Wikipedia and other datasets.
Features
- Autonomous search: Pi reads files and runs shell commands (rg, grep, find, etc.) to answer your questions over a corpus.
- Real-time terminal: Watch Pi's reasoning and tool execution in a live terminal-like log.
- Default corpus: Wikipedia corpus with multi-hop QA examples from 2WikiMultiHopQA, HotpotQA, and other datasets.
- Upload your own corpus: ZIP upload with per-file (1 KB) and total (15 MB) limits.
- Native PI runner: Uses the original DCI-Agent Pi CLI via RPC. The Docker build now requires
pi-monoto build successfully so remote deployments stay aligned with local behavior.
Deployment
Hugging Face Spaces (Docker)
- Create a new Space on Hugging Face, choose Docker as the SDK.
- Upload the contents of this
web-app/directory. - Set your
OPENAI_API_KEYas a Space secret (optional โ users can also provide it in the UI). - The Space will build and launch automatically.
Local testing
cd web-app
pip install -r requirements.txt
python app.py
Open http://localhost:7860 in your browser.
Usage
- Enter your OpenAI API key.
- Choose a model (gpt-4o recommended).
- Set max turns (default: 6).
- Either check "Use Default Corpus" or upload your own ZIP file.
- Type a question and click Run Search.
- Watch the terminal log for real-time progress.
- The final answer appears in the Final Answer box.
File structure
web-app/
โโโ app.py # Gradio UI and orchestration
โโโ pi_wrapper.py # PI RPC client and native runner integration
โโโ Dockerfile # HF Spaces Docker image
โโโ requirements.txt # Python dependencies
โโโ default_corpus/ # Wikipedia corpus (wiki_dump.jsonl)
โ โโโ biology/
โ โโโ earth_science/
โ โโโ economics/
โ โโโ robotics/
โโโ README.md
Design
Prestige Purple theme:
- Deep purples (
#B4AFF2,#5822B4) and rich blacks (#0A0A12,#141420). - Plus Jakarta Sans for headings and body.
- JetBrains Mono for the terminal log.
- Cinematic gradients and generous whitespace.