Skip to main content Switch to mobile version sequence-ai 0.67.3 SequenceLink is an open-source framework for serving robot policies from remote GPUs over wide-area networks (WANs).
pip install sequence-ai==0.67.3 Copy PIP instructions
Serve robot policies from GPUs anywhere
| Platform | Documentation | Blog | Paper | Twitter/X |
Architecture · Quick start · The problem · Inference layer · Network layer · Results · Docs
How it fits together
sequence_ai.network is the connection between a robot and the GPU its policy runs on. On the robot, connect() applies the client-side components to one connection. On the server, one_write and ping wrap a uvicorn or a WebSocket server. sequence_ai.engine is the inference layer on the GPU: sequence serve serves a policy with the server's side of both layers on, optimize shortens one inference with the speed-ups that keep its outputs exactly the same, batcher and slack share a GPU among robots, and replicas runs one process per GPU. bench/ measures a link before anything is added to it.
pip install sequence-ai The same package goes on the GPU and on the robot: Python 3.10 or later, on Linux or macOS (a robot can connect() from 3.9). The speed-ups use your model's own torch (2.4 or later) or JAX (0.4.30 or later).
sequence-ai, the open-source framework, is Apache-2.0. The install brings sequence-cloud with it, the client of General Sequences' platform, under a proprietary license: only the platform needs it.
No account, no key, no GPU: serve the toy policy on this machine and get an action from it.
sequence serve toy-policy serving toy-policy on port 8000: a robot connects with sequence_ai.connect("http://
import sequence_ai with sequence_ai.connect("http://127.0.0.1:8000", token="...") as policy_user: # the token it printed policy_user.observe({"state": [0.0], "target": [0.5]}) # where the arm is, and where it should go print(policy_user.act()) # {'delta': [0.1]}: one step toward the target SEQ_SERVE_TOKEN set in both terminals gives them one of your own, and neither is told it again.
Your own policy: on the GPU - a CPU serves this one too - save this as policy.py in a folder of its own:
import numpy as np import seq @seq.policy(hz=15, action_chunk_valid_len=8, action_chunk_replan_at=5) class QuickstartPolicy_user: @seq.sample def sample_user(self): observation_user = {"image": np.zeros((224, 224, 3), dtype=np.uint8), "state": np.zeros(7, dtype=np.float32)} return [("observe", observation_user), ("act",)] * 3 # an observation, then an act, three times @seq.infer def infer_user(self, observation_user): frame_user = observation_user["image"] # your model here: the next 10 steps, 7 joints each return {"actions": np.full((10, 7), float(frame_user.mean()), dtype=np.float32)} Then serve it from that folder:
sequence serve serving quickstart-policy-user on port 8000, each robot held and seated by its time at 15 Hz: a robot connects with sequence_ai.connect("http://
import numpy as np import sequence_ai with sequence_ai.connect("http://127.0.0.1:8000", token="...") as policy_user: # your GPU's address, its token policy_user.wait_until_ready() # once, before the robot moves frame_user = np.zeros((224, 224, 3), dtype=np.uint8) # your camera's frame, streamed as video policy_user.observe({"image": sequence_ai.Video(frame_user), "state": np.zeros(7, dtype=np.float32)}) print(policy_user.act()["actions"].shape) # (10, 7) The robot plays 15 steps a second (hz), uses the first 8 steps of each chunk (action_chunk_valid_len), and asks for the next chunk at step 5 (action_chunk_replan_at). Quickstart has the whole loop. Names ending in _user are yours to change.
An official template: sequence init pi05-libero my_pi05_user, then sequence serve in that folder (how).
Both halves on one machine: in a clone of this repository, export SEQ_SERVE_TOKEN=my-token_user, then sequence serve examples/quickstart_policy & python examples/quickstart_robot.py.
A server you already run: its parts, one file each.
What is on by default: each part, and how to turn it off.
GPUs run for you: deploy the same folder to General Sequences.
The problem, by layer
A robot policy built on a vision-language-action (VLA) model runs each inference on a GPU, and a robot without a suitable GPU on board sends its observations over a WAN to a remote one. Each layer of that path has its own problem.
The model is most of the latency. Across thirteen model and network configurations, the model is 68 to 96% of a request's latency. The time of one inference is therefore the main lever, and optimize shortens it without changing the model's output.
One robot leaves its GPU mostly idle. One robot keeps a GPU busy 21 to 55% of the time, so several robots can share one, provided that no robot's action chunk runs out while its request waits. batcher batches the requests that are waiting, slack computes how long each may wait and how many robots a replica can serve, and replicas runs one replica per GPU.
A robot pauses, and Linux restarts its connection. A robot executes a chunk between requests, and Linux restarts a TCP connection's congestion window after an idle period. The upload after a pause then takes one extra round trip, at every RTT measured from 12 ms up but the longest. window, ping and connect keep the window open.
A request carries more round trips and bytes than it needs. A response split across writes can wait a round trip behind a tunnel, and a camera frame is 50 to 100 KB. one_write sends each response in one write, connect() sends each camera as video and compresses a large array only when that shortens the upload, and frames resizes a frame before it is sent.
GPUs are in short supply. Few are near any given robot, and every millisecond of round-trip time comes out of the slack an action chunk leaves. Getting a GPU near the robot is the routing layer, which is outside this package.
from sequence_ai.engine import optimize, slack from sequence_ai.engine.batcher import Batcher from sequence_ai.engine.replicas import ReplicaPool optimize(model_user, examples_user) # 32 or more of your robot's observations batcher_user = Batcher(model_on_a_list_user, sizes=[1, 2, 4, 8], wait_ms=2.0) pool_user = ReplicaPool(load_user, replicas=2, devices=[0, 1]) # one replica per GPU table_user = slack.measure(forward_of_user, sizes=[1, 2, 4]) # forward_of_user(n): one forward pass of n requests play_user = slack.playback(hz=20, valid_len=15, replan_at=8) # 15 valid steps, the next requested at the 8th seating_user = slack.Seating(table_user, play_user["buffer_s"] * 1000, sizes=[1, 2, 4], cycle_ms=(play_user["play_s"] - play_user["buffer_s"]) * 1000) seats_user, over_user = seating_user.seat([("near-1", 30.0), ("near-2", 30.0), ("near-3", 30.0), ("near-4", 30.0), ("far", 60.0)]) # (robot, its RTT in ms) optimize tries cuda_graphs on every module that repeats and whole_graph on a run's whole call, keeps each where the outputs stay exactly the same and acts get faster, and reports why each is on or off. torch_compile, fused_kernels, tensorrt and precision change the outputs and need tolerance=. How do I make a policy faster without changing its outputs, and what does each switch change?
Its graphs speed up PyTorch policies whose time goes to launching kernels. XLA already compiles each jitted function of a JAX policy such as π0.5 whole and puts most of its work in command buffers, so on a JAX policy they are tried only when you turn them on. cuda_graphs replays each module called many times per run with the same shapes from CUDA graphs of its own eager kernels, and checks each new shape against eager mode byte for byte. A shape whose capture fails or differs runs in eager mode from then on. The module stays the same object of the same class, with its weights, state_dict and hooks unchanged. How do I make a PyTorch robot policy faster without changing its outputs?
batcher dispatches a batch as soon as it is full, or wait_ms after its first call while the model is free. While the model is busy, waiting calls accumulate and are dispatched together. Only the listed sizes are used, and a batch in which the model raised is re-run call by call. How many robots can one GPU serve?
replicas runs each replica in its own process on its own GPU, so a forward pass never blocks the server's event loop. ReplicaError is the model's own error, and the replica takes the next call. ReplicaDied is a process that has exited, and it is replaced. Should I run two replicas of a policy on one GPU?
slack computes a replica's capacity from the playback time an action chunk leaves when its robot requests the next one, each robot by its own RTT, and tells a server how long the open batch may wait. slack: scheduling by the slack an action chunk leaves
How do I use the inference components with openpi, LeRobot or GR00T?
"Client" is the robot's program and "server" is the policy server on the GPU.
Combined, and for clients you may already use:
What does each component do? gives the lines to add, the reason and the measurement for each one, and examples/components/ has a runnable file for each. How do I run π0 (openpi) on a remote GPU? | How do I serve a robot policy from my own GPU?
sequence_ai.chat() and Conversation (an agent's history and its tool calls) take server="openrouter" with your own OpenRouter key, or the address of a server of your own with the OpenAI chat completions API:
result_user = sequence_ai.chat("qwen/qwen3-next-80b-a3b-instruct", [{"role": "user", "content": "Plan the next step."}], server="openrouter") # your key in OPENROUTER_API_KEY How do I use an LLM with my own OpenRouter key?
Across thirteen model and network configurations, the time a request spends outside the model is 4 to 32% of its latency. A remote GPU is therefore close to an on-board GPU of the same type, and inference time is the main lever.
Measurements lists the network layer's commands, and bench/ measures your own link.
sequence_ai/ engine/ inference layer: serve · optimize · load · cuda_graphs · batcher · replicas · slack network/ network layer client: connect · window · frames · wifi_power server: one_write · ping · tcp_link both: msgpack_io · latency_stats chat/ chat() and Conversation: on General Sequences, or at a server of your own (server=) check.py python -m sequence_ai.check: which defaults are on between a robot and its server seq/ sequence init, serve and weights get, and the decorators a policy is written with bench/ measures a link: a TCP client and server, WebSocket, Zenoh examples/ first_action.py first (the toy policy, no key), the quick starts, and one runnable file per component docs/ one page per question, the measurements, the FAQ tests/ the components' tests, on a machine with no GPU tools/ writes llms-full.txt Documentation
What is open source, and what does General Sequences host?
Quickstart: a policy and a robot
Parts for a server you already run
Quickstart: batching and replicas
Inference layer How do I make a policy faster without changing its outputs, and what does each switch change?
How do I make a PyTorch robot policy faster without changing its outputs?
How many robots can one GPU serve?
Should I run two replicas of a policy on one GPU?
slack: scheduling by the slack an action chunk leaves
Network layer How do I serve a robot policy from my own GPU?
How do I run a template on my own GPU?
How do I run π0 (openpi) on a remote GPU?
Why does my robot's upload get slow after a pause?
How do I measure the link between my robot and my GPU?
How do I keep a WebSocket policy server's connection warm?
What do the network components save, measured with the tools in this repository?
How do the components compare with openpi's remote inference and LeRobot's?
What does each network component do?
Language models How do I use an LLM with my own OpenRouter key?
A GPU near your robot How do I get a GPU near my robot?
FAQ: errors you may see, and what to do next
llms.txt is a map of the repository for a coding assistant, and llms-full.txt is this README and every page of docs/ in one file.
A note on the numbers
Every number in this README is given with the model, the GPU or the link it was measured on, and Measurements lists the command behind each of the network layer's. What a network component saves depends on the link, so bench/ measures yours before you add anything. Each module's docstring states what the component does in one sentence, why, and what was measured.
uv venv --python 3.11 uv pip install -e ".[dev]" .venv/bin/python -m pytest -q .venv/bin/ruff check sequence_ai/engine sequence_ai/network tests examples bench tools The tests are the components', and run on every Python the package takes, on a machine with no GPU. Each release is published here from General Sequences' own repository: CONTRIBUTING.md has what that means for a pull request.
Questions and ideas go to Discussions. Issues and pull requests are welcome: see CONTRIBUTING.md and the Code of Conduct. To report a security problem, see SECURITY.md.
If you use SequenceLink in research, please cite it:
@software{generalsequences2026sequenceai, title = {SequenceLink}, author = {{General Sequences}}, year = {2026}, url = {https://github.com/General-Sequences/sequence-ai} } CITATION.cff has the same, with the version.
Released: Dec 2, 2026
Author: General Sequences
Apache-2.0 View SPDX License List
action chunk batching cuda graphs gr00t inference latency lerobot manipulation openpi policy remote inference robot policy serving robotics vla wide-area network
Development Status 4 - Beta
Intended Audience Developers
Operating System OS Independent
Programming Language Python :: 3
Topic Scientific/Engineering :: Artificial Intelligence
Release files for sequence-ai 0.67.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
Built distribution (wheel)
Total release size: 1.3 MB
Release files / sequence_ai-0.67.3.tar.gz
Release files / sequence_ai-0.67.3-py3-none-any.whl
Security for sequence-ai 0.67.3
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.
Release history Release notifications | RSS feed
Dec 2, 2026 2 release files No provenance
Nov 29, 2026 2 release files No provenance
Nov 28, 2026 2 release files No provenance
Nov 24, 2026 2 release files No provenance
Nov 22, 2026 2 release files No provenance
Nov 21, 2026 2 release files No provenance
Nov 20, 2026 2 release files No provenance
Nov 19, 2026 2 release files No provenance
Nov 18, 2026 2 release files No provenance
Nov 17, 2026 2 release files No provenance
Nov 16, 2026 2 release files No provenance
Nov 15, 2026 2 release files No provenance
Nov 14, 2026 2 release files No provenance
Nov 13, 2026 2 release files No provenance
Nov 12, 2026 2 release files No provenance
Nov 11, 2026 2 release files No provenance
Nov 10, 2026 2 release files No provenance
Nov 9, 2026 2 release files No provenance
Nov 8, 2026 2 release files No provenance
Nov 6, 2026 2 release files No provenance
Nov 5, 2026 2 release files No provenance
Nov 4, 2026 2 release files No provenance
Nov 3, 2026 2 release files No provenance
Nov 2, 2026 2 release files No provenance
Nov 1, 2026 2 release files No provenance
Oct 31, 2026 2 release files No provenance
Oct 30, 2026 2 release files No provenance
Oct 29, 2026 2 release files No provenance
Oct 28, 2026 2 release files No provenance
Oct 27, 2026 2 release files No provenance
Oct 26, 2026 2 release files No provenance
Oct 25, 2026 2 release files No provenance
Oct 24, 2026 2 release files No provenance
Oct 23, 2026 2 release files No provenance
Oct 21, 2026 2 release files No provenance
Oct 20, 2026 2 release files No provenance
Oct 20, 2026 2 release files Loss of provenance
Oct 19, 2026 2 release files Loss of provenance
Oct 18, 2026 2 release files Loss of provenance
Oct 17, 2026 2 release files Loss of provenance
Oct 16, 2026 2 release files Loss of provenance
Oct 15, 2026 2 release files Loss of provenance
Oct 14, 2026 2 release files Loss of provenance
Oct 13, 2026 2 release files Loss of provenance
Oct 12, 2026 2 release files Loss of provenance
Oct 11, 2026 2 release files Loss of provenance
Oct 10, 2026 2 release files Loss of provenance
Oct 9, 2026 2 release files Loss of provenance
Oct 8, 2026 2 release files Loss of provenance
Oct 7, 2026 2 release files Loss of provenance
Oct 6, 2026 2 release files Loss of provenance
Oct 6, 2026 2 release files Full provenance
Oct 5, 2026 2 release files Loss of provenance
Oct 4, 2026 2 release files Loss of provenance
Oct 3, 2026 2 release files Loss of provenance
Oct 3, 2026 2 release files Full provenance
Oct 2, 2026 2 release files Full provenance
Oct 1, 2026 2 release files Full provenance
Oct 1, 2026 2 release files No provenance
Sep 20, 2026 2 release files No provenance
Sep 19, 2026 2 release files No provenance
Sep 17, 2026 2 release files No provenance
Sep 16, 2026 2 release files No provenance
Sep 15, 2026 2 release files No provenance
Sep 14, 2026 2 release files No provenance
Sep 9, 2026 2 release files No provenance
Sep 7, 2026 2 release files No provenance
"PyPI", "Python Package Index", and the blocks logos are registered trademarks of the Python Software Foundation.
© 2026 Python Software Foundation
Deployed from 6571ef3











