# Deployment Diagram of Python Agents Managed by Sherpa Orchestrator

A complete diagram is available at the link:

## Solution Architecture Description

Sherpa Orchestrator and Sherpa Python Coordinator / Sherpa Python SDK provide automation of business processes using Python agents running on terminal servers or virtual machines.

The Orchestrator triggers Python scripts based on events or incoming data from the external environment (via API), executed in the accounts of terminal servers without User involvement:

* on command from the AI agent,
* on command from the business user,
* on schedule.

Python scripts, using Sherpa Python SDK, exchange logs, tasks from queues, centrally stored credentials, and shared data with the Orchestrator.

All components of the platform are installed locally within the Client's network, without connection to external servers or SaaS services. The ability and necessity for platform components to access internal and external systems are determined by the task being solved within the business process.

Deployment of Sherpa Python SDK is carried out using an exe installer in technical user accounts. Installation of Sherpa Coordinator Service is performed in the administrator account of the terminal server using an exe installer.

By default, deployment of Sherpa Orchestrator is done using a Docker container.

The sequence of steps in the process:

1. The AI agent script developer creates a script using any suitable Python IDE with Sherpa Python SDK. Completed scripts are transferred to the technical accounts of AI agents using the remote publishing feature in Sherpa Orchestrator. Version control of scripts is also managed through Sherpa Orchestrator.
2. The server component of Sherpa Orchestrator maintains communication with agents running on client machines and stores:
   1. configurations and versions of scripts,
   2. shared global variables and credentials,
   3. logs and screenshots of agent operations,
   4. Orchestrator audit logs,
   5. Users,
   6. Roles and tenants of the Orchestrator itself,
   7. Licenses for all platform components,
   8. statistics on script execution.
3. Users and administrators of Sherpa Orchestrator access resources, settings, and statistics through the Orchestrator web application available via a web browser. Sherpa Orchestrator includes:
   1. Nginx web server,
   2. PHP interpreter,
   3. relational database (default - MariaDB).
4. On a schedule, API call, agent command, or another supported trigger, Sherpa Orchestrator instructs the Sherpa Python Coordinator Service of the corresponding terminal server to create an RDP connection to a local or remote account designated for the AI agent.\
   \
   Multiple such accounts can be hosted and actively used on a single terminal server. Access to the agent account is performed using the login and password provided by the Orchestrator.\
   \
   After logging in, the corresponding instance of Sherpa Python SDK is launched in the account. It connects to the Orchestrator, receives the task to execute the script and the script itself, stored in the Orchestrator.\
   \
   During the execution of the script, Sherpa Python SDK can send the Orchestrator:

   1. current status,
   2. tasks,
   3. logs,
   4. values of global variables and credentials.

   \
   Also, during the execution of the script, Sherpa Python SDK can receive from the Orchestrator:

   1. tasks,
   2. values of global variables and credentials,
   3. commands for "soft" or "hard" termination of the script.

   \
   After the script execution is completed, Sherpa Python SDK logs off from its account.


---

# 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/diagramma-razvertyvaniya-python-agentov-pod-upravleniem-sherpa-orchestrator.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.
