Skip to content

Create smart bookmark

POST
/api/browser/bookmark

Create AI-enhanced bookmark with automatic tagging, summarization, and suggestions.

Creates intelligent bookmark with AI-generated tags, one-sentence summary, and usage suggestions for project integration. Stores bookmark in ChromaDB for semantic searchability and retrieval. Supports both manual and AI-assisted bookmark creation.

Request Body:

  • url: URL to bookmark (required)
  • title: Page title
  • content: Page content for AI analysis
  • project: Project context for organization (default: “general”)
  • tags: User-defined tags for categorization
  • ai_analysis: Enable AI tagging and analysis (default: true)

Returns:

  • BookmarkResponse containing:
    • bookmark_id: Unique identifier for the created bookmark
    • ai_tags: AI-generated tags for categorization (5-7 tags)
    • ai_summary: AI-generated one-sentence summary
    • suggestions: AI-generated usage suggestions for project

Raises:

  • HTTPException 500: For unexpected errors during bookmark creation

AI Analysis (when enabled):

  • Generates 5-7 relevant tags for categorization
  • Creates concise one-sentence summary
  • Suggests how content could be used in project
  • Analyzes content for context and relevance

ChromaDB Storage:

  • Stored in “ishvana_bookmarks” collection
  • Searchable by content, tags, title, and summary
  • Queryable by project and tag filters

Example Request:

{
    "url": "https://example.com/vector-db-intro",
    "title": "Introduction to Vector Databases",
    "content": "Vector databases enable semantic search...",
    "project": "research",
    "tags": ["database", "ai"],
    "ai_analysis": true
}

Example Response:

{
    "bookmark_id": "bookmark_1702905000",
    "ai_tags": ["vector-database", "semantic-search", "embeddings"],
    "ai_summary": "Guide to vector databases and semantic search.",
    "suggestions": [
        "Reference for database selection in AI projects",
        "Include in technical documentation",
        "Consider for research paper citations"
    ]
}
BookmarkRequest

Request model for creating AI-enhanced smart bookmarks.

Used for creating intelligent bookmarks with automatic AI tagging, summarization, and project relevance analysis for efficient knowledge management.

Fields:

  • url: The URL to bookmark
  • title: The page title
  • content: The page content for analysis
  • category: Bookmark category for organization
  • description: User-provided description or notes
  • project: Project context for organization
  • tags: User-defined tags for categorization
  • ai_analysis: Whether to perform AI analysis

Categories:

  • research: Research papers and academic content
  • reference: Documentation and reference materials
  • documentation: Technical documentation and guides
  • inspiration: Creative and inspirational content
  • other: Uncategorized bookmarks

AI Analysis Features (when enabled):

  • Automatic tag generation based on content
  • Extractive summarization
  • Entity recognition
  • Project relevance scoring
  • Reading time estimation
  • Content classification

Usage: POST /api/browser/bookmark for creating smart bookmarks.

JSON Example:

{
  "url": "https://example.com/typescript-guide",
  "title": "TypeScript Best Practices",
  "content": "TypeScript is a typed superset...",
  "category": "documentation",
  "description": "Comprehensive guide to TypeScript best practices",
  "project": "ishvana_docs",
  "tags": ["typescript", "reference"],
  "aiAnalysis": true
}

Integration:

  • Bookmark Service: Creates and stores bookmarks
  • AI Analysis: Generates tags and summary if enabled
  • ChromaDB: Indexes bookmark content for semantic search
  • Frontend: Displays bookmarks with AI-generated metadata
object
url
required
Url

URL to bookmark

string format: uri
>= 1 characters <= 2083 characters
title
required
Title

Page title

string
content
required
Content

Page content

string
category
Category

Bookmark category

string
default: other /^(research|reference|documentation|inspiration|other)$/
description
Description

User-provided description or notes

string
""
project
Project

Project context

string
default: general
tags
Tags

User-defined tags

Array<string>
aiAnalysis
Aianalysis

Whether to perform AI analysis

boolean
default: true

Successful Response

BookmarkResponse

Response model for bookmark creation results - COMPLETE BOOKMARK DATA.

Contains the complete bookmark including all user-provided data, AI-generated tags, summary, and usage suggestions for knowledge organization. This is the SINGLE SOURCE OF TRUTH for bookmark structure - frontend consumes this schema.

Fields:

  • bookmark_id: Unique identifier for the bookmark
  • url: Bookmarked URL
  • title: Page title
  • content: Page content
  • category: Bookmark category (research/reference/documentation/inspiration/other)
  • description: User-provided description or notes
  • project: Project context
  • user_tags: User-defined tags
  • ai_tags: AI-generated tags for categorization
  • ai_summary: AI-generated summary of the content
  • suggestions: AI-generated suggestions for usage
  • created_at: ISO 8601 timestamp of bookmark creation

AI Tags: Generated based on content analysis, typically 3-7 tags capturing:

  • Primary topics
  • Technologies mentioned
  • Content type (tutorial, reference, etc.)
  • Difficulty level

AI Summary: 2-3 sentence summary of bookmark content and utility.

Suggestions: Actionable recommendations like:

  • “Use for React performance optimization reference”
  • “Apply patterns to Ishvana frontend components”
  • “Share with team for TypeScript best practices”

Usage: Returned from POST /api/browser/bookmark endpoint.

JSON Example:

{
  "bookmarkId": "bm_abc123",
  "url": "https://example.com/typescript-guide",
  "title": "TypeScript Best Practices",
  "content": "TypeScript is a typed superset...",
  "category": "documentation",
  "description": "Comprehensive guide to TypeScript best practices",
  "project": "ishvana_docs",
  "userTags": ["typescript", "reference"],
  "aiTags": ["typescript", "best-practices", "type-safety", "tutorial"],
  "aiSummary": "Comprehensive guide to TypeScript best practices focusing on "
    "type safety and modern patterns",
  "suggestions": [
    "Apply type narrowing patterns to Ishvana codebase",
    "Use as reference for strict TypeScript configuration",
    "Share with development team"
  ],
  "createdAt": "2024-12-20T10:30:00Z"
}
object
bookmarkId
required
Bookmarkid

Unique bookmark identifier

string
url
required
Url

Bookmarked URL

string
title
required
Title

Page title

string
content
required
Content

Page content

string
category
required
Category

Bookmark category

string
description
required
Description

User-provided description or notes

string
project
required
Project

Project context

string
userTags
Usertags

User-defined tags

Array<string>
aiTags
Aitags

AI-generated tags

Array<string>
aiSummary
Any of:
string
suggestions
Suggestions

Usage suggestions

Array<string>
createdAt
required
Createdat

ISO 8601 bookmark creation timestamp

string

Validation Error

HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object