understand-agent-flow

Explain AgentFramework execution flow to diagnose tool selection and orchestration.

1|Updated Jul 28, 2025
One-click install
npx skills add https://github.com/anoopg87/KAgentic --skill understand-agent-flow
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: understand-agent-flow
Source: https://github.com/anoopg87/KAgentic/tree/main/.claude/skills/understand-agent-flow
Command: npx skills add https://github.com/anoopg87/KAgentic --skill understand-agent-flow

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Help engineers and maintainers understand how KAgentic's AgentFramework orchestrates LLMs, tools, and memory so they can diagnose incorrect tool selection, inconsistent responses, and performance bottlenecks.

Core Features & Use Cases

  • Execution Flow Mapping: Step-by-step breakdown from user input to final LLM response including optional embedding and multi-agent graph delegation.
  • Tool Selection Debugging: Guidance to inspect canHandle(), score(), and maxByOrNull selection with logging examples and score conventions.
  • Diagnostics & Performance: Strategies to trace memory state, measure per-step latency, handle tool/LLM failures, and profile hotspots for optimization.
  • Use Case: Debug why a CalculatorTool was not chosen for a math query, reproduce inconsistent agent replies, or profile LLM vs tool latency.

Quick Start

Ask the agent to "Explain the AgentFramework execution flow and why the CalculatorTool was selected for the input 'What is 5 + 3?'".

Frequently Asked Questions about understand-agent-flow

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I debug incorrect tool selection in a multi-agent framework?

Debug tool selection in a multi-agent framework by inspecting canHandle() and score() implementations with logging examples. Trace maxByOrNull selection and score conventions using AgentFramework logs to diagnose why specific tools are chosen for user inputs.

How does AgentFramework orchestrate LLM responses and memory state?

AgentFramework orchestrates LLM responses by mapping the execution flow from user input to final output, including optional embedding and multi-agent graph delegation. It traces memory state and prompt construction throughout the step-by-step pipeline.

What is the best way to profile LLM vs tool latency in Kotlin agent workflows?

Profile LLM vs tool latency in Kotlin agent workflows by applying diagnostic strategies to measure per-step latency. Trace memory state, handle tool or LLM failures, and profile hotspots to identify performance bottlenecks.

Can I trace multi-agent graph delegation using only AgentFramework logs?

Yes, you can trace multi-agent graph delegation using AgentFramework logs. The diagnostic process requires access to these logs alongside tool canHandle and score implementations to diagnose agent orchestration and response generation.

Why does my agent return inconsistent replies for the same prompt?

Inconsistent agent replies often stem from unstable tool selection or fluctuating memory state. Reproduce the issue by tracing the AgentFramework execution flow, inspecting prompt construction, and verifying tool scoring logic with provided Kotlin snippets.