V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
爱意满满的作品展示区。
observerw
V2EX  ›  分享创造

你偶尔会觉得“如果有就好了”的小工具: agent-playground,让 agent 在临时目录中运行

  •  
  •   observerw · 3 月 27 日 · 646 次点击

    GitHub 链接: https://github.com/observerw/agent-playground

    我个人在使用 cc/codex/oc 等 agent 的时候,虽然大多数时候都是用他们来在代码仓库中编写代码,但偶尔也需要做一些临时性的小工作,比如使用 notion mcp 连接到我的 notion 数据库帮我管理任务,或者让它联网搜索资料写个临时的小报告等。但想要做到这一点面临两个问题:

    1. 在哪里去启动这个 agent ?随便选个目录吗?非常有可能会把现有目录的东西搞乱,手动新建一个又太麻烦;
    2. 把 notion mcp 这种对写代码没什么用的 mcp 放到全局配置目录的话,相当于总是会白白浪费上下文空间;

    要说是痛点其实也不算太痛,但终究是个小小问题。所以我就写了这个 agent-playground ,能够让你配置临时目录的模板(也就是 playground ),你可以在 playground 模板里面配置 agent 工作所需的 mcp ,skills 等,比如:

    # ~/.config/agent-playground/playgrounds/notion
    notion
    ├── .agents
    │   └── skills
    │       ├── notion-cli
    │       ├── notion-knowledge-capture
    │       ├── notion-meeting-intelligence
    │       ├── notion-research-documentation
    │       └── notion-spec-to-implementation
    ├── .codex
    ├── .mcp.json
    └── scripts
    

    在使用的时候,只需要运行:

    # 在临时 notion 工作目录中运行 codex
    apg notion --agent codex
    

    就会在 /tmp 中新建一个工作目录,就可以干净利落地在其中操作 notion 了。工作完成后输入 /exit 退出后,还会提醒你是否需要将该临时目录保存下来以备不时之需。

    自从写完之后我个人使用的频率还是很高的,我配置的 playground 包括:

    playgrounds
    ├── academic
    ├── browser
    ├── figma
    ├── notion
    ├── pencil
    └── search
    

    欢迎大家来试用一下!😋

    目前尚无回复
    关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   5424 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 09:02 · PVG 17:02 · LAX 02:02 · JFK 05:02
    ♥ Do have faith in what you're doing.