tokens&
For enterprises
Submit a resource
tokens&

Find tools, check provider offers, save a build plan, and share your work when you’re ready.

For buildersFor enterprises

For builders

  • Startup credits and perks
  • Agent Skills
  • Publish a project

For enterprises

  • Start free company workspace
  • Submit a tool, product, or perk

Community

  • Community
  • Newsletter
  • Events
Xin

© 2026 tokensand, LLC. All rights reserved.

  • Terms
  • Privacy
  • Security
  • Data Processing
  • Status
Agent Skills/cuOpt routing API for Python
NVIDIAModelsSKILL.mdLicense identified

Agent Skill

cuOpt routing API for Python

Build vehicle-routing and fleet-optimization models with constraints, objectives, and solution validation.

Install this skillView repository

Vendor-authored source · Apache-2.0 / CC-BY-4.0 license.

Source snapshot: 2026-09-04. This listing does not verify installation, security, vendor participation, or product use.

Raw SKILL.mdInstall the Tokens& Agent Pack

Skill specification

Declared by NVIDIA in the package front matter. Trigger conditions are what the coding agent matches on before it loads the skill.

View package fields
cuOpt routing API for Python SKILL.md front matter fields
Skill namecuopt-routing-api-python
Trigger conditionsVehicle routing (VRP, TSP, PDP) with cuOpt — Python API only. Use when the user is building or solving routing in Python.
Declared licenseApache-2.0
Version26.10.00

Install cuopt-routing-api-python

In a terminal with Node.js, npm and Git, run the command for your agent. The Skills CLI installs the complete package directory, including referenced files within it. Review its install prompt, then start a new agent session. A skill package does not set up an MCP server connection.

Claude Code

.claude/skills/cuopt-routing-api-python/SKILL.md

Project skills are committed with the repo. Use the user directory for a personal install across every project.

Project install

npx skills add 'https://github.com/NVIDIA/skills/tree/main/skills/cuopt-routing-api-python' --skill 'cuopt-routing-api-python' --agent 'claude-code'
Install for all projects instead

Personal install

npx skills add 'https://github.com/NVIDIA/skills/tree/main/skills/cuopt-routing-api-python' --skill 'cuopt-routing-api-python' --agent 'claude-code' --global

Codex

.agents/skills/cuopt-routing-api-python/SKILL.md

Codex reads `.agents/skills/` as its primary location, which is also the cross-platform default other clients honour.

Project install

npx skills add 'https://github.com/NVIDIA/skills/tree/main/skills/cuopt-routing-api-python' --skill 'cuopt-routing-api-python' --agent 'codex'
Install for all projects instead

Personal install

npx skills add 'https://github.com/NVIDIA/skills/tree/main/skills/cuopt-routing-api-python' --skill 'cuopt-routing-api-python' --agent 'codex' --global

Cursor

.agents/skills/cuopt-routing-api-python/SKILL.md

Cursor also loads `.agents/skills/`, `.claude/skills/`, and `.codex/skills/`, so one committed copy can serve several clients.

Project install

npx skills add 'https://github.com/NVIDIA/skills/tree/main/skills/cuopt-routing-api-python' --skill 'cuopt-routing-api-python' --agent 'cursor'
Install for all projects instead

Personal install

npx skills add 'https://github.com/NVIDIA/skills/tree/main/skills/cuopt-routing-api-python' --skill 'cuopt-routing-api-python' --agent 'cursor' --global

Gemini CLI

.agents/skills/cuopt-routing-api-python/SKILL.md

Gemini CLI reads `.agents/skills/` first when both directories exist.

Project install

npx skills add 'https://github.com/NVIDIA/skills/tree/main/skills/cuopt-routing-api-python' --skill 'cuopt-routing-api-python' --agent 'gemini-cli'
Install for all projects instead

Personal install

npx skills add 'https://github.com/NVIDIA/skills/tree/main/skills/cuopt-routing-api-python' --skill 'cuopt-routing-api-python' --agent 'gemini-cli' --global

GitHub Copilot

.agents/skills/cuopt-routing-api-python/SKILL.md

The Skills CLI uses the shared `.agents/skills/` directory for Copilot project installs.

Project install

npx skills add 'https://github.com/NVIDIA/skills/tree/main/skills/cuopt-routing-api-python' --skill 'cuopt-routing-api-python' --agent 'github-copilot'
Install for all projects instead

Personal install

npx skills add 'https://github.com/NVIDIA/skills/tree/main/skills/cuopt-routing-api-python' --skill 'cuopt-routing-api-python' --agent 'github-copilot' --global

SKILL.md

View raw source

Source snapshot fetched 2026-09-04 from github.com/NVIDIA/skills/tree/main/skills/cuopt-routing-api-python. The install command fetches the upstream package, which may have changed since this snapshot.

Read full skill instructions

cuOpt Routing — Python API

This skill is Python only. Routing has no C API in cuOpt.

Required questions

Ask these if not already clear:

  1. Problem type — TSP, VRP, or PDP?
  2. Locations — How many? Depot(s)? Cost or distance between pairs (matrix or derived)?
  3. Orders / tasks — Which locations must be visited? Demand or service per stop?
  4. Fleet — Number of vehicles, capacity per vehicle (and per dimension if multiple), start/end locations?
  5. Constraints — Time windows (earliest/latest arrival), service times, precedence (order A before B)?

Minimal VRP Example

import cudf
from cuopt import routing

cost_matrix = cudf.DataFrame([...], dtype="float32")
dm = routing.DataModel(n_locations=4, n_fleet=2, n_orders=3)
dm.add_cost_matrix(cost_matrix)
dm.set_order_locations(cudf.Series([1, 2, 3], dtype="int32"))
solution = routing.Solve(dm, routing.SolverSettings())

if solution.get_status() == 0:
    solution.display_routes()

Adding Constraints

# Time windows
dm.add_transit_time_matrix(transit_time_matrix)
dm.set_order_time_windows(earliest_series, latest_series)

# Capacities
dm.add_capacity_dimension("weight", demand_series, capacity_series)
dm.set_order_service_times(service_times)
dm.set_vehicle_locations(start_locations, end_locations)
dm.set_vehicle_time_windows(earliest_start, latest_return)

# Pickup-delivery pairs
dm.set_pickup_delivery_pairs(pickup_indices, delivery_indices)

# Precedence
dm.add_order_precedence(node_id=2, preceding_nodes=np.array([0, 1]))

Solution Checking

status = solution.get_status()  # 0=SUCCESS, 1=FAIL, 2=TIMEOUT, 3=EMPTY
if status == 0:
    route_df = solution.get_route()
    total_cost = solution.get_total_objective()
else:
    print(solution.get_error_message())
    print(solution.get_infeasible_orders().to_list())

Data Types (use explicit dtypes)

cost_matrix = cost_matrix.astype("float32")
order_locations = cudf.Series([...], dtype="int32")
demand = cudf.Series([...], dtype="int32")

Solver Settings

ss = routing.SolverSettings()
ss.set_time_limit(30)
ss.set_verbose_mode(True)
ss.set_error_logging_mode(True)

Common Issues

ProblemFix
Empty solutionWiden time windows or check travel times
Infeasible ordersIncrease fleet or capacity
Status != 0 with time windowsAdd add_transit_time_matrix()
Wrong costCheck cost_matrix is symmetric
compute_waypoint_sequence alters route_dfIt replaces the location column with waypoint ids in place — pass route_df.copy() if you still need cost-matrix indices (e.g. when iterating per truck)

Debugging

When status != 0: print(solution.get_error_message()) and print(solution.get_infeasible_orders().to_list()) to see which orders are infeasible.

Data types: Use explicit dtypes (float32, int32) for matrices and series to avoid silent errors.

Examples

  • examples.md — VRP, PDP, multi-depot
  • server_examples.md — REST client (curl, Python)
  • Reference models: This skill's assets/ — vrp_basic, pdp_basic. See assets/README.md.

Escalate

For contribution or build-from-source, see the developer skill.

More NVIDIA Agent Skills

All Agent Skills

AI-Q Blueprint deployment

Install, run, validate, troubleshoot, and stop a local or self-hosted NVIDIA AI-Q Blueprint environment.

Agents

CUDA-Q onboarding guide

Install CUDA-Q, validate simulators and hardware targets, and build reproducible quantum applications.

Models

cuOpt installation

Select and verify a compatible cuOpt Python, C, or REST server installation for an NVIDIA GPU environment.

Models

cuOpt numerical optimization API

Solve linear, mixed-integer, and quadratic programs with the cuOpt Python API and result diagnostics.

Models

cuOpt optimization formulation

Translate business constraints and objectives into verifiable cuOpt mathematical programs before implementation.

Models

cuPyNumeric installation

Plan an isolated cuPyNumeric installation and verify NumPy-compatible execution and GPU usage without modifying global environments.

Models