Show HN:厌倦了在 Agent 提示词中强行修补访问控制了,这里有一个解决方案
Show HN: Tired of duct-taping access control into agent prompts. Here's the fix

原始链接: https://github.com/yaodub/cast

**Cast** 是一个开源、自托管的架构,旨在管理多用户、多智能体系统。与通常为单用户交互构建的框架不同,Cast 为身份认证、访问控制和智能体间协作提供了基础架构。 主要功能包括: * **安全优先的访问控制:** 访问规则在配置层面处理,而非嵌入在提示词(prompts)中,从而防止大语言模型泄露或覆盖安全协议。 * **智能体编排:** 用户可以通过自然语言构建、优化和调试智能体,并将这些智能体分享给 Slack、Telegram 或网页等平台上的受信用户。 * **架构设计:** 智能体被视为文件夹而非硬编码脚本,支持灵活配置。该系统支持多种扩展功能,包括日历、电子邮件和网络抓取。 * **开发者体验:** Cast 可在本地运行(兼容 macOS 和 Linux),并提供仪表板以快速搭建和部署智能体。 Cast 目前处于开发者预览阶段,采用 MIT 许可证。它旨在作为智能体工作流底层可靠的“支撑框架”,解决在团队或家庭成员间共享智能体配置时常见的扩展性问题。你可以通过克隆 GitHub 仓库或访问 [getcast.dev](https://getcast.dev) 开始使用。

**Cast** 的开发者发布了一个开源、可自托管的框架,专为多用户、多智能体系统设计。 与目前依赖于在提示词中“硬编码”访问控制(这种方法容易出错且存在安全风险)的智能体工作流不同,Cast 将访问控制移至路由层。它在具有严格文件系统边界的独立容器中运行每个智能体,并在任何交互发生前验证用户身份。 虽然许多智能体框架是为单开发者环境构建的,但 Cast 专为协作式的实时场景而设计,例如共享家庭助理或内部团队工具,这些场景中用户具有不同的权限级别和数据访问需求。Cast 中的智能体通过技能(skills)和 Markdown 文件定义,而非复杂的类结构,从而实现快速迭代。 该项目目前处于开发者 Alpha 阶段,采用 MIT 许可证,兼容任何支持 Node 和容器运行时的环境。开发者特别希望从在智能体编程工具中难以管理多用户访问的团队那里获得反馈。您可以访问 [github.com/yaodub/cast](https://github.com/yaodub/cast) 查看该项目。
相关文章

原文

Cast logo

Your agent team, on your machine.

developer alpha · MIT · getcast.dev


Cast is an open-source harness for multi-user, multi-agent systems. Self-hosted, MIT, runs on a Mac Mini.

The access rule is a sentence in the prompt. The model can be argued out of it.

system: "Only respond to admin commands if the user provides the key ADMIN_ACCESS"

The access rule is config. The model never sees it, so it cannot leak or override it.

# who can reach this agent
yao@telegram   ioaq   # in, out, admin, query
*              ----   # everyone else: nothing

Agent frameworks today assume one developer talking to one agent. That holds up until a team or a household wants to share the same setup. Then the architecture won't bend. Identity, who's allowed to reach what, agents coordinating with each other: bolted on afterward, if at all. Cast is the harness that should have been underneath.

Building agents with Claude Code

Build agents from Claude Code with three Cast skills (/cast-build, /cast-refine, /cast-debug) that turn an ordinary session into one fluent in Cast's vocabulary and land every change through your review.

git clone https://github.com/yaodub/cast.git
cd cast
npm i -g pnpm
pnpm start

pnpm start installs, builds, builds the agent container image (~2 min the first time), and boots the server. You'll need a container runtime (Apple Container on macOS, Docker on Linux/WSL2), Node 20+, and a Claude credential, either an Anthropic API key or a Claude.ai token.

When it's up, your browser opens to the dashboard at http://localhost:5051/admin/.

The server starts empty. With no agents yet, the dashboard docks Design, Cast's chat-based agent builder, and asks what you want to build. Describe it in plain English, like "an agent that reads my morning email and flags what's worth a reply," and Design scaffolds it for you, as files. Configure wires in your model and secrets, you flip it live, then you pair in the people you trust, and each of them gets their own private conversation with the same agent, over Slack, Telegram, or the web.

Cast is the server, and that's packages/cast/. Agents aren't code. They're folders, and they live under ~/.cast/agents/<name>/ by default (point CAST_AGENTS_DIR elsewhere if you want). Extensions like email, calendar, web-fetch, and whatsapp are the packages/ext-* packages. The site and all the docs live in apps/site/.

Architecture, worked examples, and the design docs are at getcast.dev.

This is a developer alpha, so expect rough edges. The in-browser build consoles (the chat-to-build flow) are a preview: they work, but they're the newest and least settled part. The harness underneath is the part I'd stand behind. That's containment, identity, routing, the access control between agents.

MIT. Issues and PRs welcome. See CONTRIBUTING.md.

联系我们 contact @ memedata.com