# AI Teachers · Connect your first Claude-backed Agentic OS draft

**The supervised, operational step after the free nine-layer course.**

The original agentic_os.py is an offline simulation. The optional **agentic_os_claude.py** makes ONE paid Claude Messages API request for ONE internal draft, then independently checks exact source quotes and requires a separate human review before local Markdown export.

It does NOT schedule tasks, connect Gmail, publish websites, execute shell commands, write to repositories, spend on behalf of customers, manage autonomous subagents or grant persistent permissions. There is no public paid-model API exposed on AI Teachers.

## 1. Prepare a safe workspace

Install Python 3.10 or later. Download and unzip the [updated Agentic OS lab ZIP](https://aiteachers.cc/downloads/ai-teachers-agentic-os-lab.zip) into a local folder. Keep the files together:

- agentic_os.py — offline training simulator
- agentic_os_claude.py — optional real-Claude draft-only client
- constitution.json — policy and admission ceilings
- demo-safe.json, demo-injection.json — fictional fixtures
- test_agentic_os.py, test_agentic_os_claude.py — offline unit tests
- README.md, LIVE-SETUP.md, RUNBOOK.md — operating guides

Do not include actual passwords, confidential customer records, health information or private account data in a beginner exercise. The real Claude API transmits approved source material to Anthropic.

## 2. Test the no-cost path first

~~~bash
python3 agentic_os.py --state ./demo-state run --task demo-safe.json
python3 agentic_os.py --state ./demo-state report
python3 -m unittest test_agentic_os.py test_agentic_os_claude.py
~~~

The demo makes no network calls. Or try the [interactive browser practice cockpit](https://aiteachers.cc/academy/agentic-os/pilot/), which runs locally and never sends practice notes to AI Teachers.

## 3. Choose your model

Read the [official model list](https://platform.claude.com/docs/en/models/overview), check your plan and prices, and verify API access. The default in this lab is Claude Sonnet 5.5. Reference prices per million tokens, October 25, 2026:

| Model ID | Input | Output |
|---|---:|---:|
| claude-haiku-5-5 (short prompts) | $0.10 | $0.50 |
| claude-sonnet-5-5 | $2 | $10 |
| claude-opus-5-5 | $4 | $20 |
| claude-fable-5-1 | $10 | $50 |

Start with Sonnet for the sample task and only use Fable after comparative evaluations justify it. Costs may change. This table is not a billing quote.

## 4. Preview the admission plan — no paid call

~~~bash
python3 agentic_os_claude.py --state ./live-state plan --task demo-safe.json --model claude-sonnet-5-5 --max-output-tokens 700
~~~

The command checks the input scope, suspicious source instructions, existing local reservations and a conservative estimated cost using the full input policy cap. It does not require an API key or charge for inference.

Default teaching ceilings: $0.05 per task and $0.25 of estimated daily reservations. Higher-cost models may be denied by design. Do not raise the ceiling merely to silence a refusal.

**Important:** These local admission checks cannot cap all costs on the Claude account, other machines or other apps. They use token-cost assumptions and are not invoice reconciliation. Set spend notifications and provider limits in Claude Console. Anthropic task budgets are advisory, NOT a hard dollar cap.

## 5. Configure your own API credential

Create a key in [Claude Console](https://platform.claude.com/). Never paste an actual key into an AI Teachers page, workbook, chat message, screenshot, repository or browser-based application.

macOS/Linux, current terminal window:

~~~bash
export ANTHROPIC_API_KEY="your-private-key-set-locally"
~~~

Windows PowerShell, current session:

~~~powershell
$env:ANTHROPIC_API_KEY = "your-private-key-set-locally"
~~~

Use a secrets manager in longer-lived systems. These examples show where the key belongs; keep the value private.

If the API key is authorized for multiple Claude workspaces, use a workspace-scoped key or set ANTHROPIC_WORKSPACE_ID privately in the same terminal. The API requires the workspace ID for keys that aren't scoped to a specific workspace. Do not put the workspace credentials in web forms.

## 6. Explicitly authorize one potentially billable request

~~~bash
python3 agentic_os_claude.py --state ./live-state run --task demo-safe.json --model claude-sonnet-5-5 --max-output-tokens 700 --confirm-paid-api-use
~~~

This is the first step that may charge tokens. The runner reserves estimated spend BEFORE sending, makes one Messages API request, records reported input/output usage and runs structural source checks. No automatic retries and NO API tools are enabled.

A successful result is NEEDS_HUMAN_REVIEW, not a published artifact. An inaccurate claim quote produces REJECTED. If a request times out or fails, inspect actual provider usage before giving it a fresh task ID and rerunning.

## 7. Human source review

Inspect the local live-state/live-events.jsonl file. Compare each excerpt to the source and check summary quality, recommendations, ownership and unconfirmed facts.

~~~bash
python3 agentic_os_claude.py --state ./live-state review --task-id feedback-safe-001 --reviewer learner --decision approve
~~~

You may instead use --decision reject. This local reviewer label is not authenticated identity; it is a teaching review record, not legal approval, a digital signature or external-action permission.

## 8. Export an approved LOCAL draft

~~~bash
python3 agentic_os_claude.py --state ./live-state export --task-id feedback-safe-001 --output approved-feedback-draft.md
~~~

The program requires a reviewed draft and refuses to overwrite files. Export does not send, upload, schedule or publish anything.

## 9. Check the ledger

~~~bash
python3 agentic_os_claude.py --state ./live-state report
~~~

The local ledger holds reservations, returned usage, the draft, verification findings and review decision. It is NOT tamper-proof or multi-host atomic and does not implement a global account billing cap.

## Before real external tools

A production workflow needs identified users, least-privilege scopes, separate server-side approval/execution, audited transactional reservations, resilient queues, strict idempotency, monitored token/usage reconciliation, safe secrets handling, data protection, real adversarial tests and incident response.

**Do not publish this local script as an unauthenticated paid API.** The browser simulator is safe to share publicly because it makes no model calls, sends no practice notes and has no write access to connected accounts.

Official documents:
- https://platform.claude.com/docs/en/api/messages/create
- https://platform.claude.com/docs/en/build-with-claude/structured-outputs
- https://platform.claude.com/docs/en/models/overview
- https://platform.claude.com/docs/en/build-with-claude/task-budgets

AI Teachers · Updated October 25, 2026.
