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.
"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.
Eyeballing misses changes
Manual comparison overlooks subtle but important differences.
Format matters
Different tasks need unified, context, or HTML output.
Agents need structure
A precise diff is far more useful to an agent than a prose summary.
Content can be sensitive
Diffing confidential text can’t mean sending it to a third party.
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
Adds, removes, changes
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.
Pick per task
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.
Private, logged
Parameters
The diff tool accepts these inputs when an agent calls it. Required inputs are flagged.
default: unified Optional Diff output format. unifiedcontextndiffhtml
default: 3 Optional Number of context lines (0–10).
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.
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.
What changes after you assign it
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.
Tools that work well alongside this one
Where this tool delivers value
Show exactly what changed
See the diff tool let an agent verify edits and present precise changes — on infrastructure you control.