# Apprentice: Self-Improving Verifiable AI Employee

> A complete AI employee you can run and extend: does a task once, proves it worked, compiles it into an auditable skill, replays it with zero model calls, repairs only the broken step, and never changes production until a human merges a reviewed state diff.

Apprentice: Self-Improving Verifiable AI Employee is a paid AI agent skill on Agensi by Deepika Sahu, in Agents & Orchestration. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $17 (one-time purchase)
- Creator: [Deepika Sahu](https://www.agensi.io/creators/deepika-sahu)
- Category: [Agents & Orchestration](https://www.agensi.io/skills/agents-orchestration)
- Version: 1.0
- Last updated: 2026-12-02
- Security: scan passed (2026-12-02); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/apprentice-self-improving-verifiable-ai-employee
- Tags: ai-agents, llm-ops, automation, python, browser-automation, verification, sandbox, self-improving

## About this skill

### Stop trusting "done". Start verifying it.

Most agents re-think every task from scratch and ask you to trust them when they say they finished. **Apprentice** is a complete, working AI employee that proves its work, learns from it, and keeps a human in control of consequences.

#### What happens when you run it
| Moment | What you see |
|---|---|
| First task | The agent has never seen the workflow. It reads policy, drives a real Chromium browser and completes it (about 6 model calls). |
| Independent verification | A separate verifier reads the database, not the agent's words: no duplicates, only approved items, protected fields untouched, within budget, goal actually met. |
| Skill learned | The verified run is compiled into a readable JSON skill with parameters and an assertion per step. |
| Same task, new vendor | The skill replays with **0 model calls**. |
| The software changes | Replay detects the broken step and repairs **only that step** (1 call). The old target stays as a fallback. |
| Payment over the limit | The work is done, but the merge button stays locked until a human approves. |
| Malicious email | Hidden instructions are treated as data. A code-level gate blocks the change even if the model were fooled. |

Everything happens on a **sandbox branch**. You review a red and green state diff, then merge or reject. After a merge, the verifier re-checks live data and reverts automatically on failure.

#### What you get
- Full source: Python, FastAPI, Playwright, SQLite, single-file dashboard (about 1,700 lines of Python)
- 19 passing tests, runnable offline without an API key
- Governed AI employees: passports with permissions and approval limits, delegation, audit trail, control plane
- Company memory: policy notes, taught facts, recorded outcomes
- A SKILL.md so your own AI agent can install it, run the demo, explain it and extend it
- Guides: architecture map and "add a new workflow, check or employee"

#### Who it is for
Developers building AI agents who want a concrete, readable reference for verification, sandboxed execution, skill learning and agent governance, and teams who want to adapt the pattern to their own system.

#### What it is not
A hosted product. It runs on your machine against a simulated company. Parameter inference is literal string matching, goal checks are written by hand per task kind, repair handles renamed or moved elements only, and branching is SQLite and row-level. The limits are listed honestly in the README.

#### Requirements
Python 3.10+, Chromium (installed by Playwright), and one model API key: a free Gemini key or an Anthropic key.

Also by this creator: Verified Task Runner, Trace-to-Skill Compiler, and Agent Guardrails and Passports, the same ideas as lightweight skills.

## Requires

- Python 3.10+
- Gemini API key (free from aistudio.google.com) or Anthropic API key
- Chromium
- Playwright
- Optional: anthropic Python package (only if you use an Anthropic key)

Runs locally against a simulated company. Set your API key in your own terminal; the skill never writes it to a file. About 300 MB disk for Chromium. No key needed to run the offline test suite.

## Known limitations

String-match parameter inference. Hand-written goal checks required. Row-level SQLite branching. Single-threaded execution only.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Apprentice: Self-Improving Verifiable AI Employee skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### Do I need an API key?

To run live tasks, yes: a free Gemini key or an Anthropic key. To run the 19 tests and the pipeline with an offline test double, no key is needed.

### Does it touch real company data?

No. It runs against a simulated finance company on your own machine. Nothing is sent anywhere except model requests to the provider you choose.

### Can I point it at my own system?

Yes, but you add three things: a page or system to act on, a goal check in the verifier, and capability mappings. The agent loop, skill engine, browser tools and gates stay unchanged. The guide in references/add-a-workflow.md walks through it. Use a staging copy, never production.

### What happens if the model is tricked by a malicious email?

Three layers: page text is labelled as untrusted data, a code-level gate blocks forbidden actions regardless of the model, and the verifier confirms protected fields are unchanged. A built-in red-team mode uses a deliberately gullible model to prove the gate works.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
