lark-harness: Lark Harness: The Agent Runtime That Turns Feishu Into a Governed Operating System

A Bash-based runtime uses Lark Base, Messenger, and Approvals to give AI agents memory, workflow, and guardrails without building a separate platform.

8 min read • View on GitHub • More from ShunsukeHayashi

A wide black-and-white editorial scene of a corporate control room built inside a chat suite. On one side, messenger panes and a ledger-like base sit beside each other like control panels. In the center, an agent tries to advance a task, while a human approval stamp and policy gate block one path and allow another to continue. The image explains how Lark Harness turns familiar office software into governed infrastructure for agent work.
Lark Harness does not bolt AI onto chat. It repurposes chat, storage, and approvals into the runtime itself.

支援の核になっているのが、私たちが自社開発したLARC(Lark Agent Runtime)というフレームワークです。 LARCは、AIが業務タスクを実行するときに、「このタスクに必要な権限はこれだけ」「この操作は人間の承認が必要」「このAIはこれができる」といったルールを自動で管理する仕組みです。 GitHubでオープンソースとして公開しており、実際のLark(飛書)環境で動作を検証済みです。

Key Takeaways

Most agent projects start by asking how much power they can give a model. Lark Harness asks the better question: how little power can you give it and still make it useful? That shift is the whole story.

Lark Is the Product

The surprise in Lark Harness is not that it connects to Lark. It treats Lark as the operating environment itself. Messenger becomes the operator surface, Lark Base becomes durable state, and Approvals become the safety valve.

That makes the repo feel less like a bot integration and more like a permission-first office OS. The agent is not wandering across SaaS tools on its own. It is moving through a place that already has memory, policy, and a human override path.

Why Permission Comes First

The key idea is not access control in the abstract. It is the movement of a task through identity selection, risk classification, and human approval before it can complete.

A WSJ-style hedcut portrait of Shunsuke Hayashi based on his GitHub avatar. The portrait is rendered in black ink on a pure white background and is used here to attribute the quoted explanation of LARC's permission-first design. The image reinforces the maintainer context behind the project without distracting from the technical argument.

The quote lands because it describes the core design in plain language. LARC is not trying to make agents omnipotent. It is trying to make them legible.

The Runtime Is a State Machine

Under the hood, the lifecycle is simple and strong: enqueue, run-once, done, or fail. That looks boring until you realize what it buys. The agent is not chatting endlessly. It is claiming work, acting once, and writing the result back into Lark Base as an audit trail.

{
  "task": "create_expense",
  "state": "enqueue",
  "claimed_by": null,
  "policy": {
    "risk": "high",
    "gate": "approval"
  }
}

That is closer to asynchronous job orchestration than to prompt-and-tools chat. The runtime can retry, log, and hand off without losing the thread. Lark Base is doing the quiet, important job of persistence.

Bot or User? The Auth Router Decides

CaseIdentityWhy it matters
Base reads and notificationsBotCheap, safe, and usually sufficient for ambient automation.
Calendar and approval-sensitive workUserSome SaaS actions require a real user context to succeed.
External direct messagesBlockedThe router avoids known failure paths and bad API outcomes.
Sensitive workflow actionsPolicy-drivenThe runtime chooses identity based on the task, not on habit.

The interesting part of auth.sh is not authentication in the abstract. It is the decision logic around identity. In SaaS automation, the wrong identity is often worse than no automation at all.

LARC makes that choice explicit. Sometimes the bot is enough. Sometimes the user has to stand behind the action. Sometimes the safest answer is to stop.

Bash Is the Glue, Not the Limitation

A close-up editorial illustration of a task token moving through a narrow mechanical pipeline made of Unix tools. One channel is labeled by visual cues only, not text, as a thin dispatcher hands work to a Python gear and then into an external CLI gear. The image explains that Bash acts as the orchestration layer while heavier work is delegated elsewhere.
Bash keeps the entry point thin. The point is not to do everything in shell. The point is to dispatch work cleanly.

Bash here is a strategic choice. It gives the repo portability, lazy loading, and a very small surface area for the dispatcher. Heavier lifting can move into Python or the Lark CLI without bloating the entry point.

LayerWhat it doesWhy it fits
Bash dispatcherSubcommand routing and environment setupPortable and easy to inspect
Python helpersData shaping and scenario logicBetter for complex transforms
Lark CLIPlatform integrationUses the official surface instead of reimplementing it

Skills as Documentation for Machines

The .claude/skills tree is one of the smartest parts of the repo. It is not just human documentation. It is runtime context for an LLM-based agent. That means the project ships its domain knowledge in a form the model can actually consume when it needs it.

That is a subtle but real shift. Documentation stops being passive reference material and becomes part of the execution environment. The repo is teaching the agent while the agent is working.

.claude/skills/
  larc-runtime/
  approvals/
  base/
  messenger/

For office automation, that matters. If the agent needs to know how a Lark-specific operation behaves, the answer should be local, structured, and close to the command path. This repo leans into that.

Where LARC Fits Among Agent Runtimes

ProjectPrimary focusWhat LARC does differently
LARCGoverned office workflows inside LarkTurns the platform into the runtime and adds approval gates
E2BSecure sandbox executionFocuses on isolated code environments rather than SaaS governance
LangGraphStateful agent orchestrationOrchestrates flows, but does not ship a Lark-native control plane
nanobotMulti-channel lightweight agentConnects to Lark, but does not center policy and auditability
cc-connectBridge between coding agents and chatMoves messages between systems instead of making Lark the execution layer

That comparison is the point. LARC does not try to win the whole agent market. It carves out a narrower, more credible niche: enterprise office work inside a specific collaboration stack, with policy, persistence, and approvals built in.