EmbodiFlowDocs
Get startedDataWorkflows and algorithmsTraining and deploymentDeveloper reference
  • Workflows and algorithms

Workflows

  • How workflows work
  • Build your own workflow
  • Runs and logs

Algorithms

  • Algorithm catalog
  • Write a custom algorithm

Algorithm developer guide

  • Your first algorithm
    • Standardize
    • Check
    • Transform
    • Enrich
    • Segment
    • Curate
    • Export
  • Image algorithms
  • Use your algorithm in a workflow
  • Interface reference
  • SDK reference
  • Command line
  • MCP tools
  • Troubleshooting

© 2026 EmbodiFlow

llms.txtOpenAPI JSON
  1. Workflows and algorithms
  2. Algorithms
  3. Write a custom algorithm

Write a custom algorithm

Write an algorithm in Python in the browser, try it on a real recording, save it as a version and use it in a workflow.

When the built-in algorithms don't measure what you care about, write your own. In a few minutes your Python becomes a typed, versioned algorithm in the team library, next to the built-in ones and ready to drop into any workflow. You don't need to install anything.

Team Owners, Admins and Researchers can write and save team algorithms. Team algorithms are in beta.

1Pick what it does

Open Algorithms, choose the Custom tab and click New algorithm. Under What does it do?, pick a category, such as Enrich or Check, and where it runs: once per recording or once per episode. Each choice comes with a working example. Click Start writing.

2Write the Python

The editor opens with the example code. The decorator at the top describes the algorithm: its name, category, parameters and what it writes. The run function does the work. Edit it as you like.

Choose a sample recording in Test run on the right, and the editor completes camera and column names from that recording as you type. The Interface panel below keeps up with your code, showing the inputs, outputs, features and resources the platform will see.

3Try it on a recording

In Test run, choose a Project and a Recording, keep Window at First 30 seconds, and click Run test. After a short wait you see "The run succeeded." and the result, such as a per-frame chart of the feature you wrote. A test run saves nothing, so try as often as you like.

A test waits for a free team slot like any step, so it may queue for a moment while workflows are running. If your code has a problem, the editor marks the line, and the test can't start until it's fixed.

4Save a version

Click Save version at the top right. The editor suggests a version number, which you can raise but not lower. A message confirms it, for example "Saved version 1.0.0. It is in the library."

If your code needs no extra Python packages, there's nothing to build. If you add requirements, the platform builds an image for the version, and a first build can take about ten minutes. If the code hasn't changed since the last version, nothing is saved.

5Find it in the library

Your algorithm is now on the Custom tab. Its page shows the Team badge, its inputs, outputs, parameters and features, and under Versions every version you saved. To change it, click Edit: you start a new version based on the latest one.

6Use it in a workflow

Open a workflow you can edit. Your algorithm appears in the library under its category, marked Team. Drag it onto the canvas and the editor wires it up. Then publish and test as in Build your own workflow.

Test runs read the original recordings, and their privacy rules still apply. Test runs for GPU algorithms and for image algorithms are not generally available yet.

For developers

The developer guide goes deeper: the full interface, an example for every category, and how to package an algorithm in any language.

  • Your first algorithm
  • Interface reference
  • Image algorithms
Previous

Algorithm catalog

Next

Your first algorithm