# Agents & AI Engineering

> How to build an AI agent, test it, and keep it running: frameworks, development environments, memory, tools and MCP, and Codex and Claude Code in practice.

- Source: https://www.zarifautomates.com/blog/pillar/agents-and-ai-engineering
- Posts: 45

## Agent-building course

Build a small ticket-label agent in stages: define its boundaries, add retrieval and state, then test failure and recovery. Each lesson has an exercise and a concrete deliverable.

[Download the local lab](https://www.zarifautomates.com/downloads/agent-course/agent_lab.py). The downloadable Python 3.10+ lab uses only the standard library and synthetic data. Run python3 agent_lab.py for eight boundary tests. It makes no network or model calls and does not establish production readiness.

[All labs on GitHub](https://github.com/zarif3624/agent-course-labs). Every lesson's lab, with a script that runs them all and checks each result against the recorded one.

### Define the boundaries

1. [AI APIs for Beginners: Make a Request and Handle the Response](https://www.zarifautomates.com/blog/complete-guide-ai-apis-beginners.md) — Send a request, parse its response and test API failures.
2. [Build a Webhook Receiver That Verifies and Recovers](https://www.zarifautomates.com/blog/how-to-use-webhooks-ai-automation.md) — Verify a delivery before accepting its work.
3. [Three Prompt Contracts You Can Check with Evaluation Fixtures](https://www.zarifautomates.com/blog/prompt-contracts-with-evaluation-fixtures.md) — Write three prompts with explicit output contracts.
4. [Run a Bounded Tool-Calling Loop in Python](https://www.zarifautomates.com/blog/how-to-build-an-ai-agent-with-tool-use-and-function-calling.md) — Separate a model proposal from an authorized action.
5. [Build an MCP Server and Client for a Ticket-Label Tool](https://www.zarifautomates.com/blog/how-to-build-an-ai-agent-using-mcp-model-context-protocol.md) — Run an MCP server and client; discover and test a tool.

### Add context and control

6. [Build a Small RAG Pipeline and Measure What It Misses](https://www.zarifautomates.com/blog/how-to-build-ai-agent-with-rag.md) — Filter retrieval by access and test insufficient evidence.
7. [Build Persistent Agent Memory with Updates, Expiry and Deletion](https://www.zarifautomates.com/blog/how-to-build-ai-agent-with-persistent-memory.md) — Scope and expire remembered facts.
8. [Plan and Execute: Build a Bounded Ticket Workflow](https://www.zarifautomates.com/blog/how-to-build-ai-agent-that-plans-and-executes-tasks.md) — Bound a plan and stop when a dependency fails.
9. [Human Approval for Agents: Store and Check the Exact Decision](https://www.zarifautomates.com/blog/how-to-build-ai-agent-human-in-loop-approval.md) — Bind approval to the exact proposed change.

### Evaluate failure and recovery

10. [Evaluate a Ticket Agent: Dataset, Scoring Code and Failure Report](https://www.zarifautomates.com/blog/evaluate-ai-agent-performance-reliability.md) — Run a dataset and preserve failures in explicit scoring denominators.
11. [Agent Evaluation Tools: Compare Five Options on One Ticket Task](https://www.zarifautomates.com/blog/best-ai-agent-testing-and-evaluation-tools.md) — Reproduce a local evaluation and compare tools on the same task.
12. [Agent Design Patterns: Run Four Control Flows and Their Failures](https://www.zarifautomates.com/blog/ai-agent-design-patterns-production-systems.md) — Run four control flows and inspect their failure behavior.
13. [Choose an Agent Starter: Inspect Three Repositories and Test One](https://www.zarifautomates.com/blog/best-ai-agent-template-libraries-and-starters.md) — Audit the hidden assumptions in a starter.

### Implement and review

14. [Use GitHub Copilot to Fix a Stale-Delete Bug You Can Verify](https://www.zarifautomates.com/blog/how-to-use-github-copilot-to-write-code-faster.md) — Review a constrained coding change against behavior.
15. [Use Cursor to Build a Ticket Approval Interface You Can Test](https://www.zarifautomates.com/blog/how-to-use-cursor-ai-to-build-web-applications.md) — Make one small app change with a testable contract.
16. [Build an n8n Ticket-Triage Workflow and Test Its Failure Paths](https://www.zarifautomates.com/blog/how-to-use-n8n-for-advanced-ai-workflow-automation.md) — Import and execute a ticket-triage workflow with failure fixtures.
17. [Build a Ticket Workflow with Signed Delivery and Approval](https://www.zarifautomates.com/blog/ticket-agent-workflow-capstone.md) — Connect signed delivery, retrieval and approval; verify restart and replay.

## Posts

- [CLAUDE.md and AGENTS.md: What Coding Agents Read](https://www.zarifautomates.com/blog/claude-md-and-agents-md-for-coding-agents.md) — How Claude Code and Codex load project instruction files, what belongs in them, and a worked AGENTS.md for a small Next.js repo. (2026-09-26)
- [Datalab in Practice: Marker, Surya, Chandra and the API](https://www.zarifautomates.com/blog/datalab-in-practice-marker-surya-chandra.md) — Install Marker, convert a PDF, read the output, then do the same through the Datalab API. Every command comes from the official READMEs and docs. (2026-09-26)
- [Designing the Document Review Queue](https://www.zarifautomates.com/blog/designing-the-document-review-queue.md) — Which documents a person should check, how many to spot-check, how many reviewer hours you need, and how corrections make the system better. (2026-09-26)
- [Document AI Cost at Scale: Pages Are the Small Part](https://www.zarifautomates.com/blog/document-ai-cost-at-scale.md) — Per-page prices for Datalab, Extend, Azure, Google and LLM APIs as of September 2026, and a worked example showing why human review is most of the bill. (2026-09-26)
- [Document AI Now: From OCR to Vision-Language Models](https://www.zarifautomates.com/blog/document-ai-from-ocr-to-vision-language-models.md) — What changed when document parsing moved from OCR to AI models that read the whole page, with dated examples from Datalab, Extend, Azure and Google. (2026-09-26)
- [Document AI Glossary: 30 Terms, Defined Plainly](https://www.zarifautomates.com/blog/document-ai-glossary.md) — Thirty document AI terms, from OCR and parsing to precision, review thresholds and per-page pricing, each linked to the post where it matters. (2026-09-26)
- [Extend in Practice: Schemas, Evals and Workflows](https://www.zarifautomates.com/blog/extend-in-practice-schemas-evals-workflows.md) — How Extend's extraction schemas, test sets and workflows fit together, from its docs, with a worked schema for one made-up invoice. (2026-09-26)
- [Extend vs Datalab vs Other Document Parsers](https://www.zarifautomates.com/blog/extend-vs-datalab-vs-other-document-parsers.md) — Extend, Datalab, Google, Azure and Mistral compared on one disclosed invoice task, using only documented features and published prices. (2026-09-26)
- [Git Workflows with Claude Code and Codex](https://www.zarifautomates.com/blog/git-workflows-with-coding-agents.md) — Branches, commits, worktrees and pull requests with a coding agent, plus the git actions an agent should never take without you. (2026-09-26)
- [Headless and CI Use of Coding Agents](https://www.zarifautomates.com/blog/headless-and-ci-use-of-coding-agents.md) — Run Claude Code and Codex non-interactively and in GitHub Actions: flags, the GitHub app, Codex cloud, secrets, and a worked workflow. (2026-09-26)
- [Hooks for Coding Agents: Rules the Model Can't Skip](https://www.zarifautomates.com/blog/hooks-for-coding-agents.md) — How Claude Code and Codex hooks work, the settings.json shape, and a worked hook that runs your checks before the agent commits. (2026-09-26)
- [Install Claude Code and Codex, Then Run a First Task](https://www.zarifautomates.com/blog/install-claude-code-and-codex-and-run-your-first-task.md) — Install Claude Code and Codex, sign in, give each the same broken test to fix in a practice project, and check what it changed before you keep it. (2026-09-26)
- [MCP Servers for Coding Agents: Claude Code and Codex](https://www.zarifautomates.com/blog/mcp-servers-for-coding-agents.md) — Add an MCP server to Claude Code and Codex, using GitHub's official server in read-only mode as the example, and decide what the agent may do. (2026-09-26)
- [Measure Document Extraction Accuracy Field by Field](https://www.zarifautomates.com/blog/measuring-document-extraction-accuracy.md) — Check how accurate your invoice extraction really is, field by field, with a small answer key and a tested Python script that scores every field. (2026-09-26)
- [Parse, Extract, Classify, Split: Which One You Need](https://www.zarifautomates.com/blog/parse-vs-extract-vs-classify-vs-split.md) — The four document AI operations, what each returns, and when each is the right tool, walked through one synthetic two-page invoice. (2026-09-26)
- [Plan Mode and Agent-Sized Tasks for Coding Agents](https://www.zarifautomates.com/blog/plan-mode-and-task-decomposition-for-coding-agents.md) — When to make a coding agent plan before it edits, how plan mode works in Claude Code and Codex, and how to cut a feature into small checkable tasks. (2026-09-26)
- [How to Review a Coding Agent's Diff](https://www.zarifautomates.com/blog/reviewing-coding-agent-diffs.md) — Read an agent's change in the right order: tests, deletions, dependencies and config first. A review checklist for Claude Code and Codex. (2026-09-26)
- [Skills and Reusable Instructions for Coding Agents](https://www.zarifautomates.com/blog/skills-and-reusable-instructions-for-coding-agents.md) — Write one SKILL.md that works in Claude Code, Codex and Cursor, and learn when a skill beats another line in CLAUDE.md or AGENTS.md. (2026-09-26)
- [Subagents and Parallel Work With Coding Agents](https://www.zarifautomates.com/blog/subagents-and-parallel-work-with-coding-agents.md) — Subagents, worktrees, and parallel lanes in Claude Code and Codex: how to split work so files don't collide, and what to review. (2026-09-26)
- [Agent Design Patterns: Run Four Control Flows and Their Failures](https://www.zarifautomates.com/blog/ai-agent-design-patterns-production-systems.md) — Run four small agent shapes on fake support tickets and watch what each one does when a step fails, stalls or gets an unclear request. (2026-09-17)
- [Choose an Agent Starter: Inspect Three Repositories and Test One](https://www.zarifautomates.com/blog/best-ai-agent-template-libraries-and-starters.md) — Compare a Python agent backend, a LangGraph chat UI and a full-stack chatbot, then check one starter at a fixed version without paying for model calls. (2026-09-17)
- [Agent Evaluation Tools: Compare Five Options on One Ticket Task](https://www.zarifautomates.com/blog/best-ai-agent-testing-and-evaluation-tools.md) — Run a local Pydantic Evals test, then see how Promptfoo, LangSmith, Braintrust and plain Python handle the same ten tickets and the same scoring rules. (2026-09-17)
- [AI APIs for Beginners: Make a Request and Handle the Response](https://www.zarifautomates.com/blog/complete-guide-ai-apis-beginners.md) — Make a Claude Messages API request in Python, validate its JSON response, and test authentication, rate limits and bad output with local fixtures. (2026-09-17)
- [Evaluate a Ticket Agent: Dataset, Scoring Code and Failure Report](https://www.zarifautomates.com/blog/evaluate-ai-agent-performance-reliability.md) — Run ten support-ticket cases through two simple classifiers, score what they got wrong, and keep every failure in the report. (2026-09-17)
- [Human Approval for Agents: Store and Check the Exact Decision](https://www.zarifautomates.com/blog/how-to-build-ai-agent-human-in-loop-approval.md) — Build an approval step in SQLite that refuses changed, outdated, expired or revoked requests, and never repeats finished work on retry. (2026-09-17)
- [Plan and Execute: Build a Bounded Ticket Workflow](https://www.zarifautomates.com/blog/how-to-build-ai-agent-that-plans-and-executes-tasks.md) — Run a four-step ticket workflow that checks its plan first, caps how much work it does, can be canceled, and shows what a failed step blocks. (2026-09-17)
- [Build Persistent Agent Memory with Updates, Expiry and Deletion](https://www.zarifautomates.com/blog/how-to-build-ai-agent-with-persistent-memory.md) — Build a SQLite memory store that keeps users apart, catches outdated updates, records where each value came from, and handles expiry and deletion. (2026-09-17)
- [Build a Small RAG Pipeline and Measure What It Misses](https://www.zarifautomates.com/blog/how-to-build-ai-agent-with-rag.md) — Build a six-document RAG pipeline, check its citations, filter out private and outdated documents, and measure the synonym question it misses. (2026-09-17)
- [Build an MCP Server and Client for a Ticket-Label Tool](https://www.zarifautomates.com/blog/how-to-build-an-ai-agent-using-mcp-model-context-protocol.md) — Build a small Python MCP server and client, find a ticket-label tool, and test good calls, rejected inputs and protocol errors. (2026-09-17)
- [Run a Bounded Tool-Calling Loop in Python](https://www.zarifautomates.com/blog/how-to-build-an-ai-agent-with-tool-use-and-function-calling.md) — Build a Python loop where a model asks for tools and your code decides what runs, with argument checks, hard limits and ten repeatable test cases. (2026-09-17)
- [Use Cursor to Build a Ticket Approval Interface You Can Test](https://www.zarifautomates.com/blog/how-to-use-cursor-ai-to-build-web-applications.md) — Use Cursor to build a small ticket-review screen, then check that approving, refusing an outdated change and retrying all work in the browser and over HTTP. (2026-09-17)
- [Use GitHub Copilot to Fix a Stale-Delete Bug You Can Verify](https://www.zarifautomates.com/blog/how-to-use-github-copilot-to-write-code-faster.md) — Use Copilot in VS Code to fix a small SQLite delete bug. Start from two failing tests, then check the one line of SQL that matters in the patch. (2026-09-17)
- [Build a Webhook Receiver That Verifies and Recovers](https://www.zarifautomates.com/blog/how-to-use-webhooks-ai-automation.md) — Run a small Python webhook receiver on your own machine, check each request's signature, store it safely, and test what happens with duplicates and crashes. (2026-09-17)
- [Three Prompt Contracts You Can Check with Evaluation Fixtures](https://www.zarifautomates.com/blog/prompt-contracts-with-evaluation-fixtures.md) — Write three prompts with a fixed output shape, then check twelve good and bad example answers against them with a small Python script. (2026-09-17)
- [RL Environments for Coding Agents: Five Projects](https://www.zarifautomates.com/blog/rl-environments-for-coding-agents.md) — Five open projects for building practice tasks and scoring for coding agents, what each one covers, and what to check before you trust a score. (2026-09-17)
- [Build a Ticket Workflow with Signed Delivery and Approval](https://www.zarifautomates.com/blog/ticket-agent-workflow-capstone.md) — Wire a real HTTP receiver to document lookup and a stored approval, then run twelve local tests of what happens when steps fail or repeat. (2026-09-17)
- [Reactive vs Proactive AI Agents: Architecture Comparison](https://www.zarifautomates.com/blog/reactive-vs-proactive-ai-agents-architecture-comparison.md) — Reactive agents wait to be asked. Proactive agents notice things on their own. How each is built, where each breaks, and which one to start with. (2026-08-23)
- [Your Research Agent Needs an Evidence Ledger](https://www.zarifautomates.com/blog/market-research-agent-workflow-teardown.md) — Set up a research agent so every claim keeps its source, guesses are labeled as guesses, and the brief ends in a decision someone can check. (2026-08-13)
- [Agent Development Environments: Coding, RL and Runtimes](https://www.zarifautomates.com/blog/best-ai-agent-development-environments.md) — People mean three things by agent development environment: a coding agent, a place to train one, or a sandbox to run its code. Here's how to tell them apart. (2026-06-16)
- [Enterprise AI Agent Platforms: An FDE's Shortlist Test](https://www.zarifautomates.com/blog/best-ai-agent-platforms-for-enterprises.md) — Five enterprise agent platforms compared on who acts, what's saved, how they connect and who runs them, plus one pilot test to give every finalist. (2026-06-11)
- [Enterprise Document Processing Tools: How to Choose](https://www.zarifautomates.com/blog/best-enterprise-ai-document-processing-tools.md) — Datalab, ABBYY, Rossum, Google and Azure for pulling data out of documents, and the questions that decide which one fits your team. (2026-06-10)
- [Enterprise AI Knowledge Management: Choose and Pilot](https://www.zarifautomates.com/blog/best-enterprise-ai-knowledge-management-systems.md) — Compare Glean, Guru, Notion and Microsoft knowledge search on who can see what, how fast changes show up, and whether answers hold up in a pilot. (2026-06-10)
- [How to Deploy AI Agents to Production](https://www.zarifautomates.com/blog/how-to-deploy-ai-agents-to-production.md) — Seven steps to take an AI agent from your laptop to real users: hosting, storage, tests, spending limits, and how to find out when it goes wrong. (2026-05-29)
- [What Is Model Context Protocol (MCP)? How It Works in 2026](https://www.zarifautomates.com/blog/what-is-model-context-protocol-mcp.md) — What Model Context Protocol is, how AI apps use it to reach tools and data under the 2026-07-28 spec, who runs it, and how to start using or building a server. (2026-04-13)
- [How to Build a Multi-Agent AI System from Scratch](https://www.zarifautomates.com/blog/how-to-build-multi-agent-ai-system.md) — Build a multi-agent AI system: give each agent one job, pick a pattern and a framework, check every handoff, and test before you launch. (2026-03-12)

---

Check article dates and linked primary sources before acting on time-sensitive details.
