Moving AI Agent Logic to YAML: Run from Telegram, VS Code, and CLI

✍️ OpenClawRadar📅 Published: August 11, 2026🔗 Source
Moving AI Agent Logic to YAML: Run from Telegram, VS Code, and CLI
Ad

One developer got tired of writing TypeScript tools for every connector in OpenClaw (Postgres, SSH, Slack, etc.). His solution: move the agent business logic into a agent.yaml file and run it via OE Runtime as an HTTP server. OpenClaw's SKILL.md points at that server, and the same YAML now works from Telegram, VS Code, and the CLI — no code duplication.

Architecture

The flow looks like this:

User message in Telegram → OpenClaw calls POST /run-file → OE Runtime executes agent.yaml → result back in Telegram

Agent Definition in YAML

Instead of writing TypeScript for each tool, the agent is defined declaratively:

name: Database Analyst
instructions: |
  You are a database analyst...
steps:
  - name: Query
    content: List all tables and row counts
connectors:
  - connection_name: My Database
    connection_type: postgresql
Ad

Why This Works

The key side effect: the same agent.yaml runs from VS Code, CLI, and HTTP. No duplication. This separates the agent logic from the UI layer and makes it portable across surfaces.

Who This Is For

If you're building with OpenClaw and want to reduce TypeScript boilerplate, or need your agent to run in multiple environments (chat, IDE, terminal), this pattern is worth a look.

📖 Read the full source: r/openclaw

Ad

👀 See Also