J. Rogers, SE Ohio
I had a concept demo where I explored the possibility of how to embed my cli tool into projects just to see if it could work, and it did! I used this working demo to embed the library into a unit test tool and into the GUI as a run button.
And today I decided to actually implement a real network services program using something simple like flask to put my workflows onto my local network as web services.
The web services module is 200 lines at a first cut and it works flawlessly and fast. It just loads and sets up flask and my agent workflow library, sets them both up and does two different things.
It can run a web service and return an answer:
| This is the results of one micro service request in my framework. |
Or it can just tell you the loaded contract, the agents available, what the agents do, what inputs and optional inputs are and what they return.
| This is the list of available servers defined by the contract public_api. |
So after I hand edited the tag into the config.json file , I changed a couple of modules in the GUI to handle the list of contracts an agent belongs to so I could edit the list in the GUI.
| The big red arrow points at the list of service contracts that the agent belongs to. |
Let me talk about why this is powerful. The agent is the record of all things that are true about that agent. It has how it processes, what its inputs and outputs are defines a contract it is making with the rest of the workflows. The agent has its test cases and results. It has its own GUI hints and control over how it works in the GUI. And now it is just natural for the agent to know what service groups it is a member of.
I have a couple of testing scripts that hammered it good and it was bulletproof on my desktop machines. You can run the testing yourself, or you won't believe it.
To wrap things up, this development just felt natural and emergent. The contracts just make sense being defined in the agent. I plan on adjusting the unit testing tool to also take this service name so you can run a test on the api being defined by a web service tool.
No comments:
Post a Comment