Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
837 changes: 193 additions & 644 deletions .github/workflows/dev.lock.yml

Large diffs are not rendered by default.

34 changes: 5 additions & 29 deletions .github/workflows/dev.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,12 @@
---
on:
workflow_dispatch:
reaction: "eyes"
push:
branches:
- copilot/*
engine: claude
- copilot*
engine: copilot
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-issue:
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.
Summarize the issue and post the summary in a comment.
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

- `GITHUB_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
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