# How to call agent using Python script

**URL:** <https://forum.uipath.com/t/how-to-call-agent-using-python-script/5755702>\
**Category:** Agent Builder\
**Tags:** question, agent, orchestrator\
**Created:** [June 23, 2026, 10:15am UTC](https://forum.uipath.com/t/how-to-call-agent-using-python-script/5755702 "2026-06-23T10:15:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Akash\_Jariwala](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/akash_jariwala/32/512920_2.png) [@Akash\_Jariwala](https://forum.uipath.com/u/Akash_Jariwala)\
**Post date:** [June 23, 2026, 10:15am UTC](https://forum.uipath.com/t/how-to-call-agent-using-python-script/5755702/1 "2026-06-23T10:15:27Z")

</div>

Hey all,

I have created one agent in the Agent service of UiPath cloud, it is working fine on my prompt and data. Now I want to call this agent using python code, The primary reason of using python code to call this agent is, I want to pass some filtered and structured data from the database to the agent. I tried below endpoint to trigger the agent, but it is giving and error status code of 405 (Method not allowed).

API end point:

> [https://cloud.uipath.com/{ORGANIZATION\_NAME}/{UIPATH\_TENANT}/orchestrator\_/api/v1/Agents/UiPath.Server.Configuration.OData.Run](https://cloud.uipath.com/%7BORGANIZATION_NAME%7D/%7BUIPATH_TENANT%7D/orchestrator%5C_/api/v1/Agents/UiPath.Server.Configuration.OData.Run)

what is the correct way and approach to call this agent using local python code ?

 ![image](https://global.discourse-cdn.com/uipath/original/4X/7/a/3/7a33848c89811d6037f179db5e3c1776a0e0e70b.png)

---

<div class="post-metadata">

**Author:** ![Anil\_G](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/anil_g/32/524291_2.png) [@Anil\_G](https://forum.uipath.com/u/Anil_G)\
**Post date:** [June 23, 2026, 10:34am UTC](https://forum.uipath.com/t/how-to-call-agent-using-python-script/5755702/2 "2026-06-23T10:34:32Z")

</div>

@Akash_Jariwala

you have python sdk which you can leverage as well

> **[Processes - UiPath SDK](https://uipath.github.io/uipath-python/core/processes/)**

cheers

---

<div class="post-metadata">

**Author:** ![JarrydScott](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/jarrydscott/32/557333_2.png) [@JarrydScott](https://forum.uipath.com/u/JarrydScott)\
**Post date:** [June 23, 2026, 11:09am UTC](https://forum.uipath.com/t/how-to-call-agent-using-python-script/5755702/3 "2026-06-23T11:09:06Z")

</div>

Hi @Akash_Jariwala

UiPath has created a python SDK that can be used when coding a project from scratch. It’s super comprehensive and and allows so much flexibility to build exactly what you need.

UiPath also offers a Python with LangGraph SDK which allows you to build LangChain agents (my personal preference): [Getting Started - UiPath SDK](https://uipath.github.io/uipath-python/langchain/quick_start/)

There’s also quite a bit of documentation available if you’re building it for the first time.

---

<div class="post-metadata">

**Author:** ![Ehab\_Sawars](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/ehab_sawars/32/401516_2.png) [@Ehab\_Sawars](https://forum.uipath.com/u/Ehab_Sawars)\
**Post date:** [October 30, 2026, 5:55am UTC](https://forum.uipath.com/t/how-to-call-agent-using-python-script/5755702/4 "2026-10-30T05:55:05Z")

</div>

You can invoke the deployed agent process through the SDK and pass your filtered data as input arguments:

```python
from uipath.platform import UiPath

client = UiPath()
job = client.processes.invoke(
    name="YourDeployedAgentProcess",
    folder_path="YourFolder",
    input_arguments={"records": filtered_records}
)

```

Use the deployed process name and match ‘records’ and its data type to your agent’s input schema. Configure SDK authentication and the correct tenant first. The call returns job details; retrieve its result after completion. You don’t need to rebuild the agent in LangGraph.
