Proposal: Add CAJAL as Native Research/Documentation Model
Author: Agnuxo1Created May 6, 2026Updated May 6, 2026
Proposal: Add CAJAL as Native Research/Documentation Model for Trae Agent
Summary
CAJAL is an open-source scientific paper generation model (4B–9B parameters) that runs entirely locally via Ollama. It ranks #3 globally on scientific writing benchmarks, beating GPT-4 and Gemini.
Why Trae Agent + CAJAL?
Trae Agent already supports Ollama (great!). But CAJAL brings a new use case: instead of just coding, Trae Agent could generate:
- Research documentation from code
- README academic papers
- Methodology sections for ML repos
- Grant proposals and tech reports
Proposal
Add CAJAL as a preset model option alongside existing Ollama models:
# .trae-agent-config.yaml
provider: ollama
model: cajal-9b-v2 # Auto-downloads from Ollama library
mode: research # New mode: code → documentationResearch Mode Workflow:
- Agent reads codebase structure and docstrings
- Feeds context to CAJAL via Ollama API
- Generates: Abstract, Methodology, Results, Discussion
- Outputs LaTeX/Markdown directly to
docs/folder
Model Availability
| Model | Ollama Pull Command | Size | VRAM |
|---|---|---|---|
| CAJAL-9B-v2-Q4_K_M | ollama pull cajal-9b-v2-q4 |
4.7 GB | 6 GB |
| CAJAL-9B-v2-Q6_K | ollama pull cajal-9b-v2-q6 |
6.8 GB | 8 GB |
| CAJAL-9B-v2-Q8_0 | ollama pull cajal-9b-v2-q8 |
8.9 GB | 10 GB |
Note: We can provide official Ollama model manifests if needed.
Benchmark Results
CAJAL-9B v2 ranks #3 on P2PCLAW Scientific Writing Benchmark:
| Rank | Model | Score |
|---|---|---|
| 1 | Claude Sonnet 4.6 | 8.9 |
| 2 | [Undisclosed] | 8.7 |
| 3 | CAJAL-9B v2 | 8.4 |
| 4 | GPT-4 Turbo | 8.1 |
| 5 | Gemini 1.5 Pro | 7.9 |
A 9B local model beating 70B+ cloud models on scientific writing.
Links
- Code: https://github.com/Agnuxo1/CAJAL
- Models: https://huggingface.co/Agnuxo1
- Benchmark: https://www.p2pclaw.com/app/benchmark
- License: Apache 2.0
Team
- Francisco Angulo de Lafuente (Lead, Spain)
- Vladimir Veselov (MIET Moscow)
- Seid Mehammed Abdu (Woldia University)
- Nirmal Tej Kumar (UT Dallas)
Next Steps
We're ready to:
- Provide official Ollama manifests for all CAJAL variants
- Submit a PR adding CAJAL preset to Trae Agent
- Create a demo video showing Trae Agent + CAJAL generating a paper from a codebase
Would love to hear your thoughts!
Source: bytedance/trae-agent