GigaLabAI Automation for Freelancers

Setup check

Is this computer ready for the course? GigaLab checks Python and its packages, your settings, the models you can call, Redis and the optional tools, and says how to fix anything missing. The same checks run in a terminal:

Modules

Copy report gives a short text for the class chat when you ask for help: the checks and your browser ID, never a key.

1.0

Inspector

Send a message. The exact HTTP request, the raw response, the streamed chunks and every retry appear here.

3 · Few-shot examples input → the exact JSON you want back; include an ambiguous one
4 · Output contract exact JSON fields, types and allowed values
Business rules your case study's own checks, run in code after the schema

Model used for tests

How the contract becomes an API request

The parts are assembled into one request. The system field carries the instruction, the output contract and the failure policy. Each few-shot example becomes a user/assistant message pair. The enquiry goes last, inside the input variable.

Tools what the agent may ask for. The harness decides what actually runs.
Limits and stop conditions slide 90

How to run it

Run the agent

Each step: observe (what is in context) → plan (the tool call the model proposes) → act (the harness checks it, then runs, denies or asks a human) → update (the result goes back). The model proposes; the harness decides (slide 90).

Cases what the agent must do, not only what it says (slide 130)

Fallback policy what happens when a check fails (slide 129)
Syntax error (not valid JSON)
Schema error (wrong fields or types)
Business-rule error
Tool outage
Temporary API error (timeout, 429, 5xx)up to 3 attempts with backoff, then human review
Wrong API key (401)stop and alert: retrying cannot fix it
Limit reached, or a tool needs approvalhuman review
How to run it

Run the evaluation

Each case runs through the agent harness with the fallback policy on the left. A case passes only if the agent did the right thing: the right route, the right amounts, and no forbidden action. Failure tests switch on a planned failure and check that the fallback catches it.

Build in:

Agentic engineering in eight ideas

Slides 147–149, 153 and 155. Answer each quick check before you build.

1 · Agentic engineering 147

You build software by directing an AI coding agent that reads files, edits code and runs commands. You set the goal, approve the plan and verify the result.

A freelancer asks Claude Code to add SST to a quote calculator, reviews its plan, then checks the tests and the diff before committing.

2 · A coding agent is the Module 3 loop 147

Same observe → plan → act → update loop as the agent in Module 3. The tools are now your project: files, the terminal and the tests.

Module 3 harnessClaude Code
System promptCLAUDE.md: standing instructions, every session
Tool permission: allowed / approval / deniedPermission rules: allow / ask / deny
Approval pausePermission prompt, and plan approval in plan mode
Limits (steps, tokens, time)A time box, small steps, /clear between tasks
Module 4 eval casesAcceptance tests, agreed before the change

3 · Agentic engineering versus vibe coding 148

Vibe coding

Accepts whatever the AI produces. 300 generated lines, unread, because the app seems to run.

Agentic engineering

Keeps engineering discipline: clear requirements, small steps, tests, review and version control.

4 · Context and project memory 148

The agent only knows what it can read. A CLAUDE.md file in the project root gives standing instructions (commands, conventions, rules) that load in every session. It is committed to Git, so it never holds secrets.

5 · Permissions and safety 149

Claude Code asks before it edits files or runs commands, unless you allow them. Plan mode is read-only. CLAUDE.md is guidance; permission rules are the hard limits.

Allow pytest to run without asking, but keep approval for git push and for deleting files.

6 · Verification defines “done” 149

An agent saying “done” is not evidence. Passing tests, a readable diff and a run of the real program are. Agree the tests before you ask for the change: you own the requirement and the acceptance test.

compute_quote([("logo", 2)]) must return subtotal RM600.00, SST RM48.00 and total RM648.00.

7 · The renovation analogy 153

Everyday ideaTechnical concept
Contractor, fast on siteCoding agent
Agreed drawingsApproved plan
Site rulesCLAUDE.md + permissions
Inspection before payingTests and diff review

Where it stops working: a contractor carries professional liability. The agent carries none, so the reviewer does.

8 · Common mistakes 155

MistakeDo instead
Accepting changes without reading the diffReview every diff. Ask Claude to explain any line you do not understand.
One huge, vague promptBreak the work into small, testable steps, and plan first.
Secrets or client data in CLAUDE.md or promptsKeep keys in environment variables. CLAUDE.md is committed to Git.

Checking Redis…

Your keys

Only keys with your browser's prefix. Inspecting them is not logged below.

Redis commands

Every command GigaLab sent for you, newest first, as redis-cli shows it.

Topic 12 · The read-through cache

Build the key, then GET it. A hit returns the stored, validated result. A miss calls the model, checks the answer, and stores it with SET key value EX ttl (slide 105).

What goes into the key leave one out and two different requests may share an answer they should not
Guided demos
Slide 108: hit, expiry, version.
Leave one out.
Side effects.

Today’s job

Studio Reka JB, a small design studio in Johor Bahru, has an AI assistant that answers customer enquiries. You decide what the AI reads before it answers: start with Start here on the right.

The studio’s documents

What the AI’s search can find. Untick a document to hide it from the search (the search index). Two are out of date on purpose, and one is in Bahasa Melayu.

Practice or a real AI model

Import my work

Bring in what you built in Modules 2–7. Each one fills its stage, and goes into the build pack as it is.

From idea to a SaaS you can sell

Fourteen stages in four phases: define the idea and its requirements, decide the stack, the quality and the core modules every SaaS needs, design the AI (only when a feature uses it), then ship. Each stage ends in a file your coding agent will read, with blueprint.json as the source of truth. Click a stage to see what you decide there and why.

One request through your app

Drawn from your own decisions: a step you chose not to have is grey. Change a decision on the Blueprint tab and this changes with it.

Trainer console

The trainer passcode is TRAINER_PASSCODE in this exam server's .env.

The studio is the slides' case. My own business builds the same agent for your business: your price list, skills and tools.

Skill library

One folder per skill. Until the agent loads one, it sees only the names and descriptions.

Skills and agents

A skill packages the know-how for one kind of task: a name, a description of when to use it, numbered steps and optional files. An agent works toward a goal by choosing which of its permitted skills and tools to use, inside a harness that sets the rules (slides 56–59).

One agent, many skills

Prompt, tool or skill?

A prompt is one instruction. A tool is one function the app runs. A skill bundles know-how for a task: instructions plus the tools and files it needs (slide 57).

Analogy: the clinic receptionist

She keeps a binder of procedures: booking, billing and panel insurance claims. She reads the tab labels and opens only the procedure each patient needs (slide 64).

API keys

GigaLab uses the keys in the server's .env file by default: the instructor's on a class server, your own when GigaLab runs on your laptop. To use your own account, paste your key here. It stays in this browser tab (sessionStorage, cleared when the tab closes) and goes to the GigaLab server only to be forwarded to the provider. The server never saves or logs it.