As someone who posts on LinkedIn everyday, I've a fair idea on how it's to post on LinkedIn, what works and what doesn't. Recently, I started managing a company's LinkedIn page and quickly realized that it was a completely different problem.
I used the same writing style as the one on my personal LinkedIn. It didn't work well as people don't relate top company pages the way they do with personal accounts. Company pages have to sound consistent. Every post represents a brand, they need supporting evidence and has to fit a positioning rather than a personal opinion.
If one were to use chatGPT or Claude for the job, it alone had to do all the work, from research to generating hooks, drafts, maintaining the brand voice and would require constant iteration prompts to get the desired result.
So, before writing a single line of code or setting up the project, I fundamentally broke down the problem.
I need to take the topic from the user as input, then the agent needs to do the research, back the research with examples and then create a brief using which it can generate a few hook variations and post drafts, which the user can choose from, where the agent scores the drafts to help user choose the draft from given options.
But what if the user didn't like the output? That's when I thought that I need to reduce the probability of the user not liking the post.
At this point all of this was too much for one agent.
That's when I thought of building a multi-agent system, where each agent would pick up a task. This makes the pipeline easy to debug and helps me maintain separate code for each agent.
Another architectural decision was separating validation from generation. Instead of immediately moving from research to writing, I added a validation stage that could identify weak reasoning or inconsistencies before the writing process even began. The generated drafts would then go through another evaluation step, where they were scored before being presented to the user.
Throughout the building of this multi-agent LinkedIn system we would be using Python and its libraries like PyTorch and Pydantic for writing the agents, wiring them, fine tuning the models and validating output.
The project also uses RAG with ChromaDB so the system works with relevant retrieved context instead of relying entirely on the model's internal knowledge.
Currently I've built the agent pipeline, fastAPI backend.
At the time of writing this, I'm working on the Streamlit interface before moving toward deployment, reliability improvements and eventually making the system work for multiple brands.
In the next article, I'll break down the orchestrator, the component responsible for deciding how every other agent in the system works together.
Github Repo: https://github.com/Manav-N4/linkedin-agent#linkedin-agent

Top comments (0)