Research preview · Mastyf Foresight

Know what your agent's next action will do. Before it runs.

Foresight reads the tool call an AI agent is about to make and predicts its real consequences: which secrets it touches, whether data leaves the machine, what it deletes, and how bad it could get. It learned from 85,000+ actions executed in an instrumented sandbox.

39named effects predicted per action
98–100%of secret leaks over HTTPS, SSH and SFTP caught
85–98%of held-out attack types caught across agent frameworks
~50 msper decision on a laptop CPU, before execution
Playground

Try any action an agent might take.

Type a command, a file path, a URL or a SQL query, or pick an example. Switch to Session to write a whole agent run, one action per line, and see each step judged with everything before it. Nothing is executed.

agent → shell
Ctrl/⌘ + Enter to run
Pick an example or type an action.
Foresight will show what it would do, before it runs.
Predicting
Attack replays

Watch it catch an attack, step by step.

Real agent sessions, replayed. Each step is judged before it runs, using everything the agent did and read earlier, including text planted in the files it opened.

How it works

Consequences, not opinions.

Most guardrails judge whether text looks like an attack. Foresight learned from what actually happened.

01

Sandbox

85,000+ real actions run in isolated containers with planted fake credentials, system-call tracing and a network trap that also decrypts HTTPS and speaks SSH.

02

Observed labels

What really happened, in 39 effects: secret read, data sent out, persistence installed, mass delete, cloud metadata touched and more.

03

Foresight

A 39M-parameter model, built from scratch, learns to predict those effects from the action and the session so far, including digests of what tools returned.

04

Built for Shield

An advisor that can only make a decision stricter (warn or escalate), never looser. If it fails or is slow, Shield decides without it.

Inside the model

A foundation model for what actions do.

Foresight is a 39M-parameter byte-level transformer built and trained from scratch by Mastyf Labs, with no third-party base model. Click any stage to see what happens there, or watch a real decision run through it.

Live decision

Watch one action go through the model

1 · The action, as raw bytes
2 · 12 transformer layers
3 · What the heads predict
Pick an action above.
What makes it different

Eight design choices that set it apart.

Each is a design decision that shows up in the product: what Foresight learns from, what it tells you, and where it can run.

The sandbox

How a training label is made.

Every training action was really executed. Pick one and watch what the instrumented sandbox records. This is a simplified, representative replay of the labelling pipeline; real traces are longer.

Where it stands

The state of the art, side by side.

Judging an agent's action before it runs became an active research area in 2025–26. Here is how Foresight's design compares with the strongest published systems, as their authors describe them.

Model size

Parameters each guard needs per decision

log scale · hover for detail
Why ground truth matters. A November 2026 study of predictive guardrails found that adding world-model predictions does not reliably make agents safer when those predictions are themselves unreliable (arXiv 2611.02815). Foresight is trained and scored against what actions were observed to do, so how accurate its predictions are is something we can measure directly, not assume.

Published figures come from different benchmarks, data and hardware, so they are not a head-to-head comparison; a shared-benchmark comparison is in progress. Sources: DreamGuard 2608.05695, StepGuard 2608.24777, JANUS / Vanguard 2607.19913, LlamaFirewall 2505.03574, ShieldAgent 2503.22738.

Benchmarks

Explore the numbers yourself.

Five simulated customer deployments built from public agent traces. Thresholds are set on each deployment's first half (its burn-in) and everything below is measured on the second half, against attack types held out of training. Move the slider to trade false alarms for catches.

Catch rate and false alarms as the budget changes
All five deployments at this budget · click one to explore
Show the numbers as a table
98–100%held-out secret leaks over HTTPS, SSH and SFTP caught; 0–1.4% of similar normal network actions flagged
96–100%of attacks a sandbox confirmed did real harm, caught
0 of 2,000fault-injected decisions where a model failure made Shield more permissive
99.5%agreement between the int8 server model and the full-precision model on 648 real steps
Release gates

What passes today, and what does not yet

release candidate RC2 · advisor role
The Mastyf platform

Put a perimeter around your agents.

Foresight is part of the Mastyf platform: runtime enforcement with Shield, content checks with Protocol X, and damage ceilings with Authority.

Runtime gate

Mastyf Shield

Checks every MCP tool call against your policy before it runs, on your machine, with a full audit trail.

Download Shield
Content check

Protocol X

Reads what your agent reads and stops poisoned tool results and planted instructions.

See Protocol X
Damage ceiling

Mastyf Authority

Assumes some attacks get in and caps what any account can do, enforced where the data and irreversible actions live.

Get your free ceiling report
Community
₹0 forever

Open-source policy engine and check service, self-hosted. AGPL-3.0.

Start free
Developer Pro · launch offer
₹999 / month

Shield desktop app with Protocol X model checks, for one developer.

Get Developer Pro
Team
₹9,999 / month

Up to 10 people and 15 agent environments, with attack tests in CI.

Choose Team
Custom
Talk to us

Private or on-premises deployment for larger and regulated teams.

Contact sales