# as_runnable

> **Function** in `langsmith`

📖 [View in docs](https://reference.langchain.com/python/langsmith/run_helpers/as_runnable)

Convert a function wrapped by the LangSmith `@traceable` decorator to a `Runnable`.

## Signature

```python
as_runnable(
    traceable_fn: Callable,
) -> Runnable
```

## Description

**Example:**

>>> @traceable
... def my_function(input_data):
...     # Function implementation
...     pass
>>> runnable = as_runnable(my_function)

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `traceable_fn` | `Callable` | Yes | The function wrapped by the `@traceable` decorator. |

## Returns

`Runnable`

A `Runnable` object that maintains a consistent LangSmith
tracing context.

---

[View source on GitHub](https://github.com/langchain-ai/langsmith-sdk/blob/19dc497a3d89638e4cc35db72ea1c29cad35cbbf/python/langsmith/run_helpers.py#L1258)