# Python Sherpa Framework

The Orchestrator supports connecting and managing not only Robots created in the Sherpa RPA environment but also connecting and managing custom Robots that you can write in the Python programming language. To take advantage of this capability, you need to wrap your Python Robots in the Sherpa Framework — a specialized layer that provides integration of arbitrary Python scripts with the Orchestrator platform.

The Sherpa Framework implements a standard interface that allows the Orchestrator to interact with the Robot, meaning it can exchange tasks, statuses, logs, credentials, and variables through a central API. As a result, your custom Robots can fully participate in automation stages and are managed by the Orchestrator just like Robots created in the visual Sherpa RPA environment.

To connect and run such Robots, you need to wrap the Python code in the appropriate template that implements interaction with the platform. After that, the scripts can be copied to target workstations or servers and launched through the Orchestrator:

* on a schedule,
* on events,
* API,
* User commands.

During the execution of scripts, using the Orchestrator API, your Robots will be able to send and receive:

* logs,
* task statuses,
* processing results,
* global variables,
* credentials,

as well as interact with other systems and services.

Integration with the Sherpa Framework allows you to implement any business processes in Python: from simple tasks to complex scenarios with multiple conditions, loops, error handling, and interactions. This gives you the ability to use familiar programming tools, expanding the flexibility of automation without being limited to the standard components of the platform.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sherparpa.ru/en/sherpa-rpa/sherpa-orchestrator/python-sherpa-framework.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
