# Auth.md: Agent-Native Registration & Autonomous Harnesses

Category: Agent Orchestration
Stack: WorkOS, MCP, OAuth2 for Agents, Sandbox Isolation

## Overview
How autonomous agents discover services, prove machine identity, exchange tokens, and call APIs without human captchas.

## The Problem
Traditional SaaS onboarding relies on interactive browser forms, captchas, and manual credit card inputs, preventing autonomous agents from consuming services independently.

## Production Rule
Implement machine-readable discovery files (auth.md) and scoped service tokens. Structure agent systems across five explicit layers: Runtime, Tools, Context, Feedback Loops, and Human Review.

## Code / Specification
File: `agent_harness_architecture.md`

```protocol spec
The 5 Layers of Autonomous Agent Systems:

1. Runtime: Sandboxed container, execution permissions, scoped credentials.
2. Tools: MCP servers, database connectors, issue tracker APIs.
3. Context: Codebase index, PRDs, database schemas, persistent rules.
4. Feedback Loops: Automated linting, test runners, assertion gates.
5. Human Review: Strategic intent check and production deployment sign-off.
```
