Skip to content
Available for new work
Pages in Blog

ReferencePremium

CoullWorks Blog for Laravel AI writer reference

The AI providers, run steps and statuses, prompts and the spend and retention behaviour.

Updated 16 November 2026Back to the package pageBuy

The AI Writer module is off until coullworks-blog.ai.enabled is true. Configuration keys are listed in the configuration reference.

Providers#

NameValuesWhat it is
Provider: openaiCapabilities: AiProvider, MakesImages, ResearchesWeb, WritesStructured. Models: gpt-6.1-sol (default), gpt-6-astra, gpt-6-luna; images gpt-image-2.5-flare (default), gpt-image-2.5-sunburst; endpoints /v1/responses and /v1/images/generations. Keys stored encrypted per blog (ai_credentials); custom provider: tag a class implementing AiProvider with cwb.ai-providers.
Provider: geminiCapabilities: AiProvider, MakesImages. Models: images only: gemini-3-pro-image; no text models. Keys stored encrypted per blog (ai_credentials); custom provider: tag a class implementing AiProvider with cwb.ai-providers.

Writer#

NameValuesWhat it is
Run steps enumresearch, outline, write, images, reviewThe steps an AI writer run goes through.
Run kindsnew, refreshWhether a run writes a new article or refreshes an existing one.
Run statusesqueued, running, done, failed, cancelledThe states of an AI writer run.
Generation kinds (spend ledger)research, outline, article, meta, image, refresh_diffThe kinds of provider call recorded in the spend ledger.
Generation statusesrunning, done, failedThe states of one recorded provider call.
Run-post rolecreated, refreshedHow a run relates to a post: it created the post, or refreshed it.

Prompts#

NameValuesWhat it is
Prompt asset: humanizer-v2Rules the writer must follow so the text does not read machine-written; local HumanizerCheck scores 100 and takes 12 off per finding. Versioned; sent as written.
Prompt asset: research-v1Research step prompt (web research with sources and claims). Versioned; sent as written.
Prompt asset: writer-v1Outline/article writing prompt. Versioned; sent as written.
Prompt asset: refresh-v1Refresh prompt (diff against the existing article). Versioned; sent as written.
Prompt asset: image-v1Image prompt. Versioned; sent as written.

Behaviour#

NameValuesWhat it is
Spend guardMonthly cap and hourly call limit are checked before each provider call; a reservation priced from max_tokens is written first (cache lock cwb-ai-spend:{blog}); settle() records real usage; SpendCapExceeded / RateLimitExceeded refuse the call.
Writer block typesConfig ai.writer_block_types: heading, text, callout, table; takeaways, FAQ, images and sources are added by code.
Credential storePer-blog provider keys encrypted at rest; only last four characters ever shown; key field write-only; "Check key" calls the provider models endpoint.
Claims and sourcesResearch stores ai_sources and ai_claims; pinned sources are kept, dropped ones excluded; citations contributor adds sources to SEO output (CitationContributor).
Retentioncwb:ai-prune deletes stored output older than ai.retention_days; runs, sources, claims and usage stay.
Drafts onlyDraftSaver creates a draft; the queue never publishes.

Queue#

NameValuesWhat it is
Queue item statesqueued, running, done, failed, paused, cancelledThe states of an item in the bulk queue.

Available for new work

UK based · PHP · Python · JS · TS. Every first call is free.