ad-agent_architecture 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/docs/requirements.md CHANGED
@@ -1,99 +1,86 @@
1
- ### Analysis and Clarification of Workflow Documents
2
1
 
3
- The provided documents outline structured workflows for creating YouTube scripts and Medium articles using AI tools and human input. Here’s a detailed analysis based on the initial documents and the additional information provided:
4
-
5
- ### Key Insights from Both Documents
6
-
7
- 1. **Human-AI Collaboration**:
8
- - The YouTube script workflow is a complete list of steps performed primarily by AI (ChatGPT), with minimal human input, passed through various prompts to generate the output.
9
- - The Medium article workflow is similar but not fully documented, indicating the same concept for generating content from a transcript.
10
- - These workflows are common in agent automation frameworks, where AI performs most tasks, with humans providing quality assurance.
11
-
12
- 2. **Parameter Collection**:
13
- - Parameters are collected and built over time, starting with a simple project title (simple_title) for YouTube and a transcript for Medium articles.
14
- - Static input parameters like brand and target audience are crucial for defining the content's direction.
15
-
16
- 3. **Workflow Phases**:
17
- - Both workflows consist of distinct phases: research and script/article writing.
18
- - The research phase involves gathering information and generating potential content elements (titles, factsheets, topics).
19
- - The writing phase focuses on drafting, revising, and finalizing the content.
20
-
21
- 4. **Input Parameters**:
22
- - Parameters range from simple (single values) to complex (arrays of values).
23
- - Initial parameters are relatively simple but grow in complexity as the workflow progresses.
24
-
25
- 5. **Prompts and Outputs**:
26
- - Prompts are human-written text files with input parameter placeholders.
27
- - Outputs can be simple (text) or complex (arrays of values such as engaging_titles[], keywords[], topics[]).
28
- - Complex outputs generate new parameters for further steps.
29
-
30
- 6. **Human Decision Points**:
31
- - Certain steps require human decisions, such as selecting the focus_video_type from multiple generated topics.
32
- - Human input is crucial for quality assurance and final content selection.
33
-
34
- 7. **Iterative and Parallel Processes**:
35
- - Workflows often involve iterative steps, refining outputs until satisfactory results are achieved.
36
- - Parallel workflows can be initiated to explore multiple options simultaneously, using the same initial parameters but diverging paths.
37
-
38
- ### Detailed Analysis Document
39
-
40
- #### Document 1: YouTube Script Creation Workflow
41
-
42
- - **Parameters**:
43
- - Initial: simple_title (e.g., "Fotor AI tool")
44
- - Dynamic: Built over time (basic_factsheet, video_types[], focus_video_type, expanded_factsheet, topics[], keywords[], engaging_titles[], basic_script, basic_transcript, transcript_qa)
45
-
46
- - **Phases**:
47
- - **Research Phase**:
48
- 1. Generate potential titles using YouTube search.
49
- 2. Create a detailed factsheet using web search and AI tools.
50
- 3. Identify video types based on factsheet.
51
- 4. Expand factsheet with focus video type.
52
- 5. Generate engaging titles, keywords, and topics.
53
- - **Script Writing Phase**:
54
- 1. Create basic script.
55
- 2. Clean and revise transcript.
56
- 3. Fact-check and finalize transcript.
57
-
58
- - **Human Involvement**:
59
- - Decision on focus_video_type.
60
- - Final review and quality assurance.
61
-
62
- #### Document 2: Medium Article Creation Workflow
63
-
64
- - **Parameters**:
65
- - Initial: transcript (YouTube transcript)
66
- - Dynamic: article_recomendations, target_audience, outline, article_first_draft, outline_first_draft, introductions[], outline_first_draft_updated_with_intro
67
-
68
- - **Phases**:
69
- - **Research Phase**:
70
- 1. Generate article recommendations from transcript.
71
- 2. Draft the article based on target audience and recommendations.
72
- 3. Create preliminary outline from transcript.
73
- - **Writing Phase**:
74
- 1. Write the first draft following the outline.
75
- 2. Generate and critique various introductions.
76
- 3. Revise and update outline with selected introduction.
77
-
78
- - **Human Involvement**:
79
- - Selection of introduction.
80
- - Final review and quality assurance.
81
-
82
- ### Additional Insights
83
-
84
- 1. **Parameter Complexity**:
85
- - Parameters evolve from simple inputs to complex structures, incorporating arrays of values that influence subsequent steps.
86
-
87
- 2. **Iterative Processes**:
88
- - Both workflows benefit from iterative refinement, ensuring high-quality outputs before moving to the next phase.
89
-
90
- 3. **Parallel Workflows**:
91
- - Exploring multiple options simultaneously (e.g., different video types) can provide richer content and better decision-making.
92
-
93
- 4. **Independent Subtasks**:
94
- - Certain elements (like generating introductions for Medium articles) can operate independently but feed back into the main workflow, enhancing flexibility and adaptability.
95
-
96
- 5. **Cyclic Steps**:
97
- - Iterative cycles help refine outputs continuously until optimal results are achieved, demonstrating a robust approach to content creation.
98
-
99
- This structured approach to content creation leverages AI for efficiency while ensuring human oversight for quality, making it a highly effective workflow for producing engaging YouTube scripts and Medium articles.
2
+ ## Schema for AI Agents
3
+
4
+ ### Entity Relationship Diagram
5
+
6
+ ![Schema](./erd.svg)
7
+
8
+ ### Static Workflow Definition
9
+
10
+ #### Table: workflows
11
+ | Field | Type | Description |
12
+ |-------------|--------|-------------------------------------|
13
+ | id | string | Unique identifier for the workflow |
14
+ | name | string | The name of the workflow |
15
+ | description | string | A brief description of the workflow |
16
+
17
+ #### Table: sections
18
+ | Field | Type | Description |
19
+ |-------------|---------|----------------------------------------|
20
+ | id | string | Unique identifier for the section |
21
+ | name | string | The name of the section |
22
+ | description | string | A brief description of the section |
23
+ | order | integer | The order of the section in the workflow|
24
+ | workflow_id | string | Foreign key referencing workflows |
25
+
26
+ #### Table: steps
27
+ | Field | Type | Description |
28
+ |-------------|---------|-------------------------------------|
29
+ | id | string | Unique identifier for the step |
30
+ | name | string | The name of the step |
31
+ | description | string | A brief description of the step |
32
+ | order | integer | The order of the step in the section|
33
+ | section_id | string | Foreign key referencing sections |
34
+ | prompt | string | The template string for the prompt |
35
+
36
+ #### Table: attributes
37
+ | Field | Type | Description |
38
+ |-------------|---------|---------------------------------------------|
39
+ | id | string | Unique identifier for the attribute |
40
+ | name | string | The name of the attribute |
41
+ | type | string | The type of the attribute (e.g., string) |
42
+ | is_array | boolean | Indicates whether the attribute is an array |
43
+ | workflow_id | string | Foreign key referencing workflows |
44
+
45
+ #### Table: input_attributes
46
+ | Field | Type | Description |
47
+ |-------------|---------|------------------------------------|
48
+ | step_id | string | Foreign key referencing steps |
49
+ | attribute_id| string | Foreign key referencing attributes |
50
+
51
+ #### Table: output_attributes
52
+ | Field | Type | Description |
53
+ |-------------|---------|------------------------------------|
54
+ | step_id | string | Foreign key referencing steps |
55
+ | attribute_id| string | Foreign key referencing attributes |
56
+
57
+ ### Dynamic Workflow Execution
58
+
59
+ #### Table: workflow_runs
60
+ | Field | Type | Description |
61
+ |-------------|--------|---------------------------------------|
62
+ | id | string | Unique identifier for the workflow run|
63
+ | workflow_id | string | Foreign key referencing workflows |
64
+
65
+ #### Table: section_runs
66
+ | Field | Type | Description |
67
+ |-----------------|--------|----------------------------------------|
68
+ | id | string | Unique identifier for the section run |
69
+ | workflow_run_id | string | Foreign key referencing workflow_runs |
70
+ | section_id | string | Foreign key referencing sections |
71
+
72
+ #### Table: step_runs
73
+ | Field | Type | Description |
74
+ |------------------|---------|---------------------------------------------------------------------|
75
+ | id | string | Unique identifier for the step run |
76
+ | section_run_id | string | Foreign key referencing section_runs |
77
+ | step_id | string | Foreign key referencing steps |
78
+ | branch_number | integer | Branch number to distinguish different instances (branches) of the same step |
79
+
80
+ #### Table: attribute_values
81
+ | Field | Type | Description |
82
+ |---------------|--------|-----------------------------------------|
83
+ | id | string | Unique identifier for the attribute value|
84
+ | attribute_id | string | Foreign key referencing attributes |
85
+ | step_run_id | string | Foreign key referencing step_runs |
86
+ | value | text | The actual value of the attribute during the step execution |
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Ad
4
4
  module AgentArchitecture
5
- VERSION = '0.0.3'
5
+ VERSION = '0.0.4'
6
6
  end
7
7
  end
data/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "ad-agent_architecture",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "ad-agent_architecture",
9
- "version": "0.0.3",
9
+ "version": "0.0.4",
10
10
  "devDependencies": {
11
11
  "@klueless-js/semantic-release-rubygem": "github:klueless-js/semantic-release-rubygem",
12
12
  "@semantic-release/changelog": "^6.0.3",
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ad-agent_architecture",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "Architecture/Schema for AI Agents",
5
5
  "scripts": {
6
6
  "release": "semantic-release"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ad-agent_architecture
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Cruwys
@@ -47,6 +47,7 @@ files:
47
47
  - Rakefile
48
48
  - bin/console
49
49
  - bin/setup
50
+ - docs/erd.svg
50
51
  - docs/requirements.md
51
52
  - lib/ad/agent_architecture.rb
52
53
  - lib/ad/agent_architecture/version.rb