# Pipeline Without Agent

This example demonstrates that a **Digital Employee pipeline can contain any kind of steps** — not just agent steps. A pipeline can be composed of simple components such as a log step, custom processing steps, or any other step from the `gllm_pipeline` ecosystem.

In this example, we build a pipeline that uses only a `HelloWorldComponent` step. No `DigitalEmployeeAgentBuilder` is involved.

{% hint style="info" %}
**Key takeaway:** A pipeline is flexible. You can use `add_step()` to add any step type — from simple components to full agent steps. This example shows the minimal case.
{% endhint %}

## Prerequisites

* [Install](https://github.com/GDP-ADMIN/CATAPA-SDK/blob/e/gitbook-sync-documentation/python/digital-employee-core/docs/digital-employee-de-pipeline/getting-started/installation/README.md) the `digital-employee-core` package
* Set any required environment variables (e.g., for `load_dotenv()`)

## Example: Simple Hello World Pipeline

This example demonstrates a simple custom component that prepends "Hello World" to any input message. It shows how to create a basic pipeline step without using an agent, LLM, or MCP integration.

### Import the Package

{% code lineNumbers="true" %}

```python
import asyncio
from typing import Any

from dotenv import load_dotenv
from gllm_core.schema import Component
from gllm_pipeline.steps import step

from digital_employee_core import DigitalEmployeeBuilder, DigitalEmployeePipelineBuilder

load_dotenv()
```

{% endcode %}

### Define a Simple Component

{% code lineNumbers="true" %}

```python
class HelloWorldComponent(Component):
    """Component that adds 'Hello World' prefix to the input message."""

    def __init__(self) -> None:
        super().__init__()

    async def _run(self, message: str, **kwargs: Any) -> str:
        return "Hello World " + message
```

{% endcode %}

### Build the Pipeline Without Agent

{% code lineNumbers="true" %}

```python
digital_employee = (
    DigitalEmployeeBuilder()
    .set_name("DE Hello World")
    .set_email("de_hello_world@example.com")
    .set_job(
        title="Digital Assistant",
        description="A helpful digital employee assistant",
        instruction="You are a helpful digital employee assistant. Answer questions clearly and concisely.",
    )
    .set_pipeline(
        DigitalEmployeePipelineBuilder()
        .add_step(
            step(
                component=HelloWorldComponent(),
                input_state_map={"message": "message"},
                output_state="message",
                name="HelloWorld",
            )
        )
    )
    .build()
)
```

{% endcode %}

Notice that the pipeline uses `add_step()` with a `step()` from `gllm_pipeline.steps` — **no `DigitalEmployeeAgentBuilder`** is used. The pipeline is composed of a single, simple component step.

### Invoke the Pipeline

{% code lineNumbers="true" %}

```python
message = "how are you?"

response = asyncio.run(digital_employee.invoke(message=message))

print(response)
```

{% endcode %}

## Summary

* A pipeline can contain **any kind of steps** — not limited to agent steps.
* Use `step()` from `gllm_pipeline.steps` to wrap components.
* Use `add_step()` on `DigitalEmployeePipelineBuilder` to add steps.
* For agent-based pipelines with MCPs and LLMs, see [Pipeline With Agent](https://gdplabs.gitbook.io/catapa/developer-documentation/digital-employee-de-pipeline/getting-started/examples/pipeline-with-agent).
