Logo Eachlabs Workflows

Eachlabs Workflows

Tổ chức
eachlabs
eachlabs-workflows

Build, run and manage multi-step AI workflows that chain EachLabs models into one API call. Create a workflow from a JSON definition, trigger it, read its results and manage versions. Use when a task chains several models, reuses a fixed prompt, needs a fallback model, runs steps in parallel, routes on a condition, or calls an HTTP API between model steps.

Tổng quan

Nhà phát hànheachlabs
Kho mãskills
Tên kỹ năngeachlabs-workflows
Sao
46
Bản fork
7
Tệp đi kèm
1
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI là Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 1 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được eachlabs công bố trên GitHub. Hãy đọc nội dung nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Eachlabs Workflows trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL thư mục kỹ năng bên dưới và xác nhận.
    https://github.com/eachlabs/skills/tree/main/skills/eachlabs-workflows
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/eachlabs/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/eachlabs-workflows .claude/skills/eachlabs-workflows
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Eachlabs Workflows trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự tải Eachlabs Workflows ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên Eachlabs Workflows không bị giới hạn ở mô hình mà kỹ năng này được viết cho. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên kỹ năng chưa dùng không tốn chi phí.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

EachLabs Workflows

Build, manage, and execute multi-step AI pipelines that chain multiple models together. each::workflows is completely free to use - you only pay for underlying model costs.

Authentication

Header: Authorization: Bearer <your-api-key>

Set the EACHLABS_API_KEY environment variable. Get your key at eachlabs.ai. The X-API-Key header is also accepted.

Base URL

https://api.eachlabs.ai

Endpoints

MethodPathDescription
POST/v1/workflowsCreate a workflow (with its first version)
GET/v1/workflows/{workflowID}Get a workflow (UUID or slug) with its versions
PUT/v1/workflows/{workflowID}/versions/{versionID}Create or update a version
POST/v1/workflows/trigger/{workflowID}/{versionID}Run a version
POST/v1/workflows/bulk-trigger/{workflowID}/{versionID}Run a version with 1-10 inputs
GET/v1/workflows/{workflowID}/executionsList runs (filter a batch with ?bulk_id=)
GET/v1/workflows/executions/{executionID}Get a run's status and results

When to Use a Workflow

The task wants to…A workflow gives it
Ship an AI feature as one callPrompts, models and intermediate files stay on each::labs; the app only sends inputs
Change it without an app releaseEdit a prompt or swap a model in a new version; callers keep the same workflow ID
Keep working when a model failsA fallback model runs automatically if the first one errors
Combine image, video, audio and textChain an image edit into a video model, then resize, merge clips or add music
Go fasterRun independent steps (one per photo, one per scene) in parallel
Let AI decide the pathAsk a vision model a question, then route with a choice step
Use your own systemsCall any public HTTPS API from a step to fetch data or run your own code

One model with a prompt the user writes is simpler as a direct prediction. Use a workflow once the prompt is fixed, a fallback is wanted, or there is a second step.

Building a Workflow

Step 1: Create the Workflow

bash
curl -X POST https://api.eachlabs.ai/v1/workflows \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $EACHLABS_API_KEY" \
  -d '{
    "name": "Text to Image Generator",
    "definition": {
      "input_schema": {
        "properties": {
          "prompt": { "type": "string", "required": true }
        }
      },
      "steps": [
        {
          "id": "write_prompt",
          "type": "model",
          "model": "eachlabs-llm-router",
          "params": {
            "model": "google/gemini-3.6-flash",
            "messages": [
              { "role": "system", "content": "Rewrite the idea as one vivid, detailed image prompt. Reply with the prompt only." },
              { "role": "user", "content": "$.inputs.prompt" }
            ]
          }
        },
        {
          "id": "generate_image",
          "type": "model",
          "model": "nano-banana-2-text-to-image",
          "params": {
            "prompt": "$.write_prompt.primary.choices[0].message.content",
            "aspect_ratio": "16:9"
          }
        }
      ]
    }
  }'

The response has workflow_id and versions[0].version_id (v1). If it returns 400 invalid argument, send the same definition to PUT /v1/workflows/{workflowID}/versions/v1 as {"definition": {...}} to see the exact validation error.

Step 2: Trigger the Workflow

bash
curl -X POST https://api.eachlabs.ai/v1/workflows/trigger/{workflowID}/v1 \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $EACHLABS_API_KEY" \
  -d '{
    "inputs": {"prompt": "A lighthouse on a cliff at sunset"}
  }'

Response:

json
{"execution_id": "exec-123", "status": "queued"}

Step 3: Poll for Result

bash
curl https://api.eachlabs.ai/v1/workflows/executions/{executionID} \
  -H "Authorization: Bearer $EACHLABS_API_KEY"

Response (shortened):

json
{
  "execution_id": "exec-123",
  "status": "completed",
  "output": "https://cdn-us.eachlabs.ai/uploads/3334048f.png",
  "step_outputs": {
    "write_prompt": {"status": "completed", "primary": {"choices": [{"message": {"content": "A dramatic wide-angle photograph of a lighthouse..."}}]}},
    "generate_image": {"status": "completed", "primary": "https://cdn-us.eachlabs.ai/uploads/3334048f.png"}
  }
}

Execution statuses: running, completed, failed, cancelled

output is the result of the last step. workflow_output holds named outputs when the version defines output_mapping.

Authoring Rules

Follow these and a workflow runs on the first try:

  1. Reference values with $. paths: $.inputs.<name>, $.<step_id>.primary, $.<step_id>.output, nested fields, and brackets for list items ($.step.output[0]). {{inputs.prompt}} is NOT a reference; it is sent to the model as literal text.
  2. A parameter that is exactly one reference keeps its type (URL, number, list, object). A reference inside a longer string is inserted as text: "A portrait of $.inputs.name in neon light".
  3. primary is the main result: the file URL for image and video models, the chat completion for eachlabs-llm-router (text at $.step.primary.choices[0].message.content), the response for eachlabs-http-step (JSON fields at $.step.primary.output.<field>).
  4. If a prompt-like parameter (prompt, user_prompt, system_prompt, text, content, message, caption, title, description) is exactly $.step.primary or $.step.output, the value arrives JSON-encoded, wrapped in quotes. Reference a deeper field or embed the reference in a sentence.
  5. Every step, including steps inside branches, needs a unique id. Steps run top to bottom and can only reference inputs and earlier steps.
  6. Inputs go in input_schema.properties, each with type, required (true/false) and an optional default_value. Give every optional input a default_value: a run fails if a step references an omitted input that has no default. Empty values are dropped from lists, so ["$.inputs.photo1", "$.inputs.photo2"] works with one or two photos when photo2 defaults to "".
  7. Model slugs and parameters are checked when a step runs, not when you save. Read a model's inputs with GET https://api.eachlabs.ai/v1/models/{slug} and run the workflow once before shipping it.

Step Types

TypePurpose
modelRun a model: model (slug), params, optional fallback, retry, timeout_seconds
parallelRun branches[].steps at the same time
choiceEvaluate a condition and run condition_met_branch or default_branch
passReturn a fixed result

HTTP requests and Python code are not step types. They run as model steps through eachlabs-http-step (below) and eachlabs-python-step (private beta).

Model Steps

json
{
  "id": "restyle",
  "type": "model",
  "model": "nano-banana-2-edit",
  "params": {
    "prompt": "Restyle this photo as $.inputs.style. Keep the person's face unchanged.",
    "image_urls": ["$.inputs.photo"],
    "aspect_ratio": "9:16"
  },
  "retry": {"max_attempts": 3, "retry_on": ["server_error"]}
}

HTTP Calls

Call any public HTTPS API with the eachlabs-http-step model. Params: url, method, headers, query_params, body (JSON object for POST/PUT/PATCH), timeout_seconds (up to 30 recommended) and fail_on_status ("non_2xx" stops the run on an error response).

json
{
  "id": "product",
  "type": "model",
  "model": "eachlabs-http-step",
  "params": {
    "url": "https://dummyjson.com/products/$.inputs.product_id",
    "method": "GET",
    "timeout_seconds": 20,
    "fail_on_status": "non_2xx"
  }
}

A later step reads the JSON body as $.product.primary.output.title. Put credentials in headers (for example "Authorization": "Bearer <scoped-token>"); only public URLs are reachable. To run your own code, host it behind an HTTPS endpoint and POST to it.

Parallel Steps

json
{
  "id": "prepare",
  "type": "parallel",
  "branches": [
    {"steps": [{"id": "edit_a", "type": "model", "model": "nano-banana-2-edit", "params": {"prompt": "Full-body photo of this person as a traveler in a sunny old-town street.", "image_urls": ["$.inputs.photo_a"]}}]},
    {"steps": [{"id": "edit_b", "type": "model", "model": "nano-banana-2-edit", "params": {"prompt": "Full-body photo of this person as a traveler in a sunny old-town street.", "image_urls": ["$.inputs.photo_b"]}}]}
  ]
}

Later steps reference branch steps by their own ids: $.edit_a.primary, $.edit_b.primary. A branch can hold several steps that run in order.

Choice Steps (Conditional Routing)

json
{
  "id": "portrait",
  "type": "choice",
  "condition": {
    "expression": "$.subject.primary.choices[0].message.content",
    "operator": "string_matches",
    "value": "*PET*"
  },
  "condition_met_branch": {
    "name": "pet",
    "steps": [{"id": "pet_portrait", "type": "model", "model": "nano-banana-2-edit", "params": {"prompt": "A royal oil-painting portrait of this animal wearing a small crown.", "image_urls": ["$.inputs.photo"]}}]
  },
  "default_branch": {
    "name": "person",
    "steps": [{"id": "person_portrait", "type": "model", "model": "nano-banana-2-edit", "params": {"prompt": "A royal oil-painting portrait of this person wearing a crown. Keep their face unchanged.", "image_urls": ["$.inputs.photo"]}}]
  }
}

After the choice, $.portrait.primary is the result of whichever branch ran, and selected holds its name.

Condition operators:

CategoryOperators
Comparisonequals, not_equals (type-strict), greater_than, less_than, greater_than_or_equal, less_than_or_equal
Stringstring_equals, string_matches (* wildcard pattern; without * it must match exactly)
Existenceexists / is_not_null (field present), is_null / not_exists (field present and null)
Logicaland, or, not

in and not_in are not supported; combine equals conditions with or.

json
{"or": [
  {"expression": "$.inputs.format", "operator": "equals", "value": "mp4"},
  {"expression": "$.inputs.format", "operator": "equals", "value": "webm"}
]}

Pass Steps

json
{"id": "config", "type": "pass", "result": {"style": "cinematic"}}

$. references inside result are not resolved. Later steps read its fields as $.config.style.

Parameter References

ReferenceValueExample
$.inputs.<name>Workflow input$.inputs.prompt
$.<step_id>.primaryMain result of a step$.restyle.primary
$.<step_id>.outputFull result of a step$.restyle.output
$.<step_id>.primary.<field>Field of an object result$.product.primary.output.title
$.<choice_id>.primaryResult of the branch that ran$.portrait.primary

Conditions use the same paths in expression.

Fallback Configuration

json
{
  "id": "restyle",
  "type": "model",
  "model": "nano-banana-2-edit",
  "params": {"prompt": "Restyle this photo as $.inputs.style.", "image_urls": ["$.inputs.photo"]},
  "fallback": {
    "enabled": true,
    "model": "gpt-image-v2-edit",
    "params": {"prompt": "Restyle this photo as $.inputs.style.", "image_urls": ["$.inputs.photo"]}
  }
}

If the primary model fails, the fallback runs with its own params, and $.restyle.primary is its result. In the run's step_outputs, restyle_fallback.fallback.reason is primary_failed or not_triggered.

Version Management

Each version holds a complete definition, so you can change a workflow while callers keep using a previous version. Trigger a specific version with /v1/workflows/trigger/{workflowID}/{versionID}. Set locked: true on a version to stop further changes.

Create/Update a Version

bash
curl -X PUT https://api.eachlabs.ai/v1/workflows/{workflowID}/versions/v2 \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $EACHLABS_API_KEY" \
  -d '{
    "definition": {
      "input_schema": {
        "properties": {
          "prompt": { "type": "string", "required": true },
          "aspect_ratio": { "type": "string", "required": false, "default_value": "16:9" }
        }
      },
      "steps": [
        {
          "id": "write_prompt",
          "type": "model",
          "model": "eachlabs-llm-router",
          "params": {
            "model": "google/gemini-3.6-flash",
            "messages": [
              { "role": "system", "content": "Rewrite the idea as one vivid, detailed image prompt. Reply with the prompt only." },
              { "role": "user", "content": "$.inputs.prompt" }
            ]
          }
        },
        {
          "id": "generate_image",
          "type": "model",
          "model": "nano-banana-2-text-to-image",
          "params": {
            "prompt": "$.write_prompt.primary.choices[0].message.content",
            "aspect_ratio": "$.inputs.aspect_ratio"
          }
        }
      ]
    },
    "output_mapping": { "image": "$.generate_image.primary" }
  }'

A run of v2 returns the image as workflow_output.image. Omitted fields keep their stored values.

Bulk Trigger

Process multiple inputs (max 10) in a single API call:

bash
curl -X POST https://api.eachlabs.ai/v1/workflows/bulk-trigger/{workflowID}/v1 \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $EACHLABS_API_KEY" \
  -d '{
    "inputs": [
      {"prompt": "A red bicycle against a white wall"},
      {"prompt": "A blue bicycle against a white wall"}
    ]
  }'

The response has a bulk_id and one execution_id per input. List the batch with GET /v1/workflows/{workflowID}/executions?bulk_id={bulk_id}. Partial failures are possible.

Webhooks

Add webhook_url (and optionally webhook_secret) to a trigger to receive the result instead of polling:

bash
curl -X POST https://api.eachlabs.ai/v1/workflows/trigger/{workflowID}/v1 \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $EACHLABS_API_KEY" \
  -d '{
    "inputs": {"prompt": "A lighthouse on a cliff at sunset"},
    "webhook_url": "https://your-server.com/webhook",
    "webhook_secret": "your-secret"
  }'

The webhook body has the same shape as the execution response. Deliveries are attempted up to 3 times, about 10 seconds apart. With a webhook_secret, each delivery carries X-Webhook-Signature: sha256=<hex>, where <hex> is the lowercase-hex HMAC-SHA256 of <X-Webhook-Timestamp>.<raw body> keyed with the secret. Compare against the whole header value, sha256= prefix included, and hash the raw request bytes, not re-serialized JSON (Verifying Webhook Signatures).

Workflow Builder via each::sense

You can also build workflows using natural language via the each::sense workflow endpoint:

bash
curl -X POST https://eachsense-agent.core.eachlabs.run/workflow \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -d '{
    "message": "Create a workflow that generates an image and then upscales it",
    "stream": true,
    "session_id": "my-session"
  }'

To update an existing workflow, include workflow_id and version_id.

Example Workflow References

See references/WORKFLOW-EXAMPLES.md for eight complete workflows, each run end to end: one-photo effect, restyle then animate, LLM-written prompt, two photos with music, reliable vision call, HTTP API data, AI routing and parallel scenes.

Tệp đi kèm

Mô hình đọc các tệp này khi cần trong lúc kỹ năng được tải. Các tệp được cung cấp ở dạng có thể đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Eachlabs Workflows làm được gì?

Build, run and manage multi-step AI workflows that chain EachLabs models into one API call. Create a workflow from a JSON definition, trigger it, read its results and manage versions. Use when a task chains several models, reuses a fixed prompt, needs a fallback model, runs steps in parallel, routes on a condition, or calls an HTTP API between model steps.

Vì sao nên dùng Eachlabs Workflows trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Eachlabs Workflows là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Eachlabs Workflows trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/eachlabs/skills/tree/main/skills/eachlabs-workflows. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm và cài đặt thành một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Eachlabs Workflows?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Bạn có thể dùng Eachlabs Workflows với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Eachlabs Workflows với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Eachlabs Workflows có miễn phí không?

Kỹ năng này được eachlabs phát hành trên GitHub. Hãy xem điều khoản giấy phép trong kho mã. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp cho mô hình các công cụ mới để gọi — mã được chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và tiêu chí của đầu ra tốt. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇