Development & Code Intelligence Tool

The Text & File Diff Tool

Compare two texts or two files and get a precise, formatted diff — unified, context, ndiff, or HTML — so an agent can show exactly what changed, on infrastructure you control.

Explore VDF AI Agents
4Diff formats supported
Text+FileCompare strings or files
PreciseLine-level differences
100%On-prem comparison
The Comparison Problem

"What changed?" deserves a precise answer

Comparing two versions of text or a file by eye is error-prone, and pasting them into a chat for a vague "what’s different?" loses the precision a real diff provides — especially when an agent needs the exact changes.

01

Eyeballing misses changes

Manual comparison overlooks subtle but important differences.

02

Format matters

Different tasks need unified, context, or HTML output.

03

Agents need structure

A precise diff is far more useful to an agent than a prose summary.

04

Content can be sensitive

Diffing confidential text can’t mean sending it to a third party.

How the Tool Works

Precise diffs, your format

Comparison

Texts or files, line by line

Exactly what changed.

The tool compares two strings or two files and produces a precise, line-level diff, so an agent — or a human — sees exactly what was added, removed, or changed.

  • Text-to-text or file-to-file
  • Line-level precision
  • Configurable context lines
  • Deterministic output
Line
Precise Diff

Adds, removes, changes

TextFilesLinesExact

Formats

Unified, context, ndiff, HTML

The right output for the task.

Choose unified or context for review, ndiff for detail, or HTML for a rendered, shareable comparison — one tool covering the formats different workflows need.

4
Formats

Pick per task

UnifiedContextndiffHTML

Governance

On-premise comparison

Content stays internal.

Diffs run inside your perimeter with audit logging, so even confidential text and files are compared without leaving your environment.

100%
On-Prem

Private, logged

On-premPrivateAudit logLocal
Inputs

Parameters

The diff tool accepts these inputs when an agent calls it. Required inputs are flagged.

Name Type Required Description
text1 string Optional First text to compare.
text2 string Optional Second text to compare.
file1 string Optional First file path (alternative to text1).
file2 string Optional Second file path (alternative to text2).
format string
default: unified
Optional Diff output format. unifiedcontextndiffhtml
context_lines integer
default: 3
Optional Number of context lines (0–10).
Where it pays back

Where the diff tool pays back

Change review

Show exactly what an edit changed before applying it.

Config comparison

Diff two config files to spot drift.

Document versions

Compare two drafts of a document precisely.

Agent self-checks

Let an agent verify its own edits with a diff.

Rendered comparisons

Produce an HTML diff to share with stakeholders.

Audit trails

Capture precise before/after changes for the record.

How VDF AI connects it

Assigned to agents, orchestrated as networks

On VDF AI, an industry’s use cases map to agents, and you assign tools like this one to those agents. Compose multiple agents into a governed, on-premise network.

ROI Snapshot

What changes after you assign it

Precise
Exact line-level changes
4
Formats for any workflow
Verifiable
Agents check their own edits
100%
Compared on-prem
FAQ

Questions about the Text & File Diff tool

What does the diff tool do?

It compares two texts or two files and returns a precise, line-level diff in unified, context, ndiff, or HTML format, so an agent can show exactly what changed.

Can it compare files, not just text?

Yes. Provide file1 and file2 to diff files, or text1 and text2 to diff strings directly.

Which format should I use?

Unified or context for review, ndiff for fine detail, and HTML for a rendered comparison you can share. Set context_lines to control how much surrounding context is shown.

Is content kept private?

Yes. Diffs run on-premise with audit logging, so confidential text and files never leave your environment.

How is it used by agents?

Agents use it to verify their own edits, compare versions, and present precise changes — often alongside code review and the document generator.

Show exactly what changed

See the diff tool let an agent verify edits and present precise changes — on infrastructure you control.