# What if, we make every public function from OOP accessible to AI Agent? — retained record

> Retained reddit record from reddit:AI_Agents.

Canonical: https://highsignal.app/data/records/fba23c144ab4f79c

[← sources](https://highsignal.app/data)


source: [reddit](https://highsignal.app/data/reddit) (reddit:AI_Agents)  published 2026-11-02 10:48 ingested 2026-11-03 02:37

[original source ↗](https://www.reddit.com/r/AI_Agents/comments/1xlu0aq/what_if_we_make_every_public_function_from_oop/)

## retained text



```
Here's a thought, 

Most of Object Oriented Programming have been using public, protected and private variables, methods and the sole propose of that was to make it immutable.

But what if we can utilize that for agentic use case. All public methods be available to AI agent, and all private and protected are kept as is and provide user a new experiance, If a user comes in and want to see the report of 2006, they can directly type in and Agent will figure out it can use It has function get\_report(start\_date, end\_date) which previously was sent through API resposnes based on query, filters and many more, But now, Based on simple text, user can get the response and can ask further question based on those data, No new system at all, just converting service layer of appliccation as a tool , If a repo is well maintained based on modules and services, it's a cherry on top, we could use some decision models to check which services are actually requested and if service can be curated and based on small dataset, we could just be able to convert whole legacy application into Agentic Application. 

Sure, there are problems, we may need to control write vs read access, prevent from any prompt injection and all, we could create some kind of middleware where decision model can prefilter based on conditions to filter them. It's just a thought that came to my mind.

Penny for your thought redditors. 

  

```



document fetched 2026-11-03 00:19 · canonical https://reddit.com/r/AI_Agents/comments/1xlu0aq/what_if_we_make_every_public_function_from_oop
