Skip to content
Back to skills

Backend Protocol

ASecurity

"Inspect and use Nesa backend protocol structs, model registry

  • 247 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 8, 2026
ai-agentsapibackend

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 6 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill backend-protocol --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Backend Protocol?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Backend Protocol
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-backend-protocol/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-backend-protocol)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: backend-protocol
description: "Inspect and use Nesa backend protocol structs, model registry
  handlers, prompt construction, and safe encrypted LLM request previews."
metadata:
  disco-role: operating
disable-model-invocation: true
license: NO_LICENSE
---

# Backend Protocol

Use this sub-skill when the user asks how Nesa builds encrypted LLM requests,
validates sampling parameters, selects model handlers, sanitizes tokens, or
streams responses from the remote service.

Typical triggers:

- "what fields are in `LLMInference`?"
- "why does `LLMParams` reject my sampling args?"
- "how is the Nesa model registry keyed?"
- "preview the encrypted Llama request without calling the endpoint"
- "debug remote stream response parsing"

## Safe workflow

1. Read [references/api-reference.md](references/api-reference.md) for structs,
   defaults, validation, and handlers.
2. Use [scripts/inspect_protocol_defaults.py](scripts/inspect_protocol_defaults.py)
   to confirm local package behavior in the current environment.
3. Build request previews with
   [scripts/build_llm_request_preview.py](scripts/build_llm_request_preview.py)
   before contacting any remote service.
4. Contact the stream endpoint only after the user approves a network/service
   call and provides required model/tokenizer context.
5. If a field or registry key fails, read
   [references/troubleshooting.md](references/troubleshooting.md).

## Core protocol facts

- Messages are role/content pairs.
- Roles include assistant, user, ai, and system.
- `LLMParams` validates sampling ranges and normalizes `stop_token_ids`.
- Low/zero temperature forces greedy sampling behavior and constrains related
  parameters.
- `SessionID` includes an `ee` boolean to mark encrypted sessions.
- `LLMInference` contains stream flag, correlation id, messages, model id,
  optional model params, and optional session.
- Response chunks carry choices and delta content; delta content may be a string
  or an integer token.
- The remote encrypted LLM path tokenizes locally and sends token IDs as message
  content to the configured stream endpoint.

## Model registry facts

The registry checks model-specific keys first, then task-type keys. Source
evidence includes handlers for encrypted DistilBERT local classification and an
encrypted Llama remote streaming path. If a user provides a model name with `/`,
check whether the web UI normalizes it to an underscore form before registry
lookup.

## References and scripts

- [references/api-reference.md](references/api-reference.md): structs, methods,
  signatures, defaults, and validation behavior.
- [references/request-flow.md](references/request-flow.md): local tokenizer,
  prompt-template, request preview, and SSE streaming flow.
- [references/troubleshooting.md](references/troubleshooting.md): parameter,
  registry, dependency, endpoint, and response parsing failures.
- [scripts/inspect_protocol_defaults.py](scripts/inspect_protocol_defaults.py):
  safe import/default/validation check.
- [scripts/build_llm_request_preview.py](scripts/build_llm_request_preview.py):
  self-contained JSON payload preview with no network call.

## Boundaries

- Do not use this sub-skill for one-click installation or UI launch; route to
  `web-ui-runtime`.
- Do not use this sub-skill for local sentiment output interpretation; route to
  `encrypted-distilbert`.
- Do not treat request previews as proof the Nesa remote stream endpoint is
  reachable.

Files in this skill

  • SKILL.md3.4 KB
  • references/api-reference.md3.2 KB
  • references/request-flow.md2 KB
  • references/troubleshooting.md2.8 KB
  • scripts/build_llm_request_preview.py4.9 KB
  • scripts/inspect_protocol_defaults.py4.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.