Skip to content

render-examples/render-ops-agent-ts

Repository files navigation

Build and Deploy a Render Ops Agent

Build a read-only ops agent that runs on Render, inspects Render services, and stores run history in Postgres.

This is the TypeScript path for the workshop. A parallel Python repo can follow the same architecture.

What you deploy

The Blueprint creates:

  • ops-agent: a Hono web service that runs the agent.
  • ops-target: a seeded target service with deterministic logs and endpoints.
  • ops-agent-db: a Postgres database for run history and finding memory.

Prerequisites

You need:

  • A Render account.
  • A Render API key.
  • An Anthropic API key from the workshop facilitator.
  • Node 20+ and git.

The app enforces read-only Render API access in code by blocking non-GET requests.

Run locally

Install dependencies:

npm install

Copy the environment example:

cp .env.example .env

Set RENDER_API_KEY, ANTHROPIC_API_KEY, and DATABASE_URL.

Build and test:

npm run check

Start the target service:

npm run build
npm run target:start

Start the agent service in another terminal:

npm start

Run the Ink TUI. It reads AGENT_URL from .env:

npm run tui

For local development, use:

AGENT_URL=http://localhost:3000

After deploying to Render, set AGENT_URL in .env to your deployed ops-agent URL:

AGENT_URL=https://YOUR-OPS-AGENT.onrender.com

Deploy to Render

Create a Blueprint from this repo. Render reads render.yaml and creates the two web services plus Postgres.

After the resources are created, set these secret values on ops-agent:

  • RENDER_API_KEY
  • ANTHROPIC_API_KEY

DATABASE_URL is wired automatically from ops-agent-db.

Branches

  • main: completed room implementation.
  • starter: attendee branch with TODOs for the live workshop.

Take-home extensions live in WORKSHOP.md.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors