Seeed-Jetson-DevelopTool / llm-interface-control
CLAUDE.md57 starsChanged 4 months agoMITView on GitHub
Deploy a local LLM agent on Jetson Orin NX that translates natural language into structured JSON commands for hardware interface control (GPIO, PWM, I2C). Uses Ollama with a custom system prompt, FastAPI backend, and confidence-gated execution. Requires JetPack and Python 3.8+.
- Pipes a download into a shell
- Installs packages
- Sends data out
In this repository297 other files it gives its agents.
- AGENTS.mdAGENTS.md
- ai-nvrAGENTS.md
- allxon-ota-updateAGENTS.md
- allxon-setupAGENTS.md
- alwaysai-setupAGENTS.md
- backup-restoreAGENTS.md
- bsp-source-buildAGENTS.md
- clawdbot-developmentAGENTS.md
- cochl-sense-setupAGENTS.md
- cvedia-setupAGENTS.md
- dashcamnet-xavier-nx-multicameraAGENTS.md
- deciai-setupAGENTS.md
- deepseek-quick-deployAGENTS.md
- deploy-deepseek-mlcAGENTS.md
- deploy-depth-anything-v3AGENTS.md
- deploy-diaAGENTS.md
- deploy-efficient-vision-engineAGENTS.md
- deploy-frigateAGENTS.md
- deploy-live-vlm-webuiAGENTS.md
- deploy-nvbloxAGENTS.md
- deploy-ollama-anythingllmAGENTS.md
- deploy-riva-llama2AGENTS.md
- developtool-deviceAGENTS.md
- disk-encryptionAGENTS.md
- diy-bsp-buildAGENTS.md
- ethercat-communicationAGENTS.md
- ethercat-setupAGENTS.md
- finetune-llm-llama-factoryAGENTS.md
- fix-browser-snap-jetsonAGENTS.md
- gapi-setupAGENTS.md
- generative-ai-introAGENTS.md
- gpt-oss-liveAGENTS.md
- gr00t-n1-5-deploy-thorAGENTS.md
- gr00t-n1-6-deploy-agxAGENTS.md
- hardhat-setupAGENTS.md
- hybrid-bsp-dk-to-recomputerAGENTS.md
- imx477-a603-setupAGENTS.md
- j501-viola-fruit-sortingAGENTS.md
- jetpack5-ssd-boot-fixAGENTS.md
- jetpack-flash-wsl2AGENTS.md
- jetpack-jetson-overviewAGENTS.md
- jetpack-ota-updateAGENTS.md
- jetson-ai-toolsAGENTS.md
- jetson-docker-setupAGENTS.md
- jetson-faqAGENTS.md
- jetson-pc-wired-shareAGENTS.md
- jetson-project-galleryAGENTS.md
- jetson-resource-indexAGENTS.md
- jetson-tutorial-exercisesAGENTS.md
- ko-module-buildAGENTS.md
- l4t-differencesAGENTS.md
- langchain-output-formattingAGENTS.md
- lerobot-env-setupAGENTS.md
- llama-cpp-rpc-distributedAGENTS.md
- llm-interface-controlAGENTS.md
- local-chatbot-multimodalAGENTS.md
- local-chatbot-physicalAGENTS.md
- local-llm-text-to-imageAGENTS.md
- local-rag-llamaindexAGENTS.md
- lumeo-setupAGENTS.md
- The first 60 shown.
The file
We split this CLAUDE.md into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Run one phase at a time. After each phase:
- Very specific: line 16
If output contains [STOP] → stop, consult the failure decision tree.
- Very specific: line 17
If output ends with [OK] → tell the user "Phase N complete" and proceed.
- Distinctive: line 115
Test rejection of off-topic input:
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Local LLM Agent for Hardware Interface Control on Jetson
Use a local LLM running on Jetson to translate natural language commands into structured JSON for controlling hardware interfaces (lights, fans, thermostats, speakers) via GPIO, PWM, and I2C. The system uses Ollama with a custom prompt, FastAPI for the API layer, and confidence-based safety gating.
Execution model
Run one phase at a time. After each phase:
- Relay all output to the user.
- If output contains
[STOP]→ stop, consult the failure decision tree. - If output ends with
[OK]→ tell the user "Phase N complete" and proceed.
Prerequisites
| Requirement | Detail |
| Hardware | NVIDIA Jetson (Orin NX recommended) with JetPack |
| Python | 3.8+ |
| LLM Server | Ollama (installed in Phase 1) |
| Network | Local access for API calls |
Phase 1 — Install Ollama (~2 min)
curl -fsSL https://ollama.com/install.sh | shVerify:
ollama --version[OK] when Ollama version is printed.
[STOP] if install fails — check network connectivity.
Phase 2 — Clone the project and install dependencies (~2 min)
git clone https://github.com/kouroshkarimi/llm_interface_controll.git
cd llm_interface_controll
pip install -r requirements.txt[OK] when all packages install (FastAPI, uvicorn, etc.).
[STOP] if pip fails — check Python version.
Phase 3 — Create the custom Ollama model (~2 min)
The project includes a system prompt file that constrains the LLM to output only structured JSON with fields: intent, device, action, location, parameters, confidence.
cd llm_interface_controll
ollama create jetson-controller -f models/jetson-controller.txtVerify:
ollama list | grep jetson-controller[OK] when jetson-controller appears in the model list.
[STOP] if creation fails — ensure the base model (llama3.2:1b) is available: ollama pull llama3.2:1b.
Phase 4 — Start the FastAPI server (~1 min)
cd llm_interface_controll
uvicorn app.main:app --host 0.0.0.0 --port 8000[OK] when uvicorn prints "Application startup complete".
Phase 5 — Test command execution (~1 min)
In a separate terminal, send a test command:
curl -X POST http://localhost:8000/command \
-H "Content-Type: application/json" \
-d '{"text": "Turn on the kitchen lights"}'Expected response: JSON with intent: "control_device", device: "lights", action: "turn_on", location: "kitchen", confidence: >0.8.
Test a query:
curl -X POST http://localhost:8000/command \
-H "Content-Type: application/json" \
-d '{"text": "What is the temperature in the bedroom?"}'Expected: intent: "query_status", device: "thermostat".
Test rejection of off-topic input:
curl -X POST http://localhost:8000/command \
-H "Content-Type: application/json" \
-d '{"text": "Write me a poem about the ocean"}'Expected: intent: "unknown", confidence: 0.0.
[OK] when all three tests return properly structured JSON.
Failure decision tree
| Symptom | Action |
| Ollama install fails | Check internet. Try manual download from ollama.com. |
ollama create fails | Ensure base model is pulled: ollama pull llama3.2:1b. Check models/jetson-controller.txt exists. |
| FastAPI won't start | Check port 8000 not in use: ss -tlnp | grep 8000. Verify requirements installed. |
| LLM returns non-JSON output | The system prompt may not be loaded. Recreate: ollama create jetson-controller -f models/jetson-controller.txt. |
| Low confidence on valid commands | Adjust temperature in app/llm_agent.py. Try a larger base model. |
| GPIO/hardware errors | Mock hardware during development. Ensure Jetson GPIO permissions: sudo usermod -aG gpio $USER. |
| Connection refused on port 8000 | Firewall: sudo ufw allow 8000. Verify uvicorn is running. |
Reference files
references/source.body.md— Full project documentation with architecture details, JSON schema specification, customization guide, and safety constraints (reference only)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

