Local-first intelligence.
Multi-model orchestration.
Zero cloud dependencies.
handle_input(user_input: str) corvath_app.core.brain Every interaction begins as raw text entering the system. No assumptions. No preprocessing. Just the query.
preprocessor.classify(user_input, recent_messages) corvath_app.core.preprocessor → ClassificationResult { task_type, confidence, keywords_matched } CODE · CREATIVE · ANALYSIS · DEBUG · TOOL · GENERAL Dual-tier classification. Pattern matching first — sub-millisecond. If confidence falls below threshold, a lightweight model confirms.
intent_router.route(classification, tool_recommendations) corvath_app.core.intent_router → PipelineType STANDARD · META · TOOL_BYPASS Three paths through the system. Standard for full orchestration. Meta for quick recall. Tool bypass when direct action is the answer.
strategy_selector.select(classification) corvath_app.core.strategy_selector → ReasoningStrategy STEP_BY_STEP · RECALL_THEN_GENERATE · DIRECT · EXPLAIN_THEN_ANSWER Each task type maps to a reasoning approach. Code gets step-by-step decomposition. Debug gets recall-reason-generate. The strategy shapes how the model thinks.
model_registry.select_model_for_task(task_type, query, analytics) corvath_app.core.model_registry → ModelSpec { name, backend, specialization, resource_weight } Six model slots. Each scored against the task — specialization matches, resource efficiency, historical performance. Not the largest model. The right one.
prompt_builder.build(classification, strategy, tools, context, history, query) corvath_app.core.prompt_builder → PromptResult { system_prompt, messages, estimated_tokens } persona → task_scope → confidence → strategy → tools → context → few_shot → behavioral Eight conditional layers, assembled in order. Each fires only when relevant. The prompt is never the same twice.
selected_model.generate_response(prompt, context) corvath_app.models.*_runner → BaseModel Local inference. No data leaves your machine. The response streams back through the same architecture that built the request.
session_manager.add_message(role="assistant", content, metadata) corvath_app.memory.session_manager → metadata: { classifier, pipeline, strategy, model, confidence } Every interaction stored with full context. What model, what strategy, what confidence. Memory is how Corvath becomes yours.
Every query is processed on your hardware.
No cloud. No relay. No exceptions.Six model slots scored for every task.
Not the largest model. The right one.Every file operation backed up before execution.
Every action reversible. Every event logged.Not a wrapper around an API.
A system that decides how to think.Project-level intelligence. Git awareness. Build system control. Workflow pattern learning. The system adapts to where it lives.
Self-assessment. Fine-tuning on your data. Recursive self-training. The system that builds itself.