Agent Grammar Checker
An intelligent grammar and style checking interface that provides comprehensive text analysis with issue detection and correction suggestions.
Features
- Grammar Analysis: Detect grammar, spelling, and punctuation errors
- Style Suggestions: Improve clarity, tone, and readability
- Issue Management: Accept or reject individual suggestions
- Text Statistics: Word count, readability score, and issue tracking
- Real-time Editing: Live text editing with instant feedback
- Severity Levels: Error, warning, and info classifications
- Issue Categories: Grammar, spelling, style, clarity, and punctuation
- Original Text Comparison: Side-by-side before/after comparison
Examples
Basic Usage
Simple grammar checker with issue detection.
Writing review
3 suggestions | Just now
- Words
- 156
- Readability
- 78/100
- Fixed
- 2
- Remaining
- 5
Original text
Your original text with some gramatical errors and style issues that need to be fix.
Interactive Demo
Full-featured demo with text analysis and correction tools.
Writing review
4 suggestions | Just now
- Words
- 156
- Readability
- 78/100
- Fixed
- 0
- Remaining
- 4
Original text
Your original text with some gramatical errors and style issues that need to be fix.
Quick Actions:
Sample Texts:
Status: 4 issues remaining • 0 fixed • 78/100 readability score
Chat Integration
Example of how the grammar checker works within a chat conversation:
Grammar Checking Chat
Showing how the grammar checker works in a chat context
Can you check the grammar in this sentence for me? 'Their going to the store to buy some groceries for there family.'
GR
I'll analyze your text for grammar and spelling issues.
Writing review
2 suggestions | Just now
Installation
npx shadcn@latest add "https://agents-ui.github.io/agents-kit/c/agent-grammar-checker.json"API Reference
AgentGrammarChecker
| Prop | Type | Default | Description |
|---|---|---|---|
| text | string | "" | Current corrected text |
| originalText | string | "" | Original input text |
| issues | GrammarIssue[] | [] | Array of detected issues |
| stats | GrammarStats | - | Analysis statistics |
| isAnalyzing | boolean | false | Whether analysis is in progress |
| onTextChange | (text: string) => void | - | Text change callback |
| onAcceptSuggestion | (issueId: string) => void | - | Accept suggestion callback |
| onRejectSuggestion | (issueId: string) => void | - | Reject suggestion callback |
| onCopy | () => void | - | Copy text callback |
| onReanalyze | () => void | - | Re-analyze text callback |
| onRegenerateResponse | () => void | - | Regenerate callback |
| className | string | - | Additional CSS classes |
| timestamp | string | "Just now" | Display timestamp |
GrammarIssue
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | Unique issue identifier |
| type | GrammarIssueType | Yes | Issue category |
| message | string | Yes | Issue description |
| suggestion | string | Yes | Correction suggestion |
| position | { start: number; end: number } | Yes | Text position |
| severity | "error" | "warning" | "info" | Yes | Issue severity level |
GrammarIssueType
type GrammarIssueType = "grammar" | "spelling" | "style" | "clarity" | "punctuation"
GrammarStats
| Property | Type | Required | Description |
|---|---|---|---|
| wordsCount | number | Yes | Total word count |
| readabilityScore | number | Yes | Readability score (0-100) |
| issuesFixed | number | Yes | Number of fixed issues |
| totalIssues | number | Yes | Total issues detected |
Issue Severity Levels
- Error: Critical issues that affect correctness
- Warning: Important style or clarity improvements
- Info: Minor suggestions for enhancement
Issue Categories
- Grammar: Subject-verb agreement, tense consistency, etc.
- Spelling: Misspelled words and typos
- Style: Word choice, voice, and tone improvements
- Clarity: Sentence structure and readability
- Punctuation: Comma usage, capitalization, etc.