API Reference
Programmatic access to the AI Workflow Framework
Create Website
# Create a website project
workflow = env['ai.workflow.website']
project = workflow.create_website(
name='My Business',
industry='Technology',
business_type='Software Company',
target_audience='Small businesses',
page_count=5,
description='We build custom software solutions.'
)
print(f"Created project: {project.id}")
Create Website with Strategy
# Create website with specific strategy
project = workflow.create_website_with_strategy(
strategy_code='template', # or 'scratch', 'hybrid'
name='My Business',
industry='Technology',
business_type='Software Company',
page_count=5,
)
Create Ebook
# Create an ebook project
workflow = env['ai.workflow.ebook']
project = workflow.create_ebook(
title='Digital Marketing Guide',
author='Marketing Team',
topic='Digital marketing strategies',
audience='Small business owners',
chapters=10,
tone='professional',
word_count_target=40000,
)
Process Tasks
# Get project tasks
project = env['project.project'].browse(PROJECT_ID)
for task in project.task_ids:
print(f"{task.name}: {task.ai_processing_state}")
# Process a specific task
task = env['project.task'].browse(TASK_ID)
task.process_ai_stage()
Key Models
| Model | Description |
|---|---|
ai.workflow.website |
Website generation workflow |
ai.workflow.ebook |
Ebook generation workflow |
ai.project.template |
Workflow template configuration |
ai.project.stage |
Stage configuration |
ai.template |
AI prompt templates |
ai.provider |
AI provider configuration |
ai.website.strategy |
Website strategy registry |
project.project |
Extended project |
project.task |
Extended task with AI processing |