Instructions to use Frankenstein-Labs/Cortex.0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Frankenstein-Labs/Cortex.0 with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf Frankenstein-Labs/Cortex.0:Q8_0 # Run inference directly in the terminal: llama cli -hf Frankenstein-Labs/Cortex.0:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Frankenstein-Labs/Cortex.0:Q8_0 # Run inference directly in the terminal: llama cli -hf Frankenstein-Labs/Cortex.0:Q8_0
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf Frankenstein-Labs/Cortex.0:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf Frankenstein-Labs/Cortex.0:Q8_0
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf Frankenstein-Labs/Cortex.0:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf Frankenstein-Labs/Cortex.0:Q8_0
Use Docker
docker model run hf.co/Frankenstein-Labs/Cortex.0:Q8_0
- Llama new
- LM Studio
- Jan
- Ollama
How to use Frankenstein-Labs/Cortex.0 with Ollama:
ollama run hf.co/Frankenstein-Labs/Cortex.0:Q8_0
- Unsloth Desktop
- Pi
How to use Frankenstein-Labs/Cortex.0 with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Frankenstein-Labs/Cortex.0:Q8_0
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Frankenstein-Labs/Cortex.0:Q8_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use Frankenstein-Labs/Cortex.0 with Docker Model Runner:
docker model run hf.co/Frankenstein-Labs/Cortex.0:Q8_0
- Lemonade
How to use Frankenstein-Labs/Cortex.0 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Frankenstein-Labs/Cortex.0:Q8_0
Run and chat with the model
lemonade run user.Cortex.0-Q8_0
List all available models
lemonade list
- Hermes Agent
How to use Frankenstein-Labs/Cortex.0 with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Frankenstein-Labs/Cortex.0:Q8_0
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default Frankenstein-Labs/Cortex.0:Q8_0
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Frankenstein-Labs/Cortex.0 with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Frankenstein-Labs/Cortex.0:Q8_0
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "Frankenstein-Labs/Cortex.0:Q8_0" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
File size: 3,526 Bytes
c429240 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | """The fusion itself: Cortex.0 driving the OpenHands action-perception loop."""
from __future__ import annotations
import logging
from pathlib import Path
from typing import Any
from openhands.sdk import Conversation
from cortex0.agent import build_agent
from cortex0.health import ServerProbe, probe_server
from cortex0.settings import Cortex0Settings
logger = logging.getLogger("cortex0.fusion")
class Cortex0Agent:
"""A single unified system: Cortex.0 as the brain, the SDK as the body.
The model is not invoked as an external tool. It is the reasoning engine
the SDK calls on every turn, and the SDK's tools (terminal, file editor,
browser) are exposed to it as its own action space.
"""
def __init__(
self,
settings: Cortex0Settings | None = None,
verify: bool = True,
) -> None:
self.settings = settings or Cortex0Settings.load()
self.probe: ServerProbe | None = None
if verify:
self.probe = probe_server(
base_url=self.settings.base_url,
api_key=self.settings.api_key,
model=self.settings.served_model_name,
timeout=min(self.settings.timeout, 120.0),
)
if not self.probe.reachable:
raise RuntimeError(
"Cortex.0 inference server is unreachable at "
f"{self.settings.base_url}. {self.probe.detail}\n"
"Start the server (see scripts/serve_llamacpp.sh) or point "
"CORTEX0_BASE_URL at a running endpoint."
)
if not self.probe.chat_ok:
raise RuntimeError(
"Cortex.0 answered /models but not chat/completions. "
f"{self.probe.detail}"
)
if not self.probe.tool_calling_ok:
logger.warning(
"Cortex.0 did not emit tool_calls during the probe (%s). "
"The agent will still run, but autonomous tool use may be weak.",
self.probe.detail or "no tool call returned",
)
self.agent = build_agent(self.settings)
def start_conversation(self, workspace: str | Path | None = None) -> Conversation:
"""Create a conversation whose workspace is the agent's sandbox."""
target = Path(workspace or self.settings.workspace)
target.mkdir(parents=True, exist_ok=True)
return Conversation(agent=self.agent, workspace=str(target))
def run(self, task: str, workspace: str | Path | None = None) -> Any:
"""Run one task end to end and return the conversation."""
conversation = self.start_conversation(workspace)
conversation.send_message(task)
conversation.run()
return conversation
def summary(self) -> dict:
"""Report the state of the fusion, for logs and the CLI."""
return {
"model": self.settings.model,
"base_url": self.settings.base_url,
"context_window": self.settings.context_window,
"tools": list(self.settings.tools),
"server_reachable": bool(self.probe and self.probe.reachable),
"chat_ok": bool(self.probe and self.probe.chat_ok),
"tool_calling_ok": bool(self.probe and self.probe.tool_calling_ok),
"probe_detail": self.probe.detail if self.probe else "",
"probe_latency_s": self.probe.latency_s if self.probe else None,
}
|