Hello there fellow automatons, I have an interesting issue that I can’t seem to find information on. I have an automation that currently uses a combination of traditional activities and the python activities to run a script which does most of the work. Since it makes sense to have the entire process be python, I have been looking into using the UiPath python SDK to create the process so it can be invoked through orchestrator as a normal process.
Attempting to follow the (outdated and incomplete) documentation of the UiPath python sdk and digging into the source code, I was able to publish a dead simple process that simply returns whatever was input with some string concatenation.
I can run it locally using uipath run main <INPUT> and I published it to orchestrator, but I cannot seem to invoke the process from orchestrator. I deployed it to both my personal workspace folder as well as a separate shared folder, and I get the following error when trying to run it: Serverless.Api.CreditsExceeded - Not enough Agentic Units to run the automation. Please contact your administrator.
This of course doesn’t make sense as the process is not a coded agent, and should not require agent units. Interestingly, when I published to the shared folder and tried to run I got a different error when trying to execute it; Cloud - Serverless runtime license selected. There are no Cloud - Serverless runtimes configured on the templates in this folder. (#2818) This error actually made sense and so I added the [Default] Cloud Robots - Serverless machine to the folder, which switched the error back to the previously mentioned Serverless.Api.CreditsExceeded - Not enough Agentic Units to run the automation. Please contact your administrator. error.
Looking to have someone from UiPath weigh in on this, as it may be a bug? I assume creating a process using the python SDK is niche enough that nobody has encountered this before.
I am more confused on whether or not I am even using the python sdk for its intended use. In the python sdk repo there are samples, like [pizza-order-function](uipath-python/packages/uipath/samples/pizza-order-function at main · UiPath/uipath-python · GitHub)
I noticed that while the UiPath.json file has:
"functions": {
"main": "main.py:main"
}
}
which to me, from my understanding of what function vs agent means, means that it should just be a regular old process that can be invoked from orchestrator etc. But the README.md explicitly says A coded agent that prices and confirms pizza orders...
Taking a look at main.py, there is nothing implying the process is a coded agent, no LLM call, no prompt, nothing. Just accepts input and returns deterministic output. Am I misunderstanding the entire point and that functions are supposed to then just be tools that coded agents call?
To reiterate my use case, I have a process which is hybrid in that I download a bunch of stuff from a database, then invoke a Python script which assumes that the earlier activities downloaded files to certain locations in the project directory and it gets messy. It could all be done in one Python script, but the problem is there’s a lot of variability and if there were to be an error or an issue, surfacing that outside of the invoke Python activities to orchestrator is difficult if not impossible. So creating the process using the Python SDK we would completely alleviate that pain, if I could only just invoke it!
Anyone with insight would be much appreciated, especially if you contribute or are involved in the development of the UiPath python sdk 
Regards,
Ewen
Hi @hivesew
I had this EXACT same issue recently for a client presentation lol.
I ended up having to use Agentic Units to run my coded agent. But I deliberately wanted to create a coded agent in UiPath using the SDK.
After doing some research, I realized that if you ever make use of the UiPath Python SDK, it immediately assumes you are creating a coded agent, and deploys it as such. So this is probably why you’re getting the error. And it’s not a bug, I think it literally expects you to run it as such.
If you want to avoid using Agentic Units completely, I would suggest trying the following: (haven’t tried this before so let’s look at it together)
Instead of going the route of UiPath process → Invoke Python → messy file dependencies - rather expose a Main() function from the Python code that handles your important work, and then deploy it normally, BUT try and invoke it using an Orchestrator API (which you can find in the UiPath Swagger UI).
It could solve your issue.
Let me know how it goes 
I would like UiPath to confirm this, because to me it doesn’t make a whole lot of sense. All I want is to be able to create a coded python process that can be invoked from orchestrator to get the benefits of logging/tracing. Not sure why that would require agent units.
My current process gets invoked via queue trigger and involves using a python script stored in the project with a main function that gets invoked using the python activities, but it’s a hassle to use. Really I’m just looking to know if the python-sdk is intended solely for coded agent use or also for coded processes like the getting started guide advertises.
Let me tag @Alexandru_Bizon here who will know best how to reply and correct me if I’m wrong.
From my understanding, we’re working on extending the Python SDK and the required platform dependencies to cover your use case.
Hi @hivesew - thanks for the thorough write-up, and @JarrydScott for jumping in.
Quick framing to clear up the confusion: the UiPath Python SDK is GA, but specifically for building coded agents. That’s why everything you publish through it today gets routed as an agent, including your “dead simple process that returns a string.” From the platform’s perspective right now, anything from the SDK is an agent, which is why you’re hitting Serverless.Api.CreditsExceeded - Not enough Agentic Units. Jarryd’s read on this is correct.
What you actually want is UiPath Functions — a new product we’re building on top of the existing Python SDK infrastructure. Functions extends the same SDK, packaging, and uipath CLI you’re already using, so when it lands your work carries over; the project just gets typed and routed differently.
What UiPath Functions will be
A first-class way to publish and invoke coded automations as proper Orchestrator processes: starting with Python, with JavaScript / TypeScript on the roadmap. Functions run on the standard robot runtime with their own pricing model (still being finalized). Your exact scenario, a hybrid process where most of the logic is Python and you just want clean Orchestrator invocation, is one of the headline use cases driving the design.
Where things stand today
- Python SDK: GA, for coded agents.
- UiPath Functions for Python (built on top of the SDK): WIP, public preview in the next couple of weeks. Until then, anything published via the SDK routes through the agent runtime and consumes Agentic Units.
- UiPath Functions for JS/TS: WIP - a dedicated SDK is coming that unlocks some genuinely new use cases. Teaser: we’re targeting sub-100ms response time.
- The
pizza-order-function README mislabeling it as a coded agent is a docs bug, the UiPath.json "functions" block is the correct signal. We’ll fix it.
My recommendation
To be straight with you: there isn’t a clean workaround today. That’s exactly the gap UiPath Functions is built to close, bringing code as a first-class citizen on the UiPath Platform.
The best path is to wait for the public preview. It’s the one that actually delivers what you’re after: clean Python code, native Orchestrator invocation, no Agentic Units consumption. Hold tight on your current hybrid setup just a little longer, migration should be straightforward since you’ve already done the SDK exploration work.
I’ll post back here as soon as the public preview lands. Appreciate the patience while we finish baking this.
Alex Bizon
Aha! I’ve been waiting for this, thank you very much @Alexandru_Bizon! Is there any way for enterprise organizations to get access while still in public preview? Otherwise I can’t wait until this goes live for enterprise so I can convert my messy Studio desktop RPA process that executes python to this 
I plan to enable it for everyone in enterprise in a week or so