Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
699bf8a
copilot cli
pelikhan Sep 25, 2025
c267dc2
Add GitHub Copilot engine registration to the engine registry
pelikhan Sep 25, 2025
b3fc7ad
Refactor workflow files to remove unused reaction step and clarify is…
pelikhan Sep 25, 2025
364f790
Update GitHub Copilot CLI token reference to use GITHUB_COPILOT_CLI_T…
pelikhan Sep 25, 2025
d8e13d7
Refactor GetExecutionSteps to include log directory handling and upda…
pelikhan Sep 25, 2025
a63751e
Enhance copilot CLI execution by adding log directory handling and im…
pelikhan Sep 25, 2025
d1ae170
Refactor copilot CLI log handling to use a constant log directory and…
pelikhan Sep 25, 2025
68d3b90
Refactor copilot environment variables to use a temporary directory f…
pelikhan Sep 25, 2025
9c77101
Update MCP configuration file name and add local type for safe outputs
pelikhan Sep 25, 2025
fa0d091
Update Playwright MCP configuration to use local type and adjust allo…
pelikhan Sep 25, 2025
aeb67e6
Add support for cache-memory tool by appending --add-dir argument
pelikhan Sep 25, 2025
12d4d6c
Remove GitHub MCP server configuration from dev.lock.yml and copilot_…
pelikhan Sep 25, 2025
bd701ba
Add support for filtering logs by Copilot engine type
pelikhan Sep 25, 2025
cc68b9b
lint
pelikhan Sep 25, 2025
12f6b29
Add support for filtering logs by Copilot engine and update token sec…
pelikhan Sep 25, 2025
d488fd6
Update cleanup commands to use recursive removal for engine output files
pelikhan Sep 25, 2025
b12b573
Refactor workflow to create pull requests instead of issues, update R…
pelikhan Sep 25, 2025
5a7f28a
Update dev workflow to append a new poem to poem.txt and push changes…
pelikhan Sep 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1,136 changes: 498 additions & 638 deletions .github/workflows/dev.lock.yml

Large diffs are not rendered by default.

35 changes: 7 additions & 28 deletions .github/workflows/dev.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,15 @@
---
on:
workflow_dispatch:
reaction: "eyes"
push:
branches:
- copilot/*
engine: claude
- copilot*
engine: copilot
tools:
cache-memory: true
safe-outputs:
staged: true
safe-jobs:
print:
#name: "print the message"
runs-on: ubuntu-latest
inputs:
message:
description: "Message to print"
required: true
type: string
steps:
- name: See artifacts
run: cd /tmp/safe-jobs && ls -lR
- name: print message
run: |
if [ -f "$GITHUB_AW_AGENT_OUTPUT" ]; then
MESSAGE=$(cat "$GITHUB_AW_AGENT_OUTPUT" | jq -r '.items[] | select(.type == "print") | .message')
echo "print: $MESSAGE"
echo "### Print Step Summary" >> "$GITHUB_STEP_SUMMARY"
echo "$MESSAGE" >> "$GITHUB_STEP_SUMMARY"
else
echo "No agent output found, using default: Hello from safe-job!"
fi
create-pull-request:
staged: true
---
Summarize and use print the message using the `print` tool.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Create a new poem and save it to file poem.txt, then push the changes to a pull request.
4 changes: 2 additions & 2 deletions cmd/gh-aw/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ var verbose bool

// validateEngine validates the engine flag value
func validateEngine(engine string) error {
if engine != "" && engine != "claude" && engine != "codex" {
return fmt.Errorf("invalid engine value '%s'. Must be 'claude' or 'codex'", engine)
if engine != "" && engine != "claude" && engine != "codex" && engine != "copilot" {
return fmt.Errorf("invalid engine value '%s'. Must be 'copilot', 'claude' or 'codex'", engine)
}
return nil
}
Expand Down
30 changes: 22 additions & 8 deletions docs/src/content/docs/reference/engines.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ sidebar:

GitHub Agentic Workflows support multiple AI engines to interpret and execute natural language instructions. Each engine has unique capabilities and configuration options.

## Available Engines
## Agentic Engines

### Claude (Default)
### Anthropic Claude Code (Default)

Claude Code is the default and recommended AI engine for most workflows. It excels at reasoning, code analysis, and understanding complex contexts.

Expand All @@ -29,13 +29,23 @@ engine:
DEBUG_MODE: "true"
```

**Features:**
- Excellent reasoning and code analysis capabilities
- Supports max-turns for cost control
- Uses MCP servers for tool integration
- Generates `mcp-servers.json` configuration
#### Secrets

- `ANTHROPIC_API_KEY` secret is required for authentication.

### GitHub Copilot (Experimental)

### Codex (Experimental)
[GitHub Copilot CLI](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/use-copilot-cli)

```yaml
engine: copilot
```

#### Secrets

- `COPILOT_CLI_TOKEN` secret is required for authentication.

### OpenAI Codex (Experimental)

OpenAI Codex CLI with MCP server support. Designed for code-focused tasks and integration scenarios.

Expand Down Expand Up @@ -72,6 +82,10 @@ engine:
- **`user-agent`** (optional): Custom user agent string for GitHub MCP server configuration
- **`config`** (optional): Additional TOML configuration text appended to generated config.toml

#### Secrets

- `OPENAI_API_KEY` secret is required for authentication.

### Custom Engine

For advanced users who want to define completely custom GitHub Actions steps instead of using AI interpretation.
Expand Down
7 changes: 4 additions & 3 deletions pkg/cli/interactive.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,10 @@ func (b *InteractiveWorkflowBuilder) promptForTrigger() error {
// promptForEngine asks the user to select the AI engine
func (b *InteractiveWorkflowBuilder) promptForEngine() error {
engineOptions := []huh.Option[string]{
huh.NewOption("claude - Anthropic Claude Code coding agent", "claude"),
huh.NewOption("codex - OpenAI Codex engine", "codex"),
huh.NewOption("custom - Custom engine configuration", "custom"),
huh.NewOption("copilot - GitHub Copilot CLI", "copilot"),
huh.NewOption("claude - Anthropic Claude Code", "claude"),
huh.NewOption("codex - OpenAI Codex", "codex"),
huh.NewOption("custom - Custom configuration", "custom"),
}

form := huh.NewForm(
Expand Down
4 changes: 2 additions & 2 deletions pkg/cli/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ func DownloadWorkflowLogs(workflowName string, count int, startDate, endDate, ou
if detectedEngine != nil {
// Get the engine ID to compare with the filter
registry := workflow.GetGlobalEngineRegistry()
for _, supportedEngine := range []string{"claude", "codex"} {
for _, supportedEngine := range constants.AgenticEngines {
if testEngine, err := registry.GetEngine(supportedEngine); err == nil && testEngine == detectedEngine {
engineMatches = (supportedEngine == engine)
break
Expand All @@ -371,7 +371,7 @@ func DownloadWorkflowLogs(workflowName string, count int, startDate, endDate, ou
if detectedEngine != nil {
// Try to get a readable name for the detected engine
registry := workflow.GetGlobalEngineRegistry()
for _, supportedEngine := range []string{"claude", "codex"} {
for _, supportedEngine := range constants.AgenticEngines {
if testEngine, err := registry.GetEngine(supportedEngine); err == nil && testEngine == detectedEngine {
engineName = supportedEngine
break
Expand Down
1 change: 1 addition & 0 deletions pkg/cli/templates/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -795,6 +795,7 @@ gh aw logs weekly-research
# Filter logs by AI engine type
gh aw logs --engine claude # Only Claude workflows
gh aw logs --engine codex # Only Codex workflows
gh aw logs --engine copilot # Only Codex workflows

# Limit number of runs and filter by date (absolute dates)
gh aw logs -c 10 --start-date 2024-01-01 --end-date 2024-01-31
Expand Down
2 changes: 2 additions & 0 deletions pkg/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,5 @@ var AllowedExpressions = []string{
const AgentJobName = "agent"
const SafeOutputArtifactName = "safe_output.jsonl"
const AgentOutputArtifactName = "agent_output.json"

var AgenticEngines = []string{"claude", "codex", "copilot"}
3 changes: 2 additions & 1 deletion pkg/parser/schemas/main_workflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -815,11 +815,12 @@
{
"type": "string",
"enum": [
"copilot",
"claude",
"codex",
"custom"
],
"description": "Simple engine name (claude, codex, or custom)"
"description": "Agentic engine (copilot, claude, codex, or custom)"
},
{
"type": "object",
Expand Down
1 change: 1 addition & 0 deletions pkg/workflow/agentic_engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ func NewEngineRegistry() *EngineRegistry {
}

// Register built-in engines
registry.Register(NewCopilotEngine())
registry.Register(NewClaudeEngine())
registry.Register(NewCodexEngine())
registry.Register(NewCustomEngine())
Expand Down
2 changes: 1 addition & 1 deletion pkg/workflow/compiler.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ type WorkflowData struct {
RunsOn string
Tools map[string]any
MarkdownContent string
AI string // "claude" or "codex" (for backwards compatibility)
AI string // "copilot", "claude" or "codex" (for backwards compatibility)
EngineConfig *EngineConfig // Extended engine configuration
StopTime string
Command string // for /command trigger support
Expand Down
Loading
Loading