<!-- SPDX-License-Identifier: Apache-2.0 -->
**Status:** stable · **Owner:** Developer Relations · **License:** Apache-2.0

# `governed-agent` — minimal self-governing KYE agent

The smallest runnable scaffold that satisfies the KYE Agent Dev Kit™
self-governing-by-default contract (§32 §0.3): one tool, a §52 binding at
task-start, and the §0.3 evidence family + completion envelope at task-end.

Companion playbook: [govern-your-agent](../../playbooks/govern-your-agent.md).

## Run

```bash
kye agent new my-agent --template governed-agent
cd my-agent && npm install && npm start
```

## What it emits

| When | Envelope | Schema |
|---|---|---|
| task-start | binding | `kye.agent.governance.v1` |
| each tool call | tool-call | `kye.evidence.tool_call.v1` |
| task-end | completion | `kye.agent.completion.v1` |

You write the business logic inside `withKye(...)`; the binding and the evidence
family are emitted for you. Reference shapes:
[`public/examples/agent-governance/`](../../../examples/agent-governance/).

## Files

- `src/agent.ts` — the agent handler, wrapped with `withKye(...)`.
- `package.json` — depends on `@kye/agent-dev-kit`.
