Technical reference
This page explains how JarvisQwen works under the hood: the task pipeline, the cost architecture, and the safety mechanisms. If you are new here, start with the Guidelines page β it covers what the product does, how to get started, and what each page is for.
1. The task pipeline (the life of one task)
Key point: 4 of the 7 stages are zero-cost pure code. Only triage and summarization spend money, and summarization only touches papers that passed triage β that's where the order-of-magnitude cost reduction comes from.
2. Cost architecture: three-tier model routing
The core idea: a cheap, always-on steward + expensive, on-demand experts. The scheduler daemon runs on a cheap (even free) CPU VM and commands the Qwen model family on Qwen Cloud (qwen3.6-flash / qwen3.7-plus / qwen3.7-max); BYOK also supports other providers. Every piece of work is routed to the cheapest tier that can handle it:
Polling, dedup, archiving, parsing β pure Python, no model calls at all.
Instruction parsing, triage, briefings β qwen3.6-flash at $0.25/MTok input.
Deep summaries and surveys β qwen3.7-max, only when genuinely needed.
3. π‘οΈ Safety rails (no runaway bills, no data loss, no rogue actions)
π‘οΈ Dry-run mode: no key, no errors
With no API key configured, the system enters dry-run mode: LLM calls return simulated responses, the whole pipeline still runs, at zero cost. Learn the system first, connect a model later.
π‘οΈ Key auto-correction + live probe
Pasted keys are stripped of stray whitespace, quotes, Bearer prefixes, full-width characters and variable-name residue; the provider is auto-detected; a minimal test request runs on save and tells you immediately: valid / invalid / out of quota. You never discover a bad key mid-task.
π‘οΈ Hard daily budget cut-off + 80% alert
Set a daily spending cap. At 80% you get an alert; at 100% the breaker trips β running tasks are suspended instead of burning money. Worst case is capped. A runaway bill is structurally impossible.
π‘οΈ Circuit breakers + exponential backoff + model fallback
When a model/provider keeps failing it gets circuit-broken; requests reroute to a backup key β backup provider β cheaper model. Retries use exponential backoff with jitter (1sβ2sβ4sβ¦). No retry storm can ever eat your quota.
π‘οΈ Checkpoint resume: crashes never double-bill
Every completed step snapshots its state. After a power cut, restart or network outage, the task resumes from the last checkpoint β paid intermediate results are never recomputed. You never pay twice for the same work.
π‘οΈ Zombie-task watchdog
A task that hangs past its timeout is flagged as a zombie, reclaimed, and re-queued (resuming from checkpoint). Nothing silently occupies resources forever.
π‘οΈ Redaction gateway: sensitive data stays home
All text bound for the cloud passes three detection layers (regex / entropy / NER): emails, IDs, API keys are replaced with placeholders and restored after the model responds. At the highest sensitivity level, egress is blocked outright. Your unpublished ideas never streak across third-party servers.
π‘οΈ Prompt-injection isolation
External content (papers, web pages) is wrapped in a data zone declared as "material, not instructions" before entering prompts; outputs are scanned for suspicious links. Malicious instructions hidden in documents can't hijack the agent.
π‘οΈ Human-in-the-loop approvals
Destructive or outbound operations never auto-execute β they queue for your explicit approval, then resume seamlessly from checkpoint. Denied means safely stopped.
π‘οΈ Permission isolation + full audit
With multiple users, retrieval is ownership-filtered before anything reaches the model context. Every call's model, tokens, cost, and I/O digests land in an append-only audit trail β you can always answer "which call produced this conclusion?"
4. Glossary
5. Troubleshooting
Q: An API key is configured, but real model calls fail with an error?
A: Self-hosted backends need the litellm dependency: run pip install litellm on the server. The Docker image ships with it preinstalled.
Q: Tasks stay QUEUED and never start running?
A: Usually the daily budget breaker has tripped (check the Dashboard) or all workers are busy with long tasks. Raise the cap in Settings or wait for a worker to free up; suspended tasks resume automatically.
Q: Where are my data and the admin password stored?
A: Everything lives in the data/ directory next to the deployment (SQLite database, PDFs, admin_password.txt). Back up that one directory and you have backed up everything.
For usage-level questions (where results are, what the flow diagram means, how to control spending), see the FAQ in the Guidelines.