---
title: Agent initialization
source: https://docs.newrelic.com/docs/streaming-video-&-ads/installation/roku/agent-api/initialization/overview
---

## Initialization methods

| Method                                                                                                                                     | Description                     |
| ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------- |
| [NewRelic](https://docs.newrelic.com/docs/streaming-video-&-ads/installation/roku/agent-api/initialization/newrelic)                       | Build a New Relic Agent object. |
| [NewRelicSystemStart](https://docs.newrelic.com/docs/streaming-video-&-ads/installation/roku/agent-api/initialization/newrelicsystemstart) | Starts system logging.          |
| [NewRelicVideoStart](https://docs.newrelic.com/docs/streaming-video-&-ads/installation/roku/agent-api/initialization/newrelicvideostart)   | Starts video logging.           |
| [NewRelicVideoStop](https://docs.newrelic.com/docs/streaming-video-&-ads/installation/roku/agent-api/initialization/newrelicvideostop)     | Stops video logging.            |

## Examples

### Build New Relic Agent object

```brightscript
sub Main(aa as Object)
    screen = CreateObject("roSGScreen")
    m.port = CreateObject("roMessagePort")
    screen.setMessagePort(m.port)
    scene = screen.CreateScene("VideoScene")
    screen.show()

    m.nr = NewRelic("ACCOUNT ID", "API KEY")
```

### Start system logging

```brightscript
m.syslog = NewRelicSystemStart(m.port)
```

### Stop video logging

```brightscript
NewRelicVideoStop(m.nr)
```
