---
title: Deterministic steering and control for AI agents
seo_title: AI agent steering and control — Memrail Docs
description: Memrail gives AI agents and automated systems explicit, testable control at every consequential action—without putting probabilistic inference in charge of policy.
eyebrow: DOCUMENTATION FOR HUMANS + AGENTS
keywords: AI agent steering documentation, AI agent control layer, deterministic agent policies
last_updated: 2026-09-10
---

# Deterministic steering and control for AI agents

Memrail provides deterministic steering and control for AI agents and automated systems. It evaluates structured context against explicit policies and returns prescribed actions; your application authorizes and executes them. Models can interpret, classify, and propose without deciding what the application permits.

> Model output is input to policy, not permission to act.

## Set up your coding agent

Give Codex, Claude Code, or OpenCode this installation request:

```text
Read https://docs.memrail.com/agents/install-skill.md and install the complete Memrail skill for the coding agent I am using. Install only the skill, preserve any existing copy, and verify that SKILL.md and its references are available. Do not install the SDK or change this project.
```

Prefer your terminal? Install the skill with one command:

```bash
curl -fsSL https://docs.memrail.com/install.sh | sh
```

The installer selects a single detected agent, or stops and asks you to choose explicitly. It installs only the skill and preserves existing copies. See [Install the Memrail skill](/agents/) for agent-specific commands, review-before-run instructions, and the optional `--with-sdk` command to add the Python library inside your active project virtualenv.

## Choose your path

### Start a new application

Define the decisions that matter, name the context available at each decision point, and begin with a state-only policy in shadow mode. Follow [Start from scratch](/getting-started/) for a minimal Python integration and its TypeScript equivalent.

### Add Memrail to an existing application

Do not begin by rewriting conditionals. First map where authority already lives: prompts, controller branches, model thresholds, feature flags, queues, and human approvals. Follow [Add to an existing project](/existing-project/) and then run the [decision topology audit](/topology-audit/).

### Give the work to an agent

Install the Memrail skill, then give the agent a bounded request such as:

```text
Use the memrail skill. Audit this repository's decision topology without changing code.
Identify consequential decision points, atom sources, event gaps, and action executors.
Return a prioritized topology report and do not implement until I approve it.
```

See [Install the Memrail skill](/agents/) for agent-specific paths and a verification checklist.

## The control contract

At runtime, an integration has five parts:

1. Your application reaches a named **decision point** before a consequential action.
2. It sends typed state and tag **ATOMs**; separately ingested events provide temporal history.
3. Memrail evaluates versioned **EMUs**—deterministic condition/action policies—against that context.
4. Your application enforces execution authorization and handles the selected action through a connected executor, route, prompt, or context directive.
5. It records the material outcome so future temporal policy can reason over what actually happened.

```text
observation → typed ATOMs → named decision point → selected policy → action → event
                              └──────── decision trace ─────────┘
```

Evaluation is deterministic for the complete context, policy set, event history, evaluation time, cooldown/idempotency state, and options. Repeated requests can differ as those inputs change. Model output may enter as a runtime-validated tag such as `tag.intent == 'refund_request'`; the model does not choose the policy outcome.

## What to read next

| Goal | Read |
|---|---|
| Understand why explicit contracts matter for AI | [Why declarative agent control matters](/declarative-agent-control/) |
| Understand the model | [Core concepts](/concepts/) |
| Control tool use in an agent loop | [Agent control patterns](/agent-control/) |
| Integrate Python | [Python SDK](/python/) |
| Integrate TypeScript | [TypeScript SDK](/typescript/) |
| Write valid conditions | [Trigger DSL](/triggers/) |
| Manage rules as code | [Write EMUs](/emus/) |
| Find hidden decision authority | [Audit decision topology](/topology-audit/) |
| Improve policy from observed behavior | [Recursive self-improvement with Hindsight](/hindsight/) |
| Isolate evaluation and control rollout | [Production workflow](/production/) |

## Built for machine consumption

Every page has a canonical Markdown representation next to its HTML page. An agent can request the clean documentation URL with `Accept: text/markdown`, fetch the explicit `index.md`, or use one of the corpus indexes:

```bash
# This page as Markdown
curl -H 'Accept: text/markdown' https://docs.memrail.com/

# Documentation map for an LLM
curl https://docs.memrail.com/llms.txt

# Complete documentation corpus
curl https://docs.memrail.com/llms-full.txt
```

The Markdown pages contain full examples and context rather than summaries of the HTML. Use the page-level files for focused context windows and `llms-full.txt` for retrieval, indexing, or complete-site copy.

## Integration essentials

Start with the [integration invariants](/concepts/#integration-invariants), then run the [complete quickstart](/getting-started/). Validate definitions with the [EMU JSON Schema](/schemas/emu.schema.json) and interpret findings with the [diagnostic-code catalog](/reference/diagnostic-codes.json).

AMI means Adaptive Memory Intelligence, the decision engine behind Memrail. These guides use the v2 trigger DSL; HTTP routes retain the `/v1` prefix. The [core concepts](/concepts/) define the remaining vocabulary.
