Skip to main content

AI-Powered Categorization

EchOS uses Claude AI to automatically categorize and summarize content. This feature helps organize your knowledge base with minimal manual effort.

Overview

The categorization system offers two processing modes: Both modes use Claude AI (Haiku 4.5) to analyze content and extract structured metadata.

Usage

Auto-Categorize on Save

When saving articles or YouTube videos, use the autoCategorize parameter:
Example interaction:

Categorize Existing Notes

Use the categorize_note tool to analyze content that’s already saved:
Example output:

Processing Modes

Lightweight Mode

Speed: ~1-2 seconds
API Cost: ~500 tokens
Output:
  • category: Single category (e.g., “programming”, “health”, “finance”)
  • tags: 3-5 relevant tags for organization
When to use:
  • Quick categorization of many items
  • When you don’t need summaries
  • Batch processing existing notes
  • Speed is more important than detail

Full Mode

Speed: ~3-5 seconds
API Cost: ~2000 tokens
Output:
  • category: Single category
  • tags: 3-5 relevant tags
  • gist: One-sentence summary (max 100 characters)
  • summary: Comprehensive summary (2-3 paragraphs)
  • keyPoints: 3-5 actionable takeaways
When to use:
  • Important articles or videos
  • Content you’ll reference frequently
  • When you need quick summaries
  • Research or learning materials

Categories

The AI automatically selects appropriate categories based on content. Common categories include:
  • programming - Software development, coding
  • machine-learning - AI, ML, data science
  • health - Fitness, nutrition, medical
  • finance - Money, investing, economics
  • personal - Personal notes, reflections
  • work - Professional, career
  • productivity - Time management, tools
  • science - Research, discoveries
  • philosophy - Ideas, thinking
  • uncategorized - Fallback when unclear
Categories are not predefined—the AI suggests the most appropriate one for each piece of content.

Technical Details

Architecture

Implementation

The categorization service is in packages/core/src/agent/categorization.ts:

Content Length Limits

  • Lightweight mode: First 5,000 characters analyzed
  • Full mode: First 10,000 characters analyzed
Longer content is automatically truncated. This balances quality with API costs.

Error Handling

The service includes robust error handling:
Errors are logged but don’t prevent content from being saved.

Configuration

Categorization requires an Anthropic API key in .env:
The feature is automatically available once the key is configured. No additional setup required.

API Reference

categorizeContent()

Parameters:
  • title: Content title
  • content: Full text content
  • mode: 'lightweight' or 'full'
  • apiKey: Anthropic API key
  • logger: Pino logger instance
Returns: For lightweight mode:
For full mode:

categorizeLightweight()

Direct access to lightweight mode processing.

processFull()

Direct access to full mode processing.

Agent Tools

categorize_note

Manually categorize existing notes:
Example:

Plugin Parameters

Both save_article and save_youtube support:

Best Practices

When to Use Lightweight Mode

  • Processing multiple items at once
  • Don’t need summaries immediately
  • Want to minimize API costs
  • Content is straightforward to categorize

When to Use Full Mode

  • Saving important reference material
  • Need quick summaries for later
  • Content is complex or technical
  • Want structured key takeaways

Manual vs. Auto-Categorization

Manual (specify category/tags in the command):
  • You know exactly how to categorize
  • Content is personal or context-specific
  • Want consistent naming
Auto (let AI decide):
  • Discovering new topics
  • Content is unfamiliar
  • Want objective categorization
  • Processing public/professional content

Batch Processing

For categorizing many existing notes:

Performance

Token Usage

Response Times

Times measured with typical article content (~3000 words):
  • Lightweight: 1-2 seconds
  • Full: 3-5 seconds
Network latency and API load can affect these times.

Cost Estimation

Based on Anthropic Claude Haiku 4.5 pricing (0.80/MTokinput,0.80/MTok input, 4/MTok output): Costs are approximate and vary by content length.

Troubleshooting

”Categorization failed”

Cause: API error, rate limit, or invalid key Fix:
  1. Check ANTHROPIC_API_KEY is valid
  2. Verify API rate limits not exceeded
  3. Check content isn’t too long (>10k chars)
  4. Review logs for specific error

Missing gist/summary in results

Cause: Using lightweight mode Fix: Use full mode instead:

Incorrect categories

Cause: Content is ambiguous or AI misinterpreted Fix:
  • Provide more context in the content
  • Manually specify category
  • Add manual tags to guide categorization

Rate limiting

Cause: Too many API requests in short time Fix:
  • Use lightweight mode for batch processing
  • Add delays between requests
  • Check Anthropic rate limits for your tier

Examples

Example 1: Save Article with Auto-Categorization

Example 2: Categorize Existing Note (Full Mode)

Example 3: Lightweight Batch Processing

Content Taxonomy

Beyond categorization (category + tags), EchOS tracks content through a lifecycle:

ContentType

ContentStatus

Status transitions:
  • Articles/YouTube start as saved — they’re in the reading list, not the knowledge base
  • Authored notes (note, journal, conversation) start as read
  • The agent auto-marks content as read when the user begins discussing it
  • Use mark_content(id, 'read') to mark explicitly, or ask the agent “I’ve read that article”

InputSource

Tracks how content was captured:
  • text — typed by user (default for create_note)
  • voice — from a transcribed voice message
  • url — from a pasted URL (save_article, save_youtube)
  • file — from a file

Filtering by Status

See Also