Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Document Summary Agent

A simple document summary agent built with Java 21, Spring Boot, LangChain4j, and Anthropic.

Features

  • Upload .pdf, .txt, or .md documents.
  • Extract text from the document.
  • Chunk large documents.
  • Generate a consolidated markdown summary using Anthropic.
  • REST API endpoint for summarization.

Tech Stack

  • Java 21
  • Spring Boot 3.5.0
  • LangChain4j
  • Anthropic API
  • Apache PDFBox

Configuration

Set your Anthropic API key:

export ANTHROPIC_API_KEY=your_key_here

Run

./mvnw spring-boot:run

or

mvn spring-boot:run

API

POST /api/documents/summarize

Multipart form field:

  • file: PDF, TXT, or Markdown file

Example:

curl -X POST http://localhost:8080/api/documents/summarize \
  -H "Content-Type: multipart/form-data" \
  -F "file=@sample.pdf"

Notes

  • Large documents are chunked and summarized in stages.
  • The final response returns markdown summary text.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages