C runtime + Python ↔ GUI bridge for a multi-agent CLI assistant. The runtime layer I authored as part of a private team-owned multi-agent desktop assistant project, extracted as a portfolio demonstration. Runs on top of two LoRA adapters I trained (
jalva182/cli-agent-model,jalva182/cli-agent-model-gpu1).
Restricted-use repository. Source-available for review. See
NOTICE.md— no license is granted; all rights reserved.
A multi-agent CLI assistant has three layers in roughly the following order:
- An event source that observes the user's system (process events, file events, hotkeys).
- A routing layer that decides which "expert" agent should handle a given query, given the event context.
- A runtime/bridge that loads a fine-tuned LLM and surfaces responses through a desktop UI.
This repository is layers 2 and 3 — the routing layer (master_router.py), the C runtime + Python bridge (py_bridge.c, system_monitor.c, hotkey_daemon.c, c_bridge.py), and two Tkinter GUIs that drive the assistant.
The event source for layer 1 lives in the team-private upstream and is not included here. A minimal SystemEvent dataclass (src/c_core/system_event.py) stands in for it so the routing layer can be exercised standalone.
.
├── src/
│ ├── c_core/
│ │ ├── py_bridge.c # Python <-> C bridge (CPython API)
│ │ ├── system_monitor.c # cross-platform system stats (Windows API + sys/...)
│ │ ├── hotkey_daemon.c # global hotkey listener stub
│ │ ├── c_bridge.py # Python-side wrapper over the C runtime
│ │ ├── master_router.py # routes queries + events to expert agents
│ │ ├── system_event.py # minimal standalone SystemEvent (substitute your own)
│ │ ├── ai_gui.py # Tkinter chat GUI
│ │ ├── gui_simple.py # simpler launcher GUI variant
│ │ └── __init__.py
│ └── scripts/
│ ├── setup_env.sh
│ └── setup_env.bat
├── BUILD_INSTRUCTIONS.md
├── CMakeLists.txt
├── Makefile
├── build.sh
├── setup.py
├── pyproject.toml
├── requirements.txt
├── setup_project.bat
├── verify_installation.ps1
├── test_run.py # smoke test
├── NOTICE.md
└── README.md
The bridge is designed to run on top of LoRA adapters fine-tuned with GRPO via Unsloth + TRL on unsloth/llama-3-8b-Instruct. Both adapters and the training code are public.
| Model | Base | Method | Link |
|---|---|---|---|
jalva182/cli-agent-model |
unsloth/llama-3-8b-Instruct |
GRPO + LoRA (TRL via Unsloth) | https://huggingface.co/jalva182/cli-agent-model |
jalva182/cli-agent-model-gpu1 |
unsloth/llama-3-8b-Instruct |
GRPO + LoRA (TRL via Unsloth) | https://huggingface.co/jalva182/cli-agent-model-gpu1 |
Training pipeline: Alvarez-Jose/unsloth-grpo-project (extending @Carson1829's GRPO training section).
git clone https://github.com/Alvarez-Jose/multi-agent-cli-bridge
cd multi-agent-cli-bridge
# Python deps
pip install -r requirements.txt
# Build the C runtime (Windows / WSL — see BUILD_INSTRUCTIONS.md for full instructions)
bash build.sh
# Smoke-test the import surface
python test_run.py
# Launch the GUI
python -m c_core.ai_guiFor full build details, including CMake and the verification PowerShell script, see BUILD_INSTRUCTIONS.md.
- The expert-agent implementations (
DebuggingExpert,FileOperationsExpert, etc.) — owned by the Visualtaggy team, private. - The ETW event-stream wiring that produces real
SystemEventinstances in production — also private. The includedsystem_event.pyis a minimal standalone replacement for portfolio demonstration. - The full multi-agent orchestration, agent-handoff logic, and conversation memory layer — also private.
If you're reviewing this as a recruiter or collaborator and want to see how these pieces fit together end-to-end, contact me directly.
- Broader multi-agent system this layer plugs into: Visualtaggy team (private upstream).
- GRPO training section that produced the LoRA adapters extended in my fork at Alvarez-Jose/unsloth-grpo-project.
See NOTICE.md. All rights reserved; no license is granted. Restricted-use; source-available for review.
Author: Antonio Alvarez Maciel · M.S. NLP, UC Santa Cruz · LinkedIn · Email