AutoBlogs is an AI-assisted content generation tool that can leverage both open-source and/or proprietary Large Language Model (LLM) agents to create high-quality, SEO-optimized content for various needs. The system integrates a human-in-the-loop workflow, ensuring that AI-generated drafts can be reviewed, edited, and refined before publishing.
Project Overview
This project aims to simplify and accelerate the process of writing contents (blog, articles, book, research papers, etc.) by combining AI automation with human editorial control. It provides a flexible framework where multiple LLM providers can be integrated to create and customize contents using a streamlit dashboard.
The contents can then be published online, like in GitHub Pages, substack, etc. and thus starting a technical writing business or freelance job becomes very easy.
Getting Started
The repository uses third-party Python SDKs that provide an API interface to interact with open-source or any proprietary LLM, like OpenAI or Anthropic Claude to generate content.
The package is available on PyPI and can be installed as follows:
pip install autoblogsThe package does not have a hard dependency on a third-party LLM SDK, but requires one based on the type of model you want to use. For example, it either requires the Anthropic SDK for the CLAUDE provider or the OpenAI SDK for all other types of providers.
Release Note(s)
Initial developmental build of AutoBlogs β an AI-assisted, human-in-the-loop content generation toolkit that supports
both a command-line interface and a Streamlit web UI.
Core Library
autoblogs.model.dataflowsβ frozen dataclassesAIModel,AIRequest, andAIResponsefor typed, immutable data flow across the generation pipeline.AIResponseexposes computed propertiestotal_tokensandword_count.autoblogs.config.constantsβAIProviderenum (CLAUDE,OPENAI,NVIDIA-NIM,LOCAL) andDraftStatelifecycle enum (PENDING,GENERATING,DRAFT,REVIEWING,APPROVED,PUBLISHED,FAILED,RETRACTED,DELETED).autoblogs.config.defaultβ module-level defaults available globally.autoblogs.error.errorβAIClientErrorfor surfacing provider/SDK failures.
Client Layer
autoblogs.client.anthropicβclaudeGeneratefunction for Claude (Anthropic SDK) using system-prompt + user-message pattern.autoblogs.client.openaiβgenerateOpenAIfunction compatible with OpenAI, NVIDIA-NIM, and local inference servers.autoblogs.manager.client.ClientManagerβ provider-agnostic client factory with lazy, selective SDK imports; raisesAIClientErrorwhen the required SDK (anthropic/openai) is not installed.
Content & Prompt Layer
autoblogs.manager.content.ContentManagerβ Jinja2-based prompt renderer withFileSystemLoader; supports topic, SEO keywords, word-count bounds, sub-section count, and a Claude-specific rendering path.- Prompt templates shipped with the package under
autoblogs/prompts/:base.txt.jinjaβ base template inherited by all content templates.python.txt.jinjaβ specialized template for Python-topic blog posts.
- File-write support:
ContentManager.writefile()persists generated Markdown content to a configurable output directory.
CLI Tool (autoblogs-cli)
- Interactive terminal workflow: displays ASCII-art banner, collects topic, generation prompt, SEO keywords, and output filename from the user.
- Full
.env/ environment-variable configuration (LLM_PROVIDER,LLM_MODEL_NAME,LLM_MODEL_APIKEY,LLM_API_BASE_URL,MAX_TOKENS,TEMPERATURE,CONTENT_OUTPUT_DIR,AGENT_PROMPT_CONTEXT). - Registered as
autoblogs-clientry-point inpyproject.toml.
Streamlit Web UI (autoblogs-ui)
- Multi-page navigation wired via
st.navigationwith five pages:- About β project overview.
- Dashboard β content dashboard.
- Create Content β form-driven generation (topic, prompt, SEO keywords); displays word count, token usage, and latency
metrics on success. - Draft Editor β tabbed Edit / Preview interface with a 600-line editable text area and live Markdown preview; separate Save to File and Download tabs for persisting or exporting drafts as
.mdfiles. - Model Settings β configure provider, model, and API credentials.
- Sidebar heading and info button (links to PyUtility GitHub).
- Custom CSS stylesheet loaded at startup via
st.markdown. - Footer rendered without inline JS (workaround for
st.markdowninnerHTML restriction). - Registered as
autoblogs-uientry-point inpyproject.toml.
CI / Automation
- Streamlit Community Cloud CI validation workflow (
.github/workflows/streamlit.yml). - PyPI publish workflow (
.github/workflows/publish.yml). - Dependabot configured to keep GitHub Actions versions up to date.