Skip to content

Commit c470abd

Browse files
authored
Merge pull request #1043 from sunnynagavo/dev/nagavo/cagentgithubmodel
Add podcast generation workflow to show the integration in using github models.
2 parents ceca780 + 316a836 commit c470abd

File tree

3 files changed

+72
-3
lines changed

3 files changed

+72
-3
lines changed

Taskfile.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ tasks:
5555
test:
5656
aliases: [t]
5757
desc: Run tests
58-
cmd: OPENAI_API_KEY= ANTHROPIC_API_KEY= GOOGLE_API_KEY= MISTRAL_API_KEY= go test {{.CLI_ARGS}} ./...
58+
cmd: OPENAI_API_KEY= ANTHROPIC_API_KEY= GOOGLE_API_KEY= MISTRAL_API_KEY= GITHUB_TOKEN= go test {{.CLI_ARGS}} ./...
5959

6060
build-local:
6161
desc: Build binaries for local host platform
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
#!/usr/bin/env cagent run
2+
3+
agents:
4+
root:
5+
description: "Podcast Director - Orchestrates the entire podcast creation workflow and generates text file"
6+
instruction: |
7+
You are the Podcast Director responsible for coordinating the entire podcast creation process.
8+
9+
Your workflow:
10+
1. Analyze input requirements (topic, length, style, target audience)
11+
2. Delegate research to the research agent which can open duck duck go browser for researching
12+
3. Pass the researched information to the scriptwriter for script creation
13+
4. Output is generated as a text file which can be saved to file or printed out
14+
5. Ensure quality control throughout the process
15+
16+
Always maintain a professional, engaging tone and ensure the final podcast meets broadcast standards.
17+
model: github-model
18+
toolsets:
19+
- type: mcp
20+
command: docker
21+
args: ["mcp", "gateway", "run", "--servers=duckduckgo"]
22+
sub_agents: ["researcher", "scriptwriter"]
23+
researcher:
24+
model: github-model
25+
description: "Podcast Researcher - Gathers comprehensive information for podcast content"
26+
instruction: |
27+
You are an expert podcast researcher who gathers comprehensive, accurate, and engaging information.
28+
29+
Your responsibilities:
30+
- Research the given topic thoroughly using web search
31+
- Find current news, trends, and expert opinions
32+
- Gather supporting statistics, quotes, and examples
33+
- Identify interesting angles and story hooks
34+
- Create detailed research briefs with sources
35+
- Fact-check information for accuracy
36+
37+
Always provide well-sourced, current, and engaging research that will make for compelling podcast content.
38+
toolsets:
39+
- type: mcp
40+
command: docker
41+
args: ["mcp", "gateway", "run", "--servers=duckduckgo"]
42+
scriptwriter:
43+
model: github-model
44+
description: "Podcast Scriptwriter - Creates engaging, professional podcast scripts"
45+
instruction: |
46+
You are a professional podcast scriptwriter who creates compelling, conversational content.
47+
48+
Your expertise:
49+
- Transform research into engaging conversational scripts
50+
- Create natural dialogue and smooth transitions
51+
- Add hooks, sound bite moments, and calls-to-action
52+
- Structure content with clear intro, body, and outro
53+
- Include timing cues and production notes
54+
- Adapt tone for target audience and podcast style
55+
- Create multiple format options (interview, solo, panel discussion)
56+
57+
Write scripts that sound natural when spoken and keep listeners engaged throughout.
58+
toolsets:
59+
- type: mcp
60+
command: docker
61+
args: ["mcp", "gateway", "run", "--servers=filesystem"]
62+
models:
63+
github-model:
64+
provider: openai
65+
model: gpt-5
66+
base_url: https://models.github.ai/inference
67+
token_key: GITHUB_TOKEN

pkg/config/gather.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,10 @@ func GatherEnvVarsForModels(cfg *latest.Config) []string {
5555
for modelName := range modelNames {
5656
model := cfg.Models[modelName]
5757

58-
// Use the token environment variable from the alias if available
59-
if alias, exists := provider.Aliases[model.Provider]; exists {
58+
if model.TokenKey != "" {
59+
requiredEnv[model.TokenKey] = true
60+
} else if alias, exists := provider.Aliases[model.Provider]; exists {
61+
// Use the token environment variable from the alias if available
6062
if alias.TokenEnvVar != "" {
6163
requiredEnv[alias.TokenEnvVar] = true
6264
}

0 commit comments

Comments
 (0)