LinkedIn HR Agent
An agent that writes branded LinkedIn posts grounded in a company's own documents.
Architecture
How it works
- PDF · DOCX · URL · Drive
- Extract + chunk
- Local embeddings → pgvector
- Claude tool use
- Branded image card
- Review → LinkedIn / Drive
Build the knowledge base
Files, web pages and Google Drive documents are extracted, split into 500-word chunks with 50-word overlap, embedded locally with bge-small and stored in PostgreSQL with pgvector.
Pick a topic
The agent chooses a service from the company catalog and checks its memory so it doesn't repeat a recent topic.
Retrieve and write
The closest chunks are found by cosine similarity. Claude Sonnet writes the post from that context and returns it through tool calls, so the output is structured.
Make the image
Claude Haiku writes an image prompt, DALL·E renders the visual, and Pillow composes a branded card with the headline and key points.
Review and publish
Drafts appear in a Next.js dashboard for review, then publish to LinkedIn through OAuth or save to Google Drive.
Information
An HR company wanted regular LinkedIn posts that stay accurate to its own services and documents, without someone writing each one by hand.
- FastAPI
- Claude API
- pgvector
- fastembed
- Next.js
- Docker Compose