# Class LittleGhost::Subagents::AgentPath

Documentation version: Edge

Canonical HTML: https://littleghostai.org/docs/LittleGhost/Subagents/AgentPath.html

AgentPath gives every delegated conversation a stable place beneath its
parent. Paths begin at `/root`, keeping nested delegation visible
in logs and metadata.

Child task names contain only lowercase letters, digits, and underscores, are
limited to 40 characters, and must be unique among siblings when reserved by a
manager.

    AgentPath.join("/root", "review_api") # => "/root/review_api"

## Inheritance

`LittleGhost::Subagents::AgentPath < Object`

## Class methods

<a id="method-c-immediate_child-3F"></a>
### `.immediate_child?`

```ruby
.immediate_child?(path, parent)
```

Checks whether `path` is exactly one level beneath `parent`.

<a id="method-c-join"></a>
### `.join`

```ruby
.join(parent, name)
```

Validates both parts and returns a direct child path.

<a id="method-c-validate-21"></a>
### `.validate!`

```ruby
.validate!(path)
```

Validates an absolute agent path and returns it unchanged.

<a id="method-c-validate_name-21"></a>
### `.validate_name!`

```ruby
.validate_name!(name)
```

Validates and returns one model-chosen task name.
