---
question: How do I declare the services a module may call?
kind: guide
---

> **You are reading the v2.x docs (engine modules). New projects use v3.** [Read this page in v3](/capabilities/build/modules/add-dependencies) · [Migrate from 2.x to 3.0](/capabilities/upgrade/migrate-to-3)

# Add dependencies

A module names the other modules and the engine services it uses. The engine loads dependencies first and only exposes the services you listed.

In the module class:

```python
from naas_abi_core.module.Module import ModuleDependencies
from naas_abi_core.services.triple_store.TripleStoreService import TripleStoreService

dependencies: ModuleDependencies = ModuleDependencies(
    modules=["other_module"],
    services=[TripleStoreService],
)
```

Suffix a module name with `#soft` when the module may be absent. The engine still loads yours.

```python
modules=["naas_abi_marketplace.ai.anthropic#soft"]
```

A Python package the module imports is a project dependency, not a `ModuleDependencies` entry. From the project root:

```bash
uv add requests
```

Inside the module, `self.engine.services.<name>` is the service you declared. Reading one you did not declare raises. The model registry is the exception: every module can use it.

The `modules:` block in `config.yaml` is how you enable the module, not how you declare these dependencies. See [Creating a Module](/v2/capabilities/build/modules/creating-a-module).
