← Back to Index
K-Dense BYOK Co-Scientist
Open-source BYOK (Bring Your Own Keys) desktop application that orchestrates a main conversational agent ("Kady") with delegated expert sub-agents equipped with 170+ scientific skills across 22 disciplines. Organization: K-Dense Inc. Published: March 2026 (beta); actively maintained Type: repo (GitHub: K-Dense-AI/k-dense-byok) Report Type: PhD-Level Technical Analysis Report Date: April 2026
Table of Contents
- Full Title and Attribution
- Authors and Team
- Core Contribution
- Supported Solutions
- LLM Integration
- Key Results
- Reproducibility
- Compute and API Costs
- Architecture Solution
- Component Breakdown
- Core Mechanisms (Detailed)
- Programming Language
- Memory Management
- Continued Learning
- Applications
1 Full Title and Attribution
K-Dense BYOK — Your Own AI Research Assistant, Running on Your Computer, Powered by Your API Keys
- Repository: github.com/K-Dense-AI/k-dense-byok
- License: Open-source (exact license unspecified in README; repository-level)
- Stars: ~467 (as of April 2026)
- Status: Beta — actively developed with frequent releases
- Tagline: "An AI co-scientist powered by Claude Scientific Skills running on your desktop"
- Companion systems:
- K-Dense Claude Scientific Skills — the upstream skill library (170+ skills, 250+ scientific database connectors)
- K-Dense Web — the managed SaaS platform for professional/academic teams
- Video introduction: YouTube demo
Naming and Branding
"BYOK" stands for Bring Your Own Keys, the system's defining design philosophy. Instead of subscribing to a single AI provider, users supply their own API keys (primarily OpenRouter) and retain full control over model selection, cost, and data privacy. The main agent is branded Kady, a conversational orchestrator that delegates to unnamed "expert" sub-agents.
Relationship to K-Dense Ecosystem
K-Dense BYOK is the open-source desktop counterpart of the commercial K-Dense Web platform. The open-source repository provides the core agent orchestration and skill execution engine, while K-Dense Web adds managed infrastructure, team collaboration, and zero-setup deployment. Both share the same underlying skill library.
K-Dense Ecosystem
├── Claude Scientific Skills (170+ skills, open-source)
│ ├── Genomics, proteomics, cell biology
│ ├── Chemistry, drug discovery, materials science
│ ├── Physics, astrophysics, engineering
│ ├── Finance, social science, mathematics
│ └── ML, data science, clinical
├── K-Dense BYOK (open-source desktop app) ← this system
│ ├── Kady agent (orchestrator)
│ ├── Expert sub-agents (Gemini CLI + skills)
│ ├── 326 workflow templates
│ └── MCP server extensibility
└── K-Dense Web (commercial SaaS platform)
├── Managed infrastructure
├── Team collaboration
└── No-setup deployment
2 Authors and Team
| Entity | Role |
|---|---|
| K-Dense Inc. | Corporate developer, maintainer |
| K-Dense AI (GitHub org) | Open-source publishing entity |
Team composition: K-Dense Inc. is a startup/company focused on AI-powered scientific research tools. Unlike academic autoresearch projects (e.g., AutoResearchClaw from AIMING Lab), K-Dense operates as a commercial entity with an open-source community strategy. Individual contributor names are not prominently listed in the repository; the project presents as a company product rather than an academic collaboration.
Community signals: - Active on X (Twitter), LinkedIn, and YouTube for release notes and tutorials - GitHub Issues used for bug reports and feature requests - Workflow contributions accepted via pull requests - Beta status suggests small but dedicated engineering team
Institutional context: K-Dense positions itself at the intersection of scientific computing and LLM-powered agent systems. The company's skill library (Claude Scientific Skills) has achieved significant traction in the scientific AI community, and K-Dense BYOK represents the natural extension of that library into a full agent platform.
3 Core Contribution
K-Dense BYOK's core contribution is a three-tier agent architecture that brings AI-assisted scientific research to any desktop by combining:
- A conversational orchestrator (Kady) that performs intelligent task routing
- Specialized expert agents that execute domain-specific research tasks using curated scientific skills
- A model-agnostic BYOK design that decouples the system from any single LLM provider
Three Key Innovations
| Innovation | Description | Significance |
|---|---|---|
| Skill-loaded expert delegation | Kady identifies when a question requires deep domain expertise and delegates to a sub-agent pre-loaded with relevant skills from the 170+ skill library | Moves beyond generic chat-based research assistance to domain-aware task execution |
| 326 curated workflow templates | Pre-built research workflows spanning 22 disciplines with variable placeholders, suggested skills, and file upload support | Dramatically lowers the barrier for non-expert users to execute complex scientific workflows |
| Provider-agnostic model selection | 40+ models available via OpenRouter; main agent model is user-selectable while expert agents run on Gemini CLI | Eliminates vendor lock-in and lets researchers optimize for cost, speed, or capability per task |
Comparison to Related Systems
| System | Scope | Agent Model | Skill System | Model Choice |
|---|---|---|---|---|
| K-Dense BYOK | Multi-discipline co-scientist | Orchestrator → delegated experts | 170+ curated skills | 40+ via OpenRouter |
| AutoResearchClaw | End-to-end paper generation | 23-stage pipeline, 10+ agents | MetaClaw cross-run skills | Configurable per agent |
| EurekaClaw | Theorem proving + paper writing | 7-stage pipeline, specialized agents | Distilled + manual skills | Claude-primary |
| AIRA₂ | STEM research assistant | 15+ specialized agents | Internal tools | Meta-internal |
| Google AI Co-Scientist | Hypothesis generation | Multi-agent debate/ranking | — | Gemini-only |
K-Dense BYOK distinguishes itself through breadth rather than depth: it covers 22 disciplines with pre-built workflows rather than mastering a single research pipeline (like EurekaClaw's theorem proving or AutoResearchClaw's paper generation). The BYOK model also makes it uniquely accessible — no institutional API access or cloud deployment required.
4 Supported Solutions
Scientific Disciplines Covered
K-Dense BYOK provides workflow templates across 22 disciplines, organized into broad categories:
| Category | Disciplines | Example Workflows |
|---|---|---|
| Life Sciences | Genomics, Proteomics, Cell Biology, Ecology | Gene expression analysis, protein structure prediction, cell signaling pathways |
| Chemical Sciences | Chemistry, Drug Discovery, Materials Science | Molecular docking, ADMET prediction, crystal structure analysis |
| Physical Sciences | Physics, Astrophysics, Engineering | Quantum system simulation, stellar classification, FEA analysis |
| Formal Sciences | Mathematics, ML/AI | Proof verification, model selection, hyperparameter optimization |
| Health Sciences | Clinical, Neuroscience | Clinical trial design, EEG analysis, drug interaction screening |
| Social Sciences | Finance, Social Science | Portfolio optimization, sentiment analysis, survey methodology |
| Research Operations | Paper, Literature, Data, Grants, SciComm, Visual | Literature review, data visualization, grant narrative drafting |
326 Workflow Templates
Each workflow is a structured JSON object containing:
{
"id": "unique-kebab-case-id",
"name": "Human-Readable Name",
"description": "One-sentence summary shown on the card",
"category": "genomics",
"icon": "Dna",
"prompt": "Detailed instructions with {placeholder} syntax",
"suggestedSkills": ["scanpy", "scientific-visualization"],
"placeholders": [
{ "key": "placeholder", "label": "User prompt", "required": true }
],
"requiresFiles": true
}
Workflows serve as structured prompt templates that inject domain context, skill suggestions, and procedural guidance into the agent interaction. They are community-extensible — new workflows are added by editing a single JSON file.
Scientific Database Access
The system provides access to 250+ scientific databases through API key configuration:
| Database Category | Examples | Access Method |
|---|---|---|
| Genomics | NCBI, Ensembl, UniProt | REST API via skills |
| Chemistry | PubChem, ChEMBL, RCSB PDB | REST API via skills |
| Literature | PubMed, Semantic Scholar, arXiv | REST API via skills |
| Government Data | Census, BLS, EPA, NOAA | REST API via skills |
| Materials | Materials Project, AFLOW | REST API via skills |
Python Package Ecosystem
Expert agents have access to 500,000+ Python packages through the Gemini CLI execution environment, enabling computational workflows that combine: - Data manipulation (pandas, numpy, scipy) - Visualization (matplotlib, seaborn, plotly) - Domain-specific libraries (scanpy, rdkit, biopython, astropy) - Machine learning (scikit-learn, pytorch, tensorflow)
5 LLM Integration
K-Dense BYOK employs a split-model architecture where different components of the system use different LLM providers:
Model Architecture
┌─────────────────────────────────────────────────────┐
│ User Interface │
│ (port 3000) │
└───────────────────────┬─────────────────────────────┘
│ chat message
▼
┌─────────────────────────────────────────────────────┐
│ Kady (Orchestrator Agent) │
│ Model: User-selected (40+ options) │
│ Provider: OpenRouter → LiteLLM proxy │
│ │
│ Capabilities: │
│ • Direct Q&A for simple questions │
│ • Task classification and routing │
│ • Expert delegation decisions │
│ • Web search via Parallel API │
│ • File operations in sandbox │
└───────────────────────┬─────────────────────────────┘
│ delegation
▼
┌─────────────────────────────────────────────────────┐
│ Expert Sub-Agents │
│ Model: Gemini (always, via Gemini CLI) │
│ Provider: OpenRouter │
│ │
│ Capabilities: │
│ • 170+ scientific skill execution │
│ • Code generation and execution │
│ • Scientific database queries │
│ • File creation and manipulation │
│ • MCP server tool invocation │
└─────────────────────────────────────────────────────┘
Supported Models (via OpenRouter)
| Provider | Models | Notes |
|---|---|---|
| Anthropic | Claude 3.5 Sonnet, Claude 3 Opus, Claude 3 Haiku | Full range of Claude models |
| OpenAI | GPT-4o, GPT-4 Turbo, GPT-3.5 Turbo | Including vision variants |
| Gemini 1.5 Pro, Gemini 1.5 Flash, Gemini 2.0 | Also used for expert execution | |
| xAI | Grok series | Via OpenRouter |
| Qwen | Qwen 2.5 series | Via OpenRouter |
| Meta | Llama 3.x series | Via OpenRouter |
| Others | Mistral, Cohere, 01.ai, etc. | 40+ models total |
Critical Design Decision: Split Model Routing
Note: The model you select in the dropdown only applies to Kady (the main agent). Expert execution and coding tasks use the Gemini CLI, which always runs through a Gemini model on OpenRouter regardless of your dropdown selection.
This is a significant architectural decision with important trade-offs:
Rationale: The Gemini CLI provides reliable code execution, tool calling, and multi-turn context management for complex scientific tasks. The scientific skills were originally developed as "Claude Scientific Skills" but are executed through the Gemini CLI for its agent capabilities.
Trade-offs:
| Advantage | Disadvantage |
|---|---|
| Consistent expert behavior regardless of main model | Users cannot fully control expert model choice |
| Gemini CLI provides reliable tool orchestration | Dual API cost (OpenRouter for Kady + OpenRouter/Gemini for experts) |
| Skills tested against Gemini's capabilities | Gemini's skill activation "not always reliable" (known limitation) |
| Simple dropdown UX for main model | Black-box expert execution model |
LiteLLM Proxy Layer
The system runs a local LiteLLM proxy on port 4000 that translates between the application's API calls and OpenRouter's endpoints. This adds: - Unified API interface regardless of underlying provider - Request/response logging - Rate limiting and retry logic - Model aliasing and fallback configuration
6 Key Results
K-Dense BYOK is a beta-stage open-source tool rather than a research paper with formal benchmarks. Results are evaluated through community adoption and capability demonstrations rather than quantitative benchmarks.
Adoption Metrics
| Metric | Value | Context |
|---|---|---|
| GitHub stars | ~467 | Growing; beta stage |
| Workflow templates | 326 | Spanning 22 disciplines |
| Scientific skills | 170+ | Inherited from Claude Scientific Skills |
| Database connectors | 250+ | Scientific and government data APIs |
| Python package access | 500,000+ | Via Gemini CLI execution environment |
| Supported models | 40+ | Via OpenRouter |
Known Limitations (Self-Reported)
The project transparently documents several limitations related to Gemini CLI-based expert execution:
| Limitation | Impact | Mitigation |
|---|---|---|
| Skill activation unreliable | Gemini sometimes skips relevant skills | Re-run tasks; switch Kady model |
| Tool-calling inconsistency | CLI drops tool calls or uses wrong arguments | Retry; upstream Gemini improvements |
| Long-context degradation | Large skill contexts cause instruction drift | Skill curation; context windowing |
| Structured output drift | Gemini deviates from requested output formats | Post-processing; output validation |
Qualitative Capabilities
Based on the workflow library and skill documentation, K-Dense BYOK can execute:
| Capability | Evidence |
|---|---|
| Literature review across domains | Workflows in paper, literature categories |
| Gene expression analysis | Genomics workflows with scanpy skills |
| Molecular docking and drug screening | Drug discovery workflows with RDKit skills |
| Financial data analysis | Finance workflows with quantitative skills |
| Manuscript drafting and revision | Paper workflows with LaTeX/writing skills |
| Data visualization | Visual workflows with matplotlib/plotly skills |
| Statistical analysis | Data workflows with scipy/statsmodels skills |
7 Reproducibility
Installation and Setup
Reproducibility is a strength of K-Dense BYOK's design. The system provides:
| Factor | Assessment | Details |
|---|---|---|
| Installation | Simple | Single start.sh script handles all dependencies |
| Dependencies | Auto-managed | Python packages, Node.js, Gemini CLI installed automatically |
| Configuration | Minimal | Copy .env.example → .env, add OpenRouter API key |
| Platform support | macOS, Linux, WSL | Native support for research-common platforms |
| Data locality | Full | All files stay in local sandbox/ directory |
Setup Procedure
# 1. Clone
git clone https://github.com/K-Dense-AI/k-dense-byok.git
cd k-dense-byok
# 2. Configure (minimum: OpenRouter API key)
cp kady_agent/env.example kady_agent/.env
# Edit .env, add OPENROUTER_API_KEY
# 3. Start (auto-installs dependencies on first run)
chmod +x start.sh
./start.sh
# → Frontend on :3000, Backend on :8000, LiteLLM on :4000
Reproducibility Concerns
| Concern | Severity | Description |
|---|---|---|
| Model variability | Medium | Different model selections produce different results; no fixed model for reproducibility |
| Gemini CLI versioning | Medium | Expert execution depends on Gemini CLI version, which auto-updates |
| Skill versioning | Low | Skills downloaded at install time; no pinned versions |
| Non-deterministic LLM output | High | Standard LLM reproducibility challenge; no seed/temperature controls exposed |
| API key requirements | Low | OpenRouter key required; optional keys for web search and remote compute |
| Workflow stability | Low | Workflows are JSON templates; reproducible as prompt structures |
Sandbox Isolation
All file operations are confined to a local sandbox/ directory:
sandbox/
├── [uploaded files]
├── [generated files]
├── [expert task outputs]
└── [intermediate results]
This provides data isolation between sessions but does not guarantee computational reproducibility (same inputs → same outputs) due to LLM non-determinism.
8 Compute and API Costs
Cost Model
K-Dense BYOK's BYOK design means all costs are borne directly by the user through their API keys:
Cost = Kady_tokens × OpenRouter_rate(selected_model)
+ Expert_tokens × OpenRouter_rate(Gemini_model)
+ Parallel_API_calls × Parallel_rate [if web search enabled]
+ Modal_compute × Modal_rate [if remote compute enabled]
Per-Component Cost Estimates
| Component | Token Usage | Estimated Cost per Session |
|---|---|---|
| Kady (orchestrator) | 5K–50K tokens (varies by conversation length) | $0.01–$0.50 (model-dependent) |
| Expert delegation | 10K–200K tokens per expert task (includes skill injection) | $0.05–$2.00 per expert task |
| Web search | N/A (Parallel API pricing) | $0.01–$0.10 per search |
| Remote compute | N/A (Modal pricing) | Variable; GPU time |
Cost Optimization Levers
| Lever | Strategy |
|---|---|
| Model selection | Use cheaper models for Kady (e.g., Haiku, Flash) for simple orchestration |
| Expert tasks | Gemini models via OpenRouter are competitively priced |
| Web search | Disable Parallel API for offline-only workflows |
| Remote compute | Keep computation local unless GPU-intensive |
Hardware Requirements
| Requirement | Minimum | Recommended |
|---|---|---|
| OS | macOS, Linux, WSL | macOS or Linux |
| RAM | 4 GB | 8+ GB |
| Storage | 2 GB (app + skills) | 10+ GB (with sandbox data) |
| Network | Required (API calls) | Stable broadband |
| GPU | Not required | Not required (compute is remote/API) |
The local-first design means the system runs on commodity hardware — all heavy computation is offloaded to API providers or optionally to Modal for remote GPU execution.
9 Architecture Solution
Three-Service Architecture
K-Dense BYOK runs three local services that compose into a research assistant:
┌─────────────────────────────────────────────────────────────────────┐
│ User's Computer │
│ │
│ ┌──────────────┐ ┌────────────────────┐ ┌──────────────────┐ │
│ │ Frontend │ │ Backend │ │ LiteLLM Proxy │ │
│ │ (Next.js) │◄─►│ (Python/FastAPI) │──►│ (port 4000) │ │
│ │ port 3000 │ │ port 8000 │ │ │ │
│ │ │ │ │ │ Translates to │ │
│ │ • Chat UI │ │ • Kady agent │ │ OpenRouter API │ │
│ │ • File mgr │ │ • Expert dispatch │ │ │ │
│ │ • Workflows │ │ • Tool execution │ │ 40+ models │ │
│ │ • Preview │ │ • File I/O │ │ accessible │ │
│ └──────────────┘ └────────┬───────────┘ └────────┬─────────┘ │
│ │ │ │
│ ┌─────────▼──────────┐ │ │
│ │ Sandbox │ │ │
│ │ (local files) │ │ │
│ │ │ │ │
│ │ Uploaded files, │ │ │
│ │ generated output │ │ │
│ └───────────────────┘ │ │
│ │ │
└───────────────────────────────────────────────────────┼──────────────┘
│
┌───────────────────────────▼──────────┐
│ External Services │
│ │
│ • OpenRouter (LLM API gateway) │
│ • Parallel (web search) │
│ • Modal (remote compute) │
│ • 250+ scientific databases │
│ • Custom MCP servers │
└───────────────────────────────────────┘
Agent Delegation Flow
The central architectural pattern is Kady's delegation decision:
User Message
│
▼
┌─────────────────────────────────┐
│ Kady (Orchestrator) │
│ Model: user-selected via │
│ OpenRouter │
│ │
│ Decision tree: │
│ ├── Simple Q&A → answer direct │
│ ├── Web needed → Parallel API │
│ ├── File op → sandbox tools │
│ └── Expert needed → delegate │
└──────────────┬──────────────────┘
│ delegation (complex tasks)
▼
┌─────────────────────────────────┐
│ Expert Sub-Agent │
│ Model: Gemini (always) │
│ Runtime: Gemini CLI │
│ │
│ Injected context: │
│ ├── Scientific skills (170+) │
│ ├── MCP server tools │
│ ├── Database API keys │
│ └── Sandbox file access │
│ │
│ Output: │
│ ├── Text responses │
│ ├── Generated files │
│ ├── Visualizations │
│ └── Code + execution results │
└─────────────────────────────────┘
Data Flow
1. User types message in browser UI (port 3000)
2. Frontend sends HTTP request to backend (port 8000)
3. Backend's Kady agent processes the message:
a. If simple → route through LiteLLM proxy (port 4000) → OpenRouter → selected model
b. If complex → spawn expert sub-agent via Gemini CLI
4. Expert agent:
a. Receives task + relevant skills + tool definitions
b. Executes via Gemini CLI (always Gemini model via OpenRouter)
c. May call tools: web search, database APIs, code execution, file I/O
d. Returns results to Kady
5. Kady synthesizes and streams response back to frontend
6. Generated files appear in sandbox/ and are visible in file browser
10 Component Breakdown
Project Structure
k-dense-byok/
├── start.sh ← One-command startup (installs deps, launches services)
├── server.py ← Python backend server (FastAPI-based, port 8000)
│
├── kady_agent/ ← Core agent logic
│ ├── agent.py ← Main Kady agent definition and routing logic
│ ├── env.example ← Template for API keys (50+ configurable keys)
│ ├── .env ← User's actual API keys (gitignored)
│ └── tools/ ← Tool definitions for Kady
│ ├── web_search.py ← Parallel API integration
│ ├── delegate.py ← Expert delegation logic
│ ├── file_ops.py ← Sandbox file operations
│ └── [other tools] ← MCP, database connectors, etc.
│
├── web/ ← Frontend application
│ ├── src/
│ │ ├── components/ ← React components
│ │ │ ├── chat/ ← Chat interface
│ │ │ ├── file-browser/ ← File management sidebar
│ │ │ ├── preview/ ← File preview panel
│ │ │ └── workflows/ ← Workflow template browser
│ │ ├── data/
│ │ │ └── workflows.json ← 326 workflow definitions
│ │ └── [app infrastructure]
│ └── package.json
│
├── sandbox/ ← Isolated file workspace (created at runtime)
│
└── user_config/ ← Persistent user settings
└── custom_mcps.json ← Custom MCP server configurations
Component Dependency Graph
start.sh
/ | \
/ | \
Frontend Backend LiteLLM
(web/) (server.py) (proxy)
│ │ │
│ kady_agent/ │
│ ├── agent.py │
│ └── tools/ │
│ │ │
│ Gemini CLI ────┘
│ (expert execution)
│ │
│ Scientific Skills
│ (170+ .md files)
│ │
└────► sandbox/
(file I/O)
Component Details
| Component | Technology | Size | Purpose |
|---|---|---|---|
| Frontend | React + TypeScript | ~20 files | Chat UI, file browser, workflow launcher, settings |
| Backend | Python (FastAPI) | ~10 files | HTTP server, agent orchestration, tool execution |
| Kady Agent | Python | agent.py + tools/ |
Task classification, routing, delegation, response synthesis |
| Expert Agents | Gemini CLI | Spawned per task | Skill-loaded execution of complex scientific tasks |
| LiteLLM Proxy | Python (LiteLLM) | Config-driven | Model-agnostic API translation layer |
| Scientific Skills | Markdown files | 170+ files | Domain knowledge injection for expert agents |
| Workflows | JSON | 1 file, 326 entries | Structured prompt templates for research tasks |
| MCP Integration | JSON config | User-extensible | Custom tool server connections |
11 Core Mechanisms (Detailed)
11.1 Kady Agent — Intelligent Task Routing
Kady is the conversational orchestrator that serves as the single entry point for all user interactions. Its core mechanism is intelligent task classification and routing:
Input: User message M
1. CLASSIFY(M):
├── SIMPLE_QA → Generate direct response using selected model
├── WEB_REQUIRED → Invoke Parallel API search, then synthesize
├── FILE_OPERATION → Execute sandbox file tool, return result
└── EXPERT_NEEDED → Invoke expert delegation pipeline
2. If EXPERT_NEEDED:
a. Extract task description T from M
b. Identify relevant domain D from context
c. Select skills S = skill_selector(D, T) from 170+ available
d. Spawn expert sub-agent with (T, S, tools, sandbox_access)
e. Stream expert output back to user
f. Synthesize final response incorporating expert results
3. POST-PROCESS:
├── If files generated → update file browser sidebar
├── If code executed → display execution results
└── If error occurred → retry or explain failure
11.2 Expert Delegation — Gemini CLI Execution
Expert delegation is the most architecturally significant mechanism. When Kady determines a task requires domain expertise:
Expert Delegation Pipeline
│
├── 1. Task Packaging
│ ├── Extract task description from conversation
│ ├── Select suggested skills from workflow (if applicable)
│ ├── Inject relevant API keys from .env
│ └── Configure sandbox file access paths
│
├── 2. Gemini CLI Invocation
│ ├── Spawn Gemini CLI process
│ ├── Pass task + skills as system context
│ ├── Register available tools:
│ │ ├── Built-in: code execution, file I/O
│ │ ├── Scientific: database APIs, computation
│ │ └── Custom: MCP server tools
│ └── Model: Gemini (via OpenRouter, always)
│
├── 3. Execution Loop
│ ├── Gemini agent reasons about task
│ ├── Calls tools as needed (multi-turn)
│ ├── Generates intermediate files in sandbox
│ ├── Streams progress back to backend
│ └── Returns final result to Kady
│
└── 4. Result Integration
├── Kady receives expert output
├── Synthesizes user-facing response
├── Updates file browser with new files
└── Streams to frontend
11.3 Scientific Skill System
The skill system is inherited from K-Dense's Claude Scientific Skills project. Each skill is a markdown document that provides domain-specific instructions to the expert agent:
Skill Structure (Markdown)
│
├── Metadata
│ ├── Skill name and ID
│ ├── Domain tags (e.g., genomics, chemistry)
│ ├── Required tools (e.g., python, database API)
│ └── Suggested packages (e.g., scanpy, rdkit)
│
├── Instructions
│ ├── Step-by-step procedure for domain task
│ ├── Best practices and common pitfalls
│ ├── Expected input/output formats
│ └── Error handling guidance
│
└── Examples
├── Sample inputs and expected outputs
├── Code snippets for reference
└── Interpretation guidelines
Skill injection mechanism: When an expert agent is spawned, relevant skills are selected (either automatically by domain matching or explicitly by workflow suggestedSkills) and injected into the agent's system prompt context. The Gemini CLI agent then follows the skill instructions while executing the task.
Skill categories (22 disciplines):
Life Sciences Physical Sciences Formal Sciences
├── genomics ├── physics ├── math
├── proteomics ├── astrophysics └── ml
├── cellbio ├── engineering
├── ecology └── materials Research Ops
└── clinical ├── paper
Chemical Sciences ├── literature
Health Sciences ├── chemistry ├── data
├── clinical └── drugdiscovery ├── grants
└── neuro ├── scicomm
Social Sciences └── visual
├── finance
└── social
11.4 Workflow Template System
The 326 workflow templates encode structured research procedures:
Workflow Execution Flow
│
├── 1. User browses workflow library
│ └── Grouped by 22 categories with Lucide icons
│
├── 2. User selects workflow and fills placeholders
│ ├── Required fields validated
│ ├── Optional file uploads attached
│ └── Model selection (for Kady) confirmed
│
├── 3. Prompt assembly
│ ├── Template prompt with {placeholders} filled
│ ├── suggestedSkills attached as metadata
│ ├── requiresFiles flag checked
│ └── Full prompt sent to Kady
│
├── 4. Kady processes assembled prompt
│ ├── Typically delegates to expert (workflow complexity)
│ ├── Expert receives skills suggested by workflow
│ └── Execution follows workflow steps
│
└── 5. Results
├── Generated files in sandbox
├── Streamed text response
└── File preview in UI
11.5 MCP Server Integration
K-Dense BYOK supports custom MCP (Model Context Protocol) servers that extend the expert agents' tool capabilities:
{
"built-in-servers": {
"docling": { "command": "...", "args": ["..."] },
"parallel-search": { "command": "...", "args": ["..."] }
},
"custom-servers (user-defined)": {
"my-server": {
"command": "npx",
"args": ["-y", "my-mcp-server"]
},
"remote-api": {
"httpUrl": "https://mcp.example.com/api",
"headers": { "Authorization": "Bearer token" }
}
}
}
Custom MCP configurations are persisted in user_config/custom_mcps.json (outside the sandbox) and merged with built-in defaults. This enables:
- Domain-specific tool servers (lab equipment, data sources)
- Integration with institutional APIs
- Custom computation backends
- Third-party service connectors
11.6 Remote Compute via Modal
For computationally intensive tasks, K-Dense BYOK optionally delegates to Modal for serverless cloud execution:
Local Expert Agent
│
├── Lightweight tasks → local Python execution
│
└── Heavy tasks → Modal API
├── GPU-accelerated computation
├── Large dataset processing
├── Model training/inference
└── Resource-intensive simulations
This separates the orchestration plane (local) from the execution plane (cloud), enabling researchers on consumer hardware to run heavy computational workflows.
12 Programming Language
Technology Stack
| Layer | Language/Framework | Purpose |
|---|---|---|
| Backend server | Python (FastAPI) | HTTP server, agent orchestration |
| Agent logic | Python | Kady agent, tool definitions, routing |
| Expert execution | Python + Gemini CLI | Skill-loaded task execution |
| Scientific skills | Markdown | Domain knowledge documents |
| Frontend | TypeScript + React | Web UI, chat, file management |
| Workflow definitions | JSON | Structured prompt templates |
| Configuration | YAML/JSON + .env | API keys, MCP servers, settings |
| Startup/infra | Bash | Installation and service orchestration |
Python Details
The backend uses Python with FastAPI for the HTTP server layer. The agent logic (kady_agent/agent.py) defines the Kady orchestrator and its tool suite. Expert agents are spawned as Gemini CLI subprocesses.
Key Python dependencies (inferred from architecture):
- fastapi — HTTP server framework
- litellm — LLM API abstraction layer
- uvicorn — ASGI server
- Standard library for file I/O and process management
Frontend Details
The web frontend is a React + TypeScript application providing: - Three-panel layout: chat, file browser, file preview - Workflow browser with category filtering - Settings panel for API keys and MCP configuration - Streaming response display - File upload with drag-and-drop
Code Quality Indicators
| Indicator | Assessment |
|---|---|
| Type safety | TypeScript on frontend; Python typing practices not documented |
| Testing | No test suite visible in repository structure |
| Linting | Not documented |
| CI/CD | Not documented |
| Documentation | Comprehensive README; inline code documentation unknown |
13 Memory Management
Conversation Memory
K-Dense BYOK's memory model operates at the conversation level — each chat session maintains context through the standard LLM conversation history mechanism:
Session Memory Model
│
├── Conversation History (in-memory)
│ ├── User messages
│ ├── Kady responses
│ ├── Tool call results
│ └── Expert delegation outputs
│
├── Sandbox Persistence (filesystem)
│ ├── Uploaded files persist across messages
│ ├── Generated files accumulate during session
│ └── Files survive app restarts (in sandbox/)
│
└── Configuration Persistence (filesystem)
├── API keys in .env (permanent)
├── Custom MCP servers in user_config/ (permanent)
└── No cross-session conversation memory
Key Memory Characteristics
| Characteristic | Implementation |
|---|---|
| Within-session context | Standard LLM conversation history (model context window) |
| Cross-session memory | None — no persistent conversation or knowledge storage |
| File persistence | Sandbox files persist on disk across sessions |
| Expert context | Each expert delegation is independent (no cross-task memory) |
| Configuration state | Persisted in .env and user_config/ |
Memory Limitations
- No episodic memory: The system does not remember previous research sessions. Each conversation starts fresh
- No knowledge accumulation: Insights from completed tasks are not captured for future reference
- Expert isolation: Each expert delegation creates a fresh agent with no memory of prior delegations within the same conversation
- Context window bound: Long conversations are bounded by the selected model's context window
Comparison to Memory-Rich Systems
| System | Memory Tiers | Cross-Session | Knowledge Graph |
|---|---|---|---|
| K-Dense BYOK | 1 (conversation) | No | No |
| AutoResearchClaw | 3 (session, MetaClaw, skills) | Yes (MetaClaw) | No |
| EurekaClaw | 4 (episodic, persistent, KG, domain) | Yes | Yes |
| AIRA₂ | 2 (session, tournament) | Limited | No |
This is a significant gap compared to systems like EurekaClaw that maintain theorem-level knowledge graphs and cross-session persistent memory. However, K-Dense BYOK's design philosophy prioritizes simplicity and privacy — no data leaves the user's machine beyond API calls.
14 Continued Learning
Current State: No Continued Learning
K-Dense BYOK does not implement continued learning mechanisms. The system's behavior is static between sessions:
Session N Session N+1
│ │
├── User interactions ├── Fresh start
├── Expert delegations ├── No memory of Session N
├── Generated outputs ├── Same skill library
└── Session ends → no extraction └── Same workflows
Planned Features (Roadmap)
The README's "Features in the works" section lists several items that could enable learning:
| Planned Feature | Learning Potential |
|---|---|
| "Better utilization of Skills" | May include adaptive skill selection |
| "AutoResearch integration" | Could bring cross-session learning from AutoResearch systems |
| "Better UI experience tailored to scientific workflows" | May include workflow recommendation based on usage |
| "Choice between Claude Code or Gemini CLI as expert" | Could enable model-specific skill optimization |
Community Learning
While the system itself does not learn, the workflow contribution model creates a form of community-driven learning:
- Researchers create effective workflow templates
- Templates are submitted as pull requests
- Curated workflows are merged into
workflows.json - All users benefit from accumulated research procedures
This is passive knowledge accumulation at the community level rather than active machine learning, but it serves a similar function of improving system effectiveness over time.
Skill Library Evolution
The 170+ scientific skills from K-Dense's Claude Scientific Skills project represent accumulated domain expertise in document form. While K-Dense BYOK itself does not evolve its skills, the upstream skill library is actively maintained and expanded, providing a form of externalized learning where domain experts encode their knowledge into skills that benefit all users.
15 Applications
Primary Use Cases
| Use Case | Description | Key Components |
|---|---|---|
| Literature Review | Automated search, summarization, and synthesis across scientific databases | Web search, database skills, paper workflows |
| Data Analysis | Statistical analysis of experimental data with visualization | Python packages, data skills, file I/O |
| Bioinformatics | Gene expression analysis, sequence alignment, pathway analysis | Genomics/proteomics skills, scanpy, biopython |
| Drug Discovery | Molecular docking, ADMET prediction, virtual screening | Chemistry skills, RDKit, database connectors |
| Manuscript Preparation | Drafting, formatting, and revising scientific papers | Paper/writing workflows, LaTeX skills |
| Grant Writing | Narrative drafting, budget justification, significance statements | Grant workflows, writing skills |
| Materials Science | Crystal structure analysis, property prediction | Materials skills, Materials Project API |
| Financial Analysis | Portfolio optimization, risk modeling, market analysis | Finance workflows, quantitative skills |
| Science Communication | Creating presentations, infographics, summaries for diverse audiences | SciComm workflows, visualization skills |
Target Users
| User Type | Primary Value |
|---|---|
| Research scientists | Multi-domain AI assistant without platform lock-in |
| Graduate students | Access to 170+ expert skills across 22 disciplines |
| Data analysts | Automated data pipeline construction with visualization |
| Science communicators | Rapid content generation across formats |
| Curious individuals | Accessible AI research assistant on consumer hardware |
Workflow Examples by Discipline
Genomics: Upload RNA-seq count matrix → differential expression analysis → pathway enrichment → publication-ready volcano plot
Drug Discovery: Input target protein ID → virtual screening against drug database → ADMET filtering → lead compound report
Astrophysics: Query stellar catalog → spectral classification → H-R diagram generation → statistical population analysis
Finance: Upload portfolio data → risk-return optimization → Monte Carlo simulation → allocation recommendation report
Mathematics: Input conjecture → literature search for related results → computational verification → proof sketch
Limitations for Research Applications
| Limitation | Impact on Research |
|---|---|
| No reproducibility guarantees | Results vary between runs; not suitable for formal benchmarking |
| Gemini skill activation unreliable | Complex multi-step protocols may fail or produce incomplete results |
| No cross-session memory | Researchers must re-establish context each session |
| No formal verification | Generated analyses not validated against ground truth |
| Beta stability | Production research workflows may encounter bugs |
Comparison to Purpose-Built Tools
| Tool | Breadth | Depth | Autonomy | Memory |
|---|---|---|---|---|
| K-Dense BYOK | 22 disciplines | Moderate (skill-dependent) | Semi-autonomous (human-in-loop) | Session only |
| AutoResearchClaw | General research | Deep (23-stage pipeline) | Fully autonomous | Cross-run (MetaClaw) |
| EurekaClaw | Mathematical theory | Very deep (theorem proving) | Fully autonomous | 4-tier persistent |
| Elicit | Literature review | Deep (paper analysis) | Semi-autonomous | Persistent |
K-Dense BYOK occupies a unique niche as the broadest but shallowest research assistant — covering more disciplines than any competitor but without the deep pipeline integration that makes systems like EurekaClaw or AutoResearchClaw capable of fully autonomous end-to-end research. Its strength is accessibility: any researcher with an API key can get meaningful AI assistance across virtually any scientific domain within minutes of setup.