vibe-aigc 0.1.0__tar.gz → 0.2.0__tar.gz
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.
- vibe_aigc-0.2.0/PKG-INFO +179 -0
- vibe_aigc-0.2.0/README.md +144 -0
- {vibe_aigc-0.1.0 → vibe_aigc-0.2.0}/pyproject.toml +16 -3
- {vibe_aigc-0.1.0 → vibe_aigc-0.2.0}/tests/test_adaptive_replanning.py +1 -1
- vibe_aigc-0.2.0/tests/test_agents.py +231 -0
- vibe_aigc-0.2.0/tests/test_assets.py +291 -0
- vibe_aigc-0.2.0/tests/test_knowledge_base.py +161 -0
- vibe_aigc-0.2.0/tests/test_tools.py +274 -0
- vibe_aigc-0.2.0/vibe_aigc/__init__.py +101 -0
- vibe_aigc-0.2.0/vibe_aigc/agents.py +581 -0
- vibe_aigc-0.2.0/vibe_aigc/assets.py +386 -0
- vibe_aigc-0.2.0/vibe_aigc/cli.py +205 -0
- {vibe_aigc-0.1.0 → vibe_aigc-0.2.0}/vibe_aigc/executor.py +138 -8
- vibe_aigc-0.2.0/vibe_aigc/knowledge.py +398 -0
- {vibe_aigc-0.1.0 → vibe_aigc-0.2.0}/vibe_aigc/llm.py +53 -11
- {vibe_aigc-0.1.0 → vibe_aigc-0.2.0}/vibe_aigc/planner.py +38 -5
- vibe_aigc-0.2.0/vibe_aigc/tools.py +508 -0
- vibe_aigc-0.2.0/vibe_aigc/tools_multimodal.py +613 -0
- vibe_aigc-0.2.0/vibe_aigc.egg-info/PKG-INFO +179 -0
- {vibe_aigc-0.1.0 → vibe_aigc-0.2.0}/vibe_aigc.egg-info/SOURCES.txt +11 -0
- vibe_aigc-0.2.0/vibe_aigc.egg-info/entry_points.txt +2 -0
- {vibe_aigc-0.1.0 → vibe_aigc-0.2.0}/vibe_aigc.egg-info/requires.txt +5 -0
- vibe_aigc-0.1.0/PKG-INFO +0 -193
- vibe_aigc-0.1.0/README.md +0 -163
- vibe_aigc-0.1.0/vibe_aigc/__init__.py +0 -13
- vibe_aigc-0.1.0/vibe_aigc.egg-info/PKG-INFO +0 -193
- {vibe_aigc-0.1.0 → vibe_aigc-0.2.0}/LICENSE +0 -0
- {vibe_aigc-0.1.0 → vibe_aigc-0.2.0}/setup.cfg +0 -0
- {vibe_aigc-0.1.0 → vibe_aigc-0.2.0}/tests/test_auto_checkpoint.py +0 -0
- {vibe_aigc-0.1.0 → vibe_aigc-0.2.0}/tests/test_automatic_checkpoints.py +0 -0
- {vibe_aigc-0.1.0 → vibe_aigc-0.2.0}/tests/test_checkpoint_serialization.py +0 -0
- {vibe_aigc-0.1.0 → vibe_aigc-0.2.0}/tests/test_error_handling.py +0 -0
- {vibe_aigc-0.1.0 → vibe_aigc-0.2.0}/tests/test_executor.py +0 -0
- {vibe_aigc-0.1.0 → vibe_aigc-0.2.0}/tests/test_feedback_system.py +0 -0
- {vibe_aigc-0.1.0 → vibe_aigc-0.2.0}/tests/test_integration.py +0 -0
- {vibe_aigc-0.1.0 → vibe_aigc-0.2.0}/tests/test_metaplanner_resume.py +0 -0
- {vibe_aigc-0.1.0 → vibe_aigc-0.2.0}/tests/test_metaplanner_visualization.py +0 -0
- {vibe_aigc-0.1.0 → vibe_aigc-0.2.0}/tests/test_models.py +0 -0
- {vibe_aigc-0.1.0 → vibe_aigc-0.2.0}/tests/test_parallel_execution.py +0 -0
- {vibe_aigc-0.1.0 → vibe_aigc-0.2.0}/tests/test_planner.py +0 -0
- {vibe_aigc-0.1.0 → vibe_aigc-0.2.0}/tests/test_progress_callbacks.py +0 -0
- {vibe_aigc-0.1.0 → vibe_aigc-0.2.0}/tests/test_visualization.py +0 -0
- {vibe_aigc-0.1.0 → vibe_aigc-0.2.0}/tests/test_workflow_resume.py +0 -0
- {vibe_aigc-0.1.0 → vibe_aigc-0.2.0}/vibe_aigc/models.py +0 -0
- {vibe_aigc-0.1.0 → vibe_aigc-0.2.0}/vibe_aigc/persistence.py +0 -0
- {vibe_aigc-0.1.0 → vibe_aigc-0.2.0}/vibe_aigc/visualization.py +0 -0
- {vibe_aigc-0.1.0 → vibe_aigc-0.2.0}/vibe_aigc.egg-info/dependency_links.txt +0 -0
- {vibe_aigc-0.1.0 → vibe_aigc-0.2.0}/vibe_aigc.egg-info/top_level.txt +0 -0
vibe_aigc-0.2.0/PKG-INFO
ADDED
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: vibe-aigc
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: A New Paradigm for Content Generation via Agentic Orchestration
|
|
5
|
+
Author: Vibe AIGC Contributors
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://jmanhype.github.io/vibe-aigc
|
|
8
|
+
Project-URL: Repository, https://github.com/jmanhype/vibe-aigc
|
|
9
|
+
Project-URL: Documentation, https://jmanhype.github.io/vibe-aigc
|
|
10
|
+
Project-URL: Changelog, https://jmanhype.github.io/vibe-aigc/changelog
|
|
11
|
+
Project-URL: Issues, https://github.com/jmanhype/vibe-aigc/issues
|
|
12
|
+
Keywords: ai,aigc,agents,orchestration,content-generation,llm,workflow
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
18
|
+
Classifier: Typing :: Typed
|
|
19
|
+
Requires-Python: >=3.12
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
License-File: LICENSE
|
|
22
|
+
Requires-Dist: pydantic>=2.0.0
|
|
23
|
+
Requires-Dist: openai>=1.0.0
|
|
24
|
+
Provides-Extra: dev
|
|
25
|
+
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
26
|
+
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
|
|
27
|
+
Requires-Dist: black>=23.0.0; extra == "dev"
|
|
28
|
+
Requires-Dist: ruff>=0.1.0; extra == "dev"
|
|
29
|
+
Requires-Dist: mypy>=1.0.0; extra == "dev"
|
|
30
|
+
Provides-Extra: docs
|
|
31
|
+
Requires-Dist: mkdocs-material>=9.0.0; extra == "docs"
|
|
32
|
+
Requires-Dist: mkdocstrings[python]>=0.24.0; extra == "docs"
|
|
33
|
+
Requires-Dist: pymdown-extensions>=10.0.0; extra == "docs"
|
|
34
|
+
Dynamic: license-file
|
|
35
|
+
|
|
36
|
+
# Vibe AIGC
|
|
37
|
+
|
|
38
|
+
[](https://github.com/jmanhype/vibe-aigc/actions/workflows/ci.yml)
|
|
39
|
+
[](https://codecov.io/gh/jmanhype/vibe-aigc)
|
|
40
|
+
[](https://pypi.org/project/vibe-aigc/)
|
|
41
|
+
[](https://www.python.org/downloads/)
|
|
42
|
+
[](https://opensource.org/licenses/MIT)
|
|
43
|
+
[](https://jmanhype.github.io/vibe-aigc)
|
|
44
|
+
|
|
45
|
+
**A New Paradigm for Content Generation via Agentic Orchestration**
|
|
46
|
+
|
|
47
|
+
Based on [arXiv:2602.04575](https://arxiv.org/abs/2602.04575)
|
|
48
|
+
|
|
49
|
+
📚 **[Documentation](https://jmanhype.github.io/vibe-aigc)** | 🚀 **[Quick Start](https://jmanhype.github.io/vibe-aigc/getting-started/quickstart/)** | 📖 **[API Reference](https://jmanhype.github.io/vibe-aigc/api/models/)**
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## What is Vibe AIGC?
|
|
54
|
+
|
|
55
|
+
Vibe AIGC bridges the **Intent-Execution Gap** in AI content generation. Instead of prompt engineering, you provide a **Vibe** — a high-level representation of your creative intent — and the system automatically decomposes it into executable workflows.
|
|
56
|
+
|
|
57
|
+
```python
|
|
58
|
+
from vibe_aigc import MetaPlanner, Vibe
|
|
59
|
+
|
|
60
|
+
# Express your intent
|
|
61
|
+
vibe = Vibe(
|
|
62
|
+
description="Create a cinematic sci-fi trailer",
|
|
63
|
+
style="dark, atmospheric, Blade Runner aesthetic",
|
|
64
|
+
constraints=["under 60 seconds", "no dialogue"]
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
# Let the Meta-Planner handle the rest
|
|
68
|
+
planner = MetaPlanner()
|
|
69
|
+
result = await planner.execute(vibe)
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Architecture (Paper Section 5)
|
|
73
|
+
|
|
74
|
+
The implementation follows the paper's three-part architecture:
|
|
75
|
+
|
|
76
|
+
| Component | Purpose | Module |
|
|
77
|
+
|-----------|---------|--------|
|
|
78
|
+
| **MetaPlanner** | Decomposes Vibes into workflows | `vibe_aigc.planner` |
|
|
79
|
+
| **KnowledgeBase** | Domain expertise for intent understanding | `vibe_aigc.knowledge` |
|
|
80
|
+
| **ToolRegistry** | Atomic tools for content generation | `vibe_aigc.tools` |
|
|
81
|
+
|
|
82
|
+
```python
|
|
83
|
+
from vibe_aigc import MetaPlanner, Vibe, create_knowledge_base, create_default_registry
|
|
84
|
+
|
|
85
|
+
# The full architecture
|
|
86
|
+
kb = create_knowledge_base() # Film, writing, design, music knowledge
|
|
87
|
+
tools = create_default_registry() # LLM, templates, combine tools
|
|
88
|
+
|
|
89
|
+
planner = MetaPlanner(knowledge_base=kb, tool_registry=tools)
|
|
90
|
+
|
|
91
|
+
# Query knowledge for "Hitchcockian suspense" → technical specs
|
|
92
|
+
result = kb.query("Hitchcockian suspense")
|
|
93
|
+
# Returns: camera techniques, lighting specs, editing patterns
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Features
|
|
97
|
+
|
|
98
|
+
- 🎯 **Vibe-based Planning** — High-level intent → executable workflows
|
|
99
|
+
- 🧠 **Domain Knowledge** — Built-in expertise for film, writing, design, music
|
|
100
|
+
- 🔧 **Tool Library** — Pluggable tools for actual content generation
|
|
101
|
+
- ⚡ **Parallel Execution** — Independent nodes run concurrently
|
|
102
|
+
- 🔄 **Adaptive Replanning** — Automatic recovery from failures
|
|
103
|
+
- 💾 **Checkpoint/Resume** — Save and restore workflow state
|
|
104
|
+
- 📊 **Progress Tracking** — Real-time callbacks and visualization
|
|
105
|
+
- 🎨 **Workflow Visualization** — ASCII and Mermaid diagrams
|
|
106
|
+
|
|
107
|
+
## Installation
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
pip install vibe-aigc
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## CLI Usage
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
# Generate a workflow plan
|
|
117
|
+
vibe-aigc plan "Create a blog post about AI" --style "informative" --format ascii
|
|
118
|
+
|
|
119
|
+
# Execute a vibe
|
|
120
|
+
vibe-aigc execute "Design a landing page" --visualize --checkpoint
|
|
121
|
+
|
|
122
|
+
# Manage checkpoints
|
|
123
|
+
vibe-aigc checkpoints --list
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Quick Example
|
|
127
|
+
|
|
128
|
+
```python
|
|
129
|
+
import asyncio
|
|
130
|
+
from vibe_aigc import Vibe, MetaPlanner
|
|
131
|
+
|
|
132
|
+
async def main():
|
|
133
|
+
vibe = Vibe(
|
|
134
|
+
description="Write a blog post about AI agents",
|
|
135
|
+
style="informative, engaging",
|
|
136
|
+
constraints=["under 1000 words"]
|
|
137
|
+
)
|
|
138
|
+
|
|
139
|
+
planner = MetaPlanner()
|
|
140
|
+
result = await planner.execute_with_visualization(vibe)
|
|
141
|
+
|
|
142
|
+
print(f"Status: {result.get_summary()['status']}")
|
|
143
|
+
|
|
144
|
+
asyncio.run(main())
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## Architecture
|
|
148
|
+
|
|
149
|
+
```
|
|
150
|
+
User Vibe → MetaPlanner → Agentic Pipeline → Execution → Result
|
|
151
|
+
↑ ↓
|
|
152
|
+
└──── Feedback Loop ────────┘
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## Documentation
|
|
156
|
+
|
|
157
|
+
- [Installation Guide](https://jmanhype.github.io/vibe-aigc/getting-started/installation/)
|
|
158
|
+
- [Quick Start Tutorial](https://jmanhype.github.io/vibe-aigc/getting-started/quickstart/)
|
|
159
|
+
- [Core Concepts](https://jmanhype.github.io/vibe-aigc/guide/concepts/)
|
|
160
|
+
- [API Reference](https://jmanhype.github.io/vibe-aigc/api/models/)
|
|
161
|
+
- [Examples](https://jmanhype.github.io/vibe-aigc/examples/)
|
|
162
|
+
|
|
163
|
+
## Contributing
|
|
164
|
+
|
|
165
|
+
Contributions welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
166
|
+
|
|
167
|
+
## License
|
|
168
|
+
|
|
169
|
+
MIT — see [LICENSE](LICENSE) for details.
|
|
170
|
+
|
|
171
|
+
## Citation
|
|
172
|
+
|
|
173
|
+
```bibtex
|
|
174
|
+
@article{vibe-aigc-2025,
|
|
175
|
+
title={Vibe AIGC: A New Paradigm for Content Generation via Agentic Orchestration},
|
|
176
|
+
journal={arXiv preprint arXiv:2602.04575},
|
|
177
|
+
year={2025}
|
|
178
|
+
}
|
|
179
|
+
```
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# Vibe AIGC
|
|
2
|
+
|
|
3
|
+
[](https://github.com/jmanhype/vibe-aigc/actions/workflows/ci.yml)
|
|
4
|
+
[](https://codecov.io/gh/jmanhype/vibe-aigc)
|
|
5
|
+
[](https://pypi.org/project/vibe-aigc/)
|
|
6
|
+
[](https://www.python.org/downloads/)
|
|
7
|
+
[](https://opensource.org/licenses/MIT)
|
|
8
|
+
[](https://jmanhype.github.io/vibe-aigc)
|
|
9
|
+
|
|
10
|
+
**A New Paradigm for Content Generation via Agentic Orchestration**
|
|
11
|
+
|
|
12
|
+
Based on [arXiv:2602.04575](https://arxiv.org/abs/2602.04575)
|
|
13
|
+
|
|
14
|
+
📚 **[Documentation](https://jmanhype.github.io/vibe-aigc)** | 🚀 **[Quick Start](https://jmanhype.github.io/vibe-aigc/getting-started/quickstart/)** | 📖 **[API Reference](https://jmanhype.github.io/vibe-aigc/api/models/)**
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## What is Vibe AIGC?
|
|
19
|
+
|
|
20
|
+
Vibe AIGC bridges the **Intent-Execution Gap** in AI content generation. Instead of prompt engineering, you provide a **Vibe** — a high-level representation of your creative intent — and the system automatically decomposes it into executable workflows.
|
|
21
|
+
|
|
22
|
+
```python
|
|
23
|
+
from vibe_aigc import MetaPlanner, Vibe
|
|
24
|
+
|
|
25
|
+
# Express your intent
|
|
26
|
+
vibe = Vibe(
|
|
27
|
+
description="Create a cinematic sci-fi trailer",
|
|
28
|
+
style="dark, atmospheric, Blade Runner aesthetic",
|
|
29
|
+
constraints=["under 60 seconds", "no dialogue"]
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
# Let the Meta-Planner handle the rest
|
|
33
|
+
planner = MetaPlanner()
|
|
34
|
+
result = await planner.execute(vibe)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Architecture (Paper Section 5)
|
|
38
|
+
|
|
39
|
+
The implementation follows the paper's three-part architecture:
|
|
40
|
+
|
|
41
|
+
| Component | Purpose | Module |
|
|
42
|
+
|-----------|---------|--------|
|
|
43
|
+
| **MetaPlanner** | Decomposes Vibes into workflows | `vibe_aigc.planner` |
|
|
44
|
+
| **KnowledgeBase** | Domain expertise for intent understanding | `vibe_aigc.knowledge` |
|
|
45
|
+
| **ToolRegistry** | Atomic tools for content generation | `vibe_aigc.tools` |
|
|
46
|
+
|
|
47
|
+
```python
|
|
48
|
+
from vibe_aigc import MetaPlanner, Vibe, create_knowledge_base, create_default_registry
|
|
49
|
+
|
|
50
|
+
# The full architecture
|
|
51
|
+
kb = create_knowledge_base() # Film, writing, design, music knowledge
|
|
52
|
+
tools = create_default_registry() # LLM, templates, combine tools
|
|
53
|
+
|
|
54
|
+
planner = MetaPlanner(knowledge_base=kb, tool_registry=tools)
|
|
55
|
+
|
|
56
|
+
# Query knowledge for "Hitchcockian suspense" → technical specs
|
|
57
|
+
result = kb.query("Hitchcockian suspense")
|
|
58
|
+
# Returns: camera techniques, lighting specs, editing patterns
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Features
|
|
62
|
+
|
|
63
|
+
- 🎯 **Vibe-based Planning** — High-level intent → executable workflows
|
|
64
|
+
- 🧠 **Domain Knowledge** — Built-in expertise for film, writing, design, music
|
|
65
|
+
- 🔧 **Tool Library** — Pluggable tools for actual content generation
|
|
66
|
+
- ⚡ **Parallel Execution** — Independent nodes run concurrently
|
|
67
|
+
- 🔄 **Adaptive Replanning** — Automatic recovery from failures
|
|
68
|
+
- 💾 **Checkpoint/Resume** — Save and restore workflow state
|
|
69
|
+
- 📊 **Progress Tracking** — Real-time callbacks and visualization
|
|
70
|
+
- 🎨 **Workflow Visualization** — ASCII and Mermaid diagrams
|
|
71
|
+
|
|
72
|
+
## Installation
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
pip install vibe-aigc
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## CLI Usage
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
# Generate a workflow plan
|
|
82
|
+
vibe-aigc plan "Create a blog post about AI" --style "informative" --format ascii
|
|
83
|
+
|
|
84
|
+
# Execute a vibe
|
|
85
|
+
vibe-aigc execute "Design a landing page" --visualize --checkpoint
|
|
86
|
+
|
|
87
|
+
# Manage checkpoints
|
|
88
|
+
vibe-aigc checkpoints --list
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Quick Example
|
|
92
|
+
|
|
93
|
+
```python
|
|
94
|
+
import asyncio
|
|
95
|
+
from vibe_aigc import Vibe, MetaPlanner
|
|
96
|
+
|
|
97
|
+
async def main():
|
|
98
|
+
vibe = Vibe(
|
|
99
|
+
description="Write a blog post about AI agents",
|
|
100
|
+
style="informative, engaging",
|
|
101
|
+
constraints=["under 1000 words"]
|
|
102
|
+
)
|
|
103
|
+
|
|
104
|
+
planner = MetaPlanner()
|
|
105
|
+
result = await planner.execute_with_visualization(vibe)
|
|
106
|
+
|
|
107
|
+
print(f"Status: {result.get_summary()['status']}")
|
|
108
|
+
|
|
109
|
+
asyncio.run(main())
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Architecture
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
User Vibe → MetaPlanner → Agentic Pipeline → Execution → Result
|
|
116
|
+
↑ ↓
|
|
117
|
+
└──── Feedback Loop ────────┘
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Documentation
|
|
121
|
+
|
|
122
|
+
- [Installation Guide](https://jmanhype.github.io/vibe-aigc/getting-started/installation/)
|
|
123
|
+
- [Quick Start Tutorial](https://jmanhype.github.io/vibe-aigc/getting-started/quickstart/)
|
|
124
|
+
- [Core Concepts](https://jmanhype.github.io/vibe-aigc/guide/concepts/)
|
|
125
|
+
- [API Reference](https://jmanhype.github.io/vibe-aigc/api/models/)
|
|
126
|
+
- [Examples](https://jmanhype.github.io/vibe-aigc/examples/)
|
|
127
|
+
|
|
128
|
+
## Contributing
|
|
129
|
+
|
|
130
|
+
Contributions welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
131
|
+
|
|
132
|
+
## License
|
|
133
|
+
|
|
134
|
+
MIT — see [LICENSE](LICENSE) for details.
|
|
135
|
+
|
|
136
|
+
## Citation
|
|
137
|
+
|
|
138
|
+
```bibtex
|
|
139
|
+
@article{vibe-aigc-2025,
|
|
140
|
+
title={Vibe AIGC: A New Paradigm for Content Generation via Agentic Orchestration},
|
|
141
|
+
journal={arXiv preprint arXiv:2602.04575},
|
|
142
|
+
year={2025}
|
|
143
|
+
}
|
|
144
|
+
```
|
|
@@ -2,9 +2,13 @@
|
|
|
2
2
|
requires = ["setuptools>=61.0", "wheel"]
|
|
3
3
|
build-backend = "setuptools.build_meta"
|
|
4
4
|
|
|
5
|
+
[tool.setuptools.packages.find]
|
|
6
|
+
include = ["vibe_aigc*"]
|
|
7
|
+
exclude = ["tests*", "docs*", "examples*", "landing*"]
|
|
8
|
+
|
|
5
9
|
[project]
|
|
6
10
|
name = "vibe-aigc"
|
|
7
|
-
version = "0.
|
|
11
|
+
version = "0.2.0"
|
|
8
12
|
description = "A New Paradigm for Content Generation via Agentic Orchestration"
|
|
9
13
|
authors = [{name = "Vibe AIGC Contributors"}]
|
|
10
14
|
license = "MIT"
|
|
@@ -32,11 +36,20 @@ dev = [
|
|
|
32
36
|
"ruff>=0.1.0",
|
|
33
37
|
"mypy>=1.0.0",
|
|
34
38
|
]
|
|
39
|
+
docs = [
|
|
40
|
+
"mkdocs-material>=9.0.0",
|
|
41
|
+
"mkdocstrings[python]>=0.24.0",
|
|
42
|
+
"pymdown-extensions>=10.0.0",
|
|
43
|
+
]
|
|
44
|
+
|
|
45
|
+
[project.scripts]
|
|
46
|
+
vibe-aigc = "vibe_aigc.cli:main"
|
|
35
47
|
|
|
36
48
|
[project.urls]
|
|
37
|
-
Homepage = "https://github.
|
|
49
|
+
Homepage = "https://jmanhype.github.io/vibe-aigc"
|
|
38
50
|
Repository = "https://github.com/jmanhype/vibe-aigc"
|
|
39
|
-
Documentation = "https://github.
|
|
51
|
+
Documentation = "https://jmanhype.github.io/vibe-aigc"
|
|
52
|
+
Changelog = "https://jmanhype.github.io/vibe-aigc/changelog"
|
|
40
53
|
Issues = "https://github.com/jmanhype/vibe-aigc/issues"
|
|
41
54
|
|
|
42
55
|
[tool.pytest.ini_options]
|
|
@@ -282,7 +282,7 @@ class TestAdaptiveReplanning:
|
|
|
282
282
|
]
|
|
283
283
|
|
|
284
284
|
plan_call_count = 0
|
|
285
|
-
async def plan_side_effect(vibe):
|
|
285
|
+
async def plan_side_effect(vibe, knowledge_context=None, tools_context=None):
|
|
286
286
|
nonlocal plan_call_count
|
|
287
287
|
result = plans[min(plan_call_count, len(plans) - 1)]
|
|
288
288
|
plan_call_count += 1
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
"""Tests for Specialized Agent Framework."""
|
|
2
|
+
|
|
3
|
+
import pytest
|
|
4
|
+
from unittest.mock import AsyncMock, MagicMock
|
|
5
|
+
|
|
6
|
+
from vibe_aigc.agents import (
|
|
7
|
+
BaseAgent,
|
|
8
|
+
AgentRole,
|
|
9
|
+
AgentContext,
|
|
10
|
+
AgentResult,
|
|
11
|
+
AgentRegistry,
|
|
12
|
+
WriterAgent,
|
|
13
|
+
ResearcherAgent,
|
|
14
|
+
EditorAgent,
|
|
15
|
+
DirectorAgent,
|
|
16
|
+
DesignerAgent,
|
|
17
|
+
ScreenwriterAgent,
|
|
18
|
+
ComposerAgent,
|
|
19
|
+
create_default_agents
|
|
20
|
+
)
|
|
21
|
+
from vibe_aigc.tools import ToolRegistry, ToolResult
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class TestAgentContext:
|
|
25
|
+
"""Test AgentContext class."""
|
|
26
|
+
|
|
27
|
+
def test_create_context(self):
|
|
28
|
+
ctx = AgentContext(
|
|
29
|
+
task="Write a blog post",
|
|
30
|
+
vibe_description="Technical but accessible",
|
|
31
|
+
style="informative",
|
|
32
|
+
constraints=["under 1000 words"]
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
assert ctx.task == "Write a blog post"
|
|
36
|
+
assert ctx.style == "informative"
|
|
37
|
+
assert len(ctx.constraints) == 1
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
class TestAgentResult:
|
|
41
|
+
"""Test AgentResult class."""
|
|
42
|
+
|
|
43
|
+
def test_success_result(self):
|
|
44
|
+
result = AgentResult(
|
|
45
|
+
success=True,
|
|
46
|
+
output="Generated content",
|
|
47
|
+
artifacts={"image": "url"},
|
|
48
|
+
messages=["Completed"]
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
assert result.success
|
|
52
|
+
assert result.output == "Generated content"
|
|
53
|
+
assert "image" in result.artifacts
|
|
54
|
+
|
|
55
|
+
def test_to_dict(self):
|
|
56
|
+
result = AgentResult(success=True, output="test")
|
|
57
|
+
d = result.to_dict()
|
|
58
|
+
|
|
59
|
+
assert d["success"] is True
|
|
60
|
+
assert d["output"] == "test"
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
class TestWriterAgent:
|
|
64
|
+
"""Test WriterAgent."""
|
|
65
|
+
|
|
66
|
+
def test_creation(self):
|
|
67
|
+
agent = WriterAgent()
|
|
68
|
+
|
|
69
|
+
assert agent.name == "Writer"
|
|
70
|
+
assert agent.role == AgentRole.WRITER
|
|
71
|
+
assert "llm_generate" in agent._capabilities
|
|
72
|
+
|
|
73
|
+
@pytest.mark.asyncio
|
|
74
|
+
async def test_execute_without_registry(self):
|
|
75
|
+
agent = WriterAgent()
|
|
76
|
+
ctx = AgentContext(task="Write something", vibe_description="Test")
|
|
77
|
+
|
|
78
|
+
result = await agent.execute(ctx)
|
|
79
|
+
|
|
80
|
+
assert not result.success
|
|
81
|
+
assert "No tool registry" in result.messages[0]
|
|
82
|
+
|
|
83
|
+
@pytest.mark.asyncio
|
|
84
|
+
async def test_execute_with_mock_registry(self):
|
|
85
|
+
# Create mock registry
|
|
86
|
+
mock_registry = MagicMock(spec=ToolRegistry)
|
|
87
|
+
mock_tool = AsyncMock()
|
|
88
|
+
mock_tool.execute.return_value = ToolResult(
|
|
89
|
+
success=True,
|
|
90
|
+
output={"text": "Generated text", "tokens_used": 100}
|
|
91
|
+
)
|
|
92
|
+
mock_registry.get.return_value = mock_tool
|
|
93
|
+
|
|
94
|
+
agent = WriterAgent(tool_registry=mock_registry)
|
|
95
|
+
ctx = AgentContext(task="Write a haiku", vibe_description="Peaceful")
|
|
96
|
+
|
|
97
|
+
result = await agent.execute(ctx)
|
|
98
|
+
|
|
99
|
+
assert result.success
|
|
100
|
+
assert "Generated text" in result.output
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
class TestResearcherAgent:
|
|
104
|
+
"""Test ResearcherAgent."""
|
|
105
|
+
|
|
106
|
+
def test_creation(self):
|
|
107
|
+
agent = ResearcherAgent()
|
|
108
|
+
|
|
109
|
+
assert agent.role == AgentRole.RESEARCHER
|
|
110
|
+
assert "search" in agent._capabilities
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
class TestEditorAgent:
|
|
114
|
+
"""Test EditorAgent."""
|
|
115
|
+
|
|
116
|
+
def test_creation(self):
|
|
117
|
+
agent = EditorAgent()
|
|
118
|
+
|
|
119
|
+
assert agent.role == AgentRole.EDITOR
|
|
120
|
+
|
|
121
|
+
@pytest.mark.asyncio
|
|
122
|
+
async def test_execute_without_content(self):
|
|
123
|
+
mock_registry = MagicMock(spec=ToolRegistry)
|
|
124
|
+
mock_registry.get.return_value = None
|
|
125
|
+
|
|
126
|
+
agent = EditorAgent(tool_registry=mock_registry)
|
|
127
|
+
ctx = AgentContext(task="Edit", vibe_description="Test")
|
|
128
|
+
|
|
129
|
+
result = await agent.execute(ctx)
|
|
130
|
+
|
|
131
|
+
assert not result.success
|
|
132
|
+
assert "No content" in result.messages[0]
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
class TestDirectorAgent:
|
|
136
|
+
"""Test DirectorAgent."""
|
|
137
|
+
|
|
138
|
+
def test_add_managed_agent(self):
|
|
139
|
+
director = DirectorAgent()
|
|
140
|
+
writer = WriterAgent()
|
|
141
|
+
|
|
142
|
+
director.add_agent(writer)
|
|
143
|
+
|
|
144
|
+
assert "Writer" in director._managed_agents
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
class TestDesignerAgent:
|
|
148
|
+
"""Test DesignerAgent."""
|
|
149
|
+
|
|
150
|
+
def test_creation(self):
|
|
151
|
+
agent = DesignerAgent()
|
|
152
|
+
|
|
153
|
+
assert agent.role == AgentRole.DESIGNER
|
|
154
|
+
assert "image_generate" in agent._capabilities
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
class TestScreenwriterAgent:
|
|
158
|
+
"""Test ScreenwriterAgent."""
|
|
159
|
+
|
|
160
|
+
def test_creation(self):
|
|
161
|
+
agent = ScreenwriterAgent()
|
|
162
|
+
|
|
163
|
+
assert agent.role == AgentRole.SCREENWRITER
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
class TestComposerAgent:
|
|
167
|
+
"""Test ComposerAgent."""
|
|
168
|
+
|
|
169
|
+
def test_creation(self):
|
|
170
|
+
agent = ComposerAgent()
|
|
171
|
+
|
|
172
|
+
assert agent.role == AgentRole.COMPOSER
|
|
173
|
+
assert "audio_generate" in agent._capabilities
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
class TestAgentRegistry:
|
|
177
|
+
"""Test AgentRegistry."""
|
|
178
|
+
|
|
179
|
+
def test_register_and_get(self):
|
|
180
|
+
registry = AgentRegistry()
|
|
181
|
+
agent = WriterAgent()
|
|
182
|
+
|
|
183
|
+
registry.register(agent)
|
|
184
|
+
|
|
185
|
+
assert registry.get("Writer") == agent
|
|
186
|
+
|
|
187
|
+
def test_find_by_role(self):
|
|
188
|
+
registry = AgentRegistry()
|
|
189
|
+
registry.register(WriterAgent())
|
|
190
|
+
registry.register(EditorAgent())
|
|
191
|
+
|
|
192
|
+
writers = registry.find_by_role(AgentRole.WRITER)
|
|
193
|
+
|
|
194
|
+
assert len(writers) == 1
|
|
195
|
+
assert writers[0].role == AgentRole.WRITER
|
|
196
|
+
|
|
197
|
+
def test_list_agents(self):
|
|
198
|
+
registry = AgentRegistry()
|
|
199
|
+
registry.register(WriterAgent())
|
|
200
|
+
registry.register(EditorAgent())
|
|
201
|
+
|
|
202
|
+
names = registry.list_agents()
|
|
203
|
+
|
|
204
|
+
assert "Writer" in names
|
|
205
|
+
assert "Editor" in names
|
|
206
|
+
|
|
207
|
+
def test_create_team(self):
|
|
208
|
+
registry = AgentRegistry()
|
|
209
|
+
registry.register(WriterAgent())
|
|
210
|
+
registry.register(EditorAgent())
|
|
211
|
+
registry.register(DirectorAgent())
|
|
212
|
+
|
|
213
|
+
team = registry.create_team([AgentRole.WRITER, AgentRole.EDITOR])
|
|
214
|
+
|
|
215
|
+
assert AgentRole.WRITER in team
|
|
216
|
+
assert AgentRole.EDITOR in team
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
class TestCreateDefaultAgents:
|
|
220
|
+
"""Test create_default_agents factory."""
|
|
221
|
+
|
|
222
|
+
def test_creates_all_agents(self):
|
|
223
|
+
registry = create_default_agents()
|
|
224
|
+
|
|
225
|
+
assert registry.get("Writer") is not None
|
|
226
|
+
assert registry.get("Researcher") is not None
|
|
227
|
+
assert registry.get("Editor") is not None
|
|
228
|
+
assert registry.get("Director") is not None
|
|
229
|
+
assert registry.get("Designer") is not None
|
|
230
|
+
assert registry.get("Screenwriter") is not None
|
|
231
|
+
assert registry.get("Composer") is not None
|