Agentic AI · Day 05 · Chapter 04

From Laptop
to Live

An agent that only runs on your machine, in your terminal, is still just a demo.

What "done" means

Reachable
A URL anyone can hit, not "works on my machine"
Survives a restart
Comes back up on its own after a crash or redeploy
Keeps its secrets
API keys live on the server, never in the repo
Where to put it

Cloud platforms,
at a glance.

You don't need Kubernetes for one agent. These are built for exactly this size of project.

Simple · Free tier

Render

Point it at a GitHub repo, pick a start command, get a URL. Free web services sleep when idle, which suits a workshop demo far better than production traffic.

Fast deploys

Railway

Similar pitch to Render with a usage-based free allowance. Very quick from "git push" to a live URL, with painless environment-variable management.

Global, container-first

Fly.io

Deploys a small container close to your users worldwide. More control than Render or Railway, at the cost of a slightly steeper first setup.

Fastest demo

Hugging Face Spaces

Free, made for exactly "share this AI thing quickly." Great for a class demo, less suited to a real backend service.

Deployment strategy

Boring on purpose.
That's the goal.

This discipline isn't specific to agents. Every backend service needs it. Agents just make the cost of skipping it more visible.

1
Secrets in the platform, not the repo. API keys set as environment variables on Render, Railway, or Fly, never committed.
2
One clear start command. The platform should need no guesswork to boot your service.
3
A health-check endpoint. Something the platform can ping to know you're actually alive.
4
Timeouts and retries around the model call. The LLM API will occasionally be slow or rate-limit you. Plan for it, and don't hang forever.
AIOps, in plain terms

Watching an agent
is different from
watching an API.

A normal API either answers or errors. An agent can also succeed technically while doing something quietly wrong: calling the wrong tool, looping, or burning tokens for no reason. That's what AIOps watches for.

Requestcomes in from a user
Agent servicehandles it, logs every model and tool call
Logs & metricslatency, tokens, cost, failures
Alertsomeone gets paged
Best practices & monitoring

Four numbers
worth watching.

You don't need a full observability stack on day one. You do need these on a dashboard, or at minimum in a log you actually read.

The core four

Latency
How long a request takes end to end, not just the model call
Token usage & cost
Per request and per day. This is what turns into a surprise bill
Tool-call failure rate
How often a tool call errors or returns something the agent can't use
Stuck-loop rate
How often the agent hits your step limit without finishing, your signal that the loop logic needs work
End of Day 05

The loop, the landscape,
and how to ship it.

That's the whole arc: what an agent is, who's building frameworks for it, how to build one raw with Groq, and how to get it live without it falling over. Code comes next session.

← Chapter 03Back to start →