OpenAI REST API: Is it possible to create agents?

i have a c# background. i need to create an OpenAI agent NOT assistant. i was told i could do this through a microservice but it seems it is not possible. Apparently, a Python microservice can expose agent features to my C# app only IF my OpenAI account has access to the Agents API. They recommended that i request beta access to the Agents API from OpenAI. How do i request for this?

1 Like

Agents is not an API, but an SDK. It is available in Python and Typescript, allowing you to use OpenAI API’s and other providers.

Unfortunately, it is not available in C# atm.

You can find what is available about agents here:

2 Likes

Thank you Aprendendo. Do you have an idea when the service might be available? Maybe end of 2025?

1 Like

if you have a background in C# or even remotely familair with coding

why not use their api to make your own agent? they empower you to do this…

let me know if you want insights on how to make your own agents, with agency, who do whatever you want. However creating the orchestration is what openai does for you -

but tbh - once you have 1 agent, its trivial to make more. GPT can spin up a agent in minutes.

“Agent” is a nebulous phrase, just as “Assistant” means little.

It implies the AI can do something on its own. However, the AI model does not have agency.

AI models have function-calling. Being an agent in this case just means developer code that has more real-world interactions, or that can perform multiple continued calls in a plan to perform a task. In this case, you see “use my GitHub” or “read my local disk and execute shell commands”, or alternately, a path through pre-defined processing steps, facilitated by function-calling that are used to justify the naming.

So share your application need - and not your nomenclature.

There is no SDK for C# being developed, nor an API as far as I know (by OpenAI).

As others have added to this, you’d have to consider if you really need an agentic system.

Depending on what you need, it is easier to implement that yourself than waiting someone build a fork of the SDK to C#.

Feel free to share a bit more of what you are trying to build, perhaps that way we can guide you better.

ps: I thought further a bit and it came to mind that since c# is mantained by microsoft, there should be something related to it on azure or microsoft. Turns out they seem to have something, but you’d need to dig further on their website:

1 Like

my objective is that i give the agent a problem. lets say, there is flooding in a place X. i give it an assessment report so it can get more context. from there, i can then ask it to generate for me possible emergency humanitarian interventions (based on its knowledge) for the affected population based on a specific guideline. i should be able to choose say health, water and sanitation or any other thematic area and then it writes up a full project including work plan and budget. this in my view requires a long term memory, thorough planning (multi-step tasks), reasoning, and may need some level of autonomation. I tried out the OpenAI Assistant and to me it was more of a conversation. But my guess is that its me with a knowledge gap. Perhaps an assistant can achieve what i need.

Then don’t use “Assistants”.

Use the Completions end point with discrete prompts that you design and incorporate the background material the LLM will need to stitch things together.

If you need more “intelligence” you might consider the reasoning models and/or add additional tooling like web search and web crawl (both of which you can consider either OpenAI options or options from third parties via your own functions)

I use OpenAI for all sorts of purposes other than “conversations”. It is normal to use LLMs for, e.g.:

etc. etc.

None of which have to be part of a “conversation”

1 Like

i actually tried out this SDK as well. the agents created look more or less like microsoft copilot. in fact, they are called declarative agents. my intention is to build something that is cross platform. something that can work in a web browser for instance. i checked out azure AI foundry as well. it looked promising. everything seemed to work well. i could upload a file to the azure IA foundry using c# however, attaching that file or vector store to my agent using c# was just not possible. from how i understood (i am still open to learning), although there is provision to store files/vector stores as knowledge sources in azure IA foundry, you can only use them most effectively if you attach the vector store/file to the agent manually within the account. in case you want to use C# to connect your agent to the knowledge sources that you uploaded in azure AI foundry, then you had to create and configure a separate storage resource somewhere in azure portal and then connect the two. unfortunately, when i would ask it a question, there were hallucinations implying the knowledge sources were not being read thoroughly and this could mislead my new users. sorry for pouring out my frustrations here. my intention is to try and build an agent using C# without necessarily learning python but so far, it looks inevitable to deep dive into python.
on a side note, i was adviced by github copilot that i could have a microservice that can run the OpenAI python Agent SDK with C# as my front end. i tried that too. i created an account in AWS, uploaded my microservice but upon testing in postman, i couldn’t even create an agent. apparently, this feature is in beta phase and is available to only a few users and you have to request for special access from OpenAI. i have no idea who to contact for this because it could save me so many hours.

thanks a lot merefield for this insight.

1 Like

I see. Well, we have to consider that copilot/chatgpt hallucinates quite a bit.

What it probably meant was to build a python backend using Agents SDK, which doesn’t require any special access (it can even use other LLMs), and use C# to build the frontend.

Agent SDK however, doesn’t provide an API. It is just an orchestrator.

You would have still have to build the microservice to wire up the requests/authentication with the agents, and returning the results to your frontend. Which might be an overkill.

If you are still curious about agents sdk, I suggest trying to run it with python, even if your main language is C#, just to experience what “agents” are like at least once. Basically you just need to install python, set up an environment variable with your OpenAI API key and run a small example like in this quick start guide. Also have a look at the examples here.

Another option you might consider, is to see if deep research doesn’t match your needs. It is available in the API and provides a more sophisticated result (for a higher cost), and you can easily refer to the curl examples to build your own REST request directly from C#:

1 Like