Product
February 12, 2025

Scaling with Viam using fragments and nested fragments: A smarter way to build and deploy at scale

Managing large machine fleets is complex—nested fragments simplify it.
Natalia Jacobowitz
Product Manager
On this page

Introduction: Why nested fragments matter

Managing fleets of thousands of machines requires a scalable approach. Without a structured way to handle machine configurations, updates become chaotic, version control gets messy, and keeping track of changes across machines becomes overwhelming.

That’s why we built nested fragments.

What are nested fragments?

To understand Nested Fragments, let’s start with a quick refresher on fragments.

Fragments are reusable pieces of configuration that simplify fleet management. They allow teams to implement seamless updates, simplify version control, and track changes efficiently. Rather than maintaining separate configurations for each machine, teams can create a fragment once and reuse it across their fleet.

A simple nested fragments graphic, showing simple relationship between security fragment, sensors fragment, main v2 fragment

Nested fragments take this further by allowing fragments to reference other fragments, making complex machine architectures easier to manage. With this approach, teams can modularize configurations into logical building blocks while maintaining a streamlined parent structure.

Why this is a game-changer

Nested Fragments unlock several benefits that make managing complex machine fleets more efficient:

1. Modular, reusable, and scalable

  • Build once, reuse everywhere—ideal for companies managing different machine models.
  • Create a fragment that references other fragments. This approach allows you to swap out sub-fragments whenever you need, promoting development agility.
  • Gain a clear understanding of your machine by viewing the complete configuration of each machine, including all fragments and sub-fragments.
  • Users can overwrite attributes within a sub-fragment for customization, ensuring flexibility without losing modularity.

2. Seamless updates across fleets

  • Modify a single sub-fragment, and the update propagates across all machines that reference it, just as with standard fragments.
  • The key advantage of Nested Fragments is that updates to deeply embedded components are automatically reflected in all parent fragments, streamlining configuration management.
  • No need for manual reconfigurations—just update once and deploy effortlessly across complex, layered configurations.

3. Better organization for complex machines

A scale-focused fragments graphic demonstrating concept of a large number of machines using fragments.

Imagine an air-purifying robot–let’s call it PuraBot–as an example. PuraBot drives around your office or home, monitoring and cleaning the air. Equipped with cameras, it can navigate safely and avoid collisions with people.

At the PuraBot office headquarters one team manages a security fragment that handles cameras, machine learning, and vision services, while another team develops the motor and base fragments, ensuring clear separation of responsibilities. Each PuraBot model has its own distinct motor and base fragment—one for PuraBot V1 and another for PuraBot V2—tailored to their respective hardware. These unique fragments are then integrated into separate parent fragments, one for each PuraBot model, ensuring that updates to individual components remain modular and independent.

When the security fragment is improved, both PuraBot models automatically inherit the changes, while motor and base updates remain isolated to their respective versions. At scale, PuraBot only needs to deploy one of the parent fragments, enabling effortless management of 1,000+ robots while maintaining a structured and modular approach.

Sign Up

Who benefits from nested fragments?

Nested Fragments are built for scalability, collaboration, and efficiency. They benefit:

  • Companies managing large fleets (from tens to thousands of machines).
  • Teams working on multiple versions of a machine (V1, V2, etc.).
  • Developers who want reusability across different projects.
  • Collaborators & open-source users—Developers can reference and extend fragments built by other teams within their own configurations or use publicly available fragments from the community while layering in custom logic.

Closing thoughts: the future of automation at scale

Nested fragments simplify fleet management, improve collaboration, and streamline scalability by enhancing modularity and reusability. Whether managing a single machine or a global fleet, this feature ensures configurations remain adaptable, efficient, and easy to maintain. Start using nested fragments today.

twitter iconfacebook iconlinkedin iconreddit icon

Find us at our next event

Jul 17, 2025
Jul 18, 2025
,

DevRelCon

In Person
New York
Add some flair to your sticker swag by building a customizable, mini sticker vending machine for your next event, no prior hardware experience required!
Register Now
Jul 23, 2025
Jul 25, 2025
,

Nebraska.Code

In Person
Lincoln, NE
Learn how you, as a software person, can get started with robotics without knowing too much about hardware or robots at all!
Join Us
Aug 13, 2025
Aug 15, 2025
,

Kansas City Developer Conference

In Person
Kansas City
Are you interested in robotics or fun "maker space" type inventions, but have no idea where to start? Join Adrienne for a gentle introduction into robotics.
Check it out
Oct 13, 2025
Oct 14, 2025
,

All Things Open

In Person
Raleigh, NC
Viam is excited to sponsor All Things Open. Be sure to catch the Viam session where you'll learn how to build a real-time macaron (or macaroon) detection robot.
Join Us