Tools

Getting Started with Goose: The Open-Source Extensible AI Agent

Goose is an open-source extensible AI agent that goes beyond code suggestions — install, execute, edit, and test with any LLM provider on your own infrastructure.

Robson PereiraMay 31, 20268 min read
Goose extensible AI agent interface running locally.

Getting Started with Goose: The Open-Source Extensible AI Agent

The AI coding agent space is expanding fast, and **Goose** has emerged as one of the most interesting open-source entries. With over 46,000 GitHub stars, it is an extensible AI agent that goes beyond code suggestions — it can install dependencies, execute commands, edit files, and run tests, all while giving you control over which LLM provider powers it.

What makes Goose different

Goose is designed to be an agent that actually does things, not just a code completion tool. It can:

  • **Install and configure software** — run package managers, set up environments
  • **Execute code and commands** — test changes, run builds, capture output
  • **Edit files across projects** — with awareness of the full project structure
  • **Run tests and validate results** — creating a tight feedback loop
  • **Work with any LLM provider** — bring your own model, API key, and provider

This provider-agnostic approach is what makes Goose stand out in the self-hosted AI space. You are not locked into a specific model or API. If you prefer running local models, you can point Goose at your Ollama endpoint. If you need frontier capabilities for complex reasoning, you can use a cloud provider.

For context on how this fits into the broader AI coding ecosystem, see Open WebUI vs AnythingLLM for the difference between chat interfaces and agentic tools.

How Goose works

Goose operates as a terminal-based agent with a session model similar to Claude Code or Gemini CLI. You start a session, give it a goal, and it works through the task autonomously, using a toolkit that includes file operations, shell commands, code execution, and test runners.

The project is written in TypeScript and available at github.com/aaif-goose/goose under a permissive open-source licence. Its architecture is designed for extensibility — you can add custom tools, connect additional backends, and configure which capabilities the agent has access to.

Provider flexibility

This is Goose's killer feature for the self-hosted community. You can configure it to use:

  • **Local models** via Ollama, LM Studio, or any OpenAI-compatible endpoint
  • **Cloud providers** such as OpenAI, Anthropic, Google, or OpenRouter
  • **Custom endpoints** with any model you have running

This means you can use a fast small model for routine tasks and switch to a larger model for complex reasoning — all within the same tool.

Installation and setup

Install Goose via npm:

```bash

npm install -g @aaif/goose

```

Configure your provider. For local models via Ollama:

```bash

goose config set provider ollama

goose config set model llama3.1:8b

```

For cloud providers:

```bash

goose config set provider openai

goose config set api_key your-key-here

```

Start a session:

```bash

goose "Set up a FastAPI project with SQLite, add user authentication, and write tests"

```

Practical workflows

Local development assistant

Give Goose a task like "install the project dependencies, fix the failing test in tests/api.test.ts, and create a PR summary". It will read the codebase, run the test to see what fails, make the fix, rerun the test, and report back — all using local models if you prefer.

Multi-step automation

For build and deploy workflows, Goose can chain together dependency installation, configuration file editing, build execution, and smoke testing. This reduces the manual steps in your development pipeline.

Learning and exploration

Use Goose as a learning assistant that can install and run unfamiliar tools, explain their output, and show you how they work — without sending your commands or data to a third party when running locally.

Security considerations

Because Goose executes shell commands and modifies files, the same security practices apply as with any AI coding agent. Review what it proposes to run, use isolated environments for risky tasks, and keep API keys secure. For broader guidance, read How to Secure a Self-Hosted AI Server.

How Goose compares to alternatives

| Feature | Goose | Claude Code | Gemini CLI |

|---------|-------|-------------|------------|

| Provider-agnostic | Yes | No (Anthropic only) | No (Google only) |

| Local model support | Yes (via Ollama) | No | No |

| Open source | Yes | No | Yes (Apache 2.0) |

| File editing | Yes | Yes | Yes |

| Test execution | Yes | Yes | Via shell |

| Stars on GitHub | 46K+ | N/A | 105K+ |

For a detailed comparison of coding agents, read Claude Code vs Codex vs Kimi Code.

FAQ

Is Goose free?

Yes, it is open-source and free to use. You only pay for model API usage if using cloud providers.

Can Goose run entirely locally?

Yes. Point it at an Ollama endpoint with a local model, and no data leaves your machine.

What languages does Goose support?

It works with any programming language, since it operates at the shell and file level rather than parsing language-specific syntax models.

How does Goose compare to Cursor?

Cursor is an IDE-integrated code assistant. Goose is a terminal-based agent that can take multi-step actions. They solve different problems and can be complementary.

Related articles