agent-recipes 0.0.5__py3-none-any.whl

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.
Files changed (270) hide show
  1. agent_recipes/__init__.py +27 -0
  2. agent_recipes/recipe_runtime/__init__.py +28 -0
  3. agent_recipes/recipe_runtime/core.py +385 -0
  4. agent_recipes/templates/ai-ab-hook-tester/recipe.yaml +45 -0
  5. agent_recipes/templates/ai-ab-hook-tester/tools.py +169 -0
  6. agent_recipes/templates/ai-angle-generator/recipe.yaml +49 -0
  7. agent_recipes/templates/ai-angle-generator/tools.py +182 -0
  8. agent_recipes/templates/ai-api-doc-generator/README.md +59 -0
  9. agent_recipes/templates/ai-api-doc-generator/TEMPLATE.yaml +29 -0
  10. agent_recipes/templates/ai-api-tester/README.md +60 -0
  11. agent_recipes/templates/ai-api-tester/TEMPLATE.yaml +29 -0
  12. agent_recipes/templates/ai-audio-enhancer/README.md +59 -0
  13. agent_recipes/templates/ai-audio-enhancer/TEMPLATE.yaml +28 -0
  14. agent_recipes/templates/ai-audio-normalizer/README.md +13 -0
  15. agent_recipes/templates/ai-audio-normalizer/TEMPLATE.yaml +44 -0
  16. agent_recipes/templates/ai-audio-splitter/README.md +14 -0
  17. agent_recipes/templates/ai-audio-splitter/TEMPLATE.yaml +47 -0
  18. agent_recipes/templates/ai-background-music-generator/README.md +59 -0
  19. agent_recipes/templates/ai-background-music-generator/TEMPLATE.yaml +28 -0
  20. agent_recipes/templates/ai-background-remover/README.md +60 -0
  21. agent_recipes/templates/ai-background-remover/TEMPLATE.yaml +27 -0
  22. agent_recipes/templates/ai-barcode-scanner/README.md +60 -0
  23. agent_recipes/templates/ai-barcode-scanner/TEMPLATE.yaml +26 -0
  24. agent_recipes/templates/ai-blog-generator/README.md +59 -0
  25. agent_recipes/templates/ai-blog-generator/TEMPLATE.yaml +28 -0
  26. agent_recipes/templates/ai-brief-generator/recipe.yaml +52 -0
  27. agent_recipes/templates/ai-brief-generator/tools.py +231 -0
  28. agent_recipes/templates/ai-broll-builder/recipe.yaml +47 -0
  29. agent_recipes/templates/ai-broll-builder/tools.py +204 -0
  30. agent_recipes/templates/ai-calendar-scheduler/README.md +60 -0
  31. agent_recipes/templates/ai-calendar-scheduler/TEMPLATE.yaml +29 -0
  32. agent_recipes/templates/ai-changelog-generator/README.md +14 -0
  33. agent_recipes/templates/ai-changelog-generator/TEMPLATE.yaml +46 -0
  34. agent_recipes/templates/ai-chart-generator/README.md +61 -0
  35. agent_recipes/templates/ai-chart-generator/TEMPLATE.yaml +32 -0
  36. agent_recipes/templates/ai-code-documenter/README.md +12 -0
  37. agent_recipes/templates/ai-code-documenter/TEMPLATE.yaml +37 -0
  38. agent_recipes/templates/ai-code-refactorer/README.md +59 -0
  39. agent_recipes/templates/ai-code-refactorer/TEMPLATE.yaml +28 -0
  40. agent_recipes/templates/ai-code-reviewer/README.md +59 -0
  41. agent_recipes/templates/ai-code-reviewer/TEMPLATE.yaml +31 -0
  42. agent_recipes/templates/ai-color-palette-extractor/README.md +60 -0
  43. agent_recipes/templates/ai-color-palette-extractor/TEMPLATE.yaml +27 -0
  44. agent_recipes/templates/ai-comment-miner/recipe.yaml +40 -0
  45. agent_recipes/templates/ai-comment-miner/tools.py +141 -0
  46. agent_recipes/templates/ai-commit-message-generator/README.md +59 -0
  47. agent_recipes/templates/ai-commit-message-generator/TEMPLATE.yaml +31 -0
  48. agent_recipes/templates/ai-content-calendar/recipe.yaml +43 -0
  49. agent_recipes/templates/ai-content-calendar/tools.py +170 -0
  50. agent_recipes/templates/ai-context-enricher/recipe.yaml +48 -0
  51. agent_recipes/templates/ai-context-enricher/tools.py +258 -0
  52. agent_recipes/templates/ai-contract-analyzer/README.md +60 -0
  53. agent_recipes/templates/ai-contract-analyzer/TEMPLATE.yaml +34 -0
  54. agent_recipes/templates/ai-csv-cleaner/README.md +13 -0
  55. agent_recipes/templates/ai-csv-cleaner/TEMPLATE.yaml +45 -0
  56. agent_recipes/templates/ai-cta-generator/recipe.yaml +54 -0
  57. agent_recipes/templates/ai-cta-generator/tools.py +174 -0
  58. agent_recipes/templates/ai-daily-news-show/recipe.yaml +103 -0
  59. agent_recipes/templates/ai-daily-news-show/tools.py +308 -0
  60. agent_recipes/templates/ai-data-anonymizer/README.md +60 -0
  61. agent_recipes/templates/ai-data-anonymizer/TEMPLATE.yaml +31 -0
  62. agent_recipes/templates/ai-data-profiler/README.md +14 -0
  63. agent_recipes/templates/ai-data-profiler/TEMPLATE.yaml +42 -0
  64. agent_recipes/templates/ai-dependency-auditor/README.md +12 -0
  65. agent_recipes/templates/ai-dependency-auditor/TEMPLATE.yaml +37 -0
  66. agent_recipes/templates/ai-doc-translator/README.md +12 -0
  67. agent_recipes/templates/ai-doc-translator/TEMPLATE.yaml +41 -0
  68. agent_recipes/templates/ai-duplicate-finder/README.md +59 -0
  69. agent_recipes/templates/ai-duplicate-finder/TEMPLATE.yaml +28 -0
  70. agent_recipes/templates/ai-ebook-converter/README.md +60 -0
  71. agent_recipes/templates/ai-ebook-converter/TEMPLATE.yaml +27 -0
  72. agent_recipes/templates/ai-email-parser/README.md +59 -0
  73. agent_recipes/templates/ai-email-parser/TEMPLATE.yaml +29 -0
  74. agent_recipes/templates/ai-etl-pipeline/README.md +60 -0
  75. agent_recipes/templates/ai-etl-pipeline/TEMPLATE.yaml +30 -0
  76. agent_recipes/templates/ai-excel-formula-generator/README.md +59 -0
  77. agent_recipes/templates/ai-excel-formula-generator/TEMPLATE.yaml +28 -0
  78. agent_recipes/templates/ai-face-blur/README.md +60 -0
  79. agent_recipes/templates/ai-face-blur/TEMPLATE.yaml +28 -0
  80. agent_recipes/templates/ai-fact-checker/recipe.yaml +52 -0
  81. agent_recipes/templates/ai-fact-checker/tools.py +279 -0
  82. agent_recipes/templates/ai-faq-generator/README.md +59 -0
  83. agent_recipes/templates/ai-faq-generator/TEMPLATE.yaml +28 -0
  84. agent_recipes/templates/ai-file-organizer/README.md +59 -0
  85. agent_recipes/templates/ai-file-organizer/TEMPLATE.yaml +29 -0
  86. agent_recipes/templates/ai-folder-packager/README.md +15 -0
  87. agent_recipes/templates/ai-folder-packager/TEMPLATE.yaml +48 -0
  88. agent_recipes/templates/ai-form-filler/README.md +60 -0
  89. agent_recipes/templates/ai-form-filler/TEMPLATE.yaml +30 -0
  90. agent_recipes/templates/ai-hashtag-optimizer/recipe.yaml +45 -0
  91. agent_recipes/templates/ai-hashtag-optimizer/tools.py +134 -0
  92. agent_recipes/templates/ai-hook-generator/recipe.yaml +50 -0
  93. agent_recipes/templates/ai-hook-generator/tools.py +177 -0
  94. agent_recipes/templates/ai-image-captioner/README.md +59 -0
  95. agent_recipes/templates/ai-image-captioner/TEMPLATE.yaml +28 -0
  96. agent_recipes/templates/ai-image-cataloger/README.md +13 -0
  97. agent_recipes/templates/ai-image-cataloger/TEMPLATE.yaml +39 -0
  98. agent_recipes/templates/ai-image-optimizer/README.md +13 -0
  99. agent_recipes/templates/ai-image-optimizer/TEMPLATE.yaml +43 -0
  100. agent_recipes/templates/ai-image-resizer/README.md +12 -0
  101. agent_recipes/templates/ai-image-resizer/TEMPLATE.yaml +39 -0
  102. agent_recipes/templates/ai-image-tagger/README.md +59 -0
  103. agent_recipes/templates/ai-image-tagger/TEMPLATE.yaml +28 -0
  104. agent_recipes/templates/ai-image-upscaler/README.md +60 -0
  105. agent_recipes/templates/ai-image-upscaler/TEMPLATE.yaml +27 -0
  106. agent_recipes/templates/ai-invoice-processor/README.md +60 -0
  107. agent_recipes/templates/ai-invoice-processor/TEMPLATE.yaml +34 -0
  108. agent_recipes/templates/ai-json-to-csv/README.md +12 -0
  109. agent_recipes/templates/ai-json-to-csv/TEMPLATE.yaml +36 -0
  110. agent_recipes/templates/ai-log-analyzer/README.md +59 -0
  111. agent_recipes/templates/ai-log-analyzer/TEMPLATE.yaml +28 -0
  112. agent_recipes/templates/ai-markdown-to-pdf/README.md +12 -0
  113. agent_recipes/templates/ai-markdown-to-pdf/TEMPLATE.yaml +40 -0
  114. agent_recipes/templates/ai-meeting-summarizer/README.md +59 -0
  115. agent_recipes/templates/ai-meeting-summarizer/TEMPLATE.yaml +32 -0
  116. agent_recipes/templates/ai-meta-tag-generator/README.md +59 -0
  117. agent_recipes/templates/ai-meta-tag-generator/TEMPLATE.yaml +28 -0
  118. agent_recipes/templates/ai-news-capture-pack/recipe.yaml +42 -0
  119. agent_recipes/templates/ai-news-capture-pack/tools.py +150 -0
  120. agent_recipes/templates/ai-news-crawler/recipe.yaml +99 -0
  121. agent_recipes/templates/ai-news-crawler/tools.py +417 -0
  122. agent_recipes/templates/ai-news-deduper/recipe.yaml +47 -0
  123. agent_recipes/templates/ai-news-deduper/tools.py +235 -0
  124. agent_recipes/templates/ai-newsletter-generator/README.md +59 -0
  125. agent_recipes/templates/ai-newsletter-generator/TEMPLATE.yaml +28 -0
  126. agent_recipes/templates/ai-note-summarizer/README.md +59 -0
  127. agent_recipes/templates/ai-note-summarizer/TEMPLATE.yaml +28 -0
  128. agent_recipes/templates/ai-pdf-summarizer/README.md +12 -0
  129. agent_recipes/templates/ai-pdf-summarizer/TEMPLATE.yaml +40 -0
  130. agent_recipes/templates/ai-pdf-to-markdown/README.md +19 -0
  131. agent_recipes/templates/ai-pdf-to-markdown/TEMPLATE.yaml +63 -0
  132. agent_recipes/templates/ai-performance-analyzer/recipe.yaml +45 -0
  133. agent_recipes/templates/ai-performance-analyzer/tools.py +159 -0
  134. agent_recipes/templates/ai-podcast-cleaner/README.md +117 -0
  135. agent_recipes/templates/ai-podcast-cleaner/TEMPLATE.yaml +117 -0
  136. agent_recipes/templates/ai-podcast-cleaner/agents.yaml +59 -0
  137. agent_recipes/templates/ai-podcast-cleaner/workflow.yaml +77 -0
  138. agent_recipes/templates/ai-podcast-transcriber/README.md +59 -0
  139. agent_recipes/templates/ai-podcast-transcriber/TEMPLATE.yaml +32 -0
  140. agent_recipes/templates/ai-post-copy-generator/recipe.yaml +41 -0
  141. agent_recipes/templates/ai-post-copy-generator/tools.py +105 -0
  142. agent_recipes/templates/ai-product-description-generator/README.md +59 -0
  143. agent_recipes/templates/ai-product-description-generator/TEMPLATE.yaml +28 -0
  144. agent_recipes/templates/ai-publisher-pack/recipe.yaml +44 -0
  145. agent_recipes/templates/ai-publisher-pack/tools.py +252 -0
  146. agent_recipes/templates/ai-qr-code-generator/README.md +60 -0
  147. agent_recipes/templates/ai-qr-code-generator/TEMPLATE.yaml +26 -0
  148. agent_recipes/templates/ai-regex-generator/README.md +59 -0
  149. agent_recipes/templates/ai-regex-generator/TEMPLATE.yaml +28 -0
  150. agent_recipes/templates/ai-repo-readme/README.md +13 -0
  151. agent_recipes/templates/ai-repo-readme/TEMPLATE.yaml +42 -0
  152. agent_recipes/templates/ai-report-generator/README.md +61 -0
  153. agent_recipes/templates/ai-report-generator/TEMPLATE.yaml +32 -0
  154. agent_recipes/templates/ai-resume-parser/README.md +60 -0
  155. agent_recipes/templates/ai-resume-parser/TEMPLATE.yaml +33 -0
  156. agent_recipes/templates/ai-rss-aggregator/README.md +60 -0
  157. agent_recipes/templates/ai-rss-aggregator/TEMPLATE.yaml +30 -0
  158. agent_recipes/templates/ai-schema-generator/README.md +12 -0
  159. agent_recipes/templates/ai-schema-generator/TEMPLATE.yaml +34 -0
  160. agent_recipes/templates/ai-screen-recorder/recipe.yaml +43 -0
  161. agent_recipes/templates/ai-screen-recorder/tools.py +184 -0
  162. agent_recipes/templates/ai-screenshot-capture/recipe.yaml +45 -0
  163. agent_recipes/templates/ai-screenshot-capture/tools.py +231 -0
  164. agent_recipes/templates/ai-screenshot-ocr/README.md +12 -0
  165. agent_recipes/templates/ai-screenshot-ocr/TEMPLATE.yaml +37 -0
  166. agent_recipes/templates/ai-script-writer/recipe.yaml +58 -0
  167. agent_recipes/templates/ai-script-writer/tools.py +297 -0
  168. agent_recipes/templates/ai-sentiment-analyzer/README.md +59 -0
  169. agent_recipes/templates/ai-sentiment-analyzer/TEMPLATE.yaml +28 -0
  170. agent_recipes/templates/ai-seo-optimizer/README.md +59 -0
  171. agent_recipes/templates/ai-seo-optimizer/TEMPLATE.yaml +28 -0
  172. agent_recipes/templates/ai-signal-ranker/recipe.yaml +54 -0
  173. agent_recipes/templates/ai-signal-ranker/tools.py +256 -0
  174. agent_recipes/templates/ai-sitemap-generator/README.md +59 -0
  175. agent_recipes/templates/ai-sitemap-generator/TEMPLATE.yaml +26 -0
  176. agent_recipes/templates/ai-sitemap-scraper/README.md +13 -0
  177. agent_recipes/templates/ai-sitemap-scraper/TEMPLATE.yaml +41 -0
  178. agent_recipes/templates/ai-slide-generator/README.md +60 -0
  179. agent_recipes/templates/ai-slide-generator/TEMPLATE.yaml +29 -0
  180. agent_recipes/templates/ai-slide-to-notes/README.md +12 -0
  181. agent_recipes/templates/ai-slide-to-notes/TEMPLATE.yaml +37 -0
  182. agent_recipes/templates/ai-social-media-generator/README.md +59 -0
  183. agent_recipes/templates/ai-social-media-generator/TEMPLATE.yaml +28 -0
  184. agent_recipes/templates/ai-sql-generator/README.md +59 -0
  185. agent_recipes/templates/ai-sql-generator/TEMPLATE.yaml +28 -0
  186. agent_recipes/templates/ai-subtitle-generator/README.md +59 -0
  187. agent_recipes/templates/ai-subtitle-generator/TEMPLATE.yaml +31 -0
  188. agent_recipes/templates/ai-test-generator/README.md +59 -0
  189. agent_recipes/templates/ai-test-generator/TEMPLATE.yaml +28 -0
  190. agent_recipes/templates/ai-translation-batch/README.md +59 -0
  191. agent_recipes/templates/ai-translation-batch/TEMPLATE.yaml +28 -0
  192. agent_recipes/templates/ai-url-to-markdown/README.md +14 -0
  193. agent_recipes/templates/ai-url-to-markdown/TEMPLATE.yaml +44 -0
  194. agent_recipes/templates/ai-video-chapter-generator/README.md +59 -0
  195. agent_recipes/templates/ai-video-chapter-generator/TEMPLATE.yaml +32 -0
  196. agent_recipes/templates/ai-video-compressor/README.md +59 -0
  197. agent_recipes/templates/ai-video-compressor/TEMPLATE.yaml +28 -0
  198. agent_recipes/templates/ai-video-editor/README.md +254 -0
  199. agent_recipes/templates/ai-video-editor/TEMPLATE.yaml +139 -0
  200. agent_recipes/templates/ai-video-editor/agents.yaml +36 -0
  201. agent_recipes/templates/ai-video-editor/requirements.txt +8 -0
  202. agent_recipes/templates/ai-video-editor/scripts/run.sh +10 -0
  203. agent_recipes/templates/ai-video-editor/src/ai_video_editor/__init__.py +45 -0
  204. agent_recipes/templates/ai-video-editor/src/ai_video_editor/__main__.py +8 -0
  205. agent_recipes/templates/ai-video-editor/src/ai_video_editor/__pycache__/__init__.cpython-312.pyc +0 -0
  206. agent_recipes/templates/ai-video-editor/src/ai_video_editor/__pycache__/cli.cpython-312.pyc +0 -0
  207. agent_recipes/templates/ai-video-editor/src/ai_video_editor/__pycache__/config.cpython-312.pyc +0 -0
  208. agent_recipes/templates/ai-video-editor/src/ai_video_editor/__pycache__/ffmpeg_probe.cpython-312.pyc +0 -0
  209. agent_recipes/templates/ai-video-editor/src/ai_video_editor/__pycache__/heuristics.cpython-312.pyc +0 -0
  210. agent_recipes/templates/ai-video-editor/src/ai_video_editor/__pycache__/llm_plan.cpython-312.pyc +0 -0
  211. agent_recipes/templates/ai-video-editor/src/ai_video_editor/__pycache__/models.cpython-312.pyc +0 -0
  212. agent_recipes/templates/ai-video-editor/src/ai_video_editor/__pycache__/pipeline.cpython-312.pyc +0 -0
  213. agent_recipes/templates/ai-video-editor/src/ai_video_editor/__pycache__/render.cpython-312.pyc +0 -0
  214. agent_recipes/templates/ai-video-editor/src/ai_video_editor/__pycache__/timeline.cpython-312.pyc +0 -0
  215. agent_recipes/templates/ai-video-editor/src/ai_video_editor/__pycache__/transcribe.cpython-312.pyc +0 -0
  216. agent_recipes/templates/ai-video-editor/src/ai_video_editor/__pycache__/utils.cpython-312.pyc +0 -0
  217. agent_recipes/templates/ai-video-editor/src/ai_video_editor/cli.py +343 -0
  218. agent_recipes/templates/ai-video-editor/src/ai_video_editor/config.py +102 -0
  219. agent_recipes/templates/ai-video-editor/src/ai_video_editor/ffmpeg_probe.py +92 -0
  220. agent_recipes/templates/ai-video-editor/src/ai_video_editor/heuristics.py +119 -0
  221. agent_recipes/templates/ai-video-editor/src/ai_video_editor/llm_plan.py +277 -0
  222. agent_recipes/templates/ai-video-editor/src/ai_video_editor/models.py +343 -0
  223. agent_recipes/templates/ai-video-editor/src/ai_video_editor/pipeline.py +287 -0
  224. agent_recipes/templates/ai-video-editor/src/ai_video_editor/render.py +274 -0
  225. agent_recipes/templates/ai-video-editor/src/ai_video_editor/timeline.py +278 -0
  226. agent_recipes/templates/ai-video-editor/src/ai_video_editor/transcribe.py +233 -0
  227. agent_recipes/templates/ai-video-editor/src/ai_video_editor/utils.py +222 -0
  228. agent_recipes/templates/ai-video-editor/src/input.mov +0 -0
  229. agent_recipes/templates/ai-video-editor/src/out.mp4 +0 -0
  230. agent_recipes/templates/ai-video-editor/tests/test_heuristics.py +130 -0
  231. agent_recipes/templates/ai-video-editor/tests/test_models.py +152 -0
  232. agent_recipes/templates/ai-video-editor/tests/test_timeline.py +105 -0
  233. agent_recipes/templates/ai-video-editor/workflow.yaml +51 -0
  234. agent_recipes/templates/ai-video-highlight-extractor/README.md +60 -0
  235. agent_recipes/templates/ai-video-highlight-extractor/TEMPLATE.yaml +33 -0
  236. agent_recipes/templates/ai-video-merger/recipe.yaml +40 -0
  237. agent_recipes/templates/ai-video-merger/tools.py +172 -0
  238. agent_recipes/templates/ai-video-thumbnails/README.md +16 -0
  239. agent_recipes/templates/ai-video-thumbnails/TEMPLATE.yaml +53 -0
  240. agent_recipes/templates/ai-video-to-gif/README.md +14 -0
  241. agent_recipes/templates/ai-video-to-gif/TEMPLATE.yaml +64 -0
  242. agent_recipes/templates/ai-voice-cloner/README.md +59 -0
  243. agent_recipes/templates/ai-voice-cloner/TEMPLATE.yaml +31 -0
  244. agent_recipes/templates/ai-voiceover-generator/recipe.yaml +41 -0
  245. agent_recipes/templates/ai-voiceover-generator/tools.py +194 -0
  246. agent_recipes/templates/ai-watermark-adder/README.md +59 -0
  247. agent_recipes/templates/ai-watermark-adder/TEMPLATE.yaml +26 -0
  248. agent_recipes/templates/ai-watermark-remover/README.md +60 -0
  249. agent_recipes/templates/ai-watermark-remover/TEMPLATE.yaml +32 -0
  250. agent_recipes/templates/data-transformer/README.md +75 -0
  251. agent_recipes/templates/data-transformer/TEMPLATE.yaml +63 -0
  252. agent_recipes/templates/data-transformer/agents.yaml +70 -0
  253. agent_recipes/templates/data-transformer/workflow.yaml +92 -0
  254. agent_recipes/templates/shorts-generator/README.md +61 -0
  255. agent_recipes/templates/shorts-generator/TEMPLATE.yaml +65 -0
  256. agent_recipes/templates/shorts-generator/agents.yaml +66 -0
  257. agent_recipes/templates/shorts-generator/workflow.yaml +86 -0
  258. agent_recipes/templates/transcript-generator/README.md +103 -0
  259. agent_recipes/templates/transcript-generator/TEMPLATE.yaml +57 -0
  260. agent_recipes/templates/transcript-generator/agents.yaml +62 -0
  261. agent_recipes/templates/transcript-generator/workflow.yaml +82 -0
  262. agent_recipes/templates/video-editor/README.md +70 -0
  263. agent_recipes/templates/video-editor/TEMPLATE.yaml +55 -0
  264. agent_recipes/templates/video-editor/agents.yaml +68 -0
  265. agent_recipes/templates/video-editor/workflow.yaml +92 -0
  266. agent_recipes-0.0.5.dist-info/METADATA +145 -0
  267. agent_recipes-0.0.5.dist-info/RECORD +269 -0
  268. agent_recipes-0.0.5.dist-info/WHEEL +5 -0
  269. agent_recipes-0.0.5.dist-info/top_level.txt +1 -0
  270. /236/326/177nE/243/231/214/232/265/322m/201/253/353/022C/372/321/266/b/225^=/272/017t/262/3337/310@/315wb/341pB/277z/216/330/314/004/265B/213/375/236/203/026/373/307/354z41/347#/374q/262/22589/032/276 /277/244Vh/322/017/004/224/215/004/367/377/375/335/n +0 -0
@@ -0,0 +1,159 @@
1
+ """
2
+ AI Performance Analyzer Tools
3
+
4
+ Analyze content performance metrics and generate insights.
5
+ """
6
+
7
+ import logging
8
+ import os
9
+ from typing import Any, Dict, List, Optional
10
+
11
+ logger = logging.getLogger(__name__)
12
+
13
+
14
+ def call_llm(prompt: str, max_tokens: int = 800) -> str:
15
+ """Call OpenAI API."""
16
+ import requests
17
+ api_key = os.environ.get("OPENAI_API_KEY")
18
+ if not api_key:
19
+ raise ValueError("OPENAI_API_KEY not set")
20
+ response = requests.post(
21
+ "https://api.openai.com/v1/chat/completions",
22
+ headers={"Authorization": f"Bearer {api_key}", "Content-Type": "application/json"},
23
+ json={"model": "gpt-4o-mini", "messages": [{"role": "user", "content": prompt}], "max_tokens": max_tokens},
24
+ timeout=60,
25
+ )
26
+ response.raise_for_status()
27
+ return response.json()["choices"][0]["message"]["content"]
28
+
29
+
30
+ def analyze_metrics(
31
+ metrics: Dict[str, Any],
32
+ platform: str = "youtube",
33
+ ) -> Dict[str, Any]:
34
+ """
35
+ Analyze performance metrics.
36
+
37
+ Args:
38
+ metrics: Metrics dictionary from platform export
39
+ platform: Source platform
40
+
41
+ Returns:
42
+ Analysis results
43
+ """
44
+ # Extract key metrics
45
+ views = metrics.get("views", metrics.get("impressions", 0))
46
+ engagement = metrics.get("engagement", metrics.get("likes", 0) + metrics.get("comments", 0))
47
+ shares = metrics.get("shares", metrics.get("retweets", 0))
48
+
49
+ # Calculate rates
50
+ engagement_rate = (engagement / views * 100) if views > 0 else 0
51
+
52
+ analysis = {
53
+ "platform": platform,
54
+ "total_views": views,
55
+ "total_engagement": engagement,
56
+ "engagement_rate": round(engagement_rate, 2),
57
+ "shares": shares,
58
+ "performance_tier": _get_performance_tier(engagement_rate),
59
+ }
60
+
61
+ return {"analysis": analysis}
62
+
63
+
64
+ def _get_performance_tier(engagement_rate: float) -> str:
65
+ """Determine performance tier based on engagement rate."""
66
+ if engagement_rate >= 10:
67
+ return "exceptional"
68
+ elif engagement_rate >= 5:
69
+ return "excellent"
70
+ elif engagement_rate >= 2:
71
+ return "good"
72
+ elif engagement_rate >= 1:
73
+ return "average"
74
+ else:
75
+ return "needs_improvement"
76
+
77
+
78
+ def generate_insights(
79
+ metrics: Dict[str, Any],
80
+ historical: Optional[List[Dict[str, Any]]] = None,
81
+ ) -> Dict[str, Any]:
82
+ """
83
+ Generate AI-powered insights from metrics.
84
+
85
+ Args:
86
+ metrics: Current metrics
87
+ historical: Historical metrics for comparison
88
+
89
+ Returns:
90
+ Insights and recommendations
91
+ """
92
+ metrics_summary = f"""
93
+ Views: {metrics.get('views', 'N/A')}
94
+ Likes: {metrics.get('likes', 'N/A')}
95
+ Comments: {metrics.get('comments', 'N/A')}
96
+ Shares: {metrics.get('shares', 'N/A')}
97
+ Watch Time: {metrics.get('watch_time', 'N/A')}
98
+ CTR: {metrics.get('ctr', 'N/A')}%
99
+ """
100
+
101
+ prompt = f"""Analyze these content performance metrics and provide actionable insights:
102
+
103
+ {metrics_summary}
104
+
105
+ Provide:
106
+ 1. Key Performance Summary (2-3 sentences)
107
+ 2. Top 3 Strengths
108
+ 3. Top 3 Areas for Improvement
109
+ 4. 3 Specific Recommendations
110
+
111
+ Be specific and actionable."""
112
+
113
+ try:
114
+ insights_text = call_llm(prompt, max_tokens=600)
115
+
116
+ return {
117
+ "insights": insights_text,
118
+ "metrics_analyzed": list(metrics.keys()),
119
+ }
120
+ except Exception as e:
121
+ logger.error(f"Error generating insights: {e}")
122
+ return {"error": str(e)}
123
+
124
+
125
+ def compare_performance(
126
+ current: Dict[str, Any],
127
+ previous: Dict[str, Any],
128
+ ) -> Dict[str, Any]:
129
+ """
130
+ Compare current vs previous performance.
131
+
132
+ Args:
133
+ current: Current period metrics
134
+ previous: Previous period metrics
135
+
136
+ Returns:
137
+ Comparison results
138
+ """
139
+ comparison = {}
140
+
141
+ for key in current:
142
+ if key in previous and isinstance(current[key], (int, float)):
143
+ prev_val = previous[key]
144
+ curr_val = current[key]
145
+
146
+ if prev_val > 0:
147
+ change_pct = ((curr_val - prev_val) / prev_val) * 100
148
+ else:
149
+ change_pct = 100 if curr_val > 0 else 0
150
+
151
+ comparison[key] = {
152
+ "current": curr_val,
153
+ "previous": prev_val,
154
+ "change": curr_val - prev_val,
155
+ "change_percent": round(change_pct, 2),
156
+ "trend": "up" if change_pct > 0 else "down" if change_pct < 0 else "flat",
157
+ }
158
+
159
+ return {"comparison": comparison}
@@ -0,0 +1,117 @@
1
+ # AI Podcast Cleaner
2
+
3
+ Clean podcast audio by removing noise, normalizing volume, trimming silences, and generating transcripts with chapter markers.
4
+
5
+ ## Input/Output
6
+
7
+ - **Input**: Audio file (wav, mp3, m4a, flac)
8
+ - **Output**:
9
+ - `cleaned.mp3` - Cleaned and normalized audio
10
+ - `transcript.txt` - Plain text transcript
11
+ - `transcript.srt` - SRT caption file
12
+ - `chapters.json` - Chapter markers with timestamps
13
+ - `run.json` - Execution metadata
14
+
15
+ ## Requirements
16
+
17
+ - **ffmpeg**: Audio processing
18
+ - **OpenAI API Key**: For transcription (Whisper)
19
+
20
+ ```bash
21
+ # macOS
22
+ brew install ffmpeg
23
+
24
+ # Linux
25
+ apt install ffmpeg
26
+
27
+ # Set API key
28
+ export OPENAI_API_KEY=your_key_here
29
+ ```
30
+
31
+ ## Usage
32
+
33
+ ### CLI
34
+
35
+ ```bash
36
+ # Basic usage
37
+ praison run ai-podcast-cleaner recording.wav
38
+
39
+ # With output directory
40
+ praison run ai-podcast-cleaner recording.mp3 --output ./cleaned/
41
+
42
+ # Aggressive cleanup preset
43
+ praison run ai-podcast-cleaner recording.wav --preset aggressive
44
+
45
+ # Skip transcription
46
+ praison run ai-podcast-cleaner recording.wav --no-transcribe
47
+
48
+ # Dry run (show plan without executing)
49
+ praison run ai-podcast-cleaner recording.wav --dry-run
50
+
51
+ # Force overwrite existing output
52
+ praison run ai-podcast-cleaner recording.wav --force
53
+ ```
54
+
55
+ ### Python API
56
+
57
+ ```python
58
+ from praisonaiagents import Workflow
59
+
60
+ workflow = Workflow.from_template("ai-podcast-cleaner")
61
+ result = workflow.run(
62
+ input="./recording.wav",
63
+ output="./cleaned/",
64
+ preset="default"
65
+ )
66
+ ```
67
+
68
+ ## Presets
69
+
70
+ | Preset | Description |
71
+ |--------|-------------|
72
+ | `default` | Balanced cleanup for most podcasts |
73
+ | `aggressive` | Heavy noise reduction, shorter silence threshold |
74
+ | `gentle` | Light cleanup, preserves natural pauses |
75
+
76
+ ## Output Files
77
+
78
+ ### cleaned.mp3
79
+ - Normalized to -16 LUFS
80
+ - Silences > 0.5s removed
81
+ - High-quality MP3 (192kbps)
82
+
83
+ ### transcript.txt
84
+ Plain text transcript of the audio content.
85
+
86
+ ### transcript.srt
87
+ SRT format captions with timestamps:
88
+ ```
89
+ 1
90
+ 00:00:00,000 --> 00:00:05,000
91
+ Welcome to the podcast.
92
+
93
+ 2
94
+ 00:00:05,500 --> 00:00:10,000
95
+ Today we're discussing AI agents.
96
+ ```
97
+
98
+ ### chapters.json
99
+ ```json
100
+ {
101
+ "chapters": [
102
+ {"start": 0, "end": 120, "title": "Introduction"},
103
+ {"start": 120, "end": 480, "title": "Main Discussion"},
104
+ {"start": 480, "end": 600, "title": "Conclusion"}
105
+ ]
106
+ }
107
+ ```
108
+
109
+ ### run.json
110
+ Execution metadata including timing, config, and output file info.
111
+
112
+ ## Safety Defaults
113
+
114
+ - Never modifies input files
115
+ - Output to timestamped directory by default
116
+ - Requires `--force` to overwrite existing output
117
+ - Logs all operations to `run.log`
@@ -0,0 +1,117 @@
1
+ name: ai-podcast-cleaner
2
+ version: "1.0.0"
3
+ description: |
4
+ Clean podcast audio by removing noise, normalizing volume,
5
+ trimming silences, and generating transcripts with chapter markers.
6
+
7
+ Input: Audio file (wav, mp3, m4a, flac)
8
+ Output: Cleaned audio + transcript + chapters.json
9
+
10
+ author: praisonai
11
+ license: Apache-2.0
12
+ tags: [audio, podcast, cleanup, transcript, noise-reduction, normalization]
13
+
14
+ requires:
15
+ tools: [shell_tool]
16
+ packages: [praisonai-tools]
17
+ env: [OPENAI_API_KEY]
18
+ external:
19
+ - name: ffmpeg
20
+ check: "ffmpeg -version"
21
+ install_hint: "brew install ffmpeg (macOS) or apt install ffmpeg (Linux)"
22
+
23
+ workflow: workflow.yaml
24
+ agents: agents.yaml
25
+
26
+ config:
27
+ input:
28
+ type: string
29
+ required: true
30
+ description: Input audio file path
31
+ output:
32
+ type: string
33
+ description: Output directory (default: ./outputs/ai-podcast-cleaner/<timestamp>/)
34
+ preset:
35
+ type: string
36
+ default: default
37
+ enum: [default, aggressive, gentle]
38
+ description: Cleanup preset
39
+ remove_silence:
40
+ type: boolean
41
+ default: true
42
+ description: Remove long silences
43
+ normalize:
44
+ type: boolean
45
+ default: true
46
+ description: Normalize audio levels
47
+ transcribe:
48
+ type: boolean
49
+ default: true
50
+ description: Generate transcript
51
+ chapters:
52
+ type: boolean
53
+ default: true
54
+ description: Generate chapter markers
55
+
56
+ defaults:
57
+ preset: default
58
+ remove_silence: true
59
+ normalize: true
60
+ transcribe: true
61
+ chapters: true
62
+
63
+ cli:
64
+ command: ai-podcast-cleaner
65
+ args:
66
+ - name: input
67
+ positional: true
68
+ required: true
69
+ description: Input audio file
70
+ - name: --output
71
+ short: -o
72
+ description: Output directory
73
+ - name: --preset
74
+ short: -p
75
+ default: default
76
+ description: Cleanup preset (default, aggressive, gentle)
77
+ - name: --no-silence-removal
78
+ flag: true
79
+ description: Skip silence removal
80
+ - name: --no-normalize
81
+ flag: true
82
+ description: Skip normalization
83
+ - name: --no-transcribe
84
+ flag: true
85
+ description: Skip transcription
86
+ - name: --dry-run
87
+ flag: true
88
+ description: Show plan without executing
89
+ - name: --force
90
+ flag: true
91
+ description: Overwrite existing output
92
+ - name: --verbose
93
+ short: -v
94
+ flag: true
95
+ description: Enable verbose output
96
+ examples:
97
+ - "praison run ai-podcast-cleaner recording.wav"
98
+ - "praison run ai-podcast-cleaner recording.mp3 --preset aggressive"
99
+ - "praison run ai-podcast-cleaner recording.wav --output ./cleaned/ --no-transcribe"
100
+ - "praison run ai-podcast-cleaner recording.wav --dry-run"
101
+
102
+ outputs:
103
+ - name: cleaned.mp3
104
+ type: file
105
+ description: Cleaned audio file
106
+ - name: transcript.txt
107
+ type: file
108
+ description: Plain text transcript
109
+ - name: transcript.srt
110
+ type: file
111
+ description: SRT caption file
112
+ - name: chapters.json
113
+ type: file
114
+ description: Chapter markers with timestamps
115
+ - name: run.json
116
+ type: file
117
+ description: Execution metadata
@@ -0,0 +1,59 @@
1
+ framework: praisonai
2
+ topic: AI Podcast Cleaner Pipeline
3
+
4
+ roles:
5
+ audio_processor:
6
+ role: Audio Engineer
7
+ goal: Clean and enhance podcast audio
8
+ backstory: |
9
+ I am an AI audio engineer specializing in podcast production.
10
+ I use ffmpeg and audio processing tools to clean recordings,
11
+ remove noise, normalize levels, and trim silences.
12
+ tasks:
13
+ process_audio:
14
+ description: |
15
+ Process the input audio file:
16
+ 1. Probe audio to get metadata (duration, format, sample rate)
17
+ 2. Apply noise reduction if needed
18
+ 3. Normalize audio levels to -16 LUFS
19
+ 4. Remove long silences (>0.5s)
20
+ 5. Export cleaned audio as MP3
21
+
22
+ Input: {input}
23
+ Output directory: {output}
24
+ Preset: {preset}
25
+ expected_output: |
26
+ Cleaned audio file with:
27
+ - Normalized volume levels
28
+ - Reduced background noise
29
+ - Trimmed silences
30
+ tools:
31
+ - shell_tool
32
+
33
+ transcriber:
34
+ role: Transcription Specialist
35
+ goal: Generate accurate transcripts with timestamps
36
+ backstory: |
37
+ I am an AI transcription specialist using OpenAI Whisper.
38
+ I generate accurate transcripts with word-level timestamps
39
+ and can identify natural chapter breaks in content.
40
+ tasks:
41
+ transcribe_audio:
42
+ description: |
43
+ Transcribe the cleaned audio:
44
+ 1. Use Whisper API to transcribe with word timestamps
45
+ 2. Generate plain text transcript
46
+ 3. Generate SRT caption file
47
+ 4. Identify chapter breaks based on content
48
+ 5. Create chapters.json with timestamps and titles
49
+
50
+ Audio file: {output}/cleaned.mp3
51
+ expected_output: |
52
+ - transcript.txt: Full text transcript
53
+ - transcript.srt: Timestamped captions
54
+ - chapters.json: Chapter markers
55
+ tools:
56
+ - shell_tool
57
+
58
+ dependencies:
59
+ - transcribe_audio depends on process_audio
@@ -0,0 +1,77 @@
1
+ name: AI Podcast Cleaner Workflow
2
+ description: |
3
+ End-to-end podcast audio cleaning pipeline.
4
+ Cleans audio, normalizes levels, removes silence, and generates transcripts.
5
+
6
+ process: sequential
7
+
8
+ variables:
9
+ input: ""
10
+ output: ""
11
+ preset: "default"
12
+ remove_silence: "true"
13
+ normalize: "true"
14
+ transcribe: "true"
15
+ chapters: "true"
16
+
17
+ agents:
18
+ audio_processor:
19
+ name: AudioProcessor
20
+ role: Audio Engineer
21
+ goal: Clean and enhance podcast audio
22
+ instructions: |
23
+ You are an AI audio engineer. Process the input audio file using ffmpeg.
24
+
25
+ Steps:
26
+ 1. Probe the audio file to get metadata
27
+ 2. Normalize audio to -16 LUFS using loudnorm filter
28
+ 3. Remove silences longer than 0.5 seconds
29
+ 4. Export as high-quality MP3
30
+
31
+ Use these ffmpeg commands:
32
+ - Probe: ffprobe -v quiet -print_format json -show_format -show_streams "{input}"
33
+ - Normalize: ffmpeg -y -i "{input}" -af loudnorm=I=-16:TP=-1.5:LRA=11 -ar 48000 "{output}/cleaned.mp3"
34
+ - Remove silence: ffmpeg -y -i "{input}" -af silenceremove=start_periods=1:stop_periods=-1:stop_duration=0.5:stop_threshold=-50dB "{output}/cleaned.mp3"
35
+ tools: [shell_tool]
36
+
37
+ transcriber:
38
+ name: Transcriber
39
+ role: Transcription Specialist
40
+ goal: Generate transcripts with timestamps
41
+ instructions: |
42
+ You are a transcription specialist. Use the Whisper API to transcribe audio.
43
+
44
+ Generate:
45
+ 1. transcript.txt - Plain text transcript
46
+ 2. transcript.srt - SRT caption file
47
+ 3. chapters.json - Chapter markers based on content analysis
48
+ tools: [shell_tool]
49
+
50
+ tasks:
51
+ - name: probe_audio
52
+ agent: audio_processor
53
+ description: |
54
+ Probe the input audio file to get metadata.
55
+ Run: ffprobe -v quiet -print_format json -show_format -show_streams "{input}"
56
+ expected_output: Audio metadata (duration, format, sample rate, channels)
57
+
58
+ - name: normalize_audio
59
+ agent: audio_processor
60
+ description: |
61
+ Normalize audio levels to -16 LUFS.
62
+ Run: ffmpeg -y -i "{input}" -af "loudnorm=I=-16:TP=-1.5:LRA=11" -ar 48000 "{output}/normalized.mp3"
63
+ expected_output: Normalized audio file
64
+
65
+ - name: remove_silence
66
+ agent: audio_processor
67
+ description: |
68
+ Remove long silences from the audio.
69
+ Run: ffmpeg -y -i "{output}/normalized.mp3" -af "silenceremove=start_periods=1:stop_periods=-1:stop_duration=0.5:stop_threshold=-50dB" "{output}/cleaned.mp3"
70
+ expected_output: Cleaned audio with silences removed
71
+
72
+ - name: transcribe
73
+ agent: transcriber
74
+ description: |
75
+ Transcribe the cleaned audio using Whisper API.
76
+ Generate transcript.txt, transcript.srt, and chapters.json.
77
+ expected_output: Transcript files and chapter markers
@@ -0,0 +1,59 @@
1
+ # Podcast Transcriber
2
+
3
+ Full podcast transcription with speaker diarization
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pip install agent-recipes
9
+ ```
10
+
11
+ ## CLI Usage
12
+
13
+ ```bash
14
+ # Basic usage
15
+ praison recipes run ai-podcast-transcriber <input>
16
+
17
+ # With output directory
18
+ praison recipes run ai-podcast-transcriber <input> --output ./output/
19
+
20
+ # Dry run (check dependencies only)
21
+ praison recipes run ai-podcast-transcriber <input> --dry-run
22
+
23
+ # Show recipe info
24
+ praison recipes info ai-podcast-transcriber
25
+
26
+ # Check dependencies
27
+ praison recipes doctor ai-podcast-transcriber
28
+ ```
29
+
30
+ ## Python Usage
31
+
32
+ ```python
33
+ from praisonaiagents import Agent
34
+ from agent_recipes import load_recipe
35
+
36
+ # Load and run recipe
37
+ recipe = load_recipe("ai-podcast-transcriber")
38
+ result = recipe.run(input="<your-input>")
39
+ print(result)
40
+ ```
41
+
42
+ ## Requirements
43
+
44
+ ### Packages
45
+ - openai
46
+
47
+ ### Environment Variables
48
+ - OPENAI_API_KEY
49
+
50
+ ### External Tools
51
+ - ffmpeg
52
+
53
+ ## Tags
54
+
55
+ `audio`, `podcast`, `transcription`, `diarization`
56
+
57
+ ## License
58
+
59
+ Apache-2.0
@@ -0,0 +1,32 @@
1
+ name: ai-podcast-transcriber
2
+ version: "1.0.0"
3
+ description: Full podcast transcription with speaker diarization
4
+ author: praison
5
+ license: Apache-2.0
6
+ tags:
7
+ - audio
8
+ - podcast
9
+ - transcription
10
+ - diarization
11
+
12
+ requires:
13
+ tools:
14
+ - whisper_tool
15
+ - llm_tool
16
+ packages:
17
+ - openai
18
+ env:
19
+ - OPENAI_API_KEY
20
+ external:
21
+ - ffmpeg
22
+
23
+ cli:
24
+ command: praison recipes run ai-podcast-transcriber
25
+ examples:
26
+ - praison recipes run ai-podcast-transcriber <input>
27
+ - praison recipes run ai-podcast-transcriber <input> --output ./output/
28
+ - praison recipes run ai-podcast-transcriber <input> --dry-run
29
+
30
+ safety:
31
+ dry_run_default: false
32
+ overwrites_files: true
@@ -0,0 +1,41 @@
1
+ name: ai-post-copy-generator
2
+ version: 1.0.0
3
+ description: Generate platform-specific post copy for X, LinkedIn, YouTube descriptions
4
+ author: PraisonAI
5
+ tags:
6
+ - copy
7
+ - social-media
8
+ - content
9
+
10
+ config:
11
+ platforms:
12
+ - x
13
+ - linkedin
14
+ - youtube
15
+ tone: professional
16
+ include_hashtags: true
17
+
18
+ input:
19
+ type: object
20
+ properties:
21
+ topic:
22
+ type: string
23
+ platform:
24
+ type: string
25
+
26
+ output:
27
+ type: object
28
+ properties:
29
+ copy:
30
+ type: string
31
+
32
+ requires:
33
+ env:
34
+ - OPENAI_API_KEY
35
+
36
+ workflow:
37
+ agents:
38
+ - name: copywriter
39
+ role: Social Media Copywriter
40
+ tools:
41
+ - generate_post_copy