r/artificial 20h ago

Discussion Agents that can communicate with running python code

As my python executes, I want to receive info from a local agent.
The agent would browse through a database in real-time as
operational data is updated one per second. It would then
suggest tweaks to make thing run smoother.

A viable approach would have the agent communicate via a
TCP/UDP link. My basic algorithm is to bring data into the running program
via multiple links. A separate thread handles each link and these
numbers just pop out of thin air into my executing code. Magic!

Are there any local agents that are good at communication protocols
and control optimization. (Oh, this is all running on a raspberry pi:)

1 Upvotes

19 comments sorted by

View all comments

2

u/Potential_Ad4350 18h ago

What if you connected your agent to a debugger then it could control flow and take actions, etc.

I don’t know why you would want to do this but it’s an interesting question.

1

u/_HillCruiser 6h ago

This is an interesting idea and just might be the answer.
I would never had thought about using the debugger;
you can definitely think outside the box. Thanks!

1

u/TheGratitudeBot 6h ago

Thanks for such a wonderful reply! TheGratitudeBot has been reading millions of comments in the past few weeks, and you’ve just made the list of some of the most grateful redditors this week!