Skip to main content

AI & Generation

The Ever Works Platform uses AI services to power work content generation, enrichment, and conversational features. AI providers are implemented as plugins and routed through the AiFacadeService.

Providers

AI providers are managed through the plugin system. Each provider is a plugin that implements the ai-provider capability. The platform ships with 8 AI provider plugins:

ProviderPlugin IDDefault ModelConfiguration
OpenAIopenaigpt-5.1User API key
Anthropicanthropicclaude-sonnet-4-5-20250514User API key
Google Geminigooglemodels/gemini-2.5-flashUser API key
Groqgroqmeta-llama/llama-4-scout-17b-16e-instructUser API key
Mistralmistralmistral-small-latestUser API key
Ollamaollamallama2Local (no key)
OpenRouteropenrouteropenai/gpt-5.1Hybrid (admin or user key)
Vercel AI Gatewayvercel-ai-gatewayconfigurableHybrid

Provider Capabilities

All providers support chat completions and structured output. Additional capabilities vary:

ProviderStreamingTool CallingVisionEmbeddings
OpenAIYesYesYesYes
AnthropicYesYesYesNo
Google GeminiYesYesYesYes
GroqYesYesNoNo
MistralYesYesYesNo
OllamaYesYesNoNo
OpenRouterYesYesNoNo

Configuration

Providers are configured through the plugin settings UI or environment variables. Each work can use a different AI provider.

See Built-in Plugins — AI Providers for complete configuration details for each provider.

Structured Output

The AI service supports structured output via Zod schemas through LangChain's withStructuredOutput(). This is used throughout the generation pipeline to get typed, validated responses from LLMs.

Generation Pipelines

The platform supports three generation pipelines, each implemented as a plugin. Works can select which pipeline to use.

PipelinePlugin IDApproachBest For
Standard Pipelinestandard-pipeline15-step structured pipeline with LangChainFull control, configurable steps, web search + AI extraction
Agent Pipelineagent-pipelineAutonomous AI agent with tool calling (Vercel AI SDK)Flexible, autonomous research with minimal configuration
Claude Codeclaude-codeClaude Code CLI subprocessLeverages Claude Code's built-in web search and code generation

All pipelines are orchestrated by the PipelineOrchestratorService with checkpoint/resume support.

Standard Pipeline

The default pipeline runs a 15-step process organized into 8 phases:

PhaseStepsDescription
InitializationPrompt Comparison, Prompt Processing, Domain DetectionValidate prompt, extract subject, detect domain type
Content GenerationAI First Items GenerationGenerate initial items using AI knowledge
Web SearchSearch Queries Generation, Web Search, Content Retrieval, Content FilteringDiscover and fetch relevant web pages
ExtractionItems ExtractionExtract structured items from web content
AggregationDeduplication and Data AggregationMerge AI and web items, remove duplicates
CategorizationCategories and Tags Processing, Sources ValidationAssign categories/tags, validate source URLs
EnrichmentBadges Processing, Image CaptureEvaluate badges, capture screenshots
OutputMarkdown GenerationGenerate markdown descriptions from source content

The pipeline uses plugins for each external operation — the active search plugin for web research, the active AI provider for content generation, the active content extractor for page parsing, and the active screenshot plugin for image capture.

Agent Pipeline

The Agent Pipeline uses the Vercel AI SDK's generateText with tool calling to autonomously research and generate work items. It has a parent/worker model architecture:

  • Parent model (complex model) — orchestrates the research, decides which tools to call
  • Worker model (default model) — handles content extraction from URLs

The agent has access to tools for web search, URL processing, item management, and progress reporting. It includes a circuit breaker for tool failure isolation and context compaction for managing token budgets.

5 steps: Prepare Context, Generate Items, Collect Results, Capture Screenshots, Cleanup.

Claude Code Pipeline

The Claude Code Pipeline downloads the Claude Code CLI binary, creates a temporary workspace seeded with existing work data, then runs Claude Code as a subprocess to research and generate items. It requires either an OAuth token or Anthropic API key.

6 steps: Setup Claude Code, Prepare Context, Generate Items, Collect Results, Capture Screenshots, Cleanup.

See Built-in Plugins — Pipeline for configuration details for each pipeline.

Model Router

For cost optimization, the platform includes a model router that assigns tasks to different model tiers based on complexity. See Model Router for details.