Show HN:如何构建并自托管代码审查代理
Show HN: How to build and self-host a code review agent

原始链接: https://www.trytilde.ai/blog/how-to-build-code-review-agent

Tilde 是一款基于云端的工具包(SDK),旨在简化 AI 代理的构建与部署。由于对现有框架缺乏可移植性和可组合性感到不满,开发者创建了 Tilde,旨在为构建能够处理简单及复杂任务的代理提供一种模块化、以开发者为中心的体验。 该平台提供三个核心组件: * **工具 (Tools):** 集成 MCP 支持、托管式 SaaS 连接器以及凭据管理。 * **ChatKit:** 通过 Slack、GitHub 或 API 实现无缝通信,让代理可以在你的工作环境中直接运行。 * **内存 (Memory):** 为代理提供可自主维护的技能与知识库的集中式持久存储。 Tilde 中的一切均由中心化管理并设有权限控制。虽然目前它集成了 Vercel 的 AI SDK,但其设计初衷是为未来提供跨语言支持。其核心优势在于可移植性;开发者只需使用 `tilde-state.yaml` 文件,即可快速构建基础设施,用于部署安全且沙箱隔离的代理。无论是构建代码审查机器人还是复杂的自动化程序,Tilde 都能处理繁重的基础设施工作,让开发者能够全心专注于代理逻辑。 请访问[官方文档](https://trytilde.com)开始使用,或浏览其 [GitHub 示例](https://github.com/trytilde/examples/tree/main/code-review-bot)。

**Tilde** (trytilde.ai) 的创建者近期在 Hacker News 上分享了该项目,将其介绍为一个用于构建和自托管 AI 智能体的平台。Tilde 被设计为一套开发工具包(SDK),它将复杂的智能体工作流分解为模块化的云端 API 构建块,使开发者能够构建并部署针对特定用例的定制化 AI 智能体。 作者鼓励社区成员查看该项目的 GitHub 仓库以获取实现示例。在讨论中,HN 用户提供了建设性的反馈,建议集成“Reticle”MCP 服务器以改进代码验证,并表达了对未来除现有闭源模型外,能够支持开源大语言模型的期待。
相关文章

原文

Tilde is a harness SDK for building cloud deployed AI agents, extremely fast.

I built Tilde for 2 reasons:

  1. that creating a single agent harness for all tasks both simple and highly complex would lead to sub-optimal outcomes.
  2. That harness's & AI agent libraries at the time didn't give me the developer experience, portability or composability that I wanted

Over a year later into building this side project, point 1 is still true. On the other hand other frameworks, libraries and harnesses have come a long way but I still find myself reaching daily to Tilde to build agents to automate things for me. Having worked through the common pitfall most software engineers make, namely that "there's always one more feature before it's ready" - I can finally convince myself that it's ready.

What does it do?

I've taken out the meat of what makes a good harness, and composed it into components you can pick and choose to give to your agent:

  1. Tools: Spin up MCP servers to give to your agent. Add Tilde managed tools, bring your own or proxy upstream MCP servers. Tilde provides credential management, common SaaS integrations and raw HTTP1/2 reverse proxies to upstream services if MCP isn't enough
  2. ChatKit: Integrations with third party chat providers (Slack, Github or via API). Let your agents engage where you work. You can enable receiving and sending messages from Github, Slack or direct via API as well as other webhooks from these services.
  3. Memory: Create and centrally manage skills registries, wiki's and persistent memories. Surface these functions as tools to your agents to autonomously keep up to date.

Everything in Tilde is cloud based & centrally managed & permissioned. I've currently built a client-side library to work with Vercel's AI SDK but expect other frameworks and languages to be supported in future.

A practical example

One of the first agent's I built with Tilde was a code-review agent. I'm a software engineer and we tend to have a habit of automating ourselves out of work so what the heck.

There were a few key requirements:

  1. I want to tag the agent in Github PRs to trigger a review
  2. The agent must be able to securely checkout the code in a sandbox
  3. I don't want to expose credentials to the agent or the sandbox where the agent can reach to
  4. The agent should then be able to loop, reason and analyse the git diff based on some sort of system prompt
  5. Finally, comment back on the PR both inline and a summary message

Here's a basic architecture of what I was going for:

code review agent architecture

TLDR; here's the final example you can deploy yourself: https://github.com/trytilde/examples/tree/main/code-review-bot

With Tilde, I could essentially just focus on point 7 in the above diagram and the Tilde's SDK took care of everything else.

A few minutes later & voila! A functioning, secure agent that I could instantly deploy to Vercel & Tilde for remote usage anywhere.

For bonus points: You'll notice a tilde-state.yaml file in the example github repo above. You can spin up a Tilde account, head to your settings and import it there to setup the required Tilde infrastructure and integrations. From there it'll ask you to configure your Github & Modal sandbox settings. This is how I've designed the system to be as portable as possible.

Get started by reading our docs here or pointing your agent to our llms.txt .

I've spent a lot of time and energy into building the platform but less so on the docs - expect them to get a refresh in the coming days.

联系我们 contact @ memedata.com