AgentStack
MCP verified Apache-2.0 Self-run

Infer Action

mcp-inference-gateway-infer-action · by inference-gateway

A zero-runtime-dependency GitHub Action for running Infer CLI agents with multi-provider AI support, GitFirst workflows, issue automation, progress comments, and PR creation.

No reviews yet
0 installs
1 views
0.0% view→install

Install

$ agentstack add mcp-inference-gateway-infer-action

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution Used
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

Are you the author of Infer Action? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Infer Agent Action

A GitHub Action that automatically runs the Infer CLI agent on GitHub issues. The agent can analyze issues, provide solutions, and post results as comments using various AI providers (Anthropic, OpenAI, Google, Ollama, Ollama Cloud, Groq, Moonshot and more).

[](https://www.apache.org/licenses/LICENSE-2.0) [](https://github.com/inference-gateway/infer-action/releases) [](https://github.com/inference-gateway/infer-action/issues)

Features

  • 🤖 Automatically trigger AI agents on GitHub issues
  • 🔄 Support for multiple AI providers (Anthropic Claude, OpenAI GPT, Google Gemini)
  • 🎯 Customizable trigger phrases
  • 🔀 Dynamic model selection - override the default model per-issue or per-comment
  • 📝 Automatic comment posting with results and progress tracking
  • 🔀 Automatic pull request creation when file changes are made
  • ⚙️ Configurable agent behavior and iteration limits
  • 🚀 Easy setup with minimal configuration

Quick Start

Create a workflow file (e.g., .github/workflows/infer-agent.yml):

name: Infer Agent

on:
  issues:
    types:
      - opened
      - edited
  issue_comment:
    types:
      - created
  pull_request_review_comment:
    types:
      - created

jobs:
  run-agent:
    runs-on: ubuntu-24.04
    steps:
      - uses: actions/checkout@v7.0.0

      - uses: inference-gateway/infer-action@main
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          model: deepseek/deepseek-v4-flash
          deepseek-api-key: ${{ secrets.DEEPSEEK_API_KEY }}

Usage Examples

Basic Usage with Anthropic Claude

- uses: inference-gateway/infer-action@main
  with:
    github-token: ${{ secrets.GITHUB_TOKEN }}
    model: anthropic/claude-sonnet-4-6
    anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}

Using OpenAI GPT-5

- uses: inference-gateway/infer-action@main
  with:
    github-token: ${{ secrets.GITHUB_TOKEN }}
    model: openai/gpt-5
    openai-api-key: ${{ secrets.OPENAI_API_KEY }}

Using Google Gemini 3

- uses: inference-gateway/infer-action@main
  with:
    github-token: ${{ secrets.GITHUB_TOKEN }}
    model: google/gemini-3-pro
    google-api-key: ${{ secrets.GOOGLE_API_KEY }}

Custom Trigger Phrase

By default, the action triggers on @infer. You can customize this:

- uses: inference-gateway/infer-action@main
  with:
    github-token: ${{ secrets.GITHUB_TOKEN }}
    model: anthropic/claude-sonnet-4-6
    anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}
    trigger-phrase: "@ai-helper"

Dynamic Model Selection

You can override the default model on a per-issue or per-comment basis using the /model parameter. This allows you to experiment with different models without changing your workflow configuration.

Usage in issue comments:

@infer /model deepseek/deepseek-v4-flash can you explain what this project does?

Usage in issue bodies:

@infer /model openai/gpt-5 please analyze this bug and suggest a fix

Supported model format:

The model parameter accepts any valid model identifier in the format provider/model-name, such as:

  • anthropic/claude-sonnet-4-6
  • openai/gpt-5
  • google/gemini-3-pro
  • deepseek/deepseek-v4-flash
  • ollama_cloud/qwen3-coder:480b
  • moonshot/kimi-k2

The model specified in the workflow configuration serves as the default when no /model parameter is provided.

> Choosing a model. Capable models (Sonnet, Opus, GPT-5, Gemini-3-Pro) follow the branch/commit/PR protocol best and produce clean, self-contained PRs. > Flash/mini tiers (Haiku, GPT-5-mini, Gemini-3-Flash) are faster and cheaper but more often skip the git workflow, leaning on the salvage net to rescue their work. > For production repos where PR quality matters, prefer a capable model; for triage, Q&A, and lightweight tasks the flash tiers are a good fit.

Limiting Agent Iterations

- uses: inference-gateway/infer-action@main
  with:
    github-token: ${{ secrets.GITHUB_TOKEN }}
    model: deepseek/deepseek-v4-flash
    deepseek-api-key: ${{ secrets.DEEPSEEK_API_KEY }}
    max-turns: 30

Using Specific CLI Version

- uses: inference-gateway/infer-action@main
  with:
    github-token: ${{ secrets.GITHUB_TOKEN }}
    model: anthropic/claude-sonnet-4-6
    anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}
    version: v0.112.2

Adding Custom Instructions

The action includes comprehensive default instructions for the agent that cover:

  • Creating and posting a plan with todos
  • Real-time progress updates
  • Making file changes
  • Creating branches and commits
  • Opening pull requests
  • Posting results with PR links

You can provide additional project-specific instructions that will be appended to the defaults:

- uses: inference-gateway/infer-action@main
  with:
    github-token: ${{ secrets.GITHUB_TOKEN }}
    model: deepseek/deepseek-v4-flash
    deepseek-api-key: ${{ secrets.DEEPSEEK_API_KEY }}
    custom-instructions: |
      - Always run tests before committing changes
      - Follow the project's coding style guide in CONTRIBUTING.md
      - Add JSDoc comments for any new functions
      - Update relevant documentation when making changes

The custom instructions enhance the agent's behavior without replacing the core workflow.

Overriding System Prompts

For full control, the system-prompt-* inputs replace the bundled system prompts entirely:

- uses: inference-gateway/infer-action@main
  with:
    github-token: ${{ secrets.GITHUB_TOKEN }}
    model: deepseek/deepseek-v4-flash
    deepseek-api-key: ${{ secrets.DEEPSEEK_API_KEY }}
    system-prompt-issue: |
      You are an agent for issue #{{issueNumber}}.
      

> Warning: These inputs replace, not merge with, the bundled defaults. > The defaults carry a git-safety block (branch-first, commit-per-todo, push, > draft PR, finish checklist) that guards against lost work on the ephemeral > runner. An override that omits those instructions silently drops that guard. > When enable-git-operations is true the action emits a ::warning:: in the > run log listing the missing git-safety markers so the drop is visible. Prefer > custom-instructions to layer extras on top of the default unless you need a > complete replacement; if you do replace, re-add the branch/commit/push/PR > discipline to your text.

Loading Agent Skills

Infer skills are reusable Markdown packages (a folder with a SKILL.md frontmatter file) that the agent loads on startup and invokes by name. The action can install skills before the agent runs:

- uses: inference-gateway/infer-action@main
  with:
    github-token: ${{ secrets.GITHUB_TOKEN }}
    model: anthropic/claude-sonnet-4-6
    anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}
    skills: |
      maintainer
      # acme/internal-comms
      # https://github.com/anthropics/skills/tree/main/skills/pdf

Each line is passed directly to infer skills install, which accepts three forms:

  • Bare skill name - maintainer resolves to inference-gateway/skills/skills/maintainer/
  • / pair - acme/internal-comms resolves to acme/skills/skills/internal-comms/
  • Full GitHub tree URL - for any layout, branch, or tag: https://github.com///tree//

Lines beginning with # are treated as comments. Blank lines are ignored.

Notes:

  • Skills are installed to ~/.infer/skills/ on the runner (--user --overwrite). Your working tree is not modified.
  • Providing any skill automatically sets INFER_AGENT_SKILLS_ENABLED=true for the agent run.
  • Skill discovery and the first-party skill catalog live at inference-gateway/skills.
  • Skill installs are authenticated with the github-token you provide (passed to the CLI as GITHUB_TOKEN), so they use the 5,000 requests/hour authenticated limit

and can reach private repositories the token can access. Without a token, GitHub's 60 requests/hour-per-IP anonymous limit applies and is easily exhausted on shared CI runners.

Loading Infer Plugins

Infer plugins are Claude Code-format packages (an AGENTS.md instructions file plus optional skills) that extend the agent's capabilities. The action can install plugins before the agent runs:

- uses: inference-gateway/infer-action@main
  with:
    github-token: ${{ secrets.GITHUB_TOKEN }}
    model: anthropic/claude-sonnet-4-6
    anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}
    plugins: |
      # community plugin
      DietrichGebert/ponytail
      # pinned ref
      my-org/my-plugin@v2.1.0
      # full GitHub URL
      https://github.com/my-org/agent-plugins/tree/v1.0

Each line is passed directly to infer plugins install --yes, which accepts three forms:

  • owner/repo - DietrichGebert/ponytail resolves to github.com/DietrichGebert/ponytail
  • owner/repo@ref - pins a specific tag, branch, or commit: my-org/my-plugin@v2.1.0
  • Full GitHub URL - for any layout, branch, or tag: https://github.com//[/tree/]

Lines beginning with # are treated as comments. Blank lines are ignored.

Security model: Plugins are content-only mapping (skills + instructions). Plugin code (hooks/, commands/, agents/) is detected by the CLI but never executed or installed. This is especially important on unattended CI runners - the action inherits this safety from the CLI.

Notes:

  • Plugins are installed to ~/.infer/plugins/ on the runner with --yes (non-interactive).

Your working tree is not modified.

  • A failing install fails the step with a log line naming the entry.
  • After installation, infer plugins list is printed to the job log.
  • Plugin skills surface through normal skills discovery (scope plugin), and each enabled

plugin's AGENTS.md is injected into the system prompt as a labeled PLUGIN INSTRUCTIONS () section.

  • If the pinned CLI version predates the infer plugins subcommand, the install step fails

loudly, which is acceptable - upgrade the version pin.

  • No extra wiring is needed beyond the install: plugins are enabled by default in the CLI.

Spinning up A2A Agents

> Advanced / experimental. A2A (Agent-to-Agent) lets the main agent delegate > sub-tasks to other agents running as local Docker containers on the runner.

The agents input registers one or more A2A agents before the run, starts them as containers, and exposes them to the model via the A2A tools:

- uses: inference-gateway/infer-action@main
  with:
    github-token: ${{ secrets.GITHUB_TOKEN }}
    model: anthropic/claude-sonnet-4-6
    anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}
    agents: |
      browser-agent
      documentation-agent
      # custom image:
      # my-agent=ghcr.io/my-org/my-agent:latest

Each comma/newline-separated entry is one of:

  • A first-party agent name the CLI knows - browser-agent, mock-agent,

google-calendar-agent, documentation-agent, or n8n-agent. The CLI resolves the OCI image and a localhost URL for you, so the bare name is enough.

  • A name=oci-image pair - registers a custom image on an auto-assigned

localhost port (e.g. my-agent=ghcr.io/my-org/my-agent:latest).

Lines beginning with # are comments. Blank lines are ignored.

For each entry the action runs infer agents add ... --run --model , enables it, and sets INFER_A2A_ENABLED=true so infer agent starts the containers and can delegate to them. Under the hood this writes the CLI's project-level .infer/agents.yaml, which the action keeps out of the agent's commits (the "Hide Infer workspace from git" step).

Notes:

  • Docker is required on the runner. The default ubuntu-24.04 GitHub-hosted

runner has it pre-installed; the agents run as local containers.

  • Registration is best-effort. An unknown name or a failed infer agents add

logs a warning and is skipped - it does not fail the run. A missing Docker daemon warns rather than aborting.

  • Agents default to the same model as the main run (the model your workflow

already has a provider key for). For per-agent models, configure .infer/agents.yaml directly.

  • Container lifecycle is managed by the CLI; the action also tears down any

leftover inference-agent-* containers on cleanup, so they do not leak between runs on self-hosted runners.

Bash Commands (allow-list)

The agent runs bash through the Infer CLI's allow-list. As of CLI v0.121.0 the CLI owns a curated read-only baseline that every run inherits - you no longer configure it here. It covers file reads (ls, find, head, tail, wc, sort, uniq, tree), echo, task, make, read-only git (git status|branch|log|diff|remote|show), and read-only gh - including gh project list|view|item-list|field-list (reading project boards). It contains no writes.

On top of that baseline:

  • When git operations are enabled (the default), the action appends exactly the writes its PR

workflow needs: git add/commit/push/checkout/switch/fetch, gh pr create, gh pr ready, and a scoped gh pr edit limited to --title/--body/--body-file. gh pr merge, gh pr close, and gh pr review are deliberately never appended - the agent opens and maintains its own PR but a human reviews and merges.

  • Use bash-allow-append to add your project's tooling. Entries are Go regexes, each

anchored to the whole command, comma- or newline-separated:

- uses: inference-gateway/infer-action@v1
  with:
    github-token: ${{ secrets.GITHUB_TOKEN }}
    model: anthropic/claude-sonnet-4-6
    anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}
    # Add project tooling on top of the CLI baseline + the action's git-write append:
    bash-allow-append: "npm( .*)?,pnpm( .*)?,node( .*)?,go test( .*)?"

> Migrating from older versions (pre-CLI v0.121.0): the bash-whitelist-commands, > bash-whitelist-commands-append, bash-whitelist-patterns, and > bash-whitelist-patterns-append inputs are removed, along with the action's own default > command/pattern lists - the CLI now owns the read-only baseline. Move everything you used to > append into the single bash-allow-append input, and rewrite each entry as a regex > anchored to the whole command: a bare command name no longer matches its arguments, so > npm becomes npm( .*)? and ^npm .* becomes npm( .*)?. To replace the CLI baseline > (rather than append to it), configure the CLI's .infer/config.yaml directly.

Security notes:

  • Only allow commands you trust the agent to run.
  • Entries are evaluated as regex (comma- or newline-separated; no commas inside a single

pattern).

  • The CLI rejects command chaining, redirects, command substitution, and environment-variable

expansion in allowed commands, so an allow entry cannot be widened via ; / && / $() / >.

Example appends:

  • Node.js projects: bash-allow-append: "npm( .*)?,pnpm( .*)?,node( .*)?"
  • Python projects: bash-allow-append: "python3( .*)?,pip( .*)?,pytest( .*)?"
  • Build tools: bash-allow-append: "cargo( .*)?,cmake( .*)?,mvn( .*)?"

Disabling Git Operations (Comment-Only Mode)

By default, the agent can create branches, commits, and pull requests. If you want the agent to only analyze issues and post comments without making code changes, disable git operations:

- uses: inference-gateway/infer-action@main
  with:
    github-token: ${{ secrets.GITHUB_TOKEN }}
    model: anthropic/claude-sonnet-4-6
    anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}
    enable-git-operations: false

When enable-git-operations: false:

  • The action does not append the git-write commands or gh pr create, so the agent keeps only

the CLI's read-only baseline (it can still read with git log / gh ... view, but cannot commit, push, or o

Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.