plugin-function

Create in-process request handlers for NeMo Platform plugins with CLI and HTTP interfaces.

58|16|Updated May 14, 2026
One-click install
npx skills add https://github.com/NVIDIA-NeMo/nemo-platform --skill plugin-function
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: plugin-function
Source: https://github.com/NVIDIA-NeMo/nemo-platform/tree/main/packages/nemo_platform_plugin/src/nemo_platform_plugin/.agents/skills/plugin-function
Command: npx skills add https://github.com/NVIDIA-NeMo/nemo-platform --skill plugin-function

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill simplifies the creation of in-process request handlers for NeMo Platform plugins, eliminating the need for complex scheduler or backend dispatch logic for simple tasks.

Core Features & Use Cases

  • Unified Interface: Automatically exposes functions as both CLI subcommands and HTTP routes.
  • Streaming Support: Native support for NDJSON streaming with automatic heartbeat injection to prevent connection timeouts.
  • Use Case: Developers can use this to quickly build and mount custom API endpoints for their plugins, such as a greet function or a real-time data processor, with built-in Pydantic validation and dependency injection.

Quick Start

Use the plugin-function skill to define a new NemoFunction class with a spec_schema and mount it to your plugin service using add_function_routes.

Frequently Asked Questions about plugin-function

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I expose a Python function as both a CLI command and an HTTP route in FastAPI?

You can expose a Python function as a CLI command and HTTP route by defining a NemoFunction class with a spec_schema, which automatically generates CLI flags and mounts API routes using Pydantic validation.

How do I add NDJSON streaming responses with heartbeat injection to a NeMo plugin?

To add NDJSON streaming responses to a NeMo plugin, use the plugin-function skill to define your handler, which provides native streaming support and automatically injects heartbeats to prevent connection timeouts.

Can I use Pydantic schemas for spec validation and dependency injection in NeMo Platform plugins?

Yes, you can use Pydantic schemas for spec validation and dependency injection in NeMo Platform plugins by defining a NemoFunction class that leverages these schemas for automated validation and route mounting.

What is the best way to build in-process request handlers for NeMo Platform plugins?

The best way to build in-process request handlers for NeMo Platform plugins is using the plugin-function skill, which eliminates complex scheduler or backend dispatch logic for simple tasks.

Do I need a complex scheduler to mount custom API endpoints for NeMo plugins?

No, you do not need a complex scheduler to mount custom API endpoints for NeMo plugins because the plugin-function skill creates in-process request handlers to simplify development for simple tasks.

How does automated CLI flag generation work with Pydantic schemas in NeMo plugins?

Automated CLI flag generation works by reading your Pydantic spec_schema within the NemoFunction class, translating the defined validation rules directly into CLI subcommands and HTTP interfaces.