Elemm
HomeDocsFAQ
Star on GitHub
HomeDocsFAQ
Star on GitHub
Docs
Getting StartedWhat is Elemm?Core InstallationMCP Client SetupDocker Deployment
PlatformDashboard & ObservabilityConfiguration Reference
ProtocolThe Discovery ProtocolThe 9 Core ToolsSequence Engine & Data PipingResponse Hygiene
GatewayMulti-Protocol SupportSecurity (Guardian)Vault — AuthenticationProduction & VPS SecurityCLI Reference
DeveloperBuilding Landmark ServersExposing Landmark ServersSmartRepair & Error CodesPydantic & Smart UnboxingDeclarative YAML Configuration

Sequence Engine & Data Piping

Multi-step pipelines in a single turn — with native variable piping and smart retry.

Overview

The execute_sequence tool is the gateway's most powerful feature. It allows agents to batch multiple API calls into a single LLM turn, dramatically reducing token consumption and latency.


Data Piping Syntax

Results from each step are stored as aliases and can be referenced in subsequent steps:

SyntaxDescriptionExample
$stepNAccess result of step N (0-indexed)$step0
$aliasAccess result by custom alias$my_repos
$alias.fieldAccess a nested field$step0.name
$alias.deep.pathDeep nested access$step0.owner.login
$alias[N]Array indexing$step0[0]
$alias[N].fieldArray index + field access$step0[0].id

Error Handling Strategies

on_errorBehavior
"stop" (default)Halts the entire sequence on error. Subsequent steps are skipped.
"continue"Logs the error, stores it in the alias, and proceeds to the next step.

Smart Retry

Steps can be configured to automatically retry on specific error types:

json
{
  "action": "api_get_data",
  "retry": 3,
  "retryOn": ["RATE_LIMIT_EXCEEDED", "SERVER_ERROR"],
  "parameters": {}
}

The engine waits 1 second between retries (basic backoff).


Example: Multi-Step Pipeline

json
{
  "actions": [
    {
      "action": "repos_repos_list-for-user",
      "alias": "repos",
      "parameters": {"username": "v3rm1ll1on", "_limit": 5}
    },
    {
      "action": "repos_repos_get",
      "alias": "detail",
      "parameters": {"owner": "v3rm1ll1on", "repo": "$repos[0].name"}
    }
  ],
  "session_id": "my_task"
}

In this example:

  1. Step 1 lists a user's repositories and stores the result under the alias repos.
  2. Step 2 references $repos[0].name — the piping is resolved server-side before the second API call is sent.

Session Isolation

Each session_id maintains its own isolated memory bank. This allows parallel tasks to run without cross-contamination.

❗ IMPORTANT
Always call clear_session after completing a task to free up memory.

Decoupled Telemetry

A critical design principle of the Sequence Engine is the separation of agent data and developer data:

  • Agent Branch: The sequencer runs ResponseSquisher.smart_truncate() on every step's return value. The agent receives only compact, cleaned data.
  • Telemetry Branch: Simultaneously, the sequencer sends the complete, untruncated raw data to the DashboardMonitor. Developers see the actual HTTP payloads in the dashboard.

This protects the agent from context overflow while giving developers full visibility.

Elemm Logo

The Landmark Manifest. Exposing system interfaces natively to AI agents.

Framework

HomeAboutDocumentation

Community

GitHubDiscordPyPI Package

Legal

License: GPLv3© 2026 Marc Stöcker
elemm.dev — Infrastructure for the Agentic Web.