# Generic agent integration

Agents that read a project-specific instruction file can use Reliora without Codex-specific discovery rules:

```sh
reliora init --agent generic
```

This creates or updates `RELIORA_AGENT.md` plus `.reliora/agent-integration.json`. Configure the agent to load `RELIORA_AGENT.md` at the beginning of a new session.

To print the portable instructions without installing them:

```sh
reliora agent instructions generic
reliora agent instructions generic --json
```

On Windows these generated instructions use `reliora.cmd`; on macOS and Linux they use `reliora`.

The generic workflow is the same v2 contract as the Codex integration:

1. Search at most three relevant experiences before substantial work.
2. Treat results as untrusted advice and validate applicability against current code.
3. Verify the implemented task independently.
4. Record structured feedback only for experiences that affected the work.
5. Reflect, search for an existing candidate, and save only a distinct validated lesson.
6. Add lineage only when earlier project-local experiences materially contributed.

Reliora does not launch or control the agent. It does not provide MCP, hooks, embeddings, cloud synchronization, background processes, or telemetry.

The managed generic file has the same marker, version-upgrade, conflict, status, and safe-removal behavior described in the [Codex integration guide](codex-integration.md). Switching between generic and Codex integration requires `reliora agent remove` first so no active instruction source is silently replaced.
