---
question: Where does an integration live in a module?
kind: overview
---

# Integrations

An integration is one external API, wrapped in a Python class under a module's `integrations/` folder. It handles authentication and HTTP, and returns the service's data. The module's agents call it as tools, its pipelines turn its data into RDF, and its workflows build on it. `abi new integration` scaffolds the class and a test beside it.

<!-- matrix -->

Nexus has no screen for integrations, and the API process has no integration routes. An integration is code you write, test and wire in Python. The Web UI and the REST API only reach its credentials, through the engine secret service.

## Key concepts

- **Integration class.** A subclass of `Integration` (`naas_abi_sdk.integration`, standard library only) with a configuration dataclass, a subclass of `IntegrationConfiguration`, that holds the key and the base URL. One class per external service. Raise `IntegrationConnectionError` when the service cannot be reached.
- **Nothing serves it.** The module neither finds nor serves integrations: a workflow, a pipeline or an agent of the module builds the class and calls it.
- **Credentials.** The engine secret service holds the key (`.env` by default). The module declares the `secret` service and reads the key with `await self.engine.services.secret.get("MY_API_KEY")`, then passes it in the configuration. Nexus workspace secrets do not reach it.
- **Tools.** An agent gets an integration as LangChain tools that you write around its methods, passed as `tools=` when the agent is built. The base class has no `as_tools()`.
- **No side effects.** An integration does not write to the triple store, call other modules, or hold business logic. Pipelines and workflows do that with its data.

```text
External API  →  Integration  →  Pipeline (transforms to RDF)
                              →  Workflow (business logic)
                              →  Agent tool (direct invocation by the model)
```
