← 返回 Skills 市场
botanarede

Beddel

作者 Bota na Rede · GitHub ↗ · v0.1.0 · MIT-0
cross-platform ⚠ suspicious
90
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install beddel
功能描述
Execute declarative YAML AI workflows with branching, retry, multi-provider LLM support, guardrails, and OpenTelemetry tracing via the Beddel Python SDK. Use...
使用说明 (SKILL.md)

Beddel

Declarative YAML workflow engine for AI pipelines — run multi-step LLM chains with branching, guardrails, retry, and observability out of the box.

Prerequisites

  • Python 3.11+ (python3.11 --version)
  • pip for Python 3.11 (python3.11 -m pip --version)
  • An LLM API key — any LiteLLM-supported provider works. Gemini recommended:
export GEMINI_API_KEY="your-key"

Installation

python3.11 -m pip install "beddel[all]"
beddel version

Note: System Python may be 3.10. Always use python3.11 explicitly.

Quick Start

  1. Write a workflow file hello.yaml:
id: hello
name: Hello World
input_schema:
  topic: { type: str, required: true }
steps:
  - id: greet
    primitive: llm
    config:
      model: gemini/gemini-2.0-flash
      prompt: "Write a one-sentence greeting about $input.topic"
      max_tokens: 50
  1. Run it:
beddel run hello.yaml -i topic="AI agents" --json-output

Tool Integration (OpenClaw Plugin)

The beddel tool is available via the OpenClaw plugin @botanarede/beddel:

openclaw plugins install @botanarede/beddel

Once installed, the agent can invoke beddel with actions: run, validate, list-primitives.

The bundled example examples/setup-beddel.yaml automates this installation — see Bundled Example below.

CLI Reference

Command Description
beddel run \x3Cfile> [-i key=val] [--json-output] Execute a workflow
beddel validate \x3Cfile> Validate YAML syntax and schema
beddel list-primitives Show available primitives
beddel serve -w \x3Cfile> [--port 8000] Serve workflow as HTTP endpoint
beddel version Print installed version

Core Concepts

A workflow is a YAML file with an id, name, optional input_schema, and a list of steps. Each step declares a primitive (the unit of work) and a config (primitive-specific parameters).

Steps execute sequentially. Each step's output is available to subsequent steps via $stepResult.\x3Cstep_id>.\x3Cpath>.

See references/ for full schema documentation.

Primitives

Primitive Purpose
llm Single-turn LLM call with streaming support
chat Multi-turn conversation with message history
output-generator Template-based output rendering (JSON, Markdown, text)
guardrail Data validation with strategies: raise, return_errors, correct, delegate
call-agent Nested workflow invocation with depth tracking
tool External function call — shell_exec is built-in
agent-exec Unified adapter for external agent delegation

Execution Strategies

Each step can declare an execution_strategy to control error handling:

Strategy Behavior
fail Stop workflow on error (default)
skip Log error, continue to next step
retry Retry with exponential backoff and jitter
fallback Execute an alternative step on failure
delegate Delegate error recovery to agent judgment

Variable Resolution

Namespace Example Source
$input $input.topic Runtime inputs (-i key=val)
$stepResult $stepResult.greet.content Previous step outputs
$env $env.GEMINI_API_KEY Environment variables

Key paths for step results:

  • tool steps: $stepResult.\x3Cid>.result.stdout, .result.exit_code
  • llm steps: $stepResult.\x3Cid>.content
  • guardrail steps: $stepResult.\x3Cid>.data.\x3Cfield>, .valid

Bundled Example: setup-beddel

This workflow checks whether the @botanarede/beddel OpenClaw plugin is installed and installs it if needed. It demonstrates 3 of the 7 primitives: tool, guardrail, and conditional execution via if.

id: setup-beddel
name: Beddel Plugin Setup
description: Install or update the @botanarede/beddel OpenClaw plugin and verify it loads.

steps:
  - id: check_plugin
    primitive: tool
    config:
      tool: shell_exec
      arguments:
        cmd: "python3.11 -c \"import subprocess,json,re;r=subprocess.run(['openclaw','plugins','list'],capture_output=True,text=True);has=bool(re.search(r'beddel',r.stdout));loaded=bool(re.search(r'beddel.*loaded',r.stdout));print(json.dumps({'action':'OK'if loaded else'REINSTALL'if has else'INSTALL'}))\""

  - id: validate_check
    primitive: guardrail
    config:
      data: "$stepResult.check_plugin.result.stdout"
      schema:
        fields:
          action: { type: str, required: true }
      strategy: correct

  - id: install_plugin
    primitive: tool
    config:
      tool: shell_exec
      arguments:
        cmd: "openclaw plugins install @botanarede/beddel"
      timeout: 120
    if: "$stepResult.validate_check.data.action != 'OK'"

  - id: verify
    primitive: tool
    config:
      tool: shell_exec
      arguments:
        cmd: "openclaw plugins info beddel"

What each step demonstrates

Step Primitive Feature
check_plugin tool Deterministic check via shell_exec — outputs JSON without LLM
validate_check guardrail correct strategy — parses JSON string, strips markdown fences, validates schema
install_plugin tool Conditional execution (if) — skips when plugin already loaded. timeout: 120 for network ops
verify tool Post-install verification

Run it:

beddel run examples/setup-beddel.yaml --json-output

Security & Privacy

  • Secrets: Use $env.* variables — never hardcode API keys in workflow YAML
  • shell_exec: Runs with shell=False (no shell injection). Commands are split via shlex.split(). Shell operators (|, &&, >) are sanitized in beddel 0.1.1+
  • Subprocess sandbox: Default timeout 60s, max stdout 1MB per stream, configurable per step

External Endpoints

Endpoint When Purpose
LLM provider API (e.g. generativelanguage.googleapis.com) llm, chat, guardrail (delegate) steps Model inference
PyPI (pypi.org) Installation only Package download
npm registry (registry.npmjs.org) Plugin install step Plugin download

Trust Statement

Beddel executes user-defined YAML workflows. It does not phone home, collect telemetry by default, or transmit data beyond the configured LLM provider endpoints. OpenTelemetry export is opt-in.

Observability

Beddel emits OpenTelemetry spans for every workflow and step execution:

  • beddel.workflow.execute — root span per workflow run
  • beddel.step.\x3Cprimitive> — child span per step
  • gen_ai.usage.* attributes on LLM steps (prompt/completion tokens)

Enable with any OTel-compatible collector via standard OTEL_* environment variables.

Troubleshooting

Error Cause Fix
BEDDEL-PRIM-300 Tool not found Ensure tool name is shell_exec (built-in). Custom tools need -t name=module:func
BEDDEL-RESOLVE-001 Unresolvable variable Check step id spelling and result path. Tool results use .result.stdout, LLM uses .content
BEDDEL-GUARD-201 Guardrail validation failed Check schema field types. Use strategy: correct for JSON string inputs
python3.11: not found Wrong Python version Install Python 3.11+. System Python may be 3.10
Step shows SKIPPED if condition was false or execution_strategy: skip Expected behavior — downstream steps should handle SKIPPED values

Advanced: Python SDK

from beddel import WorkflowExecutor, VariableResolver

resolver = VariableResolver()
resolver.register_namespace("secrets", lambda path, ctx: get_secret(path))

executor = WorkflowExecutor(resolver=resolver)
result = await executor.execute(workflow, {"topic": "AI"})

For FastAPI integration: beddel serve -w workflow.yaml --port 8000

References

Additional documentation in references/ (loaded on demand):

  • workflow-format.md — Complete YAML schema
  • primitives.md — All 7 primitives with full config options
  • execution-strategies.md — 5 strategies with examples
  • variable-resolution.md — Namespaces, custom resolvers, error handling
安全使用建议
This skill appears to be a reasonable adapter for the Beddel CLI, but exercise caution before installing or granting credentials. Actionable steps to reduce risk: - Do not provide a high-privilege or broadly-scoped GEMINI_API_KEY to an untrusted skill. Prefer a scoped/test key or run within an isolated environment. - Inspect any workflow YAML you run (especially bundled examples). Look for `$env.` uses and remove or audit references to environment variables you don't want exposed. - Be cautious about running the bundled `setup-beddel` workflow: it will call `openclaw plugins install @botanarede/beddel` and thus change the agent's plugins. Verify the plugin source (review @botanarede/beddel repo) before allowing installation. - If you need multi-provider support, confirm how to supply other provider keys (the skill declares only GEMINI_API_KEY). Consider whether you can run beddel CLI directly in a sandbox with only the intended provider credentials present. - Prefer running this skill in an isolated container or ephemeral environment where installing plugins and running shell commands cannot affect sensitive host resources. If you want a more confident assessment, provide the upstream plugin/package source (homepage/repository) for @botanarede/beddel and confirmation whether the skill author intends GEMINI_API_KEY to be mandatory vs. recommended; that would clarify proportionality and trust.
功能分析
Type: OpenClaw Skill Name: beddel Version: 0.1.0 The 'beddel' skill is a declarative YAML workflow engine for AI pipelines, supporting LLM chains, guardrails, and external tool execution. It includes a 'shell_exec' primitive for running system commands, which is documented with security considerations (e.g., shlex splitting and shell=False). The bundled example 'examples/setup-beddel.yaml' uses this capability to automate the installation of its own OpenClaw plugin via 'openclaw plugins install'. All behaviors, including network access to LLM providers and package registries (PyPI, npm), are transparently documented and aligned with the tool's stated purpose as an automation and orchestration engine.
能力评估
Purpose & Capability
The skill is an instruction-only adapter for the Beddel CLI and correctly requires python/pip and the beddel binary. However the metadata forces a single primary credential (GEMINI_API_KEY) even though the SKILL.md repeatedly describes 'multi-provider LLM support' and says 'any LiteLLM-supported provider' can be used. Requiring GEMINI_API_KEY as the only required env is narrower than the prose suggests and could be either a convenience choice or an unnecessary hard dependency.
Instruction Scope
The runtime instructions encourage running arbitrary shell commands via the `tool`/`shell_exec` primitive and include a bundled workflow that automatically installs or reinstalls an OpenClaw plugin (`openclaw plugins install @botanarede/beddel`). The docs also describe a `$env` namespace that reads os.environ (no per-variable restriction), meaning workflows can access arbitrary environment variables. Both the automated plugin-install step and the ability for workflows to reference arbitrary env vars broaden the skill's operational surface beyond simply 'execute workflows' and create real potential for accidental modification of the agent environment or secret exposure.
Install Mechanism
The skill is instruction-only (no install spec) which is lower risk for local code writes. However the provided example workflow instructs the agent to install an external OpenClaw plugin (`@botanarede/beddel`) using the agent's CLI, which causes the agent to modify its own plugin set. That side-effect is not handled by an install spec and could install third-party code without additional vetting.
Credentials
The skill declares and requires GEMINI_API_KEY (primary credential). That is reasonable for using the Gemini provider, but the skill claims multi-provider support and its variable-resolution docs explicitly allow reading arbitrary env vars via `$env.<NAME>`. The declared required env list does not reflect the wider capability to read any environment variable at runtime, which makes the single declared credential appear insufficient and potentially misleading. Workflows could read or surface unrelated secrets if crafted or misused.
Persistence & Privilege
The skill does not request always:true and does not explicitly change other skills' configs, but example workflows directly call `openclaw plugins install ...` which modifies the agent's plugin set. This is a significant side-effect (modifies agent environment/plugins) even though it's not represented as elevated 'always' privilege in the manifest.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install beddel
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /beddel 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.0
beddel 0.1.0 — Initial release - Execute declarative YAML AI workflows with branching, retry, and multi-provider LLM support via the Beddel Python SDK. - Out-of-the-box guardrails and OpenTelemetry tracing for observability. - CLI supports running, validating, and serving YAML workflows and listing workflow primitives. - Supports several workflow primitives: llm, chat, output-generator, guardrail, call-agent, tool, and agent-exec. - Includes detailed documentation and a bundled example for integrating with OpenClaw. - Enhanced security for shell execution and API key handling.
元数据
Slug beddel
版本 0.1.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Beddel 是什么?

Execute declarative YAML AI workflows with branching, retry, multi-provider LLM support, guardrails, and OpenTelemetry tracing via the Beddel Python SDK. Use... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 90 次。

如何安装 Beddel?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install beddel」即可一键安装,无需额外配置。

Beddel 是免费的吗?

是的,Beddel 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Beddel 支持哪些平台?

Beddel 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Beddel?

由 Bota na Rede(@botanarede)开发并维护,当前版本 v0.1.0。

💬 留言讨论