> For the complete documentation index, see [llms.txt](https://mads.avelino.run/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mads.avelino.run/readme.md).

# Introduction

mads turns a business description into Google Ads bulk upload CSVs. Read this page to find the doc you need.

You write `business.toml` and, optionally, `catalog.csv`. LLM agents plan the account and build the campaigns. Rust code validates every limit and writes the files. You review `report.md`, upload the CSVs and enable the campaigns yourself.

## Start here

* [**Why mads**](/why-mads.md) covers the problem and what mads does and does not do.
* [**Getting started**](/first-steps/getting-started.md) installs mads and runs it end to end.
* [**Tutorial**](/first-steps/tutorial.md) goes from an empty folder to uploaded campaigns, using a wine app as the example.

## Guides

* [**The business file**](/guides/business-file.md) explains how to describe your business so the agents write good ads.
* [**The catalog**](/guides/catalog.md) explains how to list the things people search for by name.
* [**Providers**](/guides/providers.md) covers the API providers, models and keys.
* [**Agent CLIs**](/guides/agent-clis.md) covers `claude-cli`, `codex-cli` and `gemini-cli`, which use a coding agent you have installed.
* [**Init from a URL**](/guides/init-from-url.md) covers `mads init --from-url`, which studies your business and drafts the input files and research notes.
* [**How campaigns are built**](/guides/how-campaigns-are-built.md) explains intents, ad groups, keyword specs, negatives, ads and what the validator enforces.
* [**Image campaigns**](/guides/image-campaigns.md) explains Performance Max and Demand Gen: formats, logo, generated pictures and the Google Ads Editor import.
* [**Review and import**](/guides/review-and-import.md) explains how to read `report.md` and upload the files.
* [**Resume and export**](/guides/resume-and-export.md) explains how to recover a failed run and re-export without a model.
* [**Cost and limits**](/guides/cost-and-limits.md) covers turns, timeouts, token budgets and retries.
* [**GitHub Actions**](/guides/github-actions.md) has a complete workflow.

## How-to

* [**Troubleshooting**](/how-to/troubleshooting.md) lists every exit code and real error messages.
* [**Run with Ollama**](/how-to/ollama-local.md)
* [**Use an OpenAI-compatible server**](/how-to/openai-compatible.md)
* [**Google Ads bulk upload format**](/how-to/google-ads-bulk-upload-format.md) describes the five CSV files of Search campaigns.

## Reference

* [**CLI reference**](/reference/cli.md)
* [**business.toml reference**](/reference/business-toml.md)
* [**catalog.csv reference**](/reference/catalog-csv.md)
* [**Validation rules**](/reference/validation-rules.md)
* [**Output files**](/reference/output-files.md)
* [**Environment variables**](/reference/environment-variables.md)
* [**Architecture**](/reference/architecture.md) also shows how to embed `mads-core` as a library.
* [**MCP tools**](/reference/mcp-tools.md) lists the tools the agents call.

## Sponsors

* [**Sponsors**](/sponsors.md) lists the companies that fund mads: Vinellu and Buser.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://mads.avelino.run/readme.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
