> ## Documentation Index
> Fetch the complete documentation index at: https://docs.uniac.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Nodes

> How a Service or System declares and consumes a dependency.

A **Node** represents a deployed instance of a Service that another Service or System depends on. Subclasses of [`Node`](/sdk/node) are generated from a published Service when you list it in your manifest and run [`uniac install`](/cli/install).

## Declaring a dependency

Add the Service to the `dependencies` array in [`uniac.json`](/concepts/manifest), run `uniac install`, then declare and initialize it:

```python theme={null}
from uniac import System
from logger import Logger  # generated Node subclass

class Greeter(System):
    logger: Logger   # annotation declares the dep

    def __init__(self):
        self.logger = Logger()  # you instantiate it
```

The framework walks class-level annotations across the MRO, asserts every `Node` slot is initialized, and records the owner relationship.

## Consuming a dependency at runtime

A `Node` instance exposes:

* `.url` — the live HTTP URL of the deployed Service. Populated by `load()` from the deploy-time wiring; `None` when called outside `load()`.
* `.name` — the published Service identifier.

```python theme={null}
@api.get("/log")
def log_something():
    requests.post(self.logger.url + "/info", json={"msg": "hello"})
```

In `uniac dev`, `.url` points at the locally-running simulator instance of the dep. After `uniac deploy`, it points at the live production endpoint.
