Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

I Give My AI Agent a Git Link and Get Back a Live App. Here's What It Does When the Build Breaks.

说明与用途

自动化部署循环:AI 代理创建服务,从 Git 仓库触发构建,流式读取日志,解析错误,提交修复,重新构建,并验证实时 URL。

问题

Automating the deployment loop for a Git-hosted app so an AI agent can build, detect failures, fix code, and redeploy without human intervention.

结果

The agent can fully automate the deployment loop, handling failures by reading logs, applying fixes, and redeploying until the app is live.

工作流

  • Create a service with placeholder image "pending" and port 3000 via POST /v1/services
  • Start a build from a git URL with source_type "git", source_url, and source_ref (commit SHA) via POST /v1/services/{svc}/builds
  • Stream the build output with GET /v1/services/{svc}/builds/{build}/logs?follow=true
  • When build fails, retrieve the full log with GET /v1/services/{svc}/builds/{build}/logs and status with GET /v1/services/{svc}/builds/{build}
  • Parse the last 40 lines of the log to identify the error
  • Fix the code (e.g., run npm install, commit lockfile), push to repo, and start a new build with the new SHA
  • After deployment success, check service status and URL with GET /v1/services/{svc} and request the URL to confirm it answers

证据

agentic-hosting is a single program called ah that runs on your server. Agents talk to it over an HTTP API.

来源

Create a service, the server's name for one app.

来源

Start a build from a git URL.

来源

Stream the build output.

来源

If it fails, read the end of the log.

来源

Fix the code, push, and build again.

来源

When it's running, check the URL.

来源

  • 记录日期: 2026-10-21T15:41:22.907Z