Saturday, April 25, 2026

(Free) Agent-based coding with Goose

Share


Photo by the editor

# Entry

The world of artificial intelligence (AI) for developers is changing at a rapid pace. You may have used tools that offer impressive code suggestions that autocomplete a line or two. But what if your AI could do more? Imagine an assistant that not only suggests a feature, but writes the entire script, runs it, detects errors, fixes them, and even implements the final design – all while sipping coffee.

This is the promise of agent-based coding, which is no longer a futuristic concept. It’s here today with tools like Goose. This article is a beginner-friendly tutorial to aid you understand and utilize Goose, a free, open-source AI agent that goes beyond plain suggestions and automates significant engineering tasks.

We’ll discuss what makes Goose unique, how it works, and exactly how you, as a data scientist, can start using it to improve your workflow.

# What is a goose?

At its core, Goose is an open-source, reusable AI agent designed to run on your local computer. Think of it as an autonomous team member who can take convoluted instructions and execute them from start to finish.

Unlike classic AI coding assistants that run in your word processor and offer snippets, Goose works in your real development environment. It can interact with the file system, run terminal commands, and even invoke external application programming interfaces (APIs). This means it can handle entire workflows, not just single lines of code.

Developed with transparency and community input in mind, Goose is powered by Block Inc. and is available to anyone under an open source license. You can find and contribute to the complete codebase GitHub repository.

# Key features that distinguish a goose

The goose is not just another AI package. Its architecture is based on several powerful principles that make it unique:

  1. The goose is truly autonomous and can divide an overarching goal into a series of steps and accomplish them. You can ask him to “build a simple web scraper for this site and generate the data in CSV format” and he will take care of the planning, coding, testing and debugging.
  2. This is a game changer. Goose can connect to any server compatible with Model context protocol (MCP). This standard allows it to be connected to a enormous ecosystem of tools such as databases, version control systems, etc Gitor external services, significantly expanding its capabilities.
  3. Your code and data remain on your computer. Goose performs tasks in your local environment, which is essential when working with sensitive data or proprietary codebases. You remain in full control.
  4. You are not locked into one AI model. Goose works with any major language model (LLM), from advanced cloud-based options like GPT-4 and Claude to on-premises models that you can run on your own hardware. This provides the flexibility to balance performance, cost and privacy.
  5. Goose is available in two flavors to fit your workflow:
    • Desktop App: User-friendly graphical interface, ideal for visual thinkers and those who prefer a chat-like experience.
    • Command Line Interface (CLI): For terminal developers, the CLI offers speed, scripting capabilities, and deep integration.

# Why should data scientists be interested in agentic coding?

If you’re a data scientist, your day job is a perfect fit for what Goose does best. You’re constantly juggling tasks that are repetitive, multi-step, and require interaction with different tools and libraries. Here’s how Goose can become your secret weapon:

  1. Rapid prototyping: Do you have a hypothesis? Tell Goose to “load the Titanic dataset from Seaborn, train a random forest classifier, and print the accuracy score.” It can write standard code, execute it and give you results in seconds, allowing you to work faster.
  2. Automated data pipeline tasks: Ask Goose to ‘write a Python script that will immaculate up all the CSV files in the format ./data/raw folder, handles the missing values ​​by assigning the median and saves the cleaned files in it ./data/processed” It will create, run and even debug the script for you.
  3. Simplifying MLOps: Want to version your model with DVC or record an experiment in MLflow? You can ask Goose to handle Git commands, DVC configuration, or MLflow logging calls, thus eliminating operational difficulties.
  4. Environment and dependency management: Up-to-date project? Ask Goose to “create a new Python virtual environment, install pandas, scikit-learn, and matplotlib, and then generate the require.txt file.” It’s like having a DevOps engineer on your team.

# Getting started with a goose: a step-by-step guide

Let’s start by installing Goose and running the first agent task. The process is plain thanks to excellent documentation.

// Step 1: Installation

There are different installation methods depending on the operating system (macOS, Linux or Windows). You can download the desktop application installer directly from the website Goose website or the releases page on GitHub.

Geese installation
Figure 1: Goose installation

// Step 2: Initial setup and configuration

Extract files from the downloaded zip file. Open the extracted folder and click on the Goose app.

The first time you launch Goose, it will guide you through the setup process. The most essential step is to set up your LLM provider. You will need an API key from a provider such as OpenAI, Anthropic or another. Goose will ask which provider you want to utilize and securely ask you for your key. You can also configure this later or change providers by editing the configuration file, giving you the flexibility to utilize different models for different tasks.

Initial setup and configuration of the goose
Figure 2: Goose initial setup and configuration

// Step 3: Your first agent session

Now the fun part. Let’s give Goose a task that will showcase his agent skills. We will ask him to perform a plain data analysis. Start a up-to-date chat:

You will be greeted with a prompt. Now type the statement. Be as clear and specific as you would be with a younger colleague.

Agent's first session
Figure 3: First agent session

Enter the following prompt:

I’m in a up-to-date, empty directory. First, create a up-to-date Python script called Analysis_stocks.py. In this script, write the code to:

1. Employ the yfinance library to download the last 3 months of daily stock data for Apple (AAPL) and Microsoft (MSFT).
2. Calculate the 20-day plain moving average of the closing price of each stock.
3. Create a single chart showing the closing prices and moving averages for both stocks, along with a legend.
4. Save the chart as stock_analytics.png.

Then run the script. If you encounter any errors (such as missing libraries), find out how to fix them and restart until it works. Finally, let me know if the image was successfully created.

Now sit back and watch.

Goose chat interface
Figure 4: Goose Chat interface

Here’s what happened:

  • We download Apple (AAPL) and Microsoft (MSFT) daily stock data for the last 3 months via file finances library.
  • We calculate a 20-day plain moving average for each stock’s closing price.
  • We create a single chart showing closing prices and moving averages.

This plain example illustrates the essence of agentic coding, where a single instruction leads to a multi-step, self-correcting workflow. More convoluted tutorials can be found on the official website.

Goose chat interface
Figure 5: Goose Chat interface

# Extending Goose’s capabilities with MCP

Goose’s true potential can be accessed through its extensibility. MCP is an open standard that allows Goose to connect to any server that implements it. Think of MCP servers as “skills” or “tools” that you can give to Goose.

For example, you can connect Goose to the following devices:

  1. MCP Server for PostgreSQL: Then you can ask: “Connect to my local database, run a query to find the top 10 customers by time-to-date value, and save the results to a CSV file.”
  2. MCP server for GitHub: Your instructions might be: “Look through the open issues in my repo data project, find the one marked ‘bug’, and create a new branch to start working on the fix.”
  3. MCP server for Slack: You can let Goose monitor your feed and automatically summarize discussions or post updates.

This ecosystem transforms Goose from a powerful local agent into a central coordinator of the entire programming process and data flow.

Goose settings
Figure 6: Geese setup

# Application

Agent coding represents a significant step forward in the way we interact with artificial intelligence. This means moving from asking for aid with a petite piece of code to delegating entire tasks and trusting the AI ​​to figure out the next steps.

Goose makes this powerful paradigm accessible, free and under your control. For data scientists, it is an invaluable tool for automating tedious tasks, quickly prototyping, and managing the increasing complexity of current projects. By running locally, being independent of LLM and extensible with MCP, it puts the power of autonomous AI agents directly in your hands, directly on your own machine.

The best way to discover its potential is to try it out. Install Goose, give it that task you’ve been dreading, and experience the future of coding.

// Reference

Shittu Olumid is a software engineer and technical writer with a passion for using cutting-edge technology to create compelling narratives, with an eye for detail and a knack for simplifying convoluted concepts. You can also find Shittu on Twitter.

Latest Posts

More News