FORWARD-DEPLOYED ENGINEERING 101 · FREE, NO MODEL KEY
Understand it.
Then build it.
You can be an experienced engineer and still be new to agents. Start with what each thing is and how it helps a person do useful work. Explore 64 original introductions across software, agents, cloud, security and delivery. Start here without a model key; each topic connects to deeper instruction and practice.
A place to start.
Choose a short reading route, or look up a concept below.
- 101UnderstandPlain language, visual walkthrough, vocabulary
- 102Build with guidanceOriginal lessons, examples and knowledge checks
- 103Practise and explainRunnable labs, failure cases and handover
Delivering a response in parts
What is a streaming response?
Streaming delivers parts of a response while work proceeds, instead of waiting to deliver the entire body at once. It is a delivery behavior, not a model or framework. Server-sent events (SSE) is one text format for sending events over HTTP. An event can carry a piece of text, a status change or completion information.
An FDE needs to make an AI application feel responsive without treating unfinished output as a completed answer or an authorized action. A visible sentence and HTTP 200 cannot tell you whether the response finished successfully.
UNDERSTAND THE SYSTEM
The text arrived. Did the response finish?
Follow a fictional maintenance draft through an HTTP stream. The visible preview, event record and completion decision change independently. These are explained examples of the accompanying local lab, not a live model call.
Read the connections in plain English
- 01Response service → Byte reader
One read can contain partial or multiple records. It is not a token boundary.
- 02Byte reader → Complete event
Decode and retain partial text before parsing a complete event.
- 03Complete event → Draft preview
Only text additions change the draft. Progress remains provisional.
- 04Complete event → Acceptance check
Inspect the completed message and its stop reason before continuing.
- 05Draft preview → Acceptance check
A nonempty draft is insufficient without valid completion evidence.
Check your understanding: The connection ended normally and some text appeared. Can the app mark the draft complete?
Only if the service's documented completion evidence and your acceptance checks are satisfied. In the lab, the missing-done case has both a normal HTTP end and partial text, yet must remain incomplete.
CONNECT IT TO WHAT YOU KNOW
Start with something familiar.
Think of a download progress display: bytes can arrive before a complete, usable file exists. Streaming text similarly makes progress visible while the response is still being assembled.
Generated output usually has no known final size, and finished text still needs content review. SSE describes how events travel; the model service defines their meaning, while your application defines what may happen next.
Words worth knowing
- Chunk
- A portion of bytes delivered to a reader; its boundaries do not define application messages.
- Decoder
- Code that reconstructs characters from bytes and preserves unfinished characters between reads.
- Server-sent events (SSE)
- A text event format carried over HTTP, with blank lines separating event records.
- Delta
- An addition or change to a result being assembled.
- Stop reason
- The service's explanation for why a message stopped; not every reason satisfies your application's contract.
Useful foundations
Open a definition and diagram here. Your lesson stays in place.
A software contractWhat is an API?
QUICK REFERENCE / 101
What is an API?
An application programming interface (API) is an agreed way for one piece of software to use another. It specifies operations, inputs, outputs and errors. Some APIs are local functions; a web API exchanges requests and responses across a network.
An agent becomes useful through connections to business systems. Those connections need clear contracts and failure behavior.
A software development kitWhat is an SDK?
QUICK REFERENCE / 101
What is an SDK?
An SDK is a collection of code and supporting tools that helps you use a platform from a programming language. A model-provider SDK can turn a Python method call into an authenticated HTTP request and parse its response. The SDK is not the model or the remote service.
FDEs integrate models, gateways and business systems. Knowing the underlying contract lets you diagnose failures when an SDK hides details.
Units of model input and outputWhat are tokens and token budgets?
QUICK REFERENCE / 101
What are tokens and token budgets?
Tokens are the units a model uses to represent content. A token can be a word, part of a word or another encoded element. Token counts affect context capacity, output limits, latency and often price. Characters, words and tokens are not interchangeable counts.
Unbounded loops and large tool responses can exhaust cost and capacity before useful work finishes.
ONE EXAMPLE / FICTIONAL CASE
Follow the connections.
A fictional service sends Café, then pump:, then check seal. A client can show those additions as a partial draft. If the connection ends before the completion event, the same client must keep the draft incomplete rather than silently treating it as ready.
UNDERSTAND THE SYSTEM
The text arrived. Did the response finish?
Follow a fictional maintenance draft through an HTTP stream. The visible preview, event record and completion decision change independently. These are explained examples of the accompanying local lab, not a live model call.
A successful status starts the response
Read the full worked example
- 01A successful status starts the response
HTTP 200 arrives before the body finishes. The start event identifies this fictional request but supplies neither a draft nor completion. Later failure is still possible.
START: Status 200 · completion not observed
- 02The first text is a preview
The first text_delta contains Café. The preview can now show something useful, labeled partial. The accented character may span byte reads; keep the same decoder across those reads.
PARTIAL: Café · receiving · do not act
- 03Different byte slices, the same message
The lab's fragmented case feeds received data to the decoder one byte at a time. It reconstructs the same five events and text. These controlled parser slices are not measured network packets or model tokens.
FRAGMENTED: Many slices → same events → same text
- 04A clean connection end can be incomplete
The missing-done case ends the HTTP body normally after two additions. The preview says Café pump: and there is no completion event. The reader withholds it. In connection-lost, a body-read error provides another reason to withhold; remote work cannot be inferred from that error alone.
MISSING-DONE: Transport ended · message incomplete · withheld
- 05Normal completion permits content review
A valid done event reports normal completion, and the body ends without an error. The assembled text becomes ready for content review. That does not establish factual correctness or approve an agent's next action.
COMPLETE: Normal completion → ready for content review
- 06A completed message can still be withheld
The limited case has full-looking text and a done event, but its reason is length_limit. This application's contract rejects that reason. The separate malformed case cannot parse the final JSON and is also withheld.
LIMITED: Completion observed · reason not accepted
Read the connections in plain English
- 01Response service → Byte reader
One read can contain partial or multiple records. It is not a token boundary.
- 02Byte reader → Complete event
Decode and retain partial text before parsing a complete event.
- 03Complete event → Draft preview
Only text additions change the draft. Progress remains provisional.
- 04Complete event → Acceptance check
Inspect the completed message and its stop reason before continuing.
- 05Draft preview → Acceptance check
A nonempty draft is insufficient without valid completion evidence.
Check your understanding: The connection ended normally and some text appeared. Can the app mark the draft complete?
Only if the service's documented completion evidence and your acceptance checks are satisfied. In the lab, the missing-done case has both a normal HTTP end and partial text, yet must remain incomplete.
Work through it, step by step.
Separate bytes, events and tokens
A body read may contain part of a character, part of an event or multiple events. Decode and assemble the documented records. Do not use read counts as model-token counts.
What you have now: A complete event record with a known type.
Show a provisional preview
Append text additions while clearly labeling the result as partial. Assembling tool arguments does not authorize executing them.
What you have now: Visible progress with no premature action.
Check completion and acceptance
Require the service's completion evidence and an acceptable reason, then validate the assembled result. A disconnect leaves an incomplete local result and possibly an unknown remote outcome.
What you have now: A reviewable result or an explicit interruption.
STREAMING 101 · WATCH A RESPONSE TAKE SHAPE
Visible does not mean finished.
Streaming lets an application show pieces of a response while it is still arriving. Follow a small local example from the first event to the decision to use—or withhold—the text.
Whole response
A fictional maintenance service sends a sentence in three additions, then a normal completion event. Follow what becomes visible before the response is finished.
FROM RECOGNITION TO REASONING
Explain six local responses and separate progress from a completed draft.
- 01
Predict an outcome, then replay each received event beside its provisional draft. Explain why HTTP 200 and visible text are insufficient.
- 02
Compare the missing-completion rules and inspect the two bytes of é. Run the linked local Node.js lab to reproduce the observations.
- 03
Change slice size and completion requirements in separate copies; identify which change preserves meaning and which introduces a bug.
Six predictions and observations, two controlled changes and a response contract.
Compare your reasoning when you are ready
Changing byte grouping should preserve the reconstructed events and text. Removing the completion requirement promotes a partial response incorrectly. A completed message with a length-limit reason is still withheld by this example's acceptance rule. No model tokens, provider behavior or production latency were measured.
Keep notes in your own working copy. Moving through these cards does not record completion.
TURN THE IDEA INTO USEFUL WORK
You can now go deeper.
Progress, message completion and acceptance are separate observations. Preserve incomplete output as incomplete; a stream ending does not approve a tool call or prove a remote operation did no work.
Academy lessons use your existing training access. Free guides stay open.