Getting it into your agent
There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.
Wrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/seeed-projects/seeed-jetson-developtool/langchain-output-formatting)<a href="https://agentmods.dev/skills/seeed-projects/seeed-jetson-developtool/langchain-output-formatting"><img src="https://agentmods.dev/badge/skills/seeed-projects/seeed-jetson-developtool/langchain-output-formatting.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00065 | $0.01655 |
| Opus 5 | $0.00032 | $0.00827 |
| Sonnet 5 | $0.00013 | $0.00331 |
| Haiku 4.5 | $0.00006 | $0.00166 |
Grade B, and why
langchain-output-formatting scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Asks for rootmediumPrivilege escalation
A mod that escalates privileges can change anything on the machine, not only the project.
| Browser can't reach Jetson | Check firewall: `sudo ufw allow 7861`. Verify IP with `hostname -I`. | Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
# Example using wget or huggingface-cli: How it starts
The opening of the file, as written. The whole thing — 186 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Format LLM Output with Langchain on Jetson
Use Langchain's StructuredOutputParser to constrain LLM output into structured JSON for smart home control. The chatbot runs locally on Jetson using LlamaCpp with a Gradio web interface.
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 | Jetson device (e.g. reComputer J4012) |
| JetPack | 5.0+ |
| Model | Llama 2 7B Chat GGUF (Q4_0 quantization) |
| Python | pip3 available |
Phase 1 — Install dependencies (~3 min)
pip3 install --no-cache-dir --verbose "langchain[llm]" openai
pip3 install --no-cache-dir --verbose gradio==3.38.0
[OK] when both packages install without error.
[STOP] if pip3 fails — check Python version and pip availability.
Phase 2 — Download GGUF model (~5–15 min)
Download the Llama 2 7B Chat GGUF model (Q4_0 quantization) from Hugging Face:
mkdir -p ~/models
# Download llama-2-7b-chat.Q4_0.gguf from Hugging Face
# Example using wget or huggingface-cli:
pip3 install huggingface-hub
huggingface-cli download TheBloke/Llama-2-7B-Chat-GGUF llama-2-7b-chat.Q4_0.gguf --local-dir ~/models
Verify:
ls -lh ~/models/llama-2-7b-chat.Q4_0.gguf
[OK] when the GGUF file exists (~3.8 GB).
[STOP] if download fails — check network and disk space.
Phase 3 — Create the chatbot script
Create format_opt.py with the following content. The script uses Langchain's StructuredOutputParser with ResponseSchema to define output fields (user_input, suggestion, control signal, temperature), then wraps a LlamaCpp model in a Gradio chat interface:
cat > format_opt.py << 'PYEOF'
import copy
import gradio as gr
from langchain.llms import LlamaCpp
from langchain.output_parsers import StructuredOutputParser, ResponseSchema
from langchain.prompts import PromptTemplate
class ChatBot:
def __init__(self, llama_model_path, history_length=3):
self.chat_history = []
self.history_threshold = history_length
self.llm = LlamaCpp(
model_path=llama_model_path,
temperature=0.75,
max_tokens=2000,
top_p=1
)
response_schemas = [
ResponseSchema(name="user_input", description="This is the user's input"),
ResponseSchema(name="suggestion", type="string", description="your suggestion"),
ResponseSchema(name="control", description="This is your response"),
ResponseSchema(name="temperature", type="int",
description="Degrees centigrade temperature of the air conditioner.")
]
self.output_parser = StructuredOutputParser.from_response_schemas(response_schemas)
self.format_instructions = self.output_parser.get_format_instructions()
self.template = """
Now you are a smart speaker, and you need to determine whether to turn on the air conditioner based on the user's input.
In the suggestion section, please reply normal conversation.
In the control section, if you need to turn on the air conditioner, please reply with <1>; if you need to turn off the air conditioner, please reply with <0>.
{format_instructions}
Please do not generate any comments.
% USER INPUT:
{user_input}
YOUR RESPONSE:
"""
self.prompt = PromptTemplate(
input_variables=["user_input"],
partial_variables={"format_instructions": self.format_instructions},
template=self.template
)
def format_chat_prompt(self, message):
prompt = ""
for turn in self.chat_history:
user_message, bot_message = turn
prompt = f"{prompt}\nUser: {user_message}\nAssistant: {bot_message}"
prompt = f"{prompt}\nUser: {message}\nAssistant:"
return prompt
def respond(self, message):
prompt = self.prompt.format(user_input=message)
formatted_prompt = self.format_chat_prompt(prompt)
bot_message = self.llm(formatted_prompt)
if len(self.chat_history) >= self.history_threshold:
del self.chat_history[0]
self.chat_history.append((message, bot_message))
return "", self.chat_history
def run_webui(self):
with gr.Blocks() as demo:
gr.Markdown("# Format Output of LLM Demo")
chatbot = gr.Chatbot(height=500)
msg = gr.Textbox(label="Prompt")
btn = gr.Button("Submit")
clear = gr.ClearButton(components=[msg, chatbot], value="Clear console")
btn.click(self.respond, inputs=[msg], outputs=[msg, chatbot])
msg.submit(self.respond, inputs=[msg], outputs=[msg, chatbot])
gr.close_all()
demo.launch()
if __name__ == '__main__':
chatbot_ins = ChatBot("/home/nvidia/models/llama-2-7b-chat.Q4_0.gguf")
chatbot_ins.run_webui()
PYEOF
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 8d ago First seen · 186 lines · 65 tokens per session scan B 31b2b69de1a0
langchain-output-formatting is a skill published in the GitHub repository Seeed-Projects/Seeed-Jetson-DevelopTool (54 stars, last pushed today), licensed MIT. It adds 65 tokens to every session and 1,655 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 2 findings (asks for root, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
spark-environment-setup
Set up a working ML training/inference environment on NVIDIA DGX Spark (GB10, aarch64, CUDA 13). Use when installing PyTorch/Unsloth/TRL/vLLM on DGX Spark, hitting libcudart or wheel-ABI errors on aarch64, or choosing between NGC containers and bare pip installs.
spark-memory-thermal-ops
Manage unified memory and thermals during long-running ML jobs on NVIDIA DGX Spark. Use when planning memory headroom for a training run on GB10, when a job OOMs on unified memory, or when monitoring temperature and power during multi-hour training.
spark-training-gotchas
Preflight and diagnose the ten known failure modes for ML training on NVIDIA DGX Spark. Use when a training run on DGX Spark fails to start, OOMs below the 128GB limit, slows down mid-run, or before any multi-hour training job on GB10.
llama-cpp
Runs LLM inference on CPU, Apple Silicon, and consumer GPUs without NVIDIA hardware. Use for edge deployment, M1/M2/M3 Macs, AMD/Intel GPUs, or when CUDA is unavailable. Supports GGUF quantization (1.5-8 bit) for reduced memory and 4-10× speedup vs PyTorch on CPU.
amc-run-rtsp-calibration
Calibrate a new dataset from live RTSP camera streams via the AutoMagicCalib REST API. Use when the user provides RTSP URLs or asks to calibrate live cameras; VIOS records clips, AMC ingests them, then runs calibration.
amc-run-video-calibration
Calibrates pre-recorded cam.mp4 datasets through the AutoMagicCalib REST API. Use for user-supplied local MP4s; route live RTSP streams to amc-run-rtsp-calibration.