EmbodiFlowDocs
Open console
Get startedAlgorithms and workflowsDataTrainingReference
  • Reference

Tools

  • CLI reference
  • Python SDK

Algorithms and workflows

  • Algorithm interface and manifest
    • Standardize
    • Check
    • Transform
    • Enrich
    • Segment
    • Filter
    • Export
  • Built-in algorithms
    • Anonymize
    • Body pose (SMPL-H)
    • Head pose (visual-inertial)
    • Standardize MCAP
    • Standardize video
    • Ego 3D visualization
    • Episode success
    • Filter episodes
    • Hand pose (MANO)
    • Hand pose
    • LeRobot v3 export
    • Import LeRobot
    • Video preview
    • Poster frames
    • Propose episodes
    • Raw-file metrics
    • Recording episodes
    • Sensor calibration
    • Split episodes
    • Stereo depth
    • Visual metrics

API

  • REST API
  • All endpoints
  • Projects
    • Recordings
      • Upload
        • Episodes and versions
          • Health and quality
            • Workflows
              • Algorithms
                • Export and training
                  • Billing and usage
                    • Team and governance
                      • Account and notifications
                        • Webhook endpoints
                          • Authentication
                          • API keys
                          • Personal access tokens
                          • Browser sessions
                          • Webhooks and signatures

                          Help

                          • Troubleshooting
                          • Changelog

                          © 2026 EmbodiFlow

                          Open consolellms.txtOpenAPI JSON
                          1. Reference
                          2. Algorithms and workflows
                          3. Algorithm interface and manifest

                          Algorithm interface and manifest

                          Everything an algorithm can declare: decorator arguments, features, parameters, semantic types, facts, resources, exit states and versions.

                          In a Python algorithm, the decorator and the Params dataclass in main.py are the interface. Everything else in the file is just the work. Keeping the two apart is what lets the platform show your ports in the editor, check workflow connections and propose version numbers, all without running your code.

                          When you save, the platform reads the interface statically and freezes it with the version as algorithm.yaml. At run time the SDK rebuilds the interface from the decorator and refuses to start if it differs from the frozen one (ALGORITHM_MANIFEST_DRIFT).

                          Decorator arguments and param(...) defaults must be literals: strings, numbers, booleans, lists, dicts and the SDK constructors Feature, Check, Input and param. Anything else is refused with ALGORITHM_FILE_INVALID, and the message names the line.
                          Beta. Custom algorithms and workflows are in the product and ready to try, but they haven't been through a full acceptance on real data yet. Expect some rough edges, and check results before you rely on them.

                          Read a recording and write features

                          Most algorithms do the same three things inside run: pick a camera, read its frames, and write values back. This section is what you need for that; the complete example at its end runs as it is. Everything comes from from embodiflow import …, which the console editor and every run already have.

                          Cameras and their names

                          recording.cameras lists the recording's cameras. Each Camera has a role, its short name such as top or wrist_left, a key, the LeRobot name such as observation.images.top, and its width and height in pixels. Take a camera by position, recording.cameras[0], or by name: recording.cameras["wrist_left"] accepts the role or the key.

                          for cam in recording.cameras:
                              print(cam.role, cam.key, cam.width, cam.height)
                          
                          cam = recording.cameras["wrist_left"]      # by role, or by key: "observation.images.wrist_left"

                          To see the cameras of your own recording, pick it in the editor's Test run panel: it says, for example, "Cameras in this recording: top (observation.images.cam_high), wrist_left (observation.images.cam_left_wrist)." Each camera is shown by its role, with its whole key in brackets; pass either, recording.cameras["top"] or recording.cameras["observation.images.cam_high"]. You can also print them in your code and run a test: what your code prints appears under Logs in the test result. A name the recording doesn't have stops the run with an error that lists the names it does have, for example KeyError: "no camera 'front'; cameras: ['top', 'wrist_left', 'wrist_right']".

                          A role is one of head, head_left, head_right, wrist_left, wrist_right, wrist, chest, third_person, top, depth, other. The robots the platform reads out of the box name their cameras like this; when two cameras share a role, take them by key or by position.

                          RobotRolesKeys
                          LimX TRON2 AV3 (dual arm)top, wrist_left, wrist_rightobservation.images.top, observation.images.wrist_left, observation.images.wrist_right
                          LimX TRON2 AV3 (dual arm, no head target)top, wrist_left, wrist_rightobservation.images.top, observation.images.wrist_left, observation.images.wrist_right
                          LimX TRON2 (gripper)top, wrist_left, wrist_rightobservation.images.top, observation.images.wrist_left, observation.images.wrist_right
                          LimX TRON2 (dexterous hands)top, wrist_left, wrist_rightobservation.images.top, observation.images.wrist_left, observation.images.wrist_right
                          ALOHA (bimanual)top, third_person, wrist_left, wrist_rightobservation.images.cam_high, observation.images.cam_low, observation.images.cam_left_wrist, observation.images.cam_right_wrist
                          SO-100 / SO-101top, top, third_person, wristobservation.images.up, observation.images.top, observation.images.side, observation.images.wrist
                          Koch v1.1third_person, third_personobservation.images.laptop, observation.images.phone
                          Franka (DROID-style)third_person, third_person, wristobservation.images.exterior_image_1_left, observation.images.exterior_image_2_left, observation.images.wrist_image_left
                          SenseXperience egocentric righead_left, head_right, wrist_left, wrist_rightobservation.images.head_left, observation.images.head_right, observation.images.wrist_left, observation.images.wrist_right

                          Frames

                          cam.frames(start=0, stop=None, step=1, gray=False, size=None) decodes the camera's video one Frame at a time, so a long recording never has to fit in memory. Each frame has an index (the frame number, 0 at the start of the recording, or of the episode at episode level), time_s (seconds from that start) and image, a numpy uint8 array: height × width × 3 in RGB, or height × width with gray=True. step reads every n-th frame, and size=(width, height) scales the picture down, which is much faster when your model wants small images.

                          for frame in cam.frames(step=5, gray=True, size=(320, 240)):
                              print(frame.index, frame.time_s, frame.image.shape)   # 0 0.0 (240, 320)
                          
                          first = cam.frame(0)      # one frame
                          ok = cam.valid()          # one bool per frame: False where the camera dropped a frame

                          Where a camera had a gap, the video holds a black placeholder frame and valid() is False for it, so you can leave those frames out.

                          The recording itself

                          NameWhat it gives you
                          recording.num_frames, recording.fps, recording.duration_sFrames, frames per second and seconds. A per-frame feature has exactly num_frames rows.
                          recording.task, recording.kindThe task text, and robot or human.
                          recording.columnsThe joint and sensor columns, each a Column with name, shape, names (for example the joint names) and unit.
                          recording.column(name)One column as a numpy array of num_frames rows, for example recording.column("observation.state"), the joint state of a robot recording.
                          recording.table(columns)Every row as a pyarrow.Table.
                          recording.window(start_s, end_s)A part of the recording, with frame numbers starting at 0.

                          Parameters and output to read back

                          ctx.params holds your Params with the values the workflow set, for example ctx.params.step. Use print() for anything you want to read back: a test run shows it under Logs, and a workflow run in the step's log. ctx.progress(done, total) reports progress on long work.

                          Write features

                          In an enrich algorithm, out is a FeatureWriter. Use the method that matches the per of each Feature you declared in the decorator, and write every declared feature exactly once.

                          MethodFor per=What you pass
                          out.per_frame(name, values)"frame"One row per frame: an array of num_frames rows (a plain list or 1-D array for a scalar). NaN marks a frame with no value. A wrong row count fails with FEATURE_ROW_COUNT_MISMATCH.
                          out.per_recording(name, value)"recording"One value for the whole recording, at most 1 MiB of JSON.
                          out.per_episode(name, value)"episode"The value of the episode being processed, with level="episode" only.
                          out.file(name, path)"file"A file you wrote, for example under ctx.tmp.

                          For example, with Feature("brightness", type="scalar", per="frame") and Feature("mean_brightness", type="scalar", per="recording") declared, and a camera chosen as above:

                          values = np.full(recording.num_frames, np.nan, np.float32)   # NaN: no value for this frame
                          for frame in cam.frames(step=ctx.params.step, gray=True):
                              values[frame.index] = frame.image.mean()
                          out.per_frame("brightness", values)
                          out.per_recording("mean_brightness", float(np.nanmean(values)))

                          A complete example

                          Motion energy, the example the console opens for Enrich, puts it all together: the imports, Params, the decorator, frames of the first camera and one value per frame. To use a named camera, change recording.cameras[0] to recording.cameras["wrist_left"].

                          """Enrich: the mean absolute difference between consecutive frames of the first camera, per frame.
                          
                          In:  the canonical recording.
                          Out: one new per-frame feature "motion_energy"; the recording itself is not changed.
                          Why: idle stretches (the arm waits, the person stands still) show as low motion, so a later step can
                               segment or drop them. A feature is how an algorithm adds knowledge without rewriting the recording.
                          """
                          
                          from dataclasses import dataclass
                          
                          import numpy as np
                          
                          from embodiflow import Context, Feature, FeatureWriter, Recording, algorithm, param
                          
                          
                          @dataclass
                          class Params:
                              step: int = param(1, minimum=1, title="Frame step")
                          
                          
                          @algorithm.enrich(
                              name="motion-energy",
                              title="Motion energy",
                              description="How much the first camera's picture changes from one frame to the next.",
                              features=[Feature("motion_energy", type="scalar", per="frame", dtype="float32", unit="none")],
                              params=Params,
                          )
                          def run(recording: Recording, out: FeatureWriter, ctx: Context[Params]) -> None:
                              cam = recording.cameras[0]
                              energy = np.zeros((recording.num_frames, 1), np.float32)
                              prev = None
                              for frame in cam.frames(step=ctx.params.step, gray=True):
                                  current = frame.image.astype(np.float32)
                                  if prev is not None:
                                      energy[frame.index, 0] = np.abs(current - prev).mean()
                                  prev = current
                              out.per_frame("motion_energy", energy)
                          Every class and method, with its arguments, is in the Python SDK reference further down this page, generated from the SDK itself.

                          Decorator arguments

                          ArgumentRequiredRule
                          name, titleyesname is lowercase letters and digits in segments joined by a single -, 2 to 63 long, starting with a letter, with no trailing - (a--b and a- are refused; the message suggests a-b). training-images is reserved. It is fixed for the algorithm's life. A team name may not start with ef- or embodiflow-.
                          descriptionnoShown in the library.
                          levelnocheck and enrich: recording (default) or episode.
                          readscheck at recording levelraw or recording (default).
                          inputsnoExtra features inputs: Input(requires=[…], optional=False). Names are lowercase letters, digits and _, up to 32 long, and not a data type name, a default port name or a run argument name.
                          featuresenrichAt least one Feature(...).
                          checkscheck; any category that writes checksCheck(id, title, description="").
                          labelssegmentThe label keys its episodes carry: {key: semantic type}.
                          requiresnoFacts the data must have. See below.
                          paramsnoA dataclass whose every field is param(default, …).
                          resourcesnoSee below.
                          requirementsnopip requirement strings. Binary wheels only. Locked at save.
                          retries, cachenoDefault: one retry on transient errors, cache on.
                          servicesnoBuilt-in algorithms only: ["vlm"].
                          privacynoBuilt-in algorithms only: "redacts" or "numbers_only".

                          You don't write a version in the code. When you save, the platform proposes the next version from what changed in the interface.

                          Data types

                          Ports carry one of eight data types, and a connection is only allowed between ports of the same type.

                          TypeWhat it is
                          rawOne recording's uploaded files.
                          recordingThe canonical recording: a LeRobot v3 tree plus meta/embodiflow/recording.json.
                          featuresNew values about a recording or its episodes.
                          checksJudgements, each with a status.
                          episodesTime ranges with a task text.
                          versionA version.
                          selectionPer-episode decisions: keep, split, task.
                          artifactFiles to download.

                          Feature

                          A feature is declared as Feature(name, type, per, dtype=…, shape=…, unit=…, frame=…, names=…, source=…, describe=…).

                          FieldMeaning
                          nameA short name. The platform stores it under a name that belongs to your team.
                          typeA semantic type from the table below.
                          perframe, recording, episode or file.
                          dtypefloat32 (default), float64, int8, int16, int32, int64, uint8 or uint16.
                          shapeThe shape of one value. Array types have a fixed default shape.
                          unit, frameRequired for geometric types, except per file.
                          namesNames of the components, for example joint names.
                          sourcerecorded, imported, estimated, computed (default) or retargeted.
                          describeExtra description, for example {"targetRig": "tron2av3"} for a retargeted action.

                          Parameters

                          Parameters are the settings a workflow can change without touching your code. Every field of Params is param(default, minimum=…, maximum=…, enum=…, title=…, description=…, widget=…), and its type comes from the annotation: int, float, str, bool, or a list of strings, integers or floats.

                          A list field takes a literal list default and also items_enum, min_items and max_items. The widget tags takes free strings; multiselect needs items_enum. A workflow sets values in with, and the platform checks them against these limits.

                          Semantic types

                          A feature's semantic type tells the next step what the numbers mean; it's how the editor knows which outputs can feed an input that requires, say, keypoints3d.hand21. The registry is closed, and teams use these types as they are.

                          TypeMeaningShape or value
                          scalarOne number[1]
                          vectorNumbers[n]
                          label.boolYes or no labelbool
                          label.categoryOne of a declared setstring; describe.values
                          label.textFree textstring
                          spansTime ranges inside an episode or recordinglist of { startS, endS, label }
                          embeddingAn embedding vector[n]; describe.model
                          pose.se3Position and quaternion[7]: x y z qx qy qz qw; unit, frame
                          keypoints3d.hand2121 hand landmarks in 3D, MediaPipe order[63]; unit, frame
                          skeleton.hand2121 hand joints with a 6-DoF frame each, MediaPipe order[147] = 21 x (x y z qx qy qz qw); unit, frame
                          skeleton.body2222 body joints with a 6-DoF frame each, SMPL order (pelvis first)[154] = 22 x (x y z qx qy qz qw); unit, frame
                          keypoints2d2D image keypoints[2k]; frame is the camera
                          confidencePer-sample confidence from 0 to 1[n]
                          calibration.stereoRectified stereo extrinsics{ R[9], T[3] }
                          calibration.cam_imuCamera to IMU transform and time offset{ R[9], T[3], dtS }
                          depth.video16-bit depth video sidecarfile
                          mask.videoPer-frame mask videofile
                          video.previewLight browser preview copy of one camera video, same framesfile, embodiflow-preview/v1
                          ros2.mcapROS 2 MCAP file (TF tree, images, point clouds, markers)file
                          action.jointJoint-space action[n]; names
                          action.ee_poseEnd-effector action[7], or [8] with the gripper
                          jsonAny small JSONobject, at most 1 MiB; matched by requires only as name:<feature>

                          Facts and requires

                          Facts are what the platform knows about the data, derived from the data itself and never typed in by a person. Your code reads them as ctx.facts, and requires uses them to decide whether your algorithm applies at all.

                          FactTypeKnown from
                          kindrobot or humanThe project
                          formatstring: mcap, lerobot, video, or x-<team format>The upload
                          privacy_requiredboolAlways true: anonymization is a workflow step for every recording
                          duration_snumberThe upload summary, then the recording, then the episode window
                          camerasintegerThe upload summary, then the recording
                          stereoboolThe recording: a stereo pair with intrinsics
                          imuboolThe recording: IMU columns
                          actionboolThe recording: an action feature
                          recorded_hand_poseboolThe recording: recorded hand keypoints
                          gripper_widthboolThe recording: a gripper-width column
                          episodesintegerThe version: number of episodes

                          requires maps a fact to true, false, a string equal to the value, or a comparison such as ">=2" or "<600". If any condition is false, the step ends as not applicable: grey, never a failure. An unknown fact never satisfies a condition, so the step is not applicable rather than run on a guess. Your code can also decide at run time with ctx.not_applicable(code, message).

                          Resources

                          KeyDefaultMeaning
                          cpu4CPU cores.
                          memory8GiMemory, for example 8Gi or 16Gi.
                          disk10GiScratch space for ctx.tmp.
                          gpuNoneNone, or {"count": 1, "memoryGb": 16}.
                          timeout30mA duration such as 20m, or {"perInputMinute": …, "min": …, "max": …}.

                          Every step gets at least 1 CPU core and 2Gi of memory, and at least 8 GB of GPU memory when it asks for a GPU; a smaller value runs with that floor, so a light step runs with what it asks for. The resources must fit on one machine, and a GPU larger than any compute pool offers is refused with ALGORITHM_GPU_UNSATISFIABLE.

                          An algorithm that asks for a GPU runs on the CUDA SDK base automatically, with PyTorch and CUDA 13 preinstalled, so you never choose a base image. Its test runs also use a GPU and wait until one has room; a deployment without a GPU refuses them with ALGORITHM_SAMPLE_RUN_GPU_UNSUPPORTED.

                          GPU test runs haven't yet been proven end to end on a freshly installed deployment. If one misbehaves, send us the run id.

                          How code ends

                          How your code finishes tells the platform what happened, and each way ends the step differently. An image algorithm signals the same outcomes with its exit code.

                          PythonExit code (image)MeaningThe step ends
                          return0Done.succeeded
                          ctx.not_applicable(code, msg)85This data is not for me.not applicable
                          ctx.input_unusable(code, msg)87The data is broken.failed; the recording is quarantined
                          raise TransientError(msg)88Try again: network, GPU busy.retried, then failed
                          any other exception1A bug.failed; the traceback is in the log

                          Codes are capital letters, digits and _, 3 to 64 long. The step message reads <code>: <message>.

                          Versions and references

                          Workflows refer to an algorithm as embodiflow/<name>@<major> or team/<name>@<major>, and each run uses the highest saved version of that major. That way a fix reaches every workflow on its next run, while a breaking change waits until you switch to the new major.

                          A change to the ports, level, requires, the declared features, checks or labels, or the type of a parameter is a breaking change and needs a new major version; saving it as a minor version is refused with ALGORITHM_INTERFACE_CHANGED. A saved version never changes.

                          How run is called

                          run is called once per recording, once per episode at episode level, or once per version for curate and export. Its arguments are bound by name, so take only the ones you need, in any order.

                          ArgumentGets
                          raw, recording, versionThe main input. What a recording offers is in Read a recording and write features.
                          episodeEpisode level only: the episode being processed.
                          An extra input nameA Features object, or None when the input is optional and absent.
                          outThe writer of the category.
                          ctxThe context: params, facts, recording_id, run_id, step_id, tmp, log, progress(done, total, message), not_applicable and input_unusable.
                          stateWhat setup(ctx) returned.

                          Use setup(ctx) to load a model once. Today the platform calls it once per job; a later version may process many items in one job and still call setup only once, with no change to your code. That's why run must not keep per-item state in globals.

                          Next

                          • SDK reference
                          • Image algorithms

                          Python SDK reference

                          This page is generated from the same SDK index the browser editor uses for completion, so it always matches the SDK you run. Everything is imported from embodiflow:

                          from embodiflow import Context, Feature, FeatureWriter, Recording, algorithm, param

                          The SDK ships type hints (py.typed), so your own editor completes it too, and every class and method has a docstring that the browser editor shows on hover. The descriptions below are those docstrings.

                          Beta. Custom algorithms and workflows are in the product and ready to try, but they haven't been through a full acceptance on real data yet. Expect some rough edges, and check results before you rely on them.

                          Decorators

                          @algorithm.standardize

                          Declare a standardizer: it turns one raw recording into the canonical recording.

                          ArgumentTypeRequiredDefault
                          namestryes
                          titlestryes
                          descriptionstr | NonenoNone
                          checkslist[Check] | NonenoNone
                          requiresdict[str, Any] | NonenoNone
                          paramstype | NonenoNone
                          constraintslist[Constraint] | NonenoNone
                          resourcesdict[str, Any] | NonenoNone
                          requirementslist[str] | NonenoNone
                          retriesint | NonenoNone
                          cachebool | NonenoNone
                          serviceslist[str] | NonenoNone

                          @algorithm.check

                          Declare a check: it judges data and never changes it.

                          ArgumentTypeRequiredDefault
                          namestryes
                          titlestryes
                          checkslist[Check]yes
                          descriptionstr | NonenoNone
                          levelstr | NonenoNone
                          readsstr | NonenoNone
                          inputsdict[str, Input] | NonenoNone
                          requiresdict[str, Any] | NonenoNone
                          paramstype | NonenoNone
                          constraintslist[Constraint] | NonenoNone
                          resourcesdict[str, Any] | NonenoNone
                          requirementslist[str] | NonenoNone
                          retriesint | NonenoNone
                          cachebool | NonenoNone
                          serviceslist[str] | NonenoNone
                          passthroughdict[str, list[str]] | NonenoNone

                          @algorithm.transform

                          Declare a transform: it returns a recording with some streams replaced or cut.

                          ArgumentTypeRequiredDefault
                          namestryes
                          titlestryes
                          descriptionstr | NonenoNone
                          inputsdict[str, Input] | NonenoNone
                          checkslist[Check] | NonenoNone
                          requiresdict[str, Any] | NonenoNone
                          paramstype | NonenoNone
                          constraintslist[Constraint] | NonenoNone
                          resourcesdict[str, Any] | NonenoNone
                          requirementslist[str] | NonenoNone
                          retriesint | NonenoNone
                          cachebool | NonenoNone
                          serviceslist[str] | NonenoNone
                          privacystr | NonenoNone
                          passthroughdict[str, list[str]] | NonenoNone

                          @algorithm.enrich

                          Declare an enricher: it computes new information without changing the recording.

                          ArgumentTypeRequiredDefault
                          namestryes
                          titlestryes
                          featureslist[Feature]yes
                          descriptionstr | NonenoNone
                          levelstr | NonenoNone
                          inputsdict[str, Input] | NonenoNone
                          checkslist[Check] | NonenoNone
                          requiresdict[str, Any] | NonenoNone
                          paramstype | NonenoNone
                          constraintslist[Constraint] | NonenoNone
                          resourcesdict[str, Any] | NonenoNone
                          requirementslist[str] | NonenoNone
                          retriesint | NonenoNone
                          cachebool | NonenoNone
                          serviceslist[str] | NonenoNone
                          privacystr | NonenoNone
                          passthroughdict[str, list[str]] | NonenoNone

                          @algorithm.segment

                          Declare a segmenter: it proposes episodes, time ranges with a task text.

                          ArgumentTypeRequiredDefault
                          namestryes
                          titlestryes
                          descriptionstr | NonenoNone
                          labelsdict[str, str] | NonenoNone
                          inputsdict[str, Input] | NonenoNone
                          checkslist[Check] | NonenoNone
                          requiresdict[str, Any] | NonenoNone
                          paramstype | NonenoNone
                          constraintslist[Constraint] | NonenoNone
                          resourcesdict[str, Any] | NonenoNone
                          requirementslist[str] | NonenoNone
                          retriesint | NonenoNone
                          cachebool | NonenoNone
                          serviceslist[str] | NonenoNone
                          segment_sourcestr | NonenoNone
                          passthroughdict[str, list[str]] | NonenoNone

                          @algorithm.curate

                          Declare a curator: it decides per episode of a dataset version whether to keep it, its split and its task.

                          ArgumentTypeRequiredDefault
                          namestryes
                          titlestryes
                          descriptionstr | NonenoNone
                          requiresdict[str, Any] | NonenoNone
                          paramstype | NonenoNone
                          constraintslist[Constraint] | NonenoNone
                          resourcesdict[str, Any] | NonenoNone
                          requirementslist[str] | NonenoNone
                          retriesint | NonenoNone
                          cachebool | NonenoNone

                          @algorithm.export

                          Declare an exporter: it turns a dataset version into downloadable files.

                          ArgumentTypeRequiredDefault
                          namestryes
                          titlestryes
                          descriptionstr | NonenoNone
                          requiresdict[str, Any] | NonenoNone
                          paramstype | NonenoNone
                          constraintslist[Constraint] | NonenoNone
                          resourcesdict[str, Any] | NonenoNone
                          requirementslist[str] | NonenoNone
                          retriesint | NonenoNone
                          cachebool | NonenoNone

                          Functions

                          param(default, *, minimum=None, maximum=None, enum=None, title=None, description=None, widget=None)

                          Declare a field of the Params dataclass with its default and limits.

                          Classes

                          ArtifactWriter

                          Collects the files of an export (embodiflow-artifact/v1).

                          AttributeMeaning
                          checks: 'CheckWriter'The CheckWriter for the checks this algorithm declared (checks=[Check(...)]).
                          MethodMeaning
                          format(name: str) -> NoneName the format of the files (lerobot-v3, csv, ...).
                          path(rel: str) -> PathA path inside the artifact to write to (parent folders are created).
                          add(src: str | Path, rel: str) -> NoneCopy the file or folder src into the artifact at rel.
                          reference(rel: str, source: str) -> dict[str, Any]Put input file source ("<input port>/<path>", e.g. "version/results/<id>/videos/…/file-000.mp4") into the artifact at rel without reading or copying it (contract §6.5).
                          summary(doc: dict[str, Any]) -> NoneDescribe the export (counts, sizes); shown on the download page.

                          Camera

                          One camera of a recording.

                          AttributeMeaning
                          anonymized: bool
                          distortion: list[float] | None
                          height: int
                          intrinsics: list[list[float]] | None
                          key: str
                          model: str | None
                          role: str
                          video_path: PathThe camera's mp4 in the recording tree.
                          width: int
                          MethodMeaning
                          valid() -> 'np.ndarray'A boolean per frame: False where the camera had a gap and the video holds a black placeholder.
                          frames(start: int=0, stop: int | None=None, step: int=1, gray: bool=False, size: tuple[int, int] | None=None) -> Iterator[Frame]Decode frames start..stop every step (indices relative to this recording or episode window).
                          frame(i: int) -> FrameDecode the single frame i.

                          Check

                          One check result id an algorithm may report through CheckWriter.result.

                          AttributeMeaning
                          description: str
                          id: str
                          title: str
                          MethodMeaning
                          to_dict() -> dict[str, Any]The declaration as the manifest input.

                          CheckWriter

                          Collects check results (embodiflow-checks/v1).

                          AttributeMeaning
                          checks: 'CheckWriter'The CheckWriter for the checks this algorithm declared (checks=[Check(...)]).
                          MethodMeaning
                          result(id: str, status: str, value: float | None=None, threshold: float | None=None, message: str='', evidence: Sequence[str | Path] | None=None, at: Mapping[str, Any] | None=None) -> NoneReport one result.
                          evidence_path(name: str) -> PathA path under evidence/ to write a picture or file to; pass it to result(evidence=[...]).
                          metrics(doc: dict[str, Any]) -> NoneAttach an embodiflow-quality-metrics/v1 body (built-in checks only).

                          Column

                          One tabular column of a recording: name, dtype, shape, names and the conventions unit, frame, source.

                          AttributeMeaning
                          dtype: str
                          frame: str | None
                          name: str
                          names: list[str] | None
                          shape: list[int]
                          source: str | None
                          type: str | None
                          unit: str | None

                          Constraint

                          A rule between two params (contract 3.2 constraints), checked before a run starts.

                          AttributeMeaning
                          at_least: str | None
                          at_most: str | None
                          multiple_of: str | None
                          param: str
                          when: Any
                          MethodMeaning
                          to_dict() -> dict[str, Any]The declaration as the manifest input.

                          Context

                          Everything a run knows about itself: params, facts, identifiers, scratch space, log, progress.

                          AttributeMeaning
                          facts: Facts
                          log: logging.Logger
                          params: P
                          platform_params: dict[str, Any]What the platform resolved for a standardize step (rigProfiles, teamDataFormat); empty otherwise.
                          recording_id: str | NoneThe recording this step works on (None for a version-level step).
                          run_id: strThe workflow run id.
                          step_id: strThe id of the step in the workflow.
                          team_slug: str | NoneThe storage slug of the team (names a team feature); None when the job does not state it.
                          tmp: Path
                          MethodMeaning
                          progress(done: int, total: int, message: str='') -> NoneReport progress to the run view (progress bar and ETA); safe to call often.
                          not_applicable(code: str, message: str) -> NoReturnEnd the step as *not applicable* (exit 85, grey in the run view, never a failure).
                          input_unusable(code: str, message: str) -> NoReturnEnd the step because the data is broken (exit 87): the step fails and the recording is quarantined.

                          DatasetVersion

                          A frozen dataset version: id, features (declared names and types) and members.

                          AttributeMeaning
                          document: dict[str, Any]
                          features: dict[str, dict[str, Any]]
                          id: str
                          members: list[Member]
                          MethodMeaning
                          to_pandas() -> 'pd.DataFrame'One row per member: id, recording, start/end/duration, task, split, labels, quality status, session, operator.

                          Episode

                          An episode of a recording: index, start_s, end_s (recording timeline), task, labels, confidence.

                          AttributeMeaning
                          confidence: float | None
                          duration_s: floatLength in seconds.
                          end_s: float
                          index: int
                          labels: dict[str, Any]
                          start_s: float
                          task: str | None

                          EpisodeWriter

                          Collects proposed episodes (embodiflow-episodes/v1).

                          AttributeMeaning
                          checks: 'CheckWriter'The CheckWriter for the checks this algorithm declared (checks=[Check(...)]).
                          MethodMeaning
                          episode(start_s: float, end_s: float, task: str, labels: Mapping[str, Any] | None=None, confidence: float | None=None) -> NoneAdd one episode: startS/endS in seconds, the task text, optional labels and a confidence in 0..1.

                          Facts

                          Facts of the main input (contract 2.1) with attribute access: ctx.facts.kind, ctx.facts.stereo.

                          AttributeMeaning
                          action: bool | None
                          cameras: int | None
                          duration_s: float | None
                          episodes: int | None
                          format: str | None
                          gripper_width: bool | None
                          imu: bool | None
                          kind: str | None
                          privacy_required: bool | None
                          recorded_hand_pose: bool | None
                          stereo: bool | None
                          MethodMeaning
                          get(name: str, default: Any=None) -> AnyThe value of a fact, or default when it is unknown.
                          as_dict() -> dict[str, Any]All known facts as a plain dict.

                          Feature

                          One feature an enrich algorithm declares and later writes through FeatureWriter.

                          AttributeMeaning
                          describe: dict[str, Any] | None
                          dtype: str | None
                          frame: str | None
                          name: str
                          names: list[str] | None
                          per: str
                          shape: list[int] | None
                          source: str | None
                          type: str
                          unit: str | None
                          MethodMeaning
                          to_dict() -> dict[str, Any]The declaration as the manifest input: only the arguments that were given.

                          FeatureWriter

                          Collects the features an enrich algorithm computes (embodiflow-features/v1).

                          AttributeMeaning
                          checks: 'CheckWriter'The CheckWriter for the checks this algorithm declared (checks=[Check(...)]).
                          MethodMeaning
                          per_frame(name: str, values: Any, confidence: str | None=None) -> NoneWrite one row per frame: values has shape (num_frames, *shape) (a 1-D array for a scalar).
                          per_recording(name: str, value: Any) -> NoneWrite one value for the whole recording (JSON, at most 1 MiB).
                          per_episode(name: str, value: Any) -> NoneWrite the value for the episode being processed (episode-level enrich only).
                          file(name: str, path: str | Path, describe: Mapping[str, Any] | None=None) -> NoneAttach a file (such as a depth video) to a per="file" feature.
                          poster(frame_ms: int, path: str | Path) -> NoneBuilt-in poster-frames only: write the JPEG at path as the poster frame_ms milliseconds into the recording.

                          Features

                          A features input (features.json plus frames.parquet, episodes.parquet and files/).

                          AttributeMeaning
                          document: dict[str, Any]
                          names: list[str]The names of all features.
                          num_frames: int
                          MethodMeaning
                          info(name: str) -> dict[str, Any]The features.json entry of name (type, per, dtype, shape, unit, frame, source, describe).
                          of_type(semantic_type: str) -> list[str]Names of the features whose semantic type is semantic_type.
                          per_frame(name: str) -> 'np.ndarray'The values of a per-frame feature, shape (num_frames, *shape); rows outside an episode window are NaN/None.
                          per_recording(name: str) -> AnyThe value of a per-recording feature.
                          per_episode(name: str) -> dict[int, Any]{episodeIndex: value} of a per-episode feature.
                          file(name: str) -> PathThe path of a per-file feature (a depth video).

                          Frame

                          One decoded video frame: index (in the recording or episode window), time_s and image (RGB H x W x 3 uint8, or H x W when gray).

                          AttributeMeaning
                          image: 'np.ndarray'
                          index: int
                          time_s: float

                          Input

                          An extra input of type features (a calibration, a hand pose).

                          AttributeMeaning
                          optional: bool
                          requires: list[str]
                          MethodMeaning
                          to_dict() -> dict[str, Any]The declaration as the manifest input.

                          InputUnavailableError

                          An input the algorithm asked for is not there (absent port, missing file or download).

                          ManifestDriftError

                          The code's interface differs from the frozen manifest of this version.

                          ManifestError

                          The algorithm interface is invalid (ALGORITHM_FILE_INVALID and its siblings).

                          McapMessage

                          A decoded ROS 2 message: topic, schema, log_time_s (seconds since the file's first message).

                          McapReader

                          An MCAP file read through its summary and only the chunks a query needs.

                          AttributeMeaning
                          duration_s: float
                          end_ns: int
                          start_ns: int
                          topics: list[McapTopic]
                          MethodMeaning
                          messages(topics: Sequence[str] | None=None, start_s: float | None=None, end_s: float | None=None) -> Iterator[McapMessage]Decoded messages in log-time order; topics filters by name, start_s/end_s bound log time.

                          McapTopic

                          One topic of an MCAP file: name, message schema name, message count and average rate in Hz.

                          AttributeMeaning
                          count: int
                          name: str
                          rate: float
                          schema: str

                          Member

                          One episode of a dataset version.

                          AttributeMeaning
                          duration_s: floatLength of the episode in seconds.
                          end_s: float
                          episode_id: str
                          features: dict[str, Any]
                          labels: dict[str, Any]
                          operator: str | None
                          quality: dict[str, Any]
                          recording_id: str
                          root: str
                          session: str | None
                          split: str | None
                          start_s: float
                          task: str | None
                          MethodMeaning
                          recording() -> RecordingThe episode's recording window, downloading its files on first use.

                          OutputError

                          A writer refused what the algorithm gave it.

                          RawFile

                          One uploaded file: path (relative to the upload root), size in bytes and local_path on disk.

                          AttributeMeaning
                          local_path: Path
                          path: str
                          size: int
                          MethodMeaning
                          open(mode: str='rb') -> IO[Any]Open the file (read-only; binary by default).

                          RawFiles

                          One recording's uploaded files, at their upload-relative paths.

                          AttributeMeaning
                          files: list[RawFile]
                          MethodMeaning
                          find(pattern: str) -> list[RawFile]The files whose path matches the glob pattern (* within a folder, ** across folders).
                          read_json(path: str) -> AnyParse the JSON file at path.
                          read_yaml(path: str) -> AnyParse the YAML file at path.
                          mcap(path: str | None=None) -> 'McapReader'Open an MCAP file; path may be omitted when the upload holds exactly one.

                          Recording

                          The canonical recording (LeRobot v3 tree plus meta/embodiflow/recording.json), or a time window of it.

                          AttributeMeaning
                          calibration: dict[str, Any]The conventions sidecar's calibration: frames, stereoPairs and timeOffsets as stored.
                          cameras: list[Camera]
                          columns: list[Column]
                          conventions: dict[str, Any]
                          duration_s: floatLength in seconds.
                          facts: dict[str, Any]
                          fps: float
                          info: dict[str, Any]
                          kind: str | None
                          meta: dict[str, Any]
                          num_frames: int
                          start_s: floatWhere this recording (or episode window) starts on the recording timeline, in seconds.
                          stereo_pairs: list[dict[str, str]]
                          task: str | None
                          total_frames: int
                          MethodMeaning
                          window(start_s: float, end_s: float) -> 'Recording'The part of this recording between start_s and end_s (seconds on this recording's own timeline).
                          table(columns: Sequence[str] | None=None) -> 'pa.Table'The frame table (one row per frame of this recording or window) as a pyarrow.Table.
                          column(name: str) -> 'np.ndarray'One column as a numpy array of shape (num_frames, *shape).

                          RecordingBuilder

                          Builds the canonical recording from a source format.

                          AttributeMeaning
                          checks: 'CheckWriter'The CheckWriter for the checks this algorithm declared (checks=[Check(...)]).
                          root: PathThe output folder of the recording port (for :meth:adopt_tree).
                          MethodMeaning
                          adopt_tree() -> NoneSay that the run wrote the complete canonical tree under out.root itself (a built-in standardizer with its own tree writer).
                          fps(value: int) -> NoneDeclare the frame rate of the recording: 30 (the platform grid; other rates are refused).
                          task(text: str) -> NoneSet the task text of the recording (one episode, one task).
                          camera(key: str, role: str, frames: Iterable[Any] | Any=None, video: str | Path | None=None, intrinsics: Sequence[Sequence[float]] | None=None, distortion: Sequence[float] | None=None, model: str | None=None) -> NoneAdd a camera from RGB frames (an array N x H x W x 3 uint8 or an iterator of H x W x 3 frames) or a video file.
                          column(name: str, values: Any, type: str='vector', unit: str='none', frame: str='none', source: str='recorded', names: Sequence[str] | None=None) -> NoneAdd a tabular column with one row per frame: values has shape (N,) or (N, ...).
                          timestamps(seconds: Any) -> NoneRecord the source capture time of each row (seconds, non-decreasing); kept beside the recording.
                          stereo_pair(left: str, right: str) -> NoneName two added cameras as a stereo pair (keys or short names).
                          dropped(what: str, reason: str) -> NoneDeclare something of the source that did not make it into the recording, and why.

                          RecordingEditor

                          Edits the input recording: replace or drop a camera, replace a column, trim.

                          AttributeMeaning
                          checks: 'CheckWriter'The CheckWriter for the checks this algorithm declared (checks=[Check(...)]).
                          root: PathThe output folder of the recording port (for :meth:adopt_tree).
                          MethodMeaning
                          adopt_tree() -> NoneSay that the run wrote the complete edited tree under out.root itself (a built-in transform with its own video path, such as anonymize with its hardware encoder).
                          unchanged() -> NoneHand the input recording through untouched (zero copy).
                          replace_camera(key: str, frames: Iterable[Any] | Any=None, video: str | Path | None=None, anonymized: bool | None=None) -> NoneReplace the pictures of camera key with frames (an iterator of H x W x 3 uint8 images, one per input frame) or a video.
                          drop_camera(key: str) -> NoneRemove camera key from the recording.
                          replace_column(name: str, values: Any) -> NoneReplace the values of column name; values has the shape of the existing column (one row per input frame).
                          trim(start_s: float, end_s: float) -> NoneKeep only start_s..end_s (seconds) of the recording.

                          SelectionWriter

                          Collects per-episode decisions (embodiflow-selection/v1).

                          AttributeMeaning
                          checks: 'CheckWriter'The CheckWriter for the checks this algorithm declared (checks=[Check(...)]).
                          MethodMeaning
                          keep(episode_id: str, split: str | None=None, task: str | None=None, reason: str | None=None) -> NoneKeep the episode, optionally assigning a split (train/val/test) and replacing its task text.
                          count(name: str, value: int) -> NoneReport a named count in the selection summary (summary.counts), e.g. count("grouped_by_recording", 3).
                          drop(episode_id: str, reason: str) -> NoneDrop the episode from the new version; reason is shown to the team.

                          SetupContext

                          What setup(ctx) sees: the params, the facts, a scratch directory and a logger.

                          AttributeMeaning
                          facts: Facts
                          log: logging.Logger
                          params: Any
                          run_id: strThe workflow run id.
                          step_id: strThe id of the step in the workflow.
                          tmp: Path

                          TransientError

                          Raise it when a retry may succeed (network, GPU busy): the step exits 88 and is retried.

                          Vocabulary

                          NameAllowed values
                          categoriesstandardize, check, transform, enrich, segment, curate, export
                          levelsrecording, episode, version
                          statusespass, warn, fail, error, not_evaluated, not_applicable
                          perframe, recording, episode, file
                          sourcesrecorded, imported, estimated, computed, retargeted
                          dtypesfloat32, float64, int8, int16, int32, int64, uint8, uint16
                          splitstrain, val, test
                          semanticTypesscalar, vector, label.bool, label.category, label.text, spans, embedding, pose.se3, keypoints3d.hand21, skeleton.hand21, skeleton.body22, keypoints2d, confidence, calibration.stereo, calibration.cam_imu, depth.video, mask.video, video.preview, ros2.mcap, action.joint, action.ee_pose, json
                          factskind, format, privacy_required, duration_s, cameras, stereo, imu, action, recorded_hand_pose, gripper_width, episodes
                          privacyredacts, numbers_only
                          servicesvlm
                          runParametersraw, recording, version, episode, out, ctx, state

                          Next

                          • Interface reference
                          • Troubleshooting

                          Image algorithms

                          Python in the browser covers most needs, but sometimes your best code is C++, Rust or a model with its own stack. An image algorithm lets you bring it as a container. The platform treats it like any other step: same categories, same ports, same checks on what it writes. Only the packaging differs.

                          The arrangement is simple. The container reads a job file and its inputs from fixed folders, writes its outputs to fixed folders and exits with a code. Since there is no decorator to read, you write the interface by hand as algorithm.yaml, and embodiflow algorithm push bakes it into the image label io.embodiflow.algorithm.

                          Beta. Custom algorithms and workflows are in the product and ready to try, but they haven't been through a full acceptance on real data yet. Expect some rough edges, and check results before you rely on them.

                          What the container does

                          • Read /embodiflow/config/job.json.
                          • Read inputs under /embodiflow/input/<port>/ and write outputs under /embodiflow/output/<port>/, in the layouts below.
                          • Optionally report progress in /embodiflow/output/progress.json: { "done", "total", "message" }.
                          • On a refusal, write /embodiflow/output/error.json: { "code", "message" }, with a code in capital letters.
                          • Use /embodiflow/tmp/ for scratch space.
                          • Exit with one of the codes below.

                          job.json

                          The job file tells your container what it's working on: the run, the item, the parameters, the facts and where each port lives. This one is for an episode-level enrich step.

                          {
                            "contract": "embodiflow-runtime/v1",
                            "category": "enrich", "level": "episode",
                            "runId": "<uuid>", "stepId": "success", "recordingId": "<uuid>",
                            "item": { "episodeIndex": 3, "startS": 120.4, "endS": 161.0, "task": "pick up the cup" },
                            "params": { "threshold": 0.5 },
                            "facts": { "kind": "human", "stereo": true, "imu": true, "privacy_required": true, "duration_s": 40.6 },
                            "inputs":  { "recording": { "type": "recording", "root": "/embodiflow/input/recording" },
                                         "episodes":  { "type": "episodes",  "root": "/embodiflow/input/episodes" } },
                            "outputs": { "features": { "type": "features", "root": "/embodiflow/output/features" } }
                          }

                          An optional input that is absent is simply missing from inputs.

                          Layouts at a port root

                          TypeLayoutValidated when the step finishes
                          rawFiles at their upload-relative paths.No check.
                          recordingThe LeRobot v3 tree plus meta/embodiflow/recording.json.The canonical rules R1 to R7 and embodiflow-recording/v1.
                          featuresfeatures.json, frames.parquet, episodes.parquet and files/**.embodiflow-features/v1
                          checkschecks.json and evidence/**.embodiflow-checks/v1
                          episodesepisodes.json.embodiflow-episodes/v1
                          versionversion.json and urls.json, with presigned links.Input only.
                          selectionselection.json.embodiflow-selection/v1
                          artifactartifact.json and the files.embodiflow-artifact/v1

                          A per-frame feature needs exactly one row per frame in frames.parquet. A per-episode value is keyed by episodeIndex, its position in the connected episodes document. Times in checks.json and episodes.json are seconds on the recording timeline.

                          Exit codes

                          Exit codeMeaningThe step ends
                          0Done.succeeded
                          85This data is not for me.not applicable
                          87The data is broken.failed; the recording is quarantined
                          88Try again: network, GPU busy.retried, then failed
                          1A bug.failed; the log is kept

                          Before exiting with 85 or 87, write the code and message to error.json. The step message then reads <code>: <message>.

                          algorithm.yaml

                          This file is the same document a Python decorator produces, with the schema embodiflow-algorithm/v1. Here is the motion energy algorithm from Your first algorithm, declared for an image:

                          apiVersion: embodiflow-algorithm/v1
                          name: motion-energy
                          title: Motion energy
                          category: enrich
                          features:
                            - name: motion_energy
                              type: scalar
                              per: frame
                              dtype: float32
                              unit: none
                          params:
                            step: { type: integer, default: 1, minimum: 1, title: Frame step }
                          resources: { cpu: 4, memory: 8Gi, timeout: 30m }

                          Test locally, then register

                          You don't have to start from an empty folder. embodiflow algorithm init <dir> --category <category> --lang image writes an algorithm.yaml, a Dockerfile with an exec-form ENTRYPOINT and an entry script that already writes the outputs of the category. From there the loop looks like this:

                          # write my-algo/algorithm.yaml (above) and a Dockerfile by hand
                          embodiflow algorithm validate my-algo
                          embodiflow algorithm test my-algo --build --recording <recording-id>
                          docker build -t my-algo my-algo && docker save my-algo -o my-algo.tar
                          embodiflow algorithm push my-algo --archive my-algo.tar --registry <registry-host>

                          validate checks algorithm.yaml with the same parser the platform uses. test runs the container on your machine and checks its outputs with the platform's rules. push imports the image archive into your team's registry and registers the algorithm with an image reference pinned to its digest.

                          An algorithm image is reviewed before it runs in a workflow. Cloud test runs of a saved image algorithm haven't yet been proven on a freshly installed deployment, so rely on algorithm test on your machine for now.

                          Next

                          • Command line
                          • Troubleshooting
                          Previous

                          Python SDK

                          Next

                          Standardize