> For the complete documentation index, see [llms.txt](https://wiki.redmodding.org/cyberpunk-2077-modding/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.redmodding.org/cyberpunk-2077-modding/modding-guides/world-editing/ai-and-npcs.md).

# AI and NPCs

This section contains all things related to NPCs and how to place them in the world using World Builder

## Theory

* NPCs in the game world are spawned via two different ways:
  * Crowd NPCs
  * Community NPCs

### Crowd NPCs

* Crowd NPCs are as the name suggests spawned as part of the regular crowd that walks the street, they are not fully understood yet

## Community NPCs

* Community NPCs are all the other NPCs, that includes everyone from the shopkeepers, quest NPCs, enemy NPCs to NPCs hanging out in specific spots
* Communities allow to define a wide combination of things, allowing for very dynamic setups (E.g. NPC type, amount and spot depending on the time of day):
  * What NPCs
  * When should they spawn
  * How many
  * Where should they spawn
  * Setups such as making them patrol along a spline

{% hint style="success" %}
Communities can not only be used for spawning an placing NPCs, but anything that has a TweakDB record, e.g. Vehicles
{% endhint %}

## Guides

* [Placing AISpot nodes](/cyberpunk-2077-modding/modding-guides/world-editing/ai-and-npcs/placing-aispot-nodes.md): These serve as markers for NPCs, defining a workspot to be used
* [Creating Communities](/cyberpunk-2077-modding/modding-guides/world-editing/ai-and-npcs/creating-communities.md): Explains how to create a community, and make it's NPCs use AISpot's


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://wiki.redmodding.org/cyberpunk-2077-modding/modding-guides/world-editing/ai-and-npcs.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
