Awaitless

io.github.xpluspro由 GitHub 账号 xpluspro 发布v0.8.0更新于 Oct 24, 2026

Durable execution and named concurrency queues for coding agents across local, SSH, and Slurm.

概览

AI 生成的概览

Awaitless 是一个本地 stdio MCP 服务器,为编码代理提供跨本地、SSH 和 Slurm 的持久化作业执行与命名并发队列。

可以做什么
通过统一执行层运行命令,短任务直接内联返回,较长或排队任务获得带稳定 ID、状态、退出码、有界日志和产物的持久化句柄,可在客户端断开或新会话后恢复。为命名稀缺资源创建固定并发的持久化 FIFO 队列,提交的命令在容量释放时自动开始。等待作业、恢复最近一次分离的作业,或通过持久化完成游标消费多个作业中先完成的结果。用类似 grep 的过滤查看有界日志并获取结构化结果与产物。在本地、SSH 和 Slurm 后端之间切换而无需改变提交方式。
适用场景
当编码代理运行可能超出会话时长的构建、测试、基准或训练任务时适用,尤其是在远程 SSH 主机或 Slurm 集群上,并希望作业标识、取消、队列准入和结果恢复在代理上下文之外处理。
运行要求
作为本地 stdio 进程运行,通过 uvx 从 awaitless-runner 的 PyPI 包启动;需要 Linux、Python 3.10+ 和 Bash,且 uvx 需在 PATH 中。SSH 和 Slurm 目标需要相应主机与调度器的访问权限。未声明认证、环境变量或请求头。
安装前请注意
它会在本地机器、SSH 主机和 Slurm 集群上执行任意命令,已提交的作业在 MCP 客户端断开后仍继续运行。取消和队列准入会影响真实工作负载;它不替代 Slurm 调度,也不会为腾出空间而终止运行中的作业。作业状态保存在本地 SQLite 数据库中,完整日志保留在磁盘上。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Awaitless,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Awaitless

[CI] [PyPI] [Python]

Adaptive durable execution for coding agents.

Run commands through one execution layer. Quick work returns inline; longer or queued work becomes durable across local, SSH, and Slurm. Your workload stays on infrastructure you already own.

Agents submit work. Awaitless owns execution.

Awaitless is the adaptive durable execution layer between coding agents and the compute they use. It gives agents one stable job contract while reusing your local machine, SSH hosts, and Slurm clusters underneath.

简体中文 · Documentation · Benchmarks · PyPI

One job lifecycle across your existing compute

text
Coding agent → submit work → Awaitless owns the job lifecycle → Local / SSH / Slurm
Durable jobsNamed scarce-resource queuesCompletion and recovery
Stable IDs, state, cancellation, bounded logs, and Artifacts survive client disconnects.Durable FIFO admission prevents too many jobs from entering a named resource at once.Exit codes and results remain available by Job ID or replayable completion cursor.

Awaitless owns the job lifecycle, not the hardware. It does not discover resources, understand GPU topology, allocate multiple resources, or replace a cluster scheduler. Operators name queues and set fixed concurrency; Slurm continues to handle requests such as --gpus 2 --mem 64G and all physical cluster scheduling.

[Awaitless SSH submit, disconnect, resume, and Artifact demo]

Your coding agent should write code, not babysit jobs

An agent can write its own run → sleep → check loop. The harder problem is making job identity, disconnect recovery, queue admission, cancellation, and result delivery reliable across long workloads and changing sessions. Without that execution layer, the agent repeatedly pulls the same growing log back into its context:

bash
ssh gpu 'run_benchmark > job.log 2>&1 &'ssh gpu 'tail -n 200 job.log'  # again...ssh gpu 'tail -n 200 job.log'  # and again...

Awaitless turns that lifecycle into one adaptive execution call and one result boundary:

bash
awaitless run --json --host gpu --artifact results.json -- ./run_benchmark# quick: {"state":"succeeded","delivery":"inline","exit_code":0,...}# longer: {"job_id":"job_019F...","state":"running","delivery":"detached",...}
awaitless wait job_019F... --json# {"state":"succeeded","exit_code":0,"parsed_results":{...}}

Detached JSON also includes job_state, wait_state, delivery_state, and a ready-to-copy next_command. A client-side wait timeout is not a workload failure: use awaitless wait --last --json for the most recently detached Job, or use the returned command with its stable Job ID. To inspect benchmark lines without reading a large tail, use awaitless logs <job-id> --grep 'PASS|FAIL|median|CV'.

Every run is durable before launch. Finishing within the inline window looks like an ordinary command result; crossing it only detaches the waiter. Interrupt the waiter, close the MCP client, or start a fresh agent session: the Job keeps running and its stable ID recovers the result.

Queue work before a named resource is free

Create a durable FIFO queue once, then submit every command immediately:

bash
awaitless queue create gpu0 --concurrency 1
awaitless submit --queue gpu0 -- python train_a.pyawaitless submit --queue gpu0 -- python train_b.pyawaitless submit --queue gpu0 -- python train_c.py

The first command runs and the others report queued. Each starts automatically when capacity becomes available. This is durable admission control for a named scarce resource: fixed concurrency and FIFO ordering, with no priority or preemption. Awaitless never kills running work to make room for a later job.

Operators can also bind adaptive runs to a queue globally or per host:

toml
[hosts.gpu]hostname = "gpu.example.com"queue = "gpu0"

The Agent can then call run without choosing a queue or probing the GPU first.

This queue does not discover resources, understand GPU topology, dynamically allocate devices, issue leases, or combine requests such as two GPUs plus 64 GB of memory. Use Slurm or another scheduler for those responsibilities; Awaitless provides the Agent-facing job lifecycle around that scheduler.

Consume whichever job finishes next

v0.7 adds completions ... --drain --json for consuming a small parallel set in one call without client-side cursor bookkeeping. Long jobs can emit structured heartbeat updates with wait --progress-interval 30s. Use --capture-log PATH for command-owned logs and --resource gpu=0 or --device 0 for explicit exclusive admission; terminal results freeze bounded logs, diagnostics, timing, environment, and a SHA-256 identified snapshot.

Submit independent work up front, keep every Job ID, then wait at one durable completion boundary:

bash
awaitless completions job_A job_B job_C --json# {"completions":[...],"next_cursor":"cmp_...","active_job_ids":[...]}
awaitless completions job_A job_B job_C --after cmp_... --json

The first call returns already-finished work immediately or blocks until at least one selected Job completes. Process the batch before advancing to next_cursor; reusing an older cursor safely replays the same completion IDs. If the client disappears, a new session can continue from the saved cursor. Awaitless makes continuation results durably available—it does not run the agent's next reasoning step or require a resident notification service.

The v0.8 evidence suite replaces historical call-count demos with four questions: does an Agent choose the protocol correctly, does a Job survive faults without duplicate launch, does Awaitless keep execution-management state out of the reasoning loop, and does adaptive run preserve low friction for short commands? See the v0.8 evidence plan.

v0.8 evidence status

Release evidence is model- and commit-specific. The checked-in suite does not carry numbers from earlier versions or from a different model. Run the v0.8 benchmarks, inspect every raw record, then publish a dated report with model, config hash, git commit, skipped workloads, and all failures in the denominator. The reviewed v0.8 evidence report includes the complete raw records and analysis summaries rather than a selected score.

Try the recovery story in 30 seconds

Linux, Python 3.10+, and Bash are required. Run the built-in demo without a persistent install:

bash
uvx --from awaitless-runner awaitless demo --json

The demo submits two local jobs, terminates their first completion waiter, then uses new clients to consume both bounded results and JSON Artifacts by cursor.

For regular CLI use:

bash
uv tool install awaitless-runnerawaitless doctor --json

pip install awaitless-runner works too.

Give it to your coding agent

Add one stdio MCP server to your client's configuration (adapt the outer key to your client):

json
{  "mcpServers": {    "awaitless": {      "command": "uvx",      "args": ["awaitless-runner"]    }  }}

The preferred run tool returns quick commands inline and automatically gives longer or queued work a durable handle. Tasks-aware clients can still use run_job, while low-level clients retain submit_job and wait_for_job. Retrying an expensive submission with the same client_request_id cannot launch a duplicate job. For parallel work, every client can use wait_for_completions regardless of MCP Tasks support. The normative identity, lifecycle, continuation, completion, Artifact, and compatibility contract is Awaitless Agent Job Protocol.

Codex plugin

This repository is also a Codex plugin. Its manifest bundles the Awaitless agent skill with the stdio MCP server, which Codex launches through uvx. Install the repository from a local Codex marketplace, then start a new Codex task so the skill and MCP tools are loaded together.

The plugin requires uvx on PATH; the first MCP launch downloads awaitless-runner from PyPI if it is not already cached.

For direct CLI use, the whole loop is:

bash
awaitless run --json --name tests -- python -m pytest -q# If delivery is detached, save the returned job_id, then:awaitless wait <job-id> --json# Or recover the most recent detached job:awaitless wait --last --json

One interface, three places to run

BackendWhat Awaitless adds
LocalDurable process-group tracking, cancellation, bounded logs, and transactional named queues.
SSHThe same job contract plus queues coordinated on the target host, with no remote daemon.
SlurmReal sbatch scheduling plus durable Slurm IDs, queue/accounting state, exit codes, logs, cancellation, and Artifacts.

Use --backend, --host, or configuration defaults to switch targets without changing how the agent submits and collects work.

Why not just use a shell or tmux?

ToolBest atWhat the agent still has to build
Blocking shell callQuick inspection and interactive workLifecycle management once an engineering command runs longer than expected.
Shell polling / nohupKeeping a basic command aliveIDs, status, exit-code recovery, bounded logs, cancellation, deduplication, and result parsing.
tmuxHumans detaching from interactive shells, REPLs, and TUIsA reliable non-interactive job protocol and wrapper glue.
AwaitlessAgent-run builds, tests, benchmarks, remote jobs, and cluster workOnly the command and, optionally, the JSON Artifact to return.

Awaitless does not replace interactive terminals or Slurm. It gives coding agents durable fixed-concurrency queues on local/SSH machines and delegates cluster resource scheduling to Slurm.

How it works

mermaid
flowchart LR    A["Coding agent"] -->|"run"| B["Awaitless MCP / CLI"]    B --> C[("SQLite job record")]    C --> Q["Optional queue admission"]    Q -->|"capacity available"| D{"Backend"}    D --> L["Local process"]    D --> S["SSH host"]    D --> H["Slurm allocation"]    L --> I{"Finished inline?"}    S --> I    H --> I    I -->|"yes: result"| A    I -->|"no: durable handle"| A    A -. "reconnect with stable ID" .-> C    C --> E["Durable completion cursor"]    E -->|"state + exit code + bounded logs + Artifacts"| A

There is no Awaitless daemon, HTTP service, or hosted sandbox. Each invocation opens the same SQLite store; submitted runners and scheduler jobs outlive the stdio server that created them. Full logs remain on disk while only bounded tails enter the agent context.

Documentation

License

MIT

来源:README.md,提交 35ebea3

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.8.0最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分