AI Document Writer Orchestrator Configuration Guide
Overview
The AI Document Writer Orchestrator is a powerful tool that coordinates AI content generation with document writing, manages complex writing workflows, and provides intelligent content enhancement and formatting. It handles review and approval processes, supports template-based document generation, and integrates with DocumentWriterTool for document writing operations and various AI providers for content generation. The tool supports multiple content generation modes (generate, enhance, rewrite, translate, convert_format, template_fill, format_content, edit_content), AI edit operations (smart_format, style_enhance, content_restructure, intelligent_highlight, auto_bold_keywords, smart_paragraph, ai_proofreading), and write strategies (immediate, review, draft, staged). The tool can be configured via environment variables using the AI_DOC_WRITER_ prefix or through programmatic configuration when initializing the tool.
Using .env Files in Your Project
When using aiecs as a dependency in your project, you can store configuration in a .env file for convenience. The AI Document Writer Orchestrator reads from environment variables that are already loaded into the process, so you need to load the .env file in your application before importing aiecs tools.
Setting Up .env Files
1. Install python-dotenv:
pip install python-dotenv
2. Create a .env file in your project root:
# .env file in your project root
AI_DOC_WRITER_DEFAULT_AI_PROVIDER=openai
AI_DOC_WRITER_MAX_CONTENT_LENGTH=50000
AI_DOC_WRITER_MAX_CONCURRENT_WRITES=5
AI_DOC_WRITER_DEFAULT_TEMPERATURE=0.3
AI_DOC_WRITER_MAX_TOKENS=4000
AI_DOC_WRITER_TIMEOUT=60
AI_DOC_WRITER_ENABLE_DRAFT_MODE=true
AI_DOC_WRITER_ENABLE_CONTENT_REVIEW=true
AI_DOC_WRITER_AUTO_BACKUP_ON_AI_WRITE=true
AI_DOC_WRITER_TEMP_DIR=/tmp
3. Load the .env file in your application:
# main.py or app.py - at the top of your entry point
from dotenv import load_dotenv
# Load environment variables from .env file
# This must be done BEFORE importing aiecs tools
load_dotenv()
# Now import and use aiecs tools
from aiecs.tools.docs.ai_document_writer_orchestrator import AIDocumentWriterOrchestrator
# The tool will automatically use the environment variables
orchestrator = AIDocumentWriterOrchestrator()
Multiple Environment Files
You can use different .env files for different environments:
import os
from dotenv import load_dotenv
# Load environment-specific configuration
env = os.getenv('APP_ENV', 'development')
if env == 'production':
load_dotenv('.env.production')
elif env == 'staging':
load_dotenv('.env.staging')
else:
load_dotenv('.env.development')
from aiecs.tools.docs.ai_document_writer_orchestrator import AIDocumentWriterOrchestrator
orchestrator = AIDocumentWriterOrchestrator()
Example .env.production:
# Production settings - optimized for performance and reliability
AI_DOC_WRITER_DEFAULT_AI_PROVIDER=openai
AI_DOC_WRITER_MAX_CONTENT_LENGTH=100000
AI_DOC_WRITER_MAX_CONCURRENT_WRITES=10
AI_DOC_WRITER_DEFAULT_TEMPERATURE=0.1
AI_DOC_WRITER_MAX_TOKENS=8000
AI_DOC_WRITER_TIMEOUT=120
AI_DOC_WRITER_ENABLE_DRAFT_MODE=true
AI_DOC_WRITER_ENABLE_CONTENT_REVIEW=true
AI_DOC_WRITER_AUTO_BACKUP_ON_AI_WRITE=true
AI_DOC_WRITER_TEMP_DIR=/app/temp/writer
Example .env.development:
# Development settings - optimized for testing and debugging
AI_DOC_WRITER_DEFAULT_AI_PROVIDER=local
AI_DOC_WRITER_MAX_CONTENT_LENGTH=25000
AI_DOC_WRITER_MAX_CONCURRENT_WRITES=2
AI_DOC_WRITER_DEFAULT_TEMPERATURE=0.5
AI_DOC_WRITER_MAX_TOKENS=2000
AI_DOC_WRITER_TIMEOUT=30
AI_DOC_WRITER_ENABLE_DRAFT_MODE=false
AI_DOC_WRITER_ENABLE_CONTENT_REVIEW=false
AI_DOC_WRITER_AUTO_BACKUP_ON_AI_WRITE=false
AI_DOC_WRITER_TEMP_DIR=./temp/writer
Best Practices for .env Files
Never commit .env files to version control - Add
.envto your.gitignore:# .gitignore .env .env.local .env.*.local .env.production .env.staging
Provide a template - Create
.env.examplewith documented dummy values:# .env.example # AI Document Writer Orchestrator Configuration # Default AI provider to use AI_DOC_WRITER_DEFAULT_AI_PROVIDER=openai # Maximum content length for AI generation AI_DOC_WRITER_MAX_CONTENT_LENGTH=50000 # Maximum concurrent write operations AI_DOC_WRITER_MAX_CONCURRENT_WRITES=5 # Default temperature for AI model AI_DOC_WRITER_DEFAULT_TEMPERATURE=0.3 # Maximum tokens for AI response AI_DOC_WRITER_MAX_TOKENS=4000 # Timeout in seconds for AI operations AI_DOC_WRITER_TIMEOUT=60 # Whether to enable draft mode AI_DOC_WRITER_ENABLE_DRAFT_MODE=true # Whether to enable content review AI_DOC_WRITER_ENABLE_CONTENT_REVIEW=true # Whether to automatically backup before AI writes AI_DOC_WRITER_AUTO_BACKUP_ON_AI_WRITE=true # Temporary directory for processing AI_DOC_WRITER_TEMP_DIR=/tmp
Document your variables - Add comments explaining each setting
Use load_dotenv() early - Call it at the very top of your entry point, before any aiecs imports
Format values correctly:
Strings: Plain text:
openai,/tmpIntegers: Plain numbers:
50000,5,4000,60Floats: Decimal numbers:
0.3,0.1Booleans:
trueorfalse
Configuration Options
1. Default AI Provider
Environment Variable: AI_DOC_WRITER_DEFAULT_AI_PROVIDER
Type: String
Default: "openai"
Description: Default AI provider to use for content generation and writing operations. This provider is used when no specific provider is specified in the request.
Supported Providers:
openai- OpenAI API (default)vertex_ai- Google Vertex AIxai- XAI (xAI)local- Local AI model
Example:
export AI_DOC_WRITER_DEFAULT_AI_PROVIDER=vertex_ai
Provider Note: Ensure the selected provider is properly configured with API keys and credentials.
2. Max Content Length
Environment Variable: AI_DOC_WRITER_MAX_CONTENT_LENGTH
Type: Integer
Default: 50000
Description: Maximum content length for AI generation operations. Content longer than this will be truncated or chunked before being sent to AI providers.
Common Values:
25000- Small content (faster processing)50000- Default content (balanced)100000- Large content (comprehensive generation)200000- Very large content (maximum generation)
Example:
export AI_DOC_WRITER_MAX_CONTENT_LENGTH=100000
Content Note: Larger values allow more comprehensive content generation but may increase processing time and costs.
3. Max Concurrent Writes
Environment Variable: AI_DOC_WRITER_MAX_CONCURRENT_WRITES
Type: Integer
Default: 5
Description: Maximum number of concurrent write operations that can be processed simultaneously. This controls the parallelism of batch writing operations.
Common Values:
2- Conservative (low resource usage)5- Default (balanced)10- Aggressive (high throughput)20- Maximum (requires high resources)
Example:
export AI_DOC_WRITER_MAX_CONCURRENT_WRITES=10
Concurrency Note: Higher values increase throughput but may hit file system or AI provider limits.
4. Default Temperature
Environment Variable: AI_DOC_WRITER_DEFAULT_TEMPERATURE
Type: Float
Default: 0.3
Description: Default temperature setting for AI models. Controls the creativity and randomness of AI-generated content.
Temperature Ranges:
0.0- Deterministic (most focused)0.1- Low creativity (factual content)0.3- Moderate creativity (default, good balance)0.5- High creativity (creative content)1.0- Maximum creativity
Example:
export AI_DOC_WRITER_DEFAULT_TEMPERATURE=0.5
Temperature Note: Higher values are better for creative writing, lower values for factual content.
5. Max Tokens
Environment Variable: AI_DOC_WRITER_MAX_TOKENS
Type: Integer
Default: 4000
Description: Maximum number of tokens for AI response generation. This limits the length of AI-generated content.
Common Values:
2000- Short responses4000- Default responses8000- Long responses16000- Very long responses
Example:
export AI_DOC_WRITER_MAX_TOKENS=8000
Token Note: Higher values allow longer content generation but increase costs and processing time.
6. Timeout
Environment Variable: AI_DOC_WRITER_TIMEOUT
Type: Integer
Default: 60
Description: Timeout in seconds for AI operations. Operations that exceed this timeout will be cancelled.
Common Values:
30- Fast timeout (quick operations)60- Default timeout (balanced)120- Long timeout (complex operations)300- Very long timeout (batch operations)
Example:
export AI_DOC_WRITER_TIMEOUT=120
Timeout Note: Increase for complex content generation or slow AI providers.
7. Enable Draft Mode
Environment Variable: AI_DOC_WRITER_ENABLE_DRAFT_MODE
Type: Boolean
Default: True
Description: Whether to enable draft mode for document writing. When enabled, documents are saved as drafts before final writing.
Values:
true- Enable draft mode (default)false- Disable draft mode
Example:
export AI_DOC_WRITER_ENABLE_DRAFT_MODE=true
Draft Note: Draft mode provides safety and review capabilities for important documents.
8. Enable Content Review
Environment Variable: AI_DOC_WRITER_ENABLE_CONTENT_REVIEW
Type: Boolean
Default: True
Description: Whether to enable content review functionality. When enabled, AI-generated content is reviewed before writing.
Values:
true- Enable content review (default)false- Disable content review
Example:
export AI_DOC_WRITER_ENABLE_CONTENT_REVIEW=true
Review Note: Content review ensures quality and accuracy of AI-generated content.
9. Auto Backup on AI Write
Environment Variable: AI_DOC_WRITER_AUTO_BACKUP_ON_AI_WRITE
Type: Boolean
Default: True
Description: Whether to automatically backup documents before AI write operations. When enabled, backups are created before any AI modifications.
Values:
true- Enable auto backup (default)false- Disable auto backup
Example:
export AI_DOC_WRITER_AUTO_BACKUP_ON_AI_WRITE=true
Backup Note: Auto backup provides data protection and recovery capabilities.
10. Temp Directory
Environment Variable: AI_DOC_WRITER_TEMP_DIR
Type: String
Default: tempfile.gettempdir()
Description: Temporary directory for processing operations. This directory stores intermediate files, drafts, and processing artifacts.
Example:
export AI_DOC_WRITER_TEMP_DIR="/app/temp/writer"
Directory Note: Ensure the directory has appropriate permissions and is accessible.
Usage Examples
Example 1: Basic Environment Configuration
# Set basic AI writing parameters
export AI_DOC_WRITER_DEFAULT_AI_PROVIDER=openai
export AI_DOC_WRITER_MAX_CONTENT_LENGTH=50000
export AI_DOC_WRITER_MAX_CONCURRENT_WRITES=5
export AI_DOC_WRITER_DEFAULT_TEMPERATURE=0.3
export AI_DOC_WRITER_MAX_TOKENS=4000
export AI_DOC_WRITER_TIMEOUT=60
# Run your application
python app.py
Example 2: High-Performance Configuration
# Optimized for high throughput
export AI_DOC_WRITER_DEFAULT_AI_PROVIDER=openai
export AI_DOC_WRITER_MAX_CONTENT_LENGTH=100000
export AI_DOC_WRITER_MAX_CONCURRENT_WRITES=10
export AI_DOC_WRITER_DEFAULT_TEMPERATURE=0.1
export AI_DOC_WRITER_MAX_TOKENS=8000
export AI_DOC_WRITER_TIMEOUT=120
export AI_DOC_WRITER_ENABLE_DRAFT_MODE=true
export AI_DOC_WRITER_ENABLE_CONTENT_REVIEW=true
export AI_DOC_WRITER_AUTO_BACKUP_ON_AI_WRITE=true
Example 3: Development Configuration
# Development-friendly settings
export AI_DOC_WRITER_DEFAULT_AI_PROVIDER=local
export AI_DOC_WRITER_MAX_CONTENT_LENGTH=25000
export AI_DOC_WRITER_MAX_CONCURRENT_WRITES=2
export AI_DOC_WRITER_DEFAULT_TEMPERATURE=0.5
export AI_DOC_WRITER_MAX_TOKENS=2000
export AI_DOC_WRITER_TIMEOUT=30
export AI_DOC_WRITER_ENABLE_DRAFT_MODE=false
export AI_DOC_WRITER_ENABLE_CONTENT_REVIEW=false
export AI_DOC_WRITER_AUTO_BACKUP_ON_AI_WRITE=false
Example 4: Programmatic Configuration
from aiecs.tools.docs.ai_document_writer_orchestrator import AIDocumentWriterOrchestrator
# Initialize with custom configuration
orchestrator = AIDocumentWriterOrchestrator(config={
'default_ai_provider': 'openai',
'max_content_length': 50000,
'max_concurrent_writes': 5,
'default_temperature': 0.3,
'max_tokens': 4000,
'timeout': 60,
'enable_draft_mode': True,
'enable_content_review': True,
'auto_backup_on_ai_write': True,
'temp_dir': '/app/temp/writer'
})
Example 5: Mixed Configuration
Environment variables are used as defaults, but can be overridden programmatically:
# Set environment defaults
export AI_DOC_WRITER_MAX_CONTENT_LENGTH=50000
export AI_DOC_WRITER_DEFAULT_TEMPERATURE=0.3
# Override for specific instance
orchestrator = AIDocumentWriterOrchestrator(config={
'max_content_length': 100000, # This overrides the environment variable
'default_temperature': 0.5 # This overrides the environment variable
})
Configuration Priority
When the AI Document Writer Orchestrator is initialized, configuration values are resolved in the following order (highest to lowest priority):
Programmatic config - Values passed to the constructor
Environment variables - Values set via
AI_DOC_WRITER_*variablesDefault values - Built-in defaults as specified above
Data Type Parsing
String Values
Strings should be provided as plain text without quotes:
export AI_DOC_WRITER_DEFAULT_AI_PROVIDER=openai
export AI_DOC_WRITER_TEMP_DIR=/app/temp/writer
Integer Values
Integers should be provided as numeric strings:
export AI_DOC_WRITER_MAX_CONTENT_LENGTH=50000
export AI_DOC_WRITER_MAX_CONCURRENT_WRITES=5
export AI_DOC_WRITER_MAX_TOKENS=4000
export AI_DOC_WRITER_TIMEOUT=60
Float Values
Floats should be provided as decimal strings:
export AI_DOC_WRITER_DEFAULT_TEMPERATURE=0.3
export AI_DOC_WRITER_DEFAULT_TEMPERATURE=0.5
Boolean Values
Booleans should be provided as lowercase strings:
export AI_DOC_WRITER_ENABLE_DRAFT_MODE=true
export AI_DOC_WRITER_ENABLE_CONTENT_REVIEW=false
export AI_DOC_WRITER_AUTO_BACKUP_ON_AI_WRITE=true
Validation
Automatic Type Validation
Pydantic’s BaseSettings automatically validates configuration values:
default_ai_providermust be a valid provider stringmax_content_lengthmust be a positive integermax_concurrent_writesmust be a positive integerdefault_temperaturemust be a float between 0.0 and 2.0max_tokensmust be a positive integertimeoutmust be a positive integerenable_draft_modemust be a booleanenable_content_reviewmust be a booleanauto_backup_on_ai_writemust be a booleantemp_dirmust be a non-empty string
Runtime Validation
When processing documents, the tool validates:
AI Provider availability - Selected provider must be configured
Content length limits - Content must fit within length limits
Concurrency limits - Write count must not exceed limits
Token limits - Responses must not exceed token limits
Timeout limits - Operations must complete within timeout
Directory accessibility - Temp directory must be accessible
Content Generation Modes
The AI Document Writer Orchestrator supports various content generation modes:
Basic Modes
Generate - Generate new content from scratch
Enhance - Enhance existing content
Rewrite - Rewrite content with improvements
Translate - Translate content to different languages
Convert Format - Convert content between formats
Advanced Modes
Template Fill - Fill templates with generated content
Format Content - Format and structure content
Edit Content - Edit and modify existing content
AI Edit Operations
Smart Operations
Smart Format - AI-powered intelligent formatting
Style Enhance - Enhance content style and tone
Content Restructure - Restructure content organization
Intelligent Highlight - Smart content highlighting
Auto Bold Keywords - Automatically bold important keywords
Smart Paragraph - Optimize paragraph structure
AI Proofreading - AI-powered proofreading and correction
Write Strategies
Writing Approaches
Immediate - Write immediately without review
Review - Write after content review
Draft - Save as draft for later review
Staged - Write in stages with checkpoints
AI Providers
Supported Providers
OpenAI - OpenAI API integration
Vertex AI - Google Cloud Vertex AI
XAI - xAI integration
Local - Local AI model integration
Provider Configuration
Each provider requires specific configuration:
OpenAI:
export OPENAI_API_KEY=your-api-key
export OPENAI_ORG_ID=your-org-id # Optional
Vertex AI:
export GOOGLE_APPLICATION_CREDENTIALS=path/to/service-account.json
export GOOGLE_CLOUD_PROJECT=your-project-id
XAI:
export XAI_API_KEY=your-api-key
Local:
export LOCAL_MODEL_PATH=path/to/model
export LOCAL_MODEL_TYPE=llama2 # or other model type
Operations Supported
The AI Document Writer Orchestrator supports comprehensive document writing operations:
Basic Writing
generate_and_write- Generate content and write to documentenhance_and_write- Enhance existing content and writerewrite_and_write- Rewrite content and writetranslate_and_write- Translate content and write
Batch Operations
batch_generate_documents- Generate multiple documentsbatch_enhance_documents- Enhance multiple documentsbatch_rewrite_documents- Rewrite multiple documents
AI Edit Operations
ai_edit_document- AI-powered document editingsmart_format- Smart content formattingstyle_enhance- Style enhancementcontent_restructure- Content restructuringintelligent_highlight- Intelligent highlightingauto_bold_keywords- Automatic keyword boldingsmart_paragraph- Smart paragraph optimizationai_proofreading- AI proofreading
Template Operations
generate_from_template- Generate content from templatesfill_template- Fill template with contentcreate_template- Create new templates
Review Operations
review_ai_content- Review AI-generated contentapprove_content- Approve content for writingreject_content- Reject content and request changes
Complex Operations
orchestrate_complex_write- Orchestrate complex writing workflowsmulti_stage_write- Multi-stage writing processcollaborative_write- Collaborative writing with AI
Utility Operations
get_writing_stats- Get writing statisticslist_drafts- List available draftscleanup_temp_files- Clean up temporary files
Troubleshooting
Issue: AI Provider not available
Error: ContentGenerationError when calling AI providers
Solutions:
# Check provider configuration
export AI_DOC_WRITER_DEFAULT_AI_PROVIDER=openai
# Verify API keys
export OPENAI_API_KEY=your-valid-api-key
# Test with local provider
export AI_DOC_WRITER_DEFAULT_AI_PROVIDER=local
Issue: Content generation fails
Error: ContentGenerationError during content generation
Solutions:
Check AI provider configuration
Verify content length limits
Check token limits
Validate temperature settings
Issue: Write orchestration fails
Error: WriteOrchestrationError during write operations
Solutions:
Check DocumentWriterTool availability
Verify file permissions
Check temp directory accessibility
Validate write strategy settings
Issue: Timeout errors
Error: Operations timeout before completion
Solutions:
# Increase timeout
export AI_DOC_WRITER_TIMEOUT=120
# Reduce content length
export AI_DOC_WRITER_MAX_CONTENT_LENGTH=25000
# Reduce concurrent writes
export AI_DOC_WRITER_MAX_CONCURRENT_WRITES=2
Issue: Backup failures
Error: Auto backup operations fail
Solutions:
Check backup directory permissions
Ensure sufficient disk space
Verify backup configuration
Check file system access
Issue: Review failures
Error: Content review operations fail
Solutions:
# Disable review for testing
export AI_DOC_WRITER_ENABLE_CONTENT_REVIEW=false
# Check review configuration
# Verify review process settings
Issue: Draft mode issues
Error: Draft operations fail
Solutions:
# Disable draft mode for testing
export AI_DOC_WRITER_ENABLE_DRAFT_MODE=false
# Check draft directory permissions
# Verify draft configuration
Issue: Memory issues
Error: Out of memory during processing
Solutions:
# Reduce content length
export AI_DOC_WRITER_MAX_CONTENT_LENGTH=25000
# Reduce concurrent writes
export AI_DOC_WRITER_MAX_CONCURRENT_WRITES=2
# Reduce max tokens
export AI_DOC_WRITER_MAX_TOKENS=2000
Best Practices
Performance Optimization
Content Length Management - Balance content length for optimal processing
Concurrency Control - Set appropriate concurrent write limits
Provider Selection - Choose providers based on task requirements
Timeout Configuration - Set reasonable timeouts for operations
Token Management - Optimize token usage for cost efficiency
Error Handling
Graceful Degradation - Handle AI provider failures gracefully
Retry Logic - Implement retry for transient failures
Fallback Strategies - Provide fallback writing methods
Error Logging - Log errors for debugging and monitoring
User Feedback - Provide clear error messages
Security
API Key Management - Secure storage of API keys
Content Validation - Validate content before writing
Access Control - Control access to AI providers
Data Privacy - Ensure data privacy in AI processing
Audit Logging - Log writing activities for compliance
Resource Management
Memory Usage - Monitor memory consumption during processing
API Rate Limits - Respect provider rate limits
Cost Management - Monitor and control AI processing costs
Processing Time - Set reasonable timeouts
Cleanup - Clean up temporary files and resources
Integration
Tool Dependencies - Ensure required tools are available
API Compatibility - Maintain API compatibility
Error Propagation - Properly propagate errors
Logging Integration - Integrate with logging systems
Monitoring - Monitor tool performance and usage
Development vs Production
Development:
AI_DOC_WRITER_DEFAULT_AI_PROVIDER=local
AI_DOC_WRITER_MAX_CONTENT_LENGTH=25000
AI_DOC_WRITER_MAX_CONCURRENT_WRITES=2
AI_DOC_WRITER_DEFAULT_TEMPERATURE=0.5
AI_DOC_WRITER_MAX_TOKENS=2000
AI_DOC_WRITER_TIMEOUT=30
AI_DOC_WRITER_ENABLE_DRAFT_MODE=false
AI_DOC_WRITER_ENABLE_CONTENT_REVIEW=false
AI_DOC_WRITER_AUTO_BACKUP_ON_AI_WRITE=false
AI_DOC_WRITER_TEMP_DIR=./temp/writer
Production:
AI_DOC_WRITER_DEFAULT_AI_PROVIDER=openai
AI_DOC_WRITER_MAX_CONTENT_LENGTH=100000
AI_DOC_WRITER_MAX_CONCURRENT_WRITES=10
AI_DOC_WRITER_DEFAULT_TEMPERATURE=0.1
AI_DOC_WRITER_MAX_TOKENS=8000
AI_DOC_WRITER_TIMEOUT=120
AI_DOC_WRITER_ENABLE_DRAFT_MODE=true
AI_DOC_WRITER_ENABLE_CONTENT_REVIEW=true
AI_DOC_WRITER_AUTO_BACKUP_ON_AI_WRITE=true
AI_DOC_WRITER_TEMP_DIR=/app/temp/writer
Error Handling
Always wrap AI writing operations in try-except blocks:
from aiecs.tools.docs.ai_document_writer_orchestrator import AIDocumentWriterOrchestrator, AIDocumentWriterOrchestratorError, ContentGenerationError, WriteOrchestrationError
orchestrator = AIDocumentWriterOrchestrator()
try:
result = orchestrator.generate_and_write(
content_prompt="Write a report about AI trends",
target_file="ai_report.md",
format="markdown"
)
except ContentGenerationError as e:
print(f"Content generation error: {e}")
except WriteOrchestrationError as e:
print(f"Write orchestration error: {e}")
except AIDocumentWriterOrchestratorError as e:
print(f"Orchestrator error: {e}")
except Exception as e:
print(f"Unexpected error: {e}")
Dependencies
Core Dependencies
# Install core dependencies
pip install pydantic pydantic-settings python-dotenv
# Install AI provider dependencies
pip install openai google-cloud-aiplatform
# Install document processing dependencies
pip install python-docx openpyxl python-pptx
Optional Dependencies
# For advanced AI providers
pip install anthropic cohere
# For local AI models
pip install transformers torch
# For enhanced document processing
pip install PyPDF2 pdfplumber
# For async processing
pip install aiohttp asyncio
Verification
# Test dependency availability
try:
import pydantic
from pydantic_settings import BaseSettings
import openai
import asyncio
print("Core dependencies available")
except ImportError as e:
print(f"Missing dependency: {e}")
# Test AI provider availability
try:
import openai
print("OpenAI available")
except ImportError:
print("OpenAI not available")
try:
from google.cloud import aiplatform
print("Vertex AI available")
except ImportError:
print("Vertex AI not available")
# Test document writing availability
try:
from aiecs.tools.docs.document_writer_tool import DocumentWriterTool
print("DocumentWriterTool available")
except ImportError:
print("DocumentWriterTool not available")
# Test document creation availability
try:
from aiecs.tools.docs.document_creator_tool import DocumentCreatorTool
print("DocumentCreatorTool available")
except ImportError:
print("DocumentCreatorTool not available")
Support
For issues or questions about AI Document Writer Orchestrator configuration:
Check the tool source code for implementation details
Review AI provider documentation for specific features
Consult the main aiecs documentation for architecture overview
Test with simple documents first to isolate configuration vs. processing issues
Monitor API rate limits and costs
Verify AI provider configuration and credentials
Ensure proper content length and timeout limits
Check concurrency and token limits
Validate writing strategy and review settings