· Learning AI engineering, Getting started
How to become an AI engineer, in three steps
One shell script, ask.sh, sends a question to a model over HTTP and prints the answer with its token counts: 21 tokens in, 103 out, about a tenth of a cent. That is the first thing in the repository for my video series, and it is the whole of what is new about the job. Everything around it is software you already write. This post is the path from that one call to an AI engineer's work, in three steps. The same three steps are a Short: https://youtu.be/3kUYbTkQjkw.
Watch the episode: What actually changed, and what didn't
Step one: know what the job is
AI engineering is not using AI to write your code. It is building software with a model inside it, whether it answers questions, makes decisions or takes actions, and engineering it so you can trust what it does.
The industry has split into two groups, AI engineers and everyone else, and if you build web apps, design schemas and write tests, you were put in the second group. The split is smaller than it looks. Calling a model is an HTTP request: a POST with a JSON body, an API key in a header, and a JSON response. Storing what it needs is a database; in my series that is SQLite. Proving it works is testing. Deployment is a server, an environment variable for the key, and a log. That is most of the job, and you already know how to do it.
The one new thing
A model is a function. Text goes in, text comes out. It runs on someone else's machine, behind an HTTP endpoint. The text you send is the prompt, and the text that comes back is the answer. There is no query language and no schema.
Three things about that function are new.
It keeps no state between calls. Nothing you sent in one request is there in the next, so a conversation is a list of messages, each with a role, user or assistant, and every request sends the whole list. The conversation is your data, and it lives where your data already lives.
It is nondeterministic. Ask the same question twice and you can get two different answers. Usually they say the same thing in different words. Sometimes they don't. A test that compares the answer to an exact string will pass on some runs and fail on others, so the tests in my series check what an answer has to contain, across a set of questions.
It is priced by the token. A token is the unit a model reads and writes, a piece of text a few characters long; a short word is one token and a long word is several. The model writes its answer one token at a time, each chosen from the prompt and from what it has written so far, until it decides to stop. The model I use costs $2 per million input tokens and $10 per million output tokens, so output costs five times what input does, and every limit you will meet is counted in tokens too.
That last point is the one that matters most. The answer is probable, not certain. The function picks each token as a likely next piece of text given everything before it, and the result is usually right and sometimes confidently wrong, with nothing in the response to tell you which. Everything an AI engineer builds around the model exists because of that sentence.
Here is the call.
#!/bin/sh
# One HTTP call to a model, from the terminal. Usage: ./ask.sh "What is a mutex?"
# The API key comes from .env (see README).
if [ -f .env ]; then . ./.env; export ANTHROPIC_API_KEY; fi
QUESTION="$1"
# The whole request: which model, how long an answer may be, and the conversation so far.
BODY=$(jq -n --arg q "$QUESTION" '{
model: "claude-sonnet-5-5",
max_tokens: 1024,
messages: [{ role: "user", content: $q }]
}')
curl -s https://api.anthropic.com/v1/messages \
-H "content-type: application/json" \
-H "anthropic-version: 2026-10-21" \
-H "x-api-key: $ANTHROPIC_API_KEY" \
-d "$BODY" \
| jq -r '(.content[] | select(.type == "text") | .text),
"",
"input tokens: \(.usage.input_tokens) output tokens: \(.usage.output_tokens)"'
The request body has three fields: the model's id, max_tokens, which is the most the answer may be (1,024 here; if the model reaches it, the answer is cut off where it stands), and the messages. One curl, three headers, and jq to print the text and the usage. The usage is the bill: the server counts the tokens and returns the counts with every answer. No SDK and no framework.
Step two: learn the fundamentals
Because the answer is probable, the job has two halves: give the model the right information, and measure what comes back.
The first half is a retrieval pipeline: code that finds the passages in your own documents that answer a question and gives the model only those, so it answers from your facts and says so when it can't. Answering that way is called retrieval-augmented generation, RAG. The model has never seen your return policy, your price list or your orders, and pasting everything into every request stops scaling fast; the series measures where.
The second half is an eval harness: a set of questions with known answers, run through the real pipeline on the real models and scored in code. It is how you know a change helped, since the model's answers vary and one good run proves little. My two series teach both. Series 1 builds the pipeline. Series 2 builds the harness.
Step three: build your own
Start from a repository, not a blank page. Mine is public, https://github.com/AiFirstDevelopment/engineer-to-ai-engineer, and tagged by episode, s1e1 through s1e8 for series 1; check out a tag and you have the code exactly as that episode leaves it. At s1e1 it is a package.json, ask.sh, and a docs folder: the internal documentation of a fictional company that sells camping lanterns, twelve Markdown files and one PDF, about 26,000 words of prices, model numbers and policies. No model has seen them. That is the point. The pipeline you build has to answer from those files or say it can't.
What to build first is the one call above. Then, episode by episode: the same call from TypeScript, a question the model can't know, the documents pasted in and what that costs, embeddings, chunking, the pipeline, and a score that says how well it works.
What to try next: clone the repository, check out s1e1, put your key in .env, and run ask.sh with a question from your own domain. Read the usage line before the answer. Then ask it something only your company knows, and watch what it does with a question it cannot answer.
Comments