---
id: "M:cAlgo.API.Robot.#ctor"
kind: "constructor"
type: "T:cAlgo.API.Robot"
url: "https://help.ctrader.com/ctrader-algo/references/General/Robot/Constructor/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# Robot constructor

Member of [Robot](https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md).

## Robot()

Robot class constructor

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public Robot()
```

Python:

```python
Robot()
```

### Examples

C#:

```csharp
public partial class SampleBot : Robot
{
    public SampleBot()
    {
        // The platform creates the cBot instance, API members are available from OnStart
    }

    protected override void OnStart()
    {
        Print("Started on {0}", SymbolName);
    }
}
```

Python:

```python
# Not available in Python: the cBot instance is created by the platform, initialize it in on_start
def on_start(self):
    api.Print(f"Started on {api.SymbolName}")
```

config.json:

```json
{
  "AccessRights": "None"
}
```

