---
title: Introduction
description: "What TheGitAI is and how it works: an AI coding agent that investigates a repository, changes code, verifies the result, and keeps every edit reversible."
---

# Introduction

TheGitAI is an AI coding agent for terminal-based engineering work. Give
it the outcome you want: it can investigate the repository, change code across
files, run the real project, keep services alive, verify the result, update the
documentation, and explain what is ready to review.

The session stays anchored to the repository in your current directory. Local
repository search, file edits, shell commands, approvals, and recovery run on
**your machine**. Model inference and server-executed research tools run on the
**TheGitAI server**.

::tip
New here? Your shortest path to a real result is two commands — `ai` signs you
in on the way if you aren't already:

```bash
npm i -g @thegitai/cli
cd your-project && ai
```
::

## Ask for the finished outcome

You do not need to decompose a task into a chain of tiny prompts. Start with the
result and the evidence you expect:

```text
Trace the failing signup test, fix the underlying validation, run the focused
suite, check the final diff for regressions, and update the signup guide.
```

The agent can publish a visible task list, investigate independent paths in
parallel, keep a dev server running in the background, and carry the same task
through implementation and verification.

## What you can do with it

In one session, TheGitAI can:

- **Understand** — search the repository, read the relevant files and related
  tests, and gather current web context.
- **Change** — create, patch, replace, and delete files across an implementation,
  its tests, configuration, and documentation.
- **Run** — use the shell, diagnostics, scratch scripts, and up to eight managed
  background processes in the real project environment.
- **Verify** — run tests, builds, linters, typecheckers, and final-diff checks as
  evidence for the handoff.
- **Work beyond source** — read PDFs, spreadsheets, and Word documents; edit
  visible DOCX text; inspect screenshots; and fetch public web pages.
- **Stay controllable** — ask for approval, operate read-only in Plan mode, undo
  assistant edits, restore checkpoints, and resume repo-scoped sessions.

See [What It Can Do](/docs/core-features/what-it-can-do) for the complete manual
or explore the visual [features page](/features).

## How a turn works

Each turn follows a tool-using loop:

1. Your message is added to the live session history.
2. The agent gathers the most relevant context from your repo.
3. The current mode controls approval behavior and which tools are available.
4. The model receives your request, the relevant context, and the available
   tools.
5. The model either answers directly or calls a tool.
6. The loop continues until the model is done.

Local file, search, and shell tools run on your machine; the model runs on the
TheGitAI server. In Default mode, you approve actions that touch files or the
shell. Auto-Accept and Plan mode let you deliberately choose a different level
of autonomy.

## Where to go next

- [Installation](/docs/getting-started/installation) — get the CLI on your
  machine.
- [Authentication](/docs/getting-started/authentication) — sign in to TheGitAI.
- [Sessions & modes](/docs/basics/sessions-and-modes) — start working and pick
  the right mode.
- [What it can do](/docs/core-features/what-it-can-do) — understand the full
  capability set.
