Huko-Engine: an out-of-the-box agent engine — give your Node app OpenClaw-grade agent power in ~
I built a CLI agent called Huko a while back. The orchestration core kept showing up as something I wanted in other Node projects, so I extracted it as Github repo alexzhaosheng/huko-engine (MIT, Node 20+, TypeScript).
The pitch is batteries-included with no framework lock-in . The engine already ships the full agent flow — plan → tool use → result delivery, algorithmic context compaction (no summariser-LLM calls), session + task + entry persistence with orphan recovery on boot, streaming events, safety policy hooks. You wire three things — persistence, an LLM provider, and a tool allow-list — and the engine drives the loop.
Roughly 20 lines gets you a working agent with the 13 bundled tools (bash, file ops, grep, glob, plan, message, web fetch/search):
import { createHukoEngine, MemoryAgentPersistence, FOUNDATIONAL_TOOL_REGISTRATIONS, } from "@alexzhaosheng/huko-engine"; const engine = await createHukoEngine({ persistence: new MemoryAgentPersistence(), }); const agent = engine.createAgent({ name: "demo", sessionId: await engine.createSession({ title: "demo" }), defaultProvider: { protocol: "openai", baseUrl: "{OPEN-ROUTER-API-URL}", apiKey: process.env.OPENROUTER_API_KEY!, modelId: "deepseek/deepseek-v4-pro", toolCallMode: "native", thinkLevel: "off", contextWindow: 128_000, }, cwd: process.cwd(), tools: { allow: FOUNDATIONAL_TOOL_REGISTRATIONS.map((r) => r.name) }, }); const result = await agent.runTurn({ message: "List the TypeScript files in src/ and summarise each.", }); console.log(result.finalResult); Persisting conversations across restarts? Swap MemoryAgentPersistence for SqliteAgentPersistence("./agent.db") — same interface, engine handles schema + orphan recovery.
Adding your own tool? engine.registerTool({ ...definition, handler }) once, then put the name in tools.allow .
Built for vibe coding. The repo ships an AGENTS.md at the root specifically for AI-assisted integration. Drop it into Cursor / Claude Code / Codex CLI's context window and your assistant immediately picks up the six hard rules — facade-only imports, tool allow-listing, async createHukoEngine , per-engine tool registration, etc. — so it writes correct integration code on the first shot instead of inventing a plausible-but-wrong API in the LangChain or Vercel-AI-SDK shape.
What it's not: a chain framework. There's no chain.invoke , no LCEL, no prompt-template DSL. The engine owns the canonical system prompt (identity, agent loop, tool-use rules, safety, ...) and you contribute overlays + tools — not the prompt itself.
Repo: https://github.com/alexzhaosheng/huko-engine
Working host (the CLI it came from): https://github.com/alexzhaosheng/huko
If it looks useful, a ⭐ on the repo goes a long way. Issues, PRs, and honest critique all welcome.
[留言]
为什么值得关注
能改变理解方式,而不只是重复常识;符合当前抓取需求;它提供了新的理解或解释,而不只是表面观点
来源:reddit,领域:tech,保留分:0.64
讨论总结
讨论量较低,暂无明显增量信息。