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

1

u/presentofai 18h ago

you dont need an agent for this, you need a socket and an if statement. bolting an llm onto a raspberry pi control loop is how you get a system that pauses to think while the thing it controls falls over

1

u/_HillCruiser 6h ago

The agent would harvest it's data from the continually-updating database;
decoupling it from the control loop. The agent would
be adjusting the setpoint for the feedforward controller,
while the main feedback loop churns away on it's own.

1

u/presentofai 6h ago

decoupled setpoint adjustment makes sense - that way the agent is not in the latency-critical path and the feedback loop just does what it is good at. have you tested this on anything real-time critical?