It sounds pretty scary, but OpenHands CLI can now ...
# success-stories
c
It sounds pretty scary, but OpenHands CLI can now actually help you debug Kubernetes issues by running
kubectl
command 🤯 You have to be there watching & approve its command of course, otherwise it might potentially 💣 your infra -- but this is a huge time saver for me, especially since I'm not really an expert in debugging k8s issues and don't know where to start looking 😅
😱 3
💡 1
a
Wait till you learn about https://github.com/k8sgpt-ai/k8sgpt
👀 1
l
we could maybe make some microagents based on this?
🙌 1
a
Probably, you'd just need to teach the microagent to understand YAML and then add detections for each type of k8s error All k8sgpt really does is stores the context of what each error means in the k8s world and then uses an upstream LLM to explain that to the end-user It's offered as an MCP Server as well
l
Ah I see. But maybe LLMs can do all of this already?
a
I'd say to an extent There are lots of nuances in k8s and having the information in an operator real time is super helpful
c
yeah like openhands-cli plus kubectl could potentially do most of the things, it is just that we'd be too scared to trust it lolsob one wrong command -- your cluster is gone
a
Yea, I saw a post where someone used AI to run terraform apply and I was like "nope, not ready for that"
lolsob 1
I'd say adding to the existing k8s microagent would be helpful though Add
kubectl
and
yq
support would go a long way
r
I have been using AI to operate some of those dangerous tools for some time now... it is usually safe. the only really dangerous behaviour that I notice it that it sometimes like to "greenfield" stuff, so if it finds out that it makes a mistake it will sometimes nuke a database or something. The solution for me has been making it clear that it should be doing only read-only operations. Would be nice to have modified versions of some tools like kubectl , psql etc, that are fully readonly to be given to AI (or one that asks for confirmation for destructive commands). they really make some really heavy operations a breeze. I have had stuff that usually takes an hour performed in less than 10 minutes like building a whole new cloud env. at amazon with IAM , EC2, certificates etc etc.
a
That sounds like a maintenance nightmare though 😆 I wonder if there are OpenSource GuardRails that can be used similar to BedRock Guardrails - which won't allow write/delete/edit activities for certain tools thinky spin
l
We already have a SecurityAnalyzer framework in OpenHands, but it’s not very widely used or maintained. We are thinking of making ways to improve this though, such as adding an argument to each function call allowing the LM to self-assess the risk level of each call
a
Could you send a link to this @limited-student-10747? I'd like to take a peak - right now I'm utilizing a
constituion.md
microagent to handle the "no nos"
l
I honestly wouldn’t suggest using it now because it’s not super-generalizable, but in case you’re interested it’s here: https://github.com/All-Hands-AI/OpenHands/tree/0c1c570dac654ba6536d1eaaa30a65dcb0416971/openhands/security
a
Thanks for that @limited-student-10747 going to check it out - I've been looking at https://github.com/guardrails-ai/guardrails a little