[ AI // Handbook ]
AI Automation Handbook
A practical handbook for building systems that use AI models correctly — from first principles to production-grade, enterprise-scale automation.
The AI Automation Handbook
This handbook teaches how to correctly build systems that use AI models to automate processes. It suits both the non-technical reader who wants to understand the possibilities and make sound decisions, and the technical reader who needs guidance aimed at building a concrete system. The documents are organized into levels that lead smoothly from basic knowledge to the professional large-project level.
How to read this handbook
The collection is organized into 5 levels. Always start with Level 1 — each following level assumes knowledge of the previous one.
- Non-technical reader: every document opens with an “In plain terms” box that gives the document's core message without technical detail. That is enough for understanding and decision-making.
- Technical reader: inside every document you will find a deeper explanation and step-by-step guides for building the system.
All 34 documents are complete and ready to read.
Level 1 — Fundamentals (01-alused/)
| # | Document | Description | Status |
|---|---|---|---|
| 1.1 | What is an AI model and how it “thinks” | What a language model is, how it works, and what its “thinking” actually means | ✅ |
| 1.2 | Capabilities and limits: what is worth automating | Which tasks suit AI and which do not, and how to decide | ✅ |
| 1.3 | Prompt fundamentals | How to write clear, reliable instructions for the model | ✅ |
| 1.4 | Where AI automation already works: use cases | Typical application areas and examples of what organizations automate with AI | ✅ |
| 1.5 | Anatomy of an AI-automated system | The system's seven parts: trigger, input data, instruction, model, checkpoint, output, and data storage | ✅ |
| 1.6 | Roles and responsibility in a project | Five roles (sponsor, builder, content designer, reviewer, maintainer) and who is responsible when AI errs | ✅ |
Level 2 — Practice (02-praktika/)
| # | Document | Description | Status |
|---|---|---|---|
| 2.1 | Toward a good prompt: structure, role, example, output format | A deeper dive: prompt templates, versions, and testing in a longer cycle | ✅ |
| 2.2 | Structured output: lists, tables, and JSON | How to get answers from the model in a predictable form | ✅ |
| 2.3 | Workflows at the basic level: steps and conditions | Multi-part processes, decision points, and conditions | ✅ |
| 2.4 | Inputs and data preparation | How to collect, clean, and format data so the model can do its job well | ✅ |
| 2.5 | The first automated workflow from start to finish | A complete example of one automated workflow from beginning to end | ✅ |
| 2.6 | Managing prompts as an asset | Storing, versioning, and reusing prompts | ✅ |
Level 3 — System Architecture (03-susteemi-ulesehitus/)
| # | Document | Description | Status |
|---|---|---|---|
| 3.1 | API integrations: calling the model from code | How to call the model from code and build it into your own system | ✅ |
| 3.2 | Context management: how the model “remembers” | Using the context window and keeping information across a conversation | ✅ |
| 3.3 | Tools and actions: let the model act | Function calling and the model's use of external systems | ✅ |
| 3.4 | Errors and error handling | What to do when the model errs or a system component fails | ✅ |
| 3.5 | Safety: limits and human-in-the-loop | How to limit the model's actions and involve a human in decisions | ✅ |
| 3.6 | Cost management: tokens, prices, budget | Measuring, forecasting, and controlling costs | ✅ |
| 3.7 | Security: keys, data, malicious instructions | API key management, data protection, and prompt injection defense | ✅ |
Level 4 — Agents & Evaluation (04-agendid-ja-mootmine/)
| # | Document | Description | Status |
|---|---|---|---|
| 4.1 | Agent systems: what they are and when you need them | Agents that plan and act independently, and whether they fit | ✅ |
| 4.2 | RAG: using your own data as a source of answers | Retrieval-augmented generation and using your own knowledge base | ✅ |
| 4.3 | Long-term memory and state management | How to keep information and state across sessions | ✅ |
| 4.4 | Multi-agent architectures | How to split a complex task's work among several agents | ✅ |
| 4.5 | Evaluation: how to know whether the system is good | Evaluation methods, test suites, and measuring quality | ✅ |
| 4.6 | Production monitoring | Tracking, alerting, and investigating quality in real use | ✅ |
| 4.7 | Performance and latency | Optimizing speed and improving the user experience | ✅ |
Level 5 — Enterprise Scale (05-suurte-projektide-tase/)
| # | Document | Description | Status |
|---|---|---|---|
| 5.1 | Architecture at scale | Architectural decisions and patterns in large systems | ✅ |
| 5.2 | Team workflows and standards | Standards, workflows, and documentation in a team | ✅ |
| 5.3 | Security and data protection (GDPR, audit) | Legal requirements, data protection, and auditability | ✅ |
| 5.4 | Cost strategy at scale | Planning and optimizing costs in large projects | ✅ |
| 5.5 | Model changes and drift | How to survive models changing and being replaced | ✅ |
| 5.6 | Continuous improvement: from measurement to decisions | How to turn measurement data into smart decisions | ✅ |
| 5.7 | Responsibility, ethics, and governance | Ethical principles and governing the system | ✅ |
| 5.8 | The template library: checklists and exemplars | Ready-made templates and checklists for practical use | ✅ |
The handbook is complete: 34 documents across five levels.
Last updated: 2026-10-05
How to read this
- Start at Level 1 and read the levels in order — each level assumes the previous one.
- Non-technical readers can rely on the “In plain terms” boxes and skip the deeper technical sections.
- Every chapter ends with a link to the next one, so the handbook can be read cover to cover.
Levels
[ Level 01 ]
Fundamentals
What AI models are, what they can and cannot do, and the anatomy of an AI-automated system.
6 docs
[ Level 02 ]
Practice
Hands-on prompt craft, structured output, workflows, data preparation, and managing prompts as an asset.
6 docs
[ Level 03 ]
System Architecture
API integrations, context management, tools, error handling, safety, costs, and security.
7 docs
[ Level 04 ]
Agents & Evaluation
Agent systems, RAG, long-term memory, multi-agent architectures, evaluation, monitoring, and latency.
7 docs
[ Level 05 ]
Enterprise Scale
Architecture at scale, team standards, GDPR and data protection, cost strategy, model drift, ethics, and templates.
8 docs
Full index
Fundamentals
Level 01
What is an AI model and how it “thinks”
What a language model is, how it predicts text one token at a time, and why that makes it flexible and powerful — yet sometimes confidently wrong.
Updated 2026-10-05
Capabilities and limits: what is worth automating
A four-question test for deciding which tasks to hand to AI, where the human stays irreplaceable, and when automation does more harm than good.
Updated 2026-10-05
Prompt fundamentals
What a prompt is and how to build reliable ones from five parts — task, context, role, output format, and examples — while avoiding five common mistakes.
Updated 2026-10-05
Where AI automation already works: use cases
Five areas where organizations already automate with AI — support, sales, admin, internal knowledge, and software — plus a simple formula for the real savings.
Updated 2026-10-05
Anatomy of an AI-automated system
The seven parts of every AI-automated system, from trigger to data storage, and the three shapes it can take: a single prompt, a workflow, or an agent.
Updated 2026-10-05
Roles and responsibility in a project
The five roles every AI automation project needs — sponsor, builder, content designer, reviewer, maintainer — and why humans stay responsible when AI errs.
Updated 2026-10-05
Practice
Level 02
Getting to a good prompt: structure, role, example, and output format
Turn a well-written prompt into a reusable prompt template with clear placeholders, and use a test cycle with acceptance criteria to make quality repeatable.
Updated 2026-10-05
Structured output: lists, tables, and JSON
Why free text fails downstream systems, when to use lists, tables, or JSON, and how to demand, repair, and validate a machine-readable model output.
Updated 2026-10-05
Basic workflows: steps and conditions
Build AI workflows step by step — each step's input, action, and output — and decide where conditions, branches, loops, and human approval steps belong.
Updated 2026-10-05
Inputs and data preparation
What separates good input data from bad: cleaning the five typical problems, formatting with clear labels, sizing data to the context window, and privacy early.
Updated 2026-10-05
Your first end-to-end automated workflow
A complete guide to building one automated workflow: goal and exclusions, the seven system parts, no-code build steps, pre-launch testing, and first-week metrics.
Updated 2026-10-05
Prompt management as an asset
Treat prompts as company assets: a shared prompt bank with six core fields, version history of what changed, why, and who approved, and safe template reuse.
Updated 2026-10-05
System Architecture
Level 03
API integrations: calling the model from your program
How your program calls an AI model directly through the API: requests, responses, API keys, rate limits, and testing the first call before production.
Updated 2026-10-05
Context management: how the model “remembers”
Why AI models have no memory, how conversation history grows, and three strategies — a limited window, summaries, and a state of affairs — for managing context.
Updated 2026-10-05
Tools and actions: let the model act
How function calling works: the model decides, your system acts. Writing tool descriptions, the flow from question to answer, and when a workflow step is enough.
Updated 2026-10-05
Errors and error handling
Five common error types in AI workflows and how to handle them: retries with limits, planned fallbacks, logging, and when to alert a human.
Updated 2026-10-05
Safety: limits and human-in-the-loop
Why independence and damage grow together, and the four safeguards — permissions, approval, a kill switch, an audit trail — that keep the human in the loop.
Updated 2026-10-05
Cost management: tokens, prices, budget
Where AI costs come from — input, output, and growing history — plus a simple estimating formula, monitoring habits, five ways to cut spend, and budget limits.
Updated 2026-10-05
Security: keys, data, prompt injection
The three security risks of AI systems — leaked API keys, over-shared data, and prompt injection — and the layered technical defenses that keep them contained.
Updated 2026-10-05
Agents & Evaluation
Level 04
Agent systems: what they are and when you need one
What makes an agent an agent — goal, tools, and decision-making freedom — when to pick a workflow instead, and why a hybrid with one agent step is often the best choice.
Updated 2026-10-05
RAG: using your own data as a source of answers
The three ways to give a model your own knowledge, the four-step RAG flow from chunking to a sourced answer, and why a RAG system needs ongoing maintenance.
Updated 2026-10-05
Long-term memory and state management
How to give an AI system memory across sessions — what to store, how to update and forget it, how to keep state, and the two risks: stale data and context poisoning.
Updated 2026-10-05
Multi-agent architectures
When one agent is no longer enough: the three multi-agent patterns, why a simple workflow usually does the orchestrating, and how costs, errors, and testing multiply.
Updated 2026-10-05
Evaluation: how to know whether a system is good
Why “looks good” is not a metric: build a test set and a golden set, track six core metrics, and catch regressions before a change reaches your customers.
Updated 2026-10-05
Production monitoring
Monitoring versus evaluation: six metrics to watch, specific alerts with thresholds, and a 15-minute weekly routine that feeds your test set and prompt updates.
Updated 2026-10-05
Performance and latency
When speed matters, the five things that slow a response down, five ways to speed it up, the speed–quality–cost triangle, and how to measure p95.
Updated 2026-10-05
Enterprise Scale
Level 05
Architecture at scale
How systems, people, keys, and logs multiply as AI automation grows — and the four architecture patterns and central gateway that keep scale manageable.
Updated 2026-10-05
Team workflows and standards
Why standards are quality assurance, not bureaucracy: the five written agreements, ownership, review flows, and onboarding that keep a growing team predictable.
Updated 2026-10-05
Security and data protection (GDPR, audit)
An educational GDPR overview for AI systems: personal data, the five core requirements, provider questions, incident response in four steps, and audit readiness.
Updated 2026-10-05
Cost strategy at scale
From one system's budget to a cost strategy: tag every euro by system, customer, and environment, set cost ceilings, review quarterly, and cap agent loops.
Updated 2026-10-05
Model updates and drift
Planned model migrations vs. silent provider changes and drift: a six-step migration process, version pinning, monitoring alerts, and a monthly golden-set run.
Updated 2026-10-05
Continuous improvement: from measurement to decisions
A five-stage monthly improvement cycle that turns monitoring numbers into decisions — collect, analyze, decide, change one thing, and verify a month later.
Updated 2026-10-05
Responsibility, ethics, and governance
Who may make which decisions: the decisions table, four ethics questions, a lean risk register, and learning from incidents instead of hunting for culprits.
Updated 2026-10-05
Template library: checklists and samples
The handbook's toolbox: four checklists for go-live, prompt changes, monthly reviews, and model changes, plus templates for prompts, decisions, and risks.
Updated 2026-10-05