Updated · Markdown

Define AI agents as code, with Terraform or an API

Updated 2026-11-29. Written by the team that builds Tex, so weigh it accordingly.

Short answer: treat an agent like any other piece of infrastructure: its instructions, model, tools, triggers, sandbox rules and budget in files, reviewed in pull requests and applied by a tool. Tex stores every agent as versions, and you can manage them from the console, its admin API, or the Terraform provider meet-glen-ai/glen.

What an agent definition holds

In Tex an agent is one markdown document. Its header names the model, tools, triggers (schedules, feeds, webhooks), sandbox egress, budget and knowledge base. Its body holds the instructions, in the same shape as Claude Code subagents and skill files. Every save is a new version. A running session finishes on its version, and the next one runs the latest.

Ways to manage agents in Tex

terraform {
  required_providers {
    glen = { source = "meet-glen-ai/glen" }
  }
}

Set GLEN_URL and GLEN_API_KEY (an admin's token from Settings) and run terraform plan.

Questions people ask

Who can change an agent? Admins. Members can run agents, chat with them and read, but not change them. A personal API token acts with its member's current role.

Can I start a run from my own code? Yes. POST /v1/send/<agent> with a message starts a session and returns its id. Later messages go to /v1/sessions/<id>/messages.

Is every change recorded? Every agent version is kept, and the journal records what each member does.

What Tex doesn't do

Try Tex with $10 of free credit