Agent skill#
skills/ajmx is an agent
skill that teaches an AI agent how to look inside a JVM with ajmx. Add it with one of these
commands, then ask about a running JVM in your own words. The agent finds the JVM and its MBeans,
reads them, and changes the JVM only when you ask.
gh skill install yagipass/ajmx ajmx
npx skills add yagipass/ajmx --skill ajmx
apm install yagipass/ajmx/skills/ajmx
The agent also needs ajmx on its PATH. See Installation.
What to ask#
- Why does the heap of
OrderServicekeep growing? - Are there deadlocked threads in the JVM listening on port 9010?
- Is the connection pool of the local Spring Boot app running out?
- Turn on a heap dump on
OutOfMemoryErrorin the running app.
What the skill teaches#
ajmx help already lists the commands and options of the installed version, and the skill tells
the agent to run it first. The skill covers what help does not.
- Exploring. Pick the JVM with
ps,searchwith a narrow pattern,describebefore reading or changing, and send several calls as onebatch. - Changing a JVM. Run
writeandinvokeonly for a change the user asked for,readthe old value first, and confirm an operation whose effect is unclear. Confirm the operations that load the JVM, such as a heap dump, before running them on a production JVM. - Partial results. Report a cut or partial result as such. Set the limits before an
invokewhose result cannot be read again. - Errors. Retry only what is
retryable, and never retry awriteorinvokewhoseexecutedisunknown. Tell the user aboutATTACH_PERMISSION_DENIEDinstead of reaching forsudo. - Credentials. Ask the user to export
JMX_USERNAMEandJMX_PASSWORDinstead of pasting a password into the conversation.