---
sidebarTitle: Create
title: "ag2 create"
description: "Scaffold projects, agents, tools, teams, and publishable artifacts."
---

The `ag2 create` command generates boilerplate for common AG2 patterns.

## ag2 create project

Scaffold a full project with directory structure, dependencies, and starter code.

```bash
ag2 create project <name> [--template <template>]
```

**Built-in templates:** `blank`, `research-team`, `rag-chatbot`

```bash
ag2 create project my-app --template research-team
```

This generates:

```
my-app/
├── pyproject.toml
├── main.py
├── agents/
├── tools/
├── config/
└── tests/
```

## ag2 create agent

Generate a single agent file with system message and optional tool wiring.

```bash
ag2 create agent <name> [--tools <tool1,tool2>]
```

```bash
ag2 create agent researcher --tools web_search,summarize
```

## ag2 create tool

Create a tool function with the `@tool` decorator and proper typing.

```bash
ag2 create tool <name>
```

```bash
ag2 create tool web_search
```

## ag2 create team

Generate a multi-agent team with a specified orchestration pattern.

```bash
ag2 create team <name> [--pattern <pattern>]
```

**Patterns:** `auto`, `round-robin`, `random`

```bash
ag2 create team research-squad --pattern round-robin
```

## ag2 create artifact

Scaffold a publishable artifact with `artifact.json` and the required directory structure.

```bash
ag2 create artifact <name> --type <type>
```

**Types:** `template`, `tool`, `dataset`, `agent`, `skills`, `bundle`

```bash
ag2 create artifact my-tool --type tool
```

This creates the structure needed for [`ag2 publish`](publish).
