CLI and MCP Basics for AI Agents ![rw-book-cover](https://readwise-assets.s3.amazonaws.com/static/images/article1.be68295a7e40.png) ๐Ÿ”— **Source:** [CLI and MCP Basics for AI Agents](https://www.youtube.com/watch?v=ZR6U4TN8-Cw#transcript) > [!note]+ Document Notes > tags: [ai-agents, cli-tools, model-context-protocol, observability, developer-tools, ai-observability] > author: [MISSING] > source: YouTube > reference: https://www.youtube.com/watch?v=ZR6U4TN8-Cw > date created: {{date:YYYY-MM-DD}} {{time:HH:mm}} > > # ๐Ÿท๏ธ Title: CLI and MCP Basics for AI Agents (The Context Window #4) > <!-- deep-read:sections start --> ## ๐Ÿงญ Table of Contents - [๐Ÿ“ Summary](#-summary) - [๐Ÿ“– Main Content](#-main-content) - [๐Ÿ—’๏ธ Notes](#๏ธ-notes) - [๐Ÿ“š References](#-references) - [๐Ÿ—ฃ๏ธ Paraphrase](#๏ธ-paraphrase) - [๐Ÿ“ฐ Newsletter](#-newsletter) - [โœ… Action Items](#-action-items) - [๐Ÿงช Hypotheses](#-hypotheses) - [๐Ÿ“Š Methodology](#-methodology) - [โ“ Questions](#-questions) - [๐Ÿ”ฎ Future Research](#-future-research) - [๐Ÿ’ก Implications](#-implications) - [๐Ÿง  Learning Styles Assessment](#-learning-styles-assessment) - [๐Ÿ“Š Accessibility Assessment](#-accessibility-assessment) - [๐ŸŒ DEIB Assessment](#-deib-assessment) - [โœ… Logical Validity](#-logical-validity) - [๐Ÿ›ก๏ธ DARVO Analysis](#-darvo-analysis) - [๐ŸŽฏ Conclusion](#-conclusion) ## ๐Ÿ“ Summary - Grafana team discusses two approaches for AI agents to interact with observability tools: Model Context Protocol (MCP) servers vs CLI tools - MCP provides standardized tool definitions with authentication, while CLIs offer progressive discovery and token efficiency - Both approaches achieve similar outcomes but with different trade-offs in token usage, discoverability, and implementation complexity - Grafana offers both GCX (CLI) and MCP servers for cloud integration, with evaluations showing comparable performance - The choice between approaches depends on use case, environment constraints, and personal preferences ## ๐Ÿ“– Main Content The Grafana team explores two competing approaches for enabling AI agents to interact with observability platforms: Model Context Protocol (MCP) servers and Command Line Interface (CLI) tools optimized for agents. ### Model Context Protocol (MCP) MCP is a standardization protocol introduced by Anthropic about 18 months ago that defines how AI agents interact with external tools. It solves the problem of every application needing to define tools separately for each agent platform. Key benefits: - **Standardized tool definitions**: Self-describing tools with parameters and authentication built into the protocol - **Cross-platform compatibility**: Works across different transports (local stdio or remote HTTP) - **Explicit tool discovery**: All available tools are defined upfront with clear descriptions Main limitations: - **Token consumption**: Tool definitions consume context window space (though mitigated by deferred tool search) - **Fixed tool set**: Less flexible for esoteric or rarely-used functionality ### CLI Approach with GCX Grafana's GCX (Grafana Cloud CLI) takes a different approach, optimizing specifically for agentic usage rather than human interaction. Key features: - **Progressive discovery**: Agents can explore available commands dynamically - **Agent-aware output**: Detects agent mode and provides JSON output vs. human-readable tables - **Efficient data handling**: Spills large payloads to disk rather than flooding context - **Semantic exit codes**: Provides actionable error information for agent decision-making - **Field selection**: Allows agents to request specific fields to minimize context usage ### Skills as Training Wheels Both approaches use "skills" - markdown files defining workflows that combine multiple commands or tools to accomplish higher-level tasks. These serve as training data until AI models have sufficient knowledge about the tools built into their training sets. ## ๐Ÿ—’๏ธ Notes #### โฑ๏ธ [00:00:00](https://www.youtube.com/watch?v=ZR6U4TN8-Cw&t=0) Introduction and Team Locations - Team across 4 countries: Portugal, USA (Seattle), Netherlands, and another US city - Nicole (Dev Advocate), Tiffany (AI/observability), Ben (ML engineer), Ward (Product Manager), David (GCX builder) #### โฑ๏ธ [00:03:12](https://www.youtube.com/watch?v=ZR6U4TN8-Cw&t=192) Recent AI News - GPT 4.8 release with improvements over 4.7, especially cost efficiency and tool calling - Anthropic IPO filing and $980B valuation - Dreaming feature for managed agents (memory consolidation) - OpenTelemetry CNCF graduation - Google IO: Gemini Spark, Anti-gravity 2 IDE - PineCone pivot from RAG to "pre-compiled knowledge" #### โฑ๏ธ [00:08:30](https://www.youtube.com/watch?v=ZR6U4TN8-Cw&t=510) What is Grafana Assistant - Chat-based agent for observability questions - Supports PromQL writing, dashboard creation, root cause analysis, SLO building - Available through multiple interfaces: chat, GCX, MCP - Now supports OSS and Enterprise, not just Cloud #### โฑ๏ธ [00:12:15](https://www.youtube.com/watch?v=ZR6U4TN8-Cw&t=735) MCP Explained - Standardizes tool definitions between applications and agents - Prevents Nร—M problem where every app defines tools for every agent - Provides authentication, cross-transport support - Examples: GitHub MCP server with create issue, pull request tools #### โฑ๏ธ [00:18:45](https://www.youtube.com/watch?v=ZR6U4TN8-Cw&t=1125) CLI in AI Context - Optimized for agentic usage, not human interaction - Progressive disclosure reduces token usage - GCX can call Grafana Assistant for specialized observability insights - Skills provide workflow templates combining multiple commands #### โฑ๏ธ [00:25:30](https://www.youtube.com/watch?v=ZR6U4TN8-Cw&t=1530) Skills Explanation - Markdown files defining workflows - Bridge between low-level commands and high-level actions - Training wheels until LLMs have sufficient knowledge in training data - Similar to Claude Code skills, installed to standard directories #### โฑ๏ธ [00:32:00](https://www.youtube.com/watch?v=ZR6U4TN8-Cw&t=1920) Ben's MCP Advocacy - Self-describing tools and parameters - Built-in authentication - Works across environments (local/remote) - Good tool discoverability upfront - Deferred tool search mitigates token consumption issues #### โฑ๏ธ [00:38:15](https://www.youtube.com/watch?v=ZR6U4TN8-Cw&t=2295) GCX Features - Agent-native design with mode detection - Hints about command complexity and output size - File spilling for large payloads - Field selection for efficient data retrieval - Semantic exit codes and JSON errors - Covers entire Grafana Cloud API surface #### โฑ๏ธ [00:45:20](https://www.youtube.com/watch?v=ZR6U4TN8-Cw&t=2720) Live Demo Comparison - Side-by-side Claude Code instances: MCP vs GCX - Task: Create SLO for assistant metrics grouped by cluster - GCX completed faster with $0.04 cost - MCP required API discovery, cost $0.07 - Both achieved the goal successfully #### โฑ๏ธ [00:52:30](https://www.youtube.com/watch?v=ZR6U4TN8-Cw&t=3150) Decision Framework - Remote environments (Claude.ai, ChatGPT) require MCP - Local IDEs can use either approach - Consider binary installation preferences - Esoteric tasks may favor CLI flexibility - Performance evaluation through ObsBench benchmark ## ๐Ÿ“š References - [Grafana MCP Server GitHub](https://github.com/grafana/grafana-mcp-server) - 3000+ stars - [GCX CLI Documentation](https://grafana.com/docs/grafana-cloud/cli/) - [Architecture of Forgetting blog post](https://contexthorizon.com) - AI memory consolidation - [ObsBench](https://github.com/grafana/obsbench) - Observability benchmark for AI agents ## ๐Ÿ—ฃ๏ธ Paraphrase The Grafana team debates two architectural approaches for AI agent integration. MCP provides a standardized protocol where tools are explicitly defined upfront, offering consistency and built-in authentication but consuming context window space. CLI approaches like GCX use progressive discovery, allowing agents to explore capabilities dynamically while optimizing for token efficiency through techniques like file spilling and field selection. Both approaches achieve similar outcomes, with the choice depending on environmental constraints (local vs remote), preference for explicit vs discovered tooling, and specific use case requirements. The team emphasizes that the interface matters less than delivering high-quality observability insights efficiently. ## ๐Ÿ“ฐ Newsletter The AI tooling landscape continues evolving rapidly! Grafana's latest Context Window episode dives deep into two fascinating approaches for connecting AI agents to observability platforms. Whether you're team MCP (standardized, explicit tool definitions) or team CLI (progressive discovery, token-efficient), both paths lead to powerful AI-assisted observability workflows. The live demo showing identical SLO creation tasks with minimal cost differences proves that good engineering execution matters more than architectural philosophy. Plus, their new GCX CLI and MCP server are both open source - check out the GitHub repos and give them a star! The ObsBench evaluation framework is particularly interesting for anyone building AI tooling. ## โœ… Action Items #### DevRel - Create comparison guide: MCP vs CLI decision tree for different environments - Develop workshops showcasing both GCX and MCP integration patterns - Build demo scripts for common observability tasks using both approaches - Measure and publish performance benchmarks across different AI platforms #### Community - Contribute to open source GCX and MCP server repositories - Share skills/workflow templates for common observability patterns - Create evaluation frameworks for AI tool effectiveness - Document best practices for agent-optimized CLI design #### WordPress - Apply progressive disclosure patterns to WP-CLI for AI agent optimization - Explore MCP server for WordPress management tasks - Consider skills-based training materials for AI-assisted WordPress workflows ## ๐Ÿงช Hypotheses - **Token efficiency hypothesis**: CLI with progressive discovery uses fewer tokens than upfront MCP tool loading for complex workflows - **Performance convergence hypothesis**: As models improve and context windows expand, performance differences between MCP and CLI approaches will diminish - **Training data effect hypothesis**: CLIs for established tools (GitHub, AWS) perform better than new tools due to training data inclusion - **Discovery vs definition hypothesis**: Explicit tool definition (MCP) provides better guidance for smaller/cheaper models than progressive discovery - **Skills obsolescence hypothesis**: As tools gain training data presence, workflow skills become less necessary for agent effectiveness ### ๐Ÿ“Š Methodology - **A/B testing**: Run identical tasks through MCP and CLI approaches, measuring tokens, latency, and success rates - **ObsBench evaluation**: Use Grafana's observability benchmark across different models and tool configurations - **Longitudinal analysis**: Track performance changes as models are retrained with more CLI documentation - **Multi-environment testing**: Compare approaches across local IDEs, cloud platforms, and edge cases ### โ“ Questions - How do token costs scale with workflow complexity for each approach? - Which method provides better error recovery and debugging experiences? - What's the learning curve difference for developers adopting each approach? - How do authentication and security models compare between MCP and CLI patterns? ### ๐Ÿ”ฎ Future Research - **Hybrid approaches**: Combining MCP tool definitions with CLI progressive discovery - **Dynamic tool generation**: Auto-generating MCP tools from CLI help documentation - **Context-aware tool selection**: Choosing optimal approach based on task complexity and environment - **Agent specialization**: Training models specifically for observability tasks ### ๐Ÿ’ก Implications - **Development strategy**: Organizations need multi-modal AI integration strategies rather than single approaches - **Standardization efforts**: Industry may converge on hybrid standards combining benefits of both approaches - **Training focus**: AI model training should emphasize tool discovery patterns alongside explicit definitions - **Tooling evolution**: Traditional CLIs will increasingly optimize for machine consumption alongside human usage ### ๐Ÿง  Learning Styles Assessment Reading level: Technical (Grade 14-16) - contains domain-specific terminology and complex architectural concepts. #### ๐Ÿ‘€ Visual learners - Present: Architecture diagrams showing MCP vs CLI data flows, token usage comparisons - Improve: Add sequence diagrams for tool discovery processes, visual decision trees #### ๐Ÿ”Š Aural learners - Present: Video format with detailed verbal explanations and live demonstrations - Improve: Audio-only version highlighting key decision points and trade-offs #### ๐Ÿ—ฃ๏ธ Verbal learners - Present: Clear definitions of MCP, CLI, skills, and progressive discovery - Improve: Add glossary of technical terms, analogies to familiar concepts #### ๐Ÿงฉ Kinesthetic learners - Present: Live coding demo, hands-on comparison of both approaches - Improve: Step-by-step tutorials, interactive decision flowcharts #### ๐Ÿง  Logical learners - Present: Decision frameworks, performance benchmarks, systematic comparisons - Improve: Formal evaluation criteria, quantitative analysis of trade-offs #### ๐Ÿง‘โ€๐Ÿคโ€๐Ÿง‘ Social learners - Present: Team discussion format, multiple perspectives represented - Improve: Community forums for sharing experiences, peer review of approaches #### ๐Ÿง˜โ€โ™€๏ธ Solitary learners - Present: Detailed technical documentation, individual exploration opportunities - Improve: Self-assessment checklists, personal experimentation guides #### ๐ŸŒฟ Naturalistic learners - Present: Evolutionary perspective on tool standardization, ecosystem thinking - Improve: Analogies to natural selection in technology adoption ### ๐Ÿ“Š Accessibility Assessment #### Screen reader semantics - Present: Clear headings, descriptive timestamps for video content - Improve: Add ARIA labels for complex diagrams, detailed alt text for code examples #### Keyboard navigation - Present: Standard video controls, accessible transcript navigation - Improve: Keyboard shortcuts for jumping between topics, skip links for repetitive content #### Contrast and readability - Present: Standard video player with good contrast - Improve: High contrast mode for code examples, larger text options for technical diagrams #### Text resizing and reflow - Present: Responsive transcript layout - Improve: Ensure technical diagrams remain readable at 200% zoom #### Media and captions - Present: Full transcript provided - Improve: Add closed captions with technical term spelling, audio descriptions for demos ### ๐ŸŒ DEIB Assessment #### Cultural breadth - Present: Global team representation (4 countries) - Improve: Include examples from diverse organizational contexts, non-Western technical patterns #### Inclusive language - Present: Professional, jargon-defined technical discussion - Improve: Provide plain language summaries, expand acronym definitions #### Neurodiversity support - Present: Multiple information formats (audio, text, visual demos) - Improve: Add structured summaries, consistent navigation patterns #### Representation - Present: Mixed gender technical team, various experience levels - Improve: Include diverse use cases, accessibility considerations in tool design ### โœ… Logical Validity #### Strong reasoning - **Comparative analysis**: Well-structured comparison of approaches with concrete examples - **Evidence-based conclusions**: Uses live demonstrations and benchmark data to support claims - **Systems thinking**: Considers broader ecosystem implications and trade-offs #### Fallacies - **False dichotomy**: Framing as "MCP vs CLI" when hybrid approaches exist - **Recency bias**: Overweighting latest model improvements without long-term analysis - **Selection bias**: Demo task may favor one approach over another #### Tone of voice Professional and collaborative, with good-natured friendly competition. Technical depth balanced with accessibility. ### ๐Ÿ›ก๏ธ DARVO Analysis No DARVO patterns detected. Discussion maintains professional focus on technical trade-offs without personal attacks or victim-blaming dynamics. ## ๐ŸŽฏ Conclusion Both MCP and CLI approaches offer viable paths for AI agent integration with observability tools. MCP excels in standardization and explicit tool definition, while CLIs provide flexibility and token efficiency through progressive discovery. The choice depends on environmental constraints, use case complexity, and developer preferences. As the ecosystem matures, hybrid approaches combining benefits from both paradigms will likely emerge. Organizations should focus on delivering high-quality insights efficiently rather than betting exclusively on a single architectural pattern. --- ## Full Transcript [00:04] And we're live.<br>[00:06] I think this is the most number of<br>[00:08] people that we've had at the same time<br>[00:09] on this episode before.<br>[00:11] >> I think so. And are we not in five<br>[00:14] different countries right now?<br>[00:17] >> Oh, me and Ben are in the same<br>[00:22] >> You messed it up.<br>[00:23] >> Sorry. American cities if that helps.<br>[00:26] I'm in Portugal,<br>[00:29] >> USA, Seattle,<br>[00:32] >> and the Netherlands.<br>[00:36] >> Well, maybe we should get started. Let's<br>[00:38] introduce ourselves. I'm Nicole<br>[00:41] Vanderhovven. I'm a dev advocate at<br>[00:43] Graphana and I'm here with Tiffany.<br>[00:48] >> I was like, am I in the same direction<br>[00:49] as you like on my screen? But I guess<br>[00:51] so. Uh<br>[00:52] >> I think so. Yeah.<br>[00:54] Um yeah, so I'm a developer advocate at<br>[00:57] Graphana for uh tempo slow tracing,<br>[01:01] pyroscope for profiling and AI things.<br>[01:05] Um I'm going to go downwards. Hello Ben,<br>[01:08] >> which I think is me. Yeah. Uh hello<br>[01:10] everyone. I'm uh I'm a a software<br>[01:13] engineer at Far. I've been here for five<br>[01:16] years now, so practically forever. Um,<br>[01:19] I've been on the machine learning team<br>[01:21] and now work on lots of different AI<br>[01:24] based products including uh the MCP<br>[01:27] server which we'll talk about a little<br>[01:29] bit. Yeah. Uh, and several other bits<br>[01:31] and pieces. Um, so yeah, let's go that<br>[01:35] way toward<br>[01:37] >> I [laughter] think the other way around.<br>[01:39] Doesn't matter. You called me out. So<br>[01:41] I'll I'll do my introduction.<br>[01:43] >> Yeah. So uh so I've been with Grafana<br>[01:46] Labs for almost seven years now and I<br>[01:49] had various functions but uh currently<br>[01:52] I'm a product manager focused on Grafana<br>[01:55] cloud and specifically nowadays on GCX.<br>[01:59] >> Yeah, I guess I'll go last. So I'm I'm<br>[02:01] David. I've been here about the same<br>[02:03] time as Ben. So just over five years<br>[02:05] I've been building GCX with Ward. Um and<br>[02:09] most recently been focusing on trying to<br>[02:11] understand how GCX performs. um with his<br>[02:14] skills against other other tools.<br>[02:20] >> Awesome. So, I I guess today we're going<br>[02:22] to be talking about MCP versus CLI, what<br>[02:27] all those letters mean and which one Ben<br>[02:30] thinks is appropriate for all<br>[02:32] situations.<br>[02:34] >> The [laughter] big the big versus word<br>[02:36] came out. I thought we were thought it<br>[02:38] were all<br>[02:39] >> Yeah, we're picking sides. [laughter]<br>[02:40] Except only Ben ended up doing that.<br>[02:46] >> I wonder which one. H<br>[02:49] >> I know.<br>[02:49] >> I guess some announcements first. Um did<br>[02:52] you all know if you're here then you're<br>[02:54] probably interested in what we're doing<br>[02:55] in AI? We're actually doing this maybe<br>[02:59] brave, maybe silly thing where we're um<br>[03:02] taking I'm taking a bit of an excerpt<br>[03:05] from every team weekly meeting and I'm<br>[03:08] putting it up on YouTube and it's mostly<br>[03:11] the demos part, but if you haven't seen<br>[03:14] it, it is here. It's called Inside the<br>[03:17] AI weekly and uh I'm trying to get one<br>[03:20] up every Monday. Uh, but let's go<br>[03:23] through some like some AI news from the<br>[03:27] last month. I think one of the biggest<br>[03:29] things is that 4.8 dropped. I think it<br>[03:31] was just like was that last week or<br>[03:33] something?<br>[03:34] >> It was very recent.<br>[03:36] >> I think it was last week indeed.<br>[03:38] >> Yeah, it's much better than the previous<br>[03:41] one because it's a higher number.<br>[03:44] [laughter]<br>[03:44] >> Yeah, it's May<br>[03:47] >> the world changing revolutionary.<br>[03:49] >> But I do think it's better. Uh, I think<br>[03:51] it seems more like an evolution than a<br>[03:54] revolution. I think they they fixed some<br>[03:57] um cost inefficiencies with 4.7. At<br>[04:01] least that's that's what I read reading<br>[04:03] between the lines. It seemed just a<br>[04:05] little bit better on on everything, but<br>[04:07] especially like a bit more efficient in<br>[04:10] in calling tools and stuff.<br>[04:13] >> Yeah. Yeah. And I also also think they<br>[04:14] wanted to get get a rid of the 4.7 bet<br>[04:17] wrap like uh there were around it. Yeah.<br>[04:21] >> Yeah. I think there's an association<br>[04:22] with like the new tokenizer in 4.7 that<br>[04:25] they were like, "Okay, we'll quickly<br>[04:26] quickly get paper over that and get a<br>[04:28] new one. I hope that doesn't have that<br>[04:29] association." That's the cynic in me. I<br>[04:32] don't know.<br>[04:34] >> And another uh there's a couple things<br>[04:36] from Anthropic. Anthropic is going to<br>[04:38] IPO now.<br>[04:41] Yeah, they did a not so secret filing I<br>[04:44] think with the sack.<br>[04:47] >> That's always scary when something when<br>[04:51] something that big like one of the<br>[04:52] frontier models is potentially up for<br>[04:55] grabs and might you know it all of these<br>[04:58] quality issues like who's who's going to<br>[05:00] control one of the best frontier models<br>[05:03] in the world. That's that's kind of<br>[05:05] scary [laughter]<br>[05:07] but we'll see what happens there. And<br>[05:09] also if you see their latest funding<br>[05:10] rounds, oh sorry I didn't want to talk<br>[05:12] over you but if you also saw their<br>[05:14] latest funding rounds like those are big<br>[05:16] numbers. It's amazing like uh 980<br>[05:20] billion or something valuation. It's<br>[05:22] incredible.<br>[05:22] >> Oh wow.<br>[05:24] >> Yeah.<br>[05:25] [laughter and snorts]<br>[05:26] >> That's a lot of cappuccinos.<br>[05:28] >> Yeah. I'm just like thinking of [snorts]<br>[05:30] how much money that the employees there<br>[05:33] are potentially getting.<br>[05:34] >> Wow.<br>[05:36] >> So many tokens. [laughter]<br>[05:37] tokens as well.<br>[05:38] >> Yeah, drinks are definitely on them if<br>[05:40] we<br>[05:40] >> they get paid in tokens.<br>[05:42] >> Yes. [laughter]<br>[05:45] >> Uh they also introduced dreaming for<br>[05:47] managed agents. So it's it's interesting<br>[05:50] because I think so open claw was<br>[05:53] actually the first to come out with this<br>[05:54] dreaming feature. It's a memory<br>[05:55] consolidation feature. But I think and<br>[05:58] they didn't say this directly but I<br>[06:00] think they got it from when the clawed<br>[06:02] source code was leaked. There were<br>[06:04] already some hints to dreaming there.<br>[06:06] Open Claw actually implemented it first<br>[06:08] and now this is Anthropic's actual<br>[06:11] implementation. I've been playing around<br>[06:13] heavily with with Open Claw um mostly<br>[06:17] using Opus. So I'm interested in seeing<br>[06:20] what Anthropic had in mind.<br>[06:23] >> Wow. And what does it do when it dreams?<br>[06:26] I didn't follow that story.<br>[06:28] >> Yeah, I it's actually a really tidy<br>[06:30] thing. Oh, I I wrote a blog post just on<br>[06:34] this.<br>[06:34] >> Shameless plug. There we go.<br>[06:36] >> Yeah. Uh it's called the architecture of<br>[06:39] forgetting. It's on context horizon, our<br>[06:42] AI based um kind of blog. And it is<br>[06:46] basically it's a three-stage memory<br>[06:49] process. It's basically how uh how AI<br>[06:52] agents remember<br>[06:54] remember things and then also forget<br>[06:57] things on purpose.<br>[07:00] Interesting. That is interesting.<br>[07:03] >> It's got there more and more agents or<br>[07:06] at least AI systems are operating as a<br>[07:10] human brain in that sense like we're<br>[07:12] we're dreaming. They are now also<br>[07:14] dreaming. What's next? Yeah, open clause<br>[07:18] implementation is particularly<br>[07:19] interesting because you can look and see<br>[07:22] what it dreamt in the light and deep and<br>[07:26] REM phases and you can see what it chose<br>[07:30] to carry over into long-term memory.<br>[07:34] >> I wish I had that choice.<br>[07:37] [laughter]<br>[07:39] Um, also open telemetry graduated from<br>[07:43] CNCF only officially on May 21<br>[07:45] apparently. And although this isn't<br>[07:48] strictly this isn't just an AI thing,<br>[07:50] the whole project really is leading hard<br>[07:53] into Gen AI and um we are our our own AI<br>[07:57] observability app follows Genai semantic<br>[08:00] conventions. So I thought that it was<br>[08:02] relevant. Uh, and then Google IO also<br>[08:06] happened and dropped a bunch of models.<br>[08:09] The most interesting one was Gemini<br>[08:11] Spark, which is, it sounds to me like<br>[08:14] their open claw, like a continuously<br>[08:16] running um, a personal agent that's only<br>[08:20] available on their new, brand new Google<br>[08:23] AI Ultra plans, which I can't get access<br>[08:26] to because I'm on a workspace. It's not,<br>[08:28] my Google account is not personal, which<br>[08:30] kind of sucks. I would like to access<br>[08:32] that.<br>[08:34] Yeah. And then I was also saying that um<br>[08:36] it was like anti-gravity 2 or something<br>[08:38] like that. Now they have some like IDE<br>[08:39] and whatnot.<br>[08:42] Yeah, it it's like it's like VS Code.<br>[08:44] It's very cursor like I think. I haven't<br>[08:48] played around so much with it, but<br>[08:49] that's also included in the AI ultra<br>[08:51] plans. So it's like use of anti-gravity<br>[08:54] and Gemini and YouTube Premium, which<br>[08:57] isn't AI, and Google Drive.<br>[09:01] That's how Google's gonna going to try<br>[09:03] to win this by bundling in all of the<br>[09:05] Google things.<br>[09:09] Uh, another thing is that Pine Cone,<br>[09:12] who's the one that came, well, not maybe<br>[09:15] not came up with, but like popularized<br>[09:18] the idea of rag retrieval augmented<br>[09:21] generation<br>[09:23] just released this blog post saying<br>[09:25] basically we don't think that rag is the<br>[09:27] way to go now. instead pre-ompiled<br>[09:30] knowledge is and they're calling it pine<br>[09:33] cone nexus. I'm not entirely sure how<br>[09:36] that works yet, but I just thought it<br>[09:38] was interesting to see whenever you see<br>[09:40] like a flip-flop like this. Um, they<br>[09:43] popularized it, so they, you know, they<br>[09:45] own this space and they're kind of<br>[09:47] saying, well, these are the areas where<br>[09:49] it's not so good.<br>[09:51] >> Interesting. It looks like from the<br>[09:53] article that I just scanned, it looks<br>[09:55] very similar to what we do in Grafana<br>[09:58] cloud around uh the knowledge graph and<br>[10:01] AI memories or the infrastructure<br>[10:04] memories that we have in the graphana<br>[10:06] assistant. So I guess we're on the right<br>[10:09] track there.<br>[10:11] >> Sounds like it. Well, since you<br>[10:13] mentioned it, Ward, why don't you why<br>[10:14] don't we get started and you can tell us<br>[10:16] what Graphana Assistant is.<br>[10:18] >> What is Graphana Assistant? Uh so Cfana<br>[10:21] assistant is our u kind of chatbased<br>[10:24] agent for all your observability<br>[10:27] questions and uh the assistant is kind<br>[10:30] of an engine and you can basically<br>[10:32] access it through all kinds of different<br>[10:34] means different doors if you will and<br>[10:37] there's two doors that we're going to<br>[10:38] talk about today I think the GCX door<br>[10:40] and the MCP door but um most of our<br>[10:43] customers are probably now familiar with<br>[10:46] using the assistant through kind of a<br>[10:48] chat interface like little bit similar<br>[10:50] to chat GPT and uh they cannot ask it<br>[10:53] all kinds of questions. So think about<br>[10:56] simple questions around um like help me<br>[10:59] write<br>[11:00] PromQL and the query language for our<br>[11:03] metrics database. uh it can ask you can<br>[11:06] ask to create a dashboard but you can<br>[11:08] also do more advanced things like do<br>[11:10] full root cause analysis or maybe help<br>[11:13] building SLOs's and much much more but<br>[11:15] that's essentially what the agent of the<br>[11:17] what the assistant is and uh what we're<br>[11:20] uh yeah making available through all<br>[11:22] kinds of various ways like MCP and GCX<br>[11:25] and APIs and the web.<br>[11:29] >> Yeah. And then also like if you're you<br>[11:31] if you've used assistant like I don't<br>[11:34] know before fonicon basically you were<br>[11:36] doing everything related to stuff you're<br>[11:37] running in cloud for like if you're<br>[11:39] directly using assistant um but as of<br>[11:42] graphonicon you can also use graphon<br>[11:44] assistant with graphon oss and also<br>[11:46] enterprise and I'm putting a blog in<br>[11:48] here that came out with that if you want<br>[11:50] to see more about that.<br>[11:55] Yeah, exactly. Big news of our Graphana<br>[11:59] conference that we just had.<br>[12:03] >> Yeah. And also at Graphfana, I noticed<br>[12:05] that we we just announced so many things<br>[12:07] all at the same time. And um you know<br>[12:10] now assistant has tools and there's a<br>[12:14] lot of people who are confused like if<br>[12:16] they want to use their AI tools, their<br>[12:20] AI agents uh to to do things in<br>[12:23] Graphana. There are now many different<br>[12:25] ways like they can use assistant<br>[12:27] everywhere it seems and and then um they<br>[12:30] can use those tools they can use the<br>[12:33] graphana MCP there's now graphana cloud<br>[12:36] MCP there's the CLI there's GCX so like<br>[12:40] let's let's figure all of this out<br>[12:43] because otherwise it's super confusing<br>[12:46] um what does it mean for assistant to<br>[12:48] use tools and what can you do with it<br>[12:52] >> yeah good question I think like tools<br>[12:55] are are the thing that makes AI into<br>[12:58] agents. That's the way I think of it.<br>[12:59] And it gives them the power to interact<br>[13:02] with the real world in in some way<br>[13:04] rather than just being like text in and<br>[13:05] text out. Uh so it allows the assistant<br>[13:08] to do all of the clever things it can do<br>[13:10] such as looking for dashboards, creating<br>[13:13] dashboards. Basically, it allows them to<br>[13:16] allows the agents to yeah perform useful<br>[13:20] tasks and to do so more accurately as<br>[13:22] well by by having real knowledge bases<br>[13:24] they can query or uh being able to hit<br>[13:26] APIs in like predefined ways<br>[13:33] and I think I think that there's two<br>[13:36] about a year and a half ago there was<br>[13:38] this this kind of big thing released by<br>[13:41] anthropic which was the model context<br>[13:43] protocol CP. Um, and this was like a<br>[13:46] standardization of the way that uh the<br>[13:49] tools are defined and and the idea was<br>[13:53] to solve the problem of you have lots of<br>[13:56] different applications that want to talk<br>[13:58] to lots of different agents and and have<br>[14:01] want have have lots of different tools<br>[14:03] defined. And how do you do that without<br>[14:07] each like application such as cursor or<br>[14:10] VS code or whatever your IDE is defining<br>[14:13] all of those tools separately like each<br>[14:15] one of them would have to go and define<br>[14:17] their own tools to interact with GitHub<br>[14:19] and to interact with Graphfana and and<br>[14:22] likewise<br>[14:23] GitHub would have to if they wanted<br>[14:25] their their tools to be available and<br>[14:26] everything they would have to contribute<br>[14:27] them towards each of those tools. Uh so<br>[14:30] MCP is is kind of a a standardized<br>[14:32] protocol defining those tools amongst<br>[14:34] other things. Uh it's not just tools. Um<br>[14:37] but it basically allows you to tell a<br>[14:40] model uh an an LLM an agent. Um these<br>[14:44] are some tools I have and and every<br>[14:46] client application knows how to talk to<br>[14:48] them. Um so some examples are the GitHub<br>[14:51] MCP server which has tools such as like<br>[14:54] create issue or create pull request uh<br>[14:57] fetch some code um and any one of the<br>[15:01] various IDE can connect that up um and<br>[15:05] the user just logs in quite simply<br>[15:07] ideally quite simply and gets all of<br>[15:09] those tools for free. Um there are a<br>[15:12] myriad trade-offs with this like it's<br>[15:14] it's great for lots of reasons. It's<br>[15:17] terrible for some others like you have.<br>[15:20] It's very partisan. Um, but we'll talk<br>[15:22] about some of that hopefully soon.<br>[15:25] >> Yeah. I guess for people that maybe are<br>[15:27] on like the observability side less so<br>[15:30] than AI side, you can kind of think<br>[15:31] about it in a way of like how open<br>[15:33] telemetry is where instead of having to<br>[15:34] figure out something for like every<br>[15:36] single uh backend that you have, whether<br>[15:38] it's different whether it's for like<br>[15:39] logging or metrics or even if it's<br>[15:42] different um types of like logging<br>[15:44] systems. So whether you're just<br>[15:47] different ones that you might be using,<br>[15:48] if you're using tracing, if you're like,<br>[15:49] hey, I have Jรคger or I have Tempo and<br>[15:51] trying to figure all of that out instead<br>[15:53] of having to set up everything<br>[15:54] separately for every single one of<br>[15:55] those. It's kind of similar, different<br>[15:57] but similar.<br>[15:59] >> Right.<br>[16:02] >> Okay. So it's kind of like a MCP is kind<br>[16:05] of like an API schema of sorts. It just<br>[16:08] kind of defines a standard format for<br>[16:11] what how to how to define these tools.<br>[16:15] >> Yeah. Yeah. And and that's that in<br>[16:17] itself is really powerful. Like even if<br>[16:18] you just had that plus the like<br>[16:21] authentication side. So for now at last<br>[16:25] we finally have a way of saying this is<br>[16:27] how a client should authenticate with a<br>[16:30] server and how what these are the RPCs<br>[16:33] or the functions of the tools that you<br>[16:35] can call and they have standardized<br>[16:36] descriptions like that alone is really<br>[16:38] valuable. I think that's not really been<br>[16:40] something that the industry has had uh<br>[16:42] for a long time. like there's been<br>[16:44] various different proposed things on top<br>[16:46] of JSON APIs like rest and those sort of<br>[16:50] things but this is yeah it's it's quite<br>[16:53] good for that from that point of view<br>[16:56] >> okay so what is the CLI then well as the<br>[17:00] CLI is not actually an an AI thing it's<br>[17:02] a command line interface right but uh to<br>[17:05] anyone who wants to answer what is the<br>[17:07] CLI in an AI context<br>[17:10] >> right right so the CLI by indeed<br>[17:14] everybody that is kind of familiar with<br>[17:15] the command line on Unix, Linux etc. But<br>[17:19] it's one of the oldest concepts in<br>[17:21] computing in that sense. Um like people<br>[17:25] are very uh well aware of that. But uh<br>[17:28] the thing in the AI age is that it's<br>[17:31] actually optimized not so much for human<br>[17:33] knowledge even though like in the case<br>[17:35] of GCX which which is the graphana cloud<br>[17:37] CLI uh like it's fine if humans use it<br>[17:40] but it's actually optimized actually for<br>[17:42] agentic usage. So we're assuming that<br>[17:46] you're not calling the CLI directly but<br>[17:48] you're actually calling it through cloud<br>[17:50] code cursor Gemini uh codeex all those<br>[17:53] types of agentic uh frameworks and um<br>[17:57] that u we need to make sure that like<br>[18:01] the the the agent<br>[18:05] like cursor cloud code can actually<br>[18:07] figure out uh based on the flags and the<br>[18:11] commands that are within in uh GCX or<br>[18:14] within the CLI uh they're able to figure<br>[18:16] out which ones to call and uh then the<br>[18:19] CLI will do actually do the heavy<br>[18:21] lifting and uh and the idea is uh<br>[18:24] because it's agent optimized that we u<br>[18:26] need to make sure that it's doing that<br>[18:28] very efficient and when you're talking<br>[18:30] about efficiency you're talking about<br>[18:32] low token usage because context and the<br>[18:35] context window uh we need to make sure<br>[18:38] that there's only relevant data in the<br>[18:40] context window and that we're not<br>[18:41] filling that up with like a big dump. Uh<br>[18:44] let's say you're going to go to Grafana<br>[18:46] Cloud and you're use GCX, you're going<br>[18:48] to ask it, hey, give me all the<br>[18:49] dashboards. That can be maybe thousands<br>[18:51] of dashboards. You don't want to put<br>[18:53] that in the context. So, it's really<br>[18:54] important that the CLI is indeed giving<br>[18:58] a small result back. And then um one of<br>[19:01] the things that we are doing is that uh<br>[19:03] GCX this CLI can actually also call the<br>[19:05] assistant. So it has uh even access to<br>[19:09] that um the specialized agents that we<br>[19:12] have on Carfana cloud for observability.<br>[19:16] [snorts]<br>[19:17] And then like when I hear people talking<br>[19:18] about these things like with MCP, you<br>[19:20] just hear people talking about MCP when<br>[19:22] people are talking about CLIs and the AI<br>[19:25] sense. I hear people talking about<br>[19:27] skills. Could someone kind of explain<br>[19:29] what that is?<br>[19:32] Well, I guess you know if you consider<br>[19:34] the kind of commands that the CLI<br>[19:36] provide as the kind of building blocks<br>[19:38] of functionality, right? You can decide<br>[19:40] to manually call a command to do a<br>[19:42] particular action. So, you know, get get<br>[19:44] a dashboard or list your dashboards or<br>[19:47] push an alert rule or something. The<br>[19:49] skills uh kind of are a way of defining<br>[19:52] uh a workflow to maybe weave a couple of<br>[19:55] those skills together uh those command<br>[19:57] uh calls together to perform a<br>[19:59] particular action. Right? So it's kind<br>[20:02] of like bridging bridging a gap to from<br>[20:04] from like a set of kind of unopinionated<br>[20:07] command line uh calls uh towards<br>[20:10] something more like what MCP tool to<br>[20:12] tools do which is to provide like an<br>[20:14] opinionated action for a given use case.<br>[20:17] Um so they're really they're really<br>[20:20] flexible things that they're essentially<br>[20:21] just a set of markdown markdown files<br>[20:23] with some references to maybe some other<br>[20:25] markdown files or bash bash scripts or<br>[20:27] something like that. Uh but for our use<br>[20:28] case, we're trying to use them to kind<br>[20:30] of build build CLI commands, build GCX<br>[20:33] commands into into actionable workflows.<br>[20:37] >> Yeah. And you can you can maybe also see<br>[20:38] that in the case of GCX that skills are<br>[20:41] a little bit also training wheels<br>[20:43] because our bet is or our hypothesis is<br>[20:47] that the more information there is<br>[20:50] around GCX the usage use cases that<br>[20:53] actually LLM will be trained on GCX. So<br>[20:57] if you ask an LLM to use the GitHub CLI<br>[21:00] or the AWS CLI, it knows exactly what to<br>[21:03] do because there's so much information,<br>[21:04] so much blog post around it. So<br>[21:07] hopefully and of course we need to prove<br>[21:09] that hopefully at some point in time<br>[21:11] there will be so much information around<br>[21:13] GCX that we don't use skills that we we<br>[21:16] don't need skills that much because it's<br>[21:17] able it's basically part of the training<br>[21:19] set of the LLMs. But uh that will<br>[21:22] probably take a little bit of time uh<br>[21:24] because like the there's always kind of<br>[21:26] a lag between the information that LLMs<br>[21:30] are trained on and the information<br>[21:31] that's out there on the interwebs<br>[21:34] >> and [clears throat] is the way that uh<br>[21:37] skills are described with like GCX is<br>[21:39] that the same way that like because I'm<br>[21:41] just like looking at an article about<br>[21:43] like cloud skills like is is skills used<br>[21:45] in the same way or is it different<br>[21:46] because like say if someone talks about<br>[21:48] like services whether you're talking<br>[21:49] about like Docker or Kubernetes or a<br>[21:51] bunch of other stuff. Services doesn't<br>[21:52] all mean the same thing.<br>[21:55] >> Yeah, in our use case, uh skills means<br>[21:58] the same for as if you were kind of<br>[22:00] installing one of the kind of claw code<br>[22:02] skills or something like this, uh the<br>[22:04] method of delivery is slightly<br>[22:05] different. Um but the result is that you<br>[22:07] get the same files in the same place. So<br>[22:10] what it you know if you're downloading<br>[22:12] some skills from what say one of the<br>[22:14] claude code skills or some skills from<br>[22:15] skills.sh SH or some other kind of<br>[22:17] registry or you know place where skills<br>[22:19] are published. Um you are essentially<br>[22:22] you're downloading a set of markdown<br>[22:24] files to a specific directory in your on<br>[22:26] your computer that uh the kind of the<br>[22:28] agents know to look in and I think each<br>[22:30] vendor has a has a different one. So<br>[22:32] there's like you know Claude looks at a<br>[22:33] predefined path and maybe Codex looks at<br>[22:36] a different one. Um but normally these<br>[22:38] are like sim linked from some kind of<br>[22:41] standard place or something. So there<br>[22:44] are some skills in bundled within GCX<br>[22:46] and there's a specific command that you<br>[22:47] can run that essentially writes those<br>[22:50] like uh skills files in in the standard<br>[22:52] kind of format to the expected place on<br>[22:56] your on your computer so that they are<br>[22:58] available for for ages to use. Yeah.<br>[23:01] >> Yeah. Maybe good to mention is that<br>[23:04] we're talking about CLI MCP and maybe<br>[23:07] you never know right in a few weeks<br>[23:09] times there there is something that is<br>[23:11] even more hip in the AI world you know<br>[23:13] how it goes right it's kind of like<br>[23:15] fashion nowadays<br>[23:17] um and from our perspective from Grafana<br>[23:21] cloud's perspective from Cfana Lab's<br>[23:23] perspective like the interface is kind<br>[23:25] of the fashion even though we try to<br>[23:27] make it very high quality very useful uh<br>[23:31] very valuable for our customers. But I<br>[23:33] think the real value is the insight that<br>[23:35] it provides the observability insights.<br>[23:37] So one of the things that we're focusing<br>[23:39] on when we're building graphana cloud is<br>[23:41] not only like u providing just raw data<br>[23:46] like results of promql queries to their<br>[23:48] customers but actually giving high<br>[23:50] quality observability insights. So the<br>[23:52] these are like fetted insights. They're<br>[23:54] prioritized. They're actionable and we<br>[23:57] try to deliver them in a fast and cheap<br>[23:59] way. So how can we give an answer with<br>[24:01] the least amount of tokens in a way that<br>[24:04] is really valuable for the agent or the<br>[24:06] human that is uh accessing those<br>[24:09] insights. So that's really where we put<br>[24:12] a lot of time and effort in that we<br>[24:14] design products like the assistant and<br>[24:16] our APIs around that so that um<br>[24:20] basically the doors if you will the the<br>[24:23] CLI MCP API doors are able to leverage<br>[24:26] that and then yeah if there is something<br>[24:28] next if there's a new fashion in town<br>[24:31] then we can adopt that and we can make<br>[24:33] our insights accessible through that<br>[24:35] interface.<br>[24:37] We do have a question here actually from<br>[24:40] one of our graphana champions.<br>[24:42] He he says, "Hi all. Can we use a custom<br>[24:45] MCP server from Graphana AI assistant?<br>[24:48] Do we have any sample configs or docs or<br>[24:51] blog post?" So I'm posting a link to<br>[24:55] docs here for that. Um but maybe maybe<br>[24:58] Ben would you like to take this?<br>[25:01] >> Yeah. Yeah, sure. Uh yes is answer uh<br>[25:04] with a couple of caveats. I think the<br>[25:05] main caveat being it has to be a hosted<br>[25:08] custom MCP server. So it has to have a<br>[25:12] use the streamable HTTP MCP transport.<br>[25:15] Um Oh, nice. We've got a demo.<br>[25:17] >> Yeah, I had it up so I figured Yeah,<br>[25:19] here's one that I [laughter] added and<br>[25:21] then you can go and click add here and<br>[25:23] >> Yeah. Yeah, exactly. So as long as you<br>[25:25] support uh as long as it supports remote<br>[25:27] MCP which means like the streamable HTTP<br>[25:31] uh transport has to be hosted somewhere<br>[25:33] it can be hosted uh ideally publicly is<br>[25:36] the easiest way but there are ways that<br>[25:38] you can make it work with the private um<br>[25:41] private network connection um and you<br>[25:44] can it supports authentication via<br>[25:46] headers or oorthth. So as long as you<br>[25:49] you kind of use pretty standard or<br>[25:52] mechanisms that should work fine.<br>[25:55] So, Ben, while you're at it, maybe maybe<br>[25:57] you could explain to us why you're on<br>[25:59] team MCP. [laughter]<br>[26:02] >> Um, okay. Yeah. Well,<br>[26:06] I I so the re the reason I'm into the<br>[26:08] MCP side is because, um, I initially<br>[26:11] wrote the MCP server, the Grafana MCP<br>[26:14] server, uh, in December 2024.<br>[26:18] Yeah. So, a little while ago now. And um<br>[26:21] that was kind of just as MCP was<br>[26:23] becoming a thing and [clears throat]<br>[26:25] people weren't really as aware of tools<br>[26:28] and how tools could work with agents and<br>[26:30] MCP was like a nice way of getting that.<br>[26:33] Um and you get a lot you used to get a<br>[26:35] lot for free back then because you<br>[26:37] didn't really have as many frameworks as<br>[26:38] you do now. Um, so yeah, wrote the wrote<br>[26:41] the initial MTP server as a hackathon<br>[26:43] project and um, it did quite well and<br>[26:46] then we decided to open source it and<br>[26:48] since then it's it's kind of taken off<br>[26:49] quite nicely. We have I think more than<br>[26:52] 3,000 GitHub stars now which is really<br>[26:55] exciting and and we we recently released<br>[26:58] a cloud version of the MTP server which<br>[27:02] um, allows you to connect seamlessly to<br>[27:05] like a Grafana cloud instance. Um, and<br>[27:09] things I really like about MCP,<br>[27:12] um, despite despite all the hate is is<br>[27:14] kind of the, um,<br>[27:17] uh, is the explicitness, I guess, like<br>[27:20] you, you you do have to define a lot of<br>[27:22] things like tools up front and you you<br>[27:24] you<br>[27:26] have to be a little bit more explicit<br>[27:28] there, but you get what you get in<br>[27:29] exchange for that is self-describing<br>[27:32] like tools and parameters. You get<br>[27:35] authentication built into the protocol<br>[27:37] which is really nice. Um you can use it<br>[27:40] across lots of different transports. So<br>[27:42] you use it either locally using the<br>[27:44] standard IO1 or remotely with streamable<br>[27:48] HTTP. And that means that it kind of<br>[27:50] works<br>[27:52] everywhere roughly as long as you have<br>[27:54] the right MTP servers. Um you can use it<br>[27:58] whether you're in for example the<br>[27:59] Grafana assistant that can connect to<br>[28:01] any remote MCP server. Um, it doesn't<br>[28:04] matter what language it was developed in<br>[28:06] or where it's hosted. As long as it has<br>[28:09] like a publicly accessible URL, you can<br>[28:11] connect to it and use it.<br>[28:14] Um, not that I don't like CLIs at all.<br>[28:17] I'm a big fan of [laughter]<br>[28:19] >> That's what I heard.<br>[28:21] Yeah, I did see like like uh like what<br>[28:24] people had against MCP uh in the past<br>[28:28] was that MCPS define the tools and the<br>[28:31] tool definition gets loaded in the<br>[28:33] context window and when you only have<br>[28:35] like 200k uh context window that fills<br>[28:38] up pretty quickly and so uh because I<br>[28:41] think like I did some calculations<br>[28:43] around 76 tools that's probably like 20k<br>[28:45] token uh tokens uh that will cost you.<br>[28:49] So that's about like 10% of your token<br>[28:51] window um is already being used before<br>[28:54] you even start the conversation.<br>[28:55] However, what you see nowadays that a<br>[28:57] lot of platforms they're implementing<br>[28:59] tool search. So that means that they're<br>[29:01] not loading it. They're only loading<br>[29:02] those tools on demand. So that um you're<br>[29:05] not filling up the token window or the<br>[29:08] context window that much. So that's one<br>[29:10] of the the main pet peeves of a lot of<br>[29:12] folks that were using MCP in the past<br>[29:14] and that's getting less and less true<br>[29:16] depending on like the agent that you're<br>[29:19] using to access the MCP.<br>[29:21] >> Yeah, exactly. I think I think the<br>[29:23] downside there<br>[29:25] that that is that is the main great<br>[29:27] mitigation that's appeared in the last<br>[29:29] year is the deferred tool search kind of<br>[29:31] side of things. Um the the main<br>[29:33] limitation is that the MCP host uh<br>[29:37] called code cursor has to implement<br>[29:38] deferred tool search itself but that is<br>[29:40] increasingly common. So yeah uh agree<br>[29:43] what like that was that was my main uh<br>[29:46] complaint until quite recently as well.<br>[29:49] Yeah, a lot of people could be like,<br>[29:50] "Oh, I'm already use I'm using cursor<br>[29:52] cloud or like other insert other um tool<br>[29:56] and then or not I guess not tool but<br>[29:58] like insert another um I guess what's<br>[30:01] even the correct word that describes all<br>[30:03] of those things. My brain is not working<br>[30:05] at the moment but um<br>[30:07] >> harnesses or Yeah.<br>[30:09] >> Yeah. But yeah, basically people are<br>[30:12] already using those for like their own<br>[30:14] uh stuff that they're doing. They're<br>[30:16] like, "Oh, I know how to use this thing.<br>[30:17] um let me just add the MCP server that I<br>[30:20] need for whether it's Graphana or GitHub<br>[30:22] or something else and they didn't have<br>[30:24] to like really in start with some other<br>[30:28] entirely different thing.<br>[30:29] >> Yeah. Yeah. Well, some some a lot of<br>[30:32] times especially in technology like good<br>[30:34] enough is sometimes just fine, right?<br>[30:36] Like it doesn't need to be perfect.<br>[30:37] There might be some downsides but for a<br>[30:40] lot of folks that's perfectly<br>[30:41] acceptable. Maybe from kind of a pure<br>[30:43] purist point of view, right? people are<br>[30:45] like me like it uses a lot of tokens. uh<br>[30:48] but yeah nowadays maybe depending on the<br>[30:51] way that you're interacting with the<br>[30:52] agent that doesn't really matter and and<br>[30:55] also the agents for example I use cloud<br>[30:57] code we now have 1 million token windows<br>[31:00] uh context windows and uh so yeah it's<br>[31:04] it's less of a yeah a big problem I<br>[31:06] think but uh yeah like if you look at<br>[31:10] CLI CLI was the like one of the reasons<br>[31:12] why a lot of folks like CLI is that uh<br>[31:15] it with a CLI you're aiming for kind of<br>[31:18] a near zero baseline where you have like<br>[31:20] progressive disclosure.<br>[31:22] it has some commands where you can then<br>[31:24] find indeed okay what are the commands<br>[31:26] that I need and that is basically<br>[31:29] discovered by the agent and so you could<br>[31:33] say that a CLI has way less token usage<br>[31:37] but again that like those those<br>[31:39] differences become less and less uh<br>[31:41] relevant I think um or well not relevant<br>[31:46] but they're they're like closing in on<br>[31:48] each other<br>[31:50] >> I think one area Where I I like MCP<br>[31:54] better is that um I feel like the tool<br>[31:56] discoverability is better on MCP. Um on<br>[32:00] CLI, you know, you kind of have to know<br>[32:03] those commands and yeah, you can go<br>[32:05] through like d-help or whatever. Uh but<br>[32:08] you still have to go through each one<br>[32:10] and then each command has different um<br>[32:13] parameters and stuff. Um sometimes you<br>[32:15] just want to know what's possible before<br>[32:18] you can figure out what you want to do<br>[32:20] next.<br>[32:22] Yeah. And each one of those like cycles<br>[32:23] to discover<br>[32:25] uh the arguments and the subcomands and<br>[32:27] everything takes latency and tokens and<br>[32:30] you know that's going to be done again<br>[32:32] every conversation that you have. It's<br>[32:33] not something that's up front. So that<br>[32:35] that can that can be slightly that can<br>[32:38] wear in after a while. I think it's<br>[32:40] quite I do wonder if it's quite fun to<br>[32:41] see it the first time you use a new CLI.<br>[32:44] You're like oh my god it's discovering<br>[32:45] everything so good. How impressive. So,<br>[32:49] and that gives you that feeling of like<br>[32:50] things happening and you know it's<br>[32:52] making progress. Um, which is nice, I<br>[32:55] have to admit.<br>[32:57] >> I think it really<br>[32:58] >> What do you think, Dave?<br>[32:59] >> Yeah, I think you see a lot of<br>[33:00] variability as well with um with the<br>[33:03] models and things like this. So for<br>[33:05] example, you know, very anecdotally, but<br>[33:07] we've we've run kind of uh agents trying<br>[33:10] to use GCX to interact with with Grafana<br>[33:12] for various uh kind of use cases and uh<br>[33:15] you know, with them with and without the<br>[33:17] GCX skills installed to kind of give it<br>[33:19] any hints or not, right? And um you we<br>[33:22] can see a lot of variability in whether<br>[33:24] the models know whether to whe that GCX<br>[33:28] exists or whether to bother trying to<br>[33:30] look for um the command structure before<br>[33:33] calling anything or just to kind of give<br>[33:34] it a crack and see see if it works. Um<br>[33:37] but you'll see it quite often kind of do<br>[33:39] this kind of stuttering thing where it<br>[33:41] gives something a go, fails, uh then<br>[33:43] decides to read the help docs for the<br>[33:45] given command uh to try and look for the<br>[33:48] guidance on how to do it. It's not so<br>[33:50] well some of the models aren't so great<br>[33:51] at like trying to discover exactly what<br>[33:53] to do before they try. They just try<br>[33:56] first and then fail and then discover.<br>[33:58] So you know um media skills are trying<br>[34:00] to bridge that gap but you can see MCP<br>[34:03] provides a lot more kind of guidance<br>[34:04] from the start for these for these<br>[34:06] models maybe especially the kind of the<br>[34:08] cheaper smaller ones.<br>[34:10] Yeah, I actually had something similar,<br>[34:11] not with the CLI, but like the other day<br>[34:13] I was I gave um Claude a blog and was<br>[34:16] asking questions and then after and I<br>[34:17] was reading I was like this is weird.<br>[34:18] I'm like did you actually read the blog?<br>[34:20] They're like no let me go pull that now.<br>[34:22] And I'm like oh [laughter]<br>[34:26] >> yeah, exactly. Yeah.<br>[34:28] >> Yeah. And um what I think is also<br>[34:30] important for us as like creators of<br>[34:33] MCPS and CLI is that we want to make<br>[34:36] sure that we're knowing when a change is<br>[34:39] being made that there's no regressions.<br>[34:41] It's actually an improvement and like<br>[34:44] Dev was already talking about a lot of<br>[34:46] the complexities because like it's a<br>[34:47] very diverse landscape. Uh there's like<br>[34:50] new versions of LLMs every day. There's<br>[34:53] like different coding tools that people<br>[34:55] use. A coding tool that's popular today<br>[34:57] might not be popular tomorrow. It can<br>[35:00] change overnight. So yeah, we do need to<br>[35:02] have a way to figure out okay, how<br>[35:05] effective are our tools for our users<br>[35:07] and that's I think uh something that uh<br>[35:10] dev has been working on on as well.<br>[35:13] >> Yeah. So well we can go into evaluations<br>[35:16] and benchmarks if we want to but just<br>[35:19] initially and Ben I think alluded to<br>[35:20] this previously around where you know<br>[35:22] models models have training data, right?<br>[35:25] So without without any external data or<br>[35:27] tools they they have a certain amount of<br>[35:29] knowledge baked into them and if they've<br>[35:31] been trained on things if they've been<br>[35:32] trained on CLI before they'll have<br>[35:33] they'll have more information about or<br>[35:35] knowledge about how they um how they<br>[35:36] work and stuff. So you'll you'll see um<br>[35:39] agents use like the GitHub CLI very<br>[35:42] effectively today because it's been<br>[35:43] around for a long time. It's very stable<br>[35:44] and and things like that. But um what<br>[35:47] we're seeing especially when GCX as GCX<br>[35:50] is so new it's um sometimes the training<br>[35:52] data is kind of fighting the way that we<br>[35:54] want to to present the commands and<br>[35:56] stuff. Um a specific example of this is<br>[35:59] um it loves well cloud code loves to um<br>[36:03] or Sonnet and Opus love to kind of<br>[36:05] redirect stud error to to stud out and<br>[36:08] kind of slurp all of that up into it<br>[36:10] into its input and do things like with<br>[36:13] that. But um it tries to do that and<br>[36:16] then it tries to you know compose the<br>[36:18] output of that command command line tool<br>[36:20] call into a Python script or into jq or<br>[36:24] something like this. Right? So what we<br>[36:26] were doing is kind of adding hints and<br>[36:28] other kind of usage kind of ideas to the<br>[36:32] stud error output, right? But when it<br>[36:34] kind of redirects that out to stud out<br>[36:36] as well and then tries to pipe that into<br>[36:38] some some other thing that assumes, you<br>[36:40] know, pure JSON output or something like<br>[36:42] this, it was falling over getting an<br>[36:43] error. So there's a few little quirks<br>[36:45] like that that we're learning about<br>[36:46] along the way. Um, and all of those<br>[36:48] kinds of things uh change constantly<br>[36:50] over time as these models are trained on<br>[36:52] new data and things like that. So<br>[36:54] regardless of what we try and pin down<br>[36:57] to kind of you know learn about what we<br>[36:59] need to change to make our kind of<br>[37:01] command line interface and skills better<br>[37:04] the the landscape around those things is<br>[37:05] changing too<br>[37:09] >> better. Are there any other ways that<br>[37:12] you think uh any other use cases or<br>[37:15] things that MCP servers are are better<br>[37:18] at than CLI?<br>[37:20] Um, so my I guess is an extension of the<br>[37:25] previous thing like I think that if an<br>[37:27] MCP server is designed correctly then it<br>[37:31] it should kind of serve the needs of<br>[37:34] like 80% of the use cases that people<br>[37:36] have really well and that means that<br>[37:39] like there will be some slightly higher<br>[37:42] level tools rather than just raw API<br>[37:45] call rappers to do the most common tasks<br>[37:47] that users ask for. um to kind of allow<br>[37:52] users to do most of the things they need<br>[37:54] to do maybe with an escape hatch to do<br>[37:57] things that you know we don't want a<br>[37:58] direct tool call tool call for to avoid<br>[38:01] having to define hundreds of tools for<br>[38:04] every like esoteric use case that you<br>[38:06] might have. So one example of this in<br>[38:08] the graphana world would be to like<br>[38:11] query uh your data sources query<br>[38:14] Prometheus or to create a dashboard.<br>[38:16] Those are some really common use cases<br>[38:18] that we can provide really decent tools<br>[38:21] for with good descriptions like decent<br>[38:23] test parameters and and that allows us<br>[38:25] to serve those common use cases really<br>[38:27] well. Um less so the case for things<br>[38:31] like I don't know interacting with some<br>[38:34] of the less commonly used cloud APIs<br>[38:36] that we may have uh things that you set<br>[38:38] up once or twice and then never really<br>[38:41] touch again. Is it worth defining a tool<br>[38:44] and eating up the context window of then<br>[38:46] every single user who uses that tool?<br>[38:49] That's like some that's dollars on my<br>[38:51] conscience that I have to justify every<br>[38:54] single time someone uses it just just to<br>[38:56] kind of occasionally serve those those<br>[38:59] uses which and often that is not the<br>[39:01] case. Um, and I think like that is one<br>[39:04] of the things that I would recommend GCX<br>[39:06] for without a shadow of a doubt is like<br>[39:09] if you need to do everything like you<br>[39:12] need to be able to do all of these<br>[39:13] different things that for example<br>[39:14] Graphana allows you to do or Grafana<br>[39:16] cloud allows you to do GGX is is a<br>[39:19] really really good uh avenue for that.<br>[39:25] Okay, maybe let's um go to the CLI side<br>[39:29] of things and uh Ward, do you want to<br>[39:32] talk about GCX and what it is and why<br>[39:35] why you thought that MCP was not enough?<br>[39:40] [snorts]<br>[39:40] >> Yeah, exactly. Um [laughter]<br>[39:43] um I I think MCP was enough like again<br>[39:46] right [laughter]<br>[39:47] like I'm not um I'm not changing minds.<br>[39:50] I think it's and and and not or or or<br>[39:52] definitely. [laughter]<br>[39:54] Um<br>[39:54] >> well, if he's team MCP, then you must be<br>[39:58] team CLI. I don't know what that<br>[39:59] >> I don't like that framing. I I reject<br>[40:01] the framing [laughter] at all. But like<br>[40:02] you can try, but I I reject it. No. Uh<br>[40:06] so let let me just talk like what what<br>[40:08] we try to do because like CLIs are very<br>[40:11] effective like that that is uh<br>[40:13] definitely something that you see when<br>[40:14] you use cloud code and use CLI. So for<br>[40:16] example, I use the GitHub CLI a lot and<br>[40:18] I love it. It's great. it works very<br>[40:20] well. Um could be that there's like a<br>[40:22] GitHub MCP server that also worked<br>[40:24] great. Haven't used this but um uh what<br>[40:27] what we noticed is that um like<br>[40:30] designing well let's first start with<br>[40:32] what GCX is because we named uh we<br>[40:34] referred to it uh quite a few times<br>[40:36] already. So GCX is the new Graphana<br>[40:39] cloud CLI. So there have been uh maybe<br>[40:43] quite a few already kind of CLI attempts<br>[40:45] for Cfana in the past and these are<br>[40:48] still great but we never had a CLI that<br>[40:51] was focused on all the endpoints all the<br>[40:53] solutions all the products that we have<br>[40:54] in Kfana cloud. So this is our well I<br>[40:58] don't want to say attempt because it's<br>[41:00] actually already in public preview. It's<br>[41:01] going to go G. It's actually uh already<br>[41:04] quite successful but this is our<br>[41:06] approach uh to a CLI optimized for<br>[41:09] aentic usage for Grafana cloud and uh<br>[41:12] yeah we're like I said we're now on the<br>[41:14] road to GA. Uh there's uh quite a few uh<br>[41:18] Grafana users uh Grafana cloud users<br>[41:21] that are adopting GCX. So we now seeing<br>[41:24] like hundreds of organizations are<br>[41:26] actually using it. We don't have the<br>[41:28] amount of GitHub stars yet as uh the MCP<br>[41:31] server has. So we're uh we're slightly<br>[41:34] behind. We need to do better. So if<br>[41:36] people are listening, go to GCX on<br>[41:38] GitHub and give it a star. Just see if<br>[41:40] we can maybe maybe if there is a battle<br>[41:43] MCP versus GCX, let's see it in the<br>[41:45] GitHub stars. Maybe that's the nice way<br>[41:47] to go about it. Yeah, that is<br>[41:50] I see Ben sweating there. Let's see.<br>[41:52] Let's see. [laughter]<br>[41:53] >> I'm sweating. Yeah, I've got a year<br>[41:55] advantage, but I don't know if I can<br>[41:56] maintain that [clears throat]<br>[41:58] [laughter]<br>[41:59] >> and uh yeah, we see also like uh like in<br>[42:01] our API usage like people are heavily<br>[42:04] using uh GCX already. We see like<br>[42:06] millions of API calls. Uh so that's<br>[42:08] really exciting and we're going to go um<br>[42:10] yeah, we want to go GA as fast as<br>[42:12] possible, but there's just some a few<br>[42:14] things that we want to get in order<br>[42:16] before we we officially stamp at G. So<br>[42:20] uh there's a few things that we focused<br>[42:21] on when we were building uh GCX. So of<br>[42:24] course it needed to support the entire<br>[42:26] Grafana cloud API. Uh but we also wanted<br>[42:29] to make it agent native and I already<br>[42:32] spoke a little bit about that. But what<br>[42:33] it uh concretely means is that we're<br>[42:36] detecting whether uh like you're running<br>[42:39] in agent mode. So cloud code cursor<br>[42:42] co-pilot whatever and then it flips the<br>[42:44] output. But we always make sure that uh<br>[42:46] when an agent is asking for stuff uh we<br>[42:50] give an agent friendly output typically<br>[42:52] JSON. Uh if you for example as a user<br>[42:55] call that API without any specific flags<br>[42:58] we typically give you uh CLI text that<br>[43:01] renders nicely like tabular information<br>[43:04] uh renders very nicely. So uh we also<br>[43:07] make sure that we add hints to all the<br>[43:09] commands. So there's like an entire<br>[43:11] command tree. There's for every piece of<br>[43:14] graphana there's basically a command and<br>[43:16] subcomands. And we also make sure that<br>[43:18] we add hints. So the hints about hey if<br>[43:21] you call this command as an agent you<br>[43:24] get um probably um medium sized output<br>[43:28] or large output. So uh so that maybe the<br>[43:31] agent can look at okay this is maybe a<br>[43:34] command that I should not directly<br>[43:36] trigger because I can maybe get a huge<br>[43:38] result back. Um, so the agent uh is<br>[43:42] hopefully based on that information know<br>[43:45] what the costs are of calling those APIs<br>[43:47] and maybe to narrow down the API or the<br>[43:50] commands that it needs to run before<br>[43:52] running or uh like the plan to make the<br>[43:56] like the plan to interact with uh GCX in<br>[43:59] that sense. Another thing that we did is<br>[44:01] also uh we spilled a file. So let's say<br>[44:04] you have a big payload, maybe a very big<br>[44:06] dashboard or like a long list of alerts.<br>[44:09] You don't want to put that in the<br>[44:12] context window like hey agent here you<br>[44:14] have like one megabyte of JSON that's<br>[44:17] not very that makes the agent not very<br>[44:19] happy. So we spill to disk in a JSON<br>[44:21] format and then we tell it what the<br>[44:23] structure is so that the agent can then<br>[44:26] decide how to read that data in<br>[44:28] effective way so the context stays clean<br>[44:30] there. Uh two other things that we did.<br>[44:34] Um so uh we with the hints we tell it<br>[44:38] how it can select some fields. So if you<br>[44:41] are for example returning alerts what<br>[44:43] what is important for alerts it's maybe<br>[44:45] like the uh the name uh maybe some<br>[44:48] labels maybe like the query that's being<br>[44:50] executed maybe the thresholds. So uh<br>[44:53] these are all fields within JSON and we<br>[44:56] uh allow the agent to specify which<br>[44:59] fields it wants to get back and that's<br>[45:01] all again again to make sure that it's<br>[45:04] as efficient as possible and then the<br>[45:06] last thing that we do is we have<br>[45:08] semantic exit codes and JSON errors. So<br>[45:11] in place in in place of retry and abort<br>[45:15] um we we can actually u make sure that<br>[45:18] the agent understand what goes wrong and<br>[45:21] based on that take the next action uh<br>[45:24] plan the next action and make that a<br>[45:26] little bit better and yeah one of the<br>[45:28] things that we're I'm focusing on right<br>[45:30] now and thinking a lot about is that uh<br>[45:32] yeah we want the feedback loop so we<br>[45:34] want to understand how people are using<br>[45:35] it and where agents that people are<br>[45:38] using are using GCX wrong or that GCX is<br>[45:42] wrong and uh basically use that as kind<br>[45:45] of a feedback loop to learn how we can<br>[45:47] improve GCX and make it more effective.<br>[45:50] So that could be like maybe anonymized<br>[45:53] usage uh reports or something like that<br>[45:55] or maybe that people can ship uh like um<br>[45:59] debugging or troubleshooting payload to<br>[46:01] us. But we we want to get that feedback<br>[46:03] loop running to make sure that GCX is as<br>[46:06] efficient as possible.<br>[46:08] Anyway, so that's a little bit about<br>[46:10] GCX.<br>[46:13] >> Great. I I kind of feel like I want I<br>[46:15] want to see the it what it looks like in<br>[46:17] practice, like to to really see how you<br>[46:20] do something in GCX or Yeah. And then<br>[46:23] how you do something with Graphana MCP.<br>[46:26] Uh Ben, do you want to go through the<br>[46:28] demo?<br>[46:30] >> Yeah. Yeah, sure. Um okay, let's try it.<br>[46:34] I'll I'll explain what's going on once<br>[46:36] uh you see Oh, we got it up. Amazing.<br>[46:38] Okay. So, um this quick demo is just uh<br>[46:41] two side by side clawed codes and it's<br>[46:46] intentional that they look very similar<br>[46:47] right now. Uh the one on the left has an<br>[46:49] MCP server configured for this specific<br>[46:52] clawed code instance and the one on the<br>[46:54] right does not but it has some skills<br>[46:56] explaining how to use GCX in the like<br>[46:59] local directory. Um so [clears throat]<br>[47:01] what I plan on doing is basically asking<br>[47:03] it to do the same thing. Um, and the sec<br>[47:07] in the second one I'm going to say use<br>[47:08] GCX because I haven't told it more about<br>[47:11] GCX yet. Um, and this task is actually<br>[47:16] one that the MCP server doesn't have a<br>[47:18] direct tool for. So, it's a little bit<br>[47:20] disadvantaged, I suppose. Um, we'll see<br>[47:22] how it goes and we'll see what it gets<br>[47:23] up to because we have plenty of other<br>[47:26] examples of things that the MCP server<br>[47:28] does have a tool for. So, let's go. So,<br>[47:32] all I'm going to do is send these and we<br>[47:34] can I mean it's going to be impossible<br>[47:36] to keep track of all of the things it's<br>[47:37] doing. Um, but what this should do is is<br>[47:42] sort of this one is now calling MCP<br>[47:44] Graphana, which is the MCP server that<br>[47:46] we have uh on the left. And um the one<br>[47:52] on the right is using GCX here. Um, it's<br>[47:56] discovered that GCX is a CLI and now<br>[47:58] it's going through all of the different<br>[48:00] help that it can find to find how to<br>[48:03] create an SLO. Um, I don't know if I<br>[48:06] even talked about the question here.<br>[48:07] It's actually create a graphana SLO for<br>[48:09] my assistant metrics group by cluster.<br>[48:12] Um, so what this should do is use<br>[48:14] they're both talking to the exact same<br>[48:15] graphana instance and we're going to<br>[48:17] look to see like which one how each one<br>[48:21] achieves the goal. Uh<br>[48:24] so actually this is very quick. Uh the<br>[48:26] one on the right here, the GCX one, uh<br>[48:29] almost immediately it has uh looked<br>[48:32] through all of the different GCX<br>[48:33] commands. Uh it's written out uh what it<br>[48:36] knows a G an SLO should look like to a<br>[48:39] YAML file that we can then check and do.<br>[48:41] And then it's done a dry run using some<br>[48:43] GCX commands here. Um and then it's gone<br>[48:47] gone ahead and uh actually created it<br>[48:50] using the SLA command there. does very<br>[48:52] quick. So, this one cost um I'm just<br>[48:56] going to zoom in slightly. This one<br>[48:57] cost4<br>[49:00] uh to do this. Uh the one on the left is<br>[49:03] asking me some follow-up questions.<br>[49:05] Let's talk about this one. What what go<br>[49:07] and have a look at what it's done. So,<br>[49:09] it's looked for some data sources using<br>[49:10] some NCP tools. Uh it's searched for<br>[49:13] labels using the MCP tools. It searchs<br>[49:15] for metrics and it's querying to figure<br>[49:19] out how the SLO API should look because<br>[49:22] it doesn't have a tool for that. Um, and<br>[49:25] then it's going to go ahead and it's<br>[49:27] going to ask me a couple of questions<br>[49:28] about how to do this. Um, hopefully it<br>[49:32] will now call the Graphana API to create<br>[49:35] that SLO and we'll see exactly what what<br>[49:39] we wanted. So, both of those have<br>[49:40] achieved this goal. It's managed to<br>[49:42] create the SLO there. um they've just<br>[49:45] done it in very different ways. One of<br>[49:47] them has just hit the API directly<br>[49:48] because it didn't have a tool for it. Um<br>[49:51] so I mean this doesn't necessarily<br>[49:54] answer the question of which one you<br>[49:56] should use. So I'm going to trying to<br>[49:57] find out how much this one has has cost<br>[49:59] on the left. Um but I'm zoomed in really<br>[50:03] far so I can't actually see the the bar<br>[50:05] at the bottom. Uh<br>[50:08] >> Sven, another engineer, Sven Gson,<br>[50:11] another engineer on the AI team says AI<br>[50:14] observability could help keep track of<br>[50:16] what they're doing. [laughter]<br>[50:19] >> Very [snorts] true. Yes. And I need to<br>[50:21] get both of those configured in the<br>[50:22] right way. Um<br>[50:24] >> you're still on Opus 4.6, man. Didn't<br>[50:26] you hear?<br>[50:26] >> Yeah. I didn't like 4.7 and then I was I<br>[50:29] was actually on PTO last week, so I<br>[50:31] haven't got around to switching<br>[50:33] everything to 4.8. [laughter]<br>[50:35] So, this is immediately invalid.<br>[50:37] Everything that I've done here means<br>[50:38] nothing. Um, but this one cost 3 cents<br>[50:41] more. So, I guess it's an obvious win<br>[50:44] for GGX. And I need to just retire<br>[50:48] >> or add a tool. [laughter]<br>[50:49] >> Or add a tool or add a tool. Yeah. Um,<br>[50:52] so so yeah, that's that's kind of a<br>[50:56] little bit of a demo of how they how<br>[50:57] each works. Uh, hopefully that's<br>[51:00] instructive at least in some way.<br>[51:04] Zoom back in a bit now.<br>[51:05] >> Yeah. Okay. Well, they both they both<br>[51:07] got there and the price difference is<br>[51:10] not enough that I would be like, "Yes,<br>[51:12] definitely use this." So, it's still<br>[51:15] kind of like, "Oh, which one do you use<br>[51:17] for which situation?"<br>[51:19] >> Yeah. Um and and one of the ways that we<br>[51:22] can help to figure this out is I like to<br>[51:25] write some kind of decision tree and and<br>[51:28] there's some some<br>[51:30] uh aspects of that decision where it's<br>[51:32] really easy to make the the choice<br>[51:35] because if you are using a remote maybe<br>[51:39] you're using claw.ai AI or chat DBT<br>[51:42] remote and you know that doesn't have uh<br>[51:45] a shell so it can't just use it can't<br>[51:49] just use GCX because it can't run GCX<br>[51:51] commands um in that case you have to use<br>[51:53] a remote MCP server like that is the<br>[51:56] solution um and in others it's less<br>[52:00] obvious like if you're using an IDE<br>[52:01] locally or you're using CL code um it<br>[52:04] could be as much as a personal<br>[52:06] preference it could be uh whether you<br>[52:09] are happy running<br>[52:12] binaries, arbitrary binaries on your<br>[52:14] machine. No shade on GCX because they're<br>[52:16] all very they're very good binaries I'm<br>[52:18] sure. Um and or it could be whether you<br>[52:22] need to perform more like esoteric tasks<br>[52:25] as we talked about. Um another another<br>[52:28] way we can try to figure this out is by<br>[52:31] running evaluations and actually looking<br>[52:34] at which of these is better for an<br>[52:37] individual task. uh whether that's uh<br>[52:40] for cost or for token usage or for speed<br>[52:45] as uh as we just got a comment I saw. Um<br>[52:48] yes, it could be that speed is what you<br>[52:49] want to optimize in which case you know<br>[52:51] you choose that. Um so Dave, I'm going<br>[52:54] to hand over to you because I know<br>[52:55] you've got things to talk about here.<br>[52:58] >> Yeah, thanks. So, you know, for for our<br>[53:00] own education as well as uh as well as<br>[53:02] for curiosity,<br>[53:04] what we've been doing is um running<br>[53:06] running uh the the Oben suite, which<br>[53:09] I'll explain what that is in a minute.<br>[53:10] Um both, you know, with uh with the MCP<br>[53:13] tool and with GCX as the as the door to<br>[53:16] Grafana, the analogy that we've been<br>[53:18] using, isn't it? So very briefly,<br>[53:20] Olebench is a is a is a bench is an<br>[53:23] observability benchmark that Grafana<br>[53:25] Labs have defined and it uh contains<br>[53:28] this is this is publicly available open<br>[53:30] source. You can go and run it yourself<br>[53:31] with your own agents um if you want to<br>[53:33] which is always quite interesting. So by<br>[53:36] default um well and this was originally<br>[53:39] defined to kind of try and test<br>[53:40] different models against uh or to see<br>[53:42] how the different models perform uh for<br>[53:44] interacting you know against graphana to<br>[53:47] perform a variety of kind of<br>[53:49] observability related tasks right so you<br>[53:52] know originally it was for kind of you<br>[53:54] fix everything down and you compare you<br>[53:55] compare the models but you know for for<br>[53:58] our use case for developing GCX and and<br>[54:00] the skills that we bundle with it we<br>[54:03] kind of flip that a little bit right so<br>[54:04] we fix the model as well as the harness.<br>[54:06] And what we what we we adjust slightly<br>[54:08] in the harness is we adjust the the way<br>[54:10] that it interacts with Graphfana, right?<br>[54:12] So instead of we can run it with with<br>[54:14] MTP, which is the default, and we can<br>[54:16] also run it then with GCX um and install<br>[54:19] the skills that GCX has um and run it<br>[54:21] like so. And so you know, this will<br>[54:24] provide a bit bit more balance and a bit<br>[54:26] more data maybe to the to the anecdotal<br>[54:28] run that Ben had. Um and it's worth<br>[54:30] mentioning as well that all of the<br>[54:32] category categories of tests here. So<br>[54:34] you'll see all of the um I think all of<br>[54:37] the tasks that are kind of defined in<br>[54:38] this benchmark there are um MCP tools<br>[54:41] for the majority of them right um so<br>[54:45] yeah there are 60 63 tasks across these<br>[54:47] five categories this particular run here<br>[54:49] is we're running um opus 46 on both of<br>[54:51] these uh benchmarks this one's running<br>[54:53] MTP and then I have another tab up here<br>[54:55] where we can see we're running DCX but<br>[54:58] everything else in theory is the same so<br>[55:01] you know we can you can spend hours kind<br>[55:03] of digging through this um but there are<br>[55:04] some headline numbers at the top. Um so<br>[55:07] for MCP like about twothirds of the uh<br>[55:10] tasks completed or like passed three<br>[55:12] times. We run this with a kind of n of<br>[55:14] three. Um and it costs about $50 in<br>[55:17] tokens essentially to to run all of<br>[55:19] this. Um and you you have some you know<br>[55:22] each test has a grading mechanism<br>[55:24] defined grading mechanism to be scored.<br>[55:26] There's some score associated with each<br>[55:28] task too.<br>[55:30] And so the same, you know, compare those<br>[55:31] headlines to running against GPX, GCX,<br>[55:34] sorry, with skills. So it's more more<br>[55:35] expensive for the runs at the minute. Uh<br>[55:37] the mean score is slightly lower.<br>[55:39] There's a slightly lower kind of uh uh<br>[55:42] incidence of all three kind of uh runs<br>[55:45] all passing. Um so we we see like a<br>[55:48] slightly degraded performance when using<br>[55:50] GCX.<br>[55:52] Now this is really useful for us<br>[55:53] internally for uh what what we could do<br>[55:56] is compare these scores. we can go and<br>[55:58] look inside a particular task, right? Uh<br>[56:00] and you can see you'll see the prompt<br>[56:02] for each task at the top. You'll tell it<br>[56:04] kind of it will show what it tried to<br>[56:05] do. Um and it has kind of then uh the<br>[56:08] kind of trajectory or the path that the<br>[56:10] agent took through all of these various<br>[56:11] things, all of the tool calls it made.<br>[56:13] And you can see the responses and I go<br>[56:15] through that. And so this is really<br>[56:16] useful for us developing GCX. And you<br>[56:18] can see sorry what skills it loaded and<br>[56:20] things like that too. So we can see, you<br>[56:23] know, compare maybe the categories where<br>[56:25] it didn't perform so well compared to<br>[56:27] MCP or maybe, you know, just compared<br>[56:29] like performed badly on its own as well.<br>[56:31] Um, and we can go and inspect to see<br>[56:34] where some of those tools uh, you know,<br>[56:36] where the agent went wrong or maybe<br>[56:38] where the agent kind of misused the the<br>[56:40] tool or maybe we've designed the tool in<br>[56:42] a in a way that's easily misused or<br>[56:45] doesn't fit the scenario and things like<br>[56:47] that. Um and then we can decide to<br>[56:49] either you know fix the make changes to<br>[56:51] GCX, we can make changes to the skills.<br>[56:54] Um and you know for full transparency as<br>[56:57] these are all quite new things like<br>[56:58] sometimes there are kind of little<br>[57:00] quirks within the benchmarking suite as<br>[57:02] well that we need to adjust right so<br>[57:05] there's like each one of these tests has<br>[57:07] a a grading rubric. Um, and maybe they<br>[57:11] were, you know, when the whole<br>[57:12] benchmarking suite was designed with the<br>[57:14] assumption that it would use MCP as the<br>[57:16] front door to Grafana. Um, so we've kind<br>[57:18] of broken that assumption, you know, by<br>[57:20] by sticking GCX in there instead. And<br>[57:22] maybe, you know, one of the grading<br>[57:24] criteria, for example, um, was<br>[57:27] originally checking that a specific uh,<br>[57:30] tool was called, right? So the agent's<br>[57:32] never going to a specific MCP tool was<br>[57:35] called. So that's never going to be true<br>[57:36] in the GCX version. Um so you know we<br>[57:40] have to go and adjust that to be less<br>[57:41] kind of or to be more agnostic of uh<br>[57:44] what you know how it got to the end<br>[57:45] result that kind of thing. So yeah the<br>[57:48] so these kind of benchmarking runs are<br>[57:50] really useful for the headline scores<br>[57:52] and then for for digging into each of<br>[57:54] those uh kind of paths that the agent<br>[57:58] took to to perform each of those tasks<br>[58:00] so that we can go and learn from that<br>[58:02] and iterate and improve the GCX uh tool<br>[58:05] and the skills that we provide with it.<br>[58:07] Awesome.<br>[58:11] This is a great way to to dog food, too.<br>[58:13] Like now we we needed this for ourselves<br>[58:16] to be able to to see more uh to test to<br>[58:20] evaluate our own our own AI tools more.<br>[58:24] Um, and then now Olebench is something<br>[58:26] that's available to everyone and is not<br>[58:28] just for our stuff, but it is pretty<br>[58:30] handy to to pit GCX and and um MCP like<br>[58:35] this and see like what what's one good<br>[58:37] at, what's the other one better at and<br>[58:38] stuff. Um, but I want to also kind of<br>[58:42] talk about other Graphfana things like<br>[58:45] that that might be mentioned in the same<br>[58:46] breath like assistant that is sometimes<br>[58:49] conflated with one or both of MCP and<br>[58:53] CLI. How would you say they're related<br>[58:56] to assistant?<br>[59:02] That's a good question. Um I think that<br>[59:05] the<br>[59:07] GCX and MCP are almost like the tool<br>[59:10] similar to analogist to the tools that<br>[59:12] the assistant has available. And<br>[59:13] actually assistant is more similar to<br>[59:15] clawed code or you know the actual agent<br>[59:18] harness like it has the whole harness<br>[59:20] from running the agent loop to calling<br>[59:24] different tools um different ways of<br>[59:27] managing context and doing tool search<br>[59:29] and all of those things that that the<br>[59:31] MCP host or the you know the the agent<br>[59:34] application normally has. Um the big<br>[59:36] advantage that Grafana assistant has is<br>[59:38] that it's really well optimized for<br>[59:41] Grafana specific tasks especially things<br>[59:43] like creating dashboards where you know<br>[59:46] it needs it can it can actually<br>[59:48] visualize the dashboards as it goes and<br>[59:50] it can it can interact with a DOM and it<br>[59:52] can update things live in front of you<br>[59:55] as you're as you're like visual as<br>[59:57] you're working through creating a<br>[59:59] dashboard from example. you can you can<br>[60:01] change these things which is really<br>[60:02] really good and and it also has some<br>[60:04] some quite bespoke tools there for for<br>[60:07] doing Grafana specific things across the<br>[60:09] whole suite between like not not just<br>[60:12] like doing those raw API calls but it<br>[60:15] also knows all the way the full workflow<br>[60:17] all the way through. Um, so yeah, I I I<br>[60:22] always reach for Grafana Assistant if<br>[60:23] I'm doing anything to do with like<br>[60:25] creating dashboards or interacting, you<br>[60:28] know, debugging issues that I know<br>[60:30] involve several different data sources<br>[60:32] or, you know, I've started on one page<br>[60:35] and it can navigate me to others. I find<br>[60:37] it really really powerful for that,<br>[60:39] especially for like the investigation<br>[60:41] side of things.<br>[60:42] >> Yeah.<br>[60:43] >> Yeah. I'd say for anything visual<br>[60:45] especially, right? Like I would go to<br>[60:47] assistant first if I want to see it or<br>[60:49] if I want to learn something like teach<br>[60:51] me how to do this thing like not just<br>[60:54] create an SLO for me but like where is<br>[60:56] that on the interface then assistant<br>[60:58] would be better for that.<br>[61:00] Yeah, exactly. And and like uh have the<br>[61:03] assistant also has access to the infra<br>[61:06] memories to the knowledge graph. Uh for<br>[61:08] the folks that are familiar with Grafana<br>[61:10] cloud schema context um like the we we<br>[61:14] put a lot of effort in the<br>[61:17] investigations. Assistant investigations<br>[61:19] is part of the assistant where we have a<br>[61:21] validated workflow working doing root<br>[61:24] cause analysis based on hypothesis. And<br>[61:27] uh there's a lot of value there because<br>[61:29] the thing is like with GCX with MCP you<br>[61:33] you definitely have the hands to operate<br>[61:36] Grafana cloud to work with Grafana cloud<br>[61:38] but um like it still needs to improvise<br>[61:42] uh based on the knowledge that the LLM<br>[61:45] has and the benefit of the assistant is<br>[61:47] that we we basically do you say that the<br>[61:50] full banana was that the the way that uh<br>[61:52] that was always mentioned I don't know<br>[61:54] what the term is but we we basically do<br>[61:57] um it knows Grafana cloud. It has like<br>[62:00] great insights about what is actually<br>[62:02] happening with your services and not so<br>[62:04] much on a like raw telemetry view or<br>[62:07] level but actually uh like um uh real<br>[62:11] time outlier detection and that kind of<br>[62:14] stuff. So like I think that assistance<br>[62:17] is still like a very important part of<br>[62:21] getting kind of valuable insights and<br>[62:24] then like for the more deterministic<br>[62:26] things like GCX and MCP are great but<br>[62:29] you always need the assistance for the<br>[62:31] brains if you will<br>[62:34] >> and and I also wanted to mention because<br>[62:36] people might get confused uh that<br>[62:39] there's there's Grafana MCP but then<br>[62:41] there's also K6's MCP P and that's a<br>[62:46] very different thing because they're<br>[62:47] they're targeting they have different<br>[62:50] goals. So the graphana MCP is about uh<br>[62:52] your observability stack and the Ksix<br>[62:55] MCP is about writing Ksix writing and<br>[62:58] running your own Ksix tests on on your<br>[63:00] machine. So different things but just<br>[63:03] because um there might be a confusion<br>[63:05] there if you look for MCP and they both<br>[63:08] come up. Uh just to wrap things up<br>[63:11] because we are out of time. I just<br>[63:13] wanted to do a quick like when to use<br>[63:16] which for Graphfana. Luckily, we we had<br>[63:18] this beforehand. So, I'm just going to<br>[63:20] read it out. If you have a non-terminal<br>[63:23] client, so something like clawed desktop<br>[63:26] or cursor, then MCP is better. If you're<br>[63:29] building automated pipelines or scripts,<br>[63:32] CLI or GCX<br>[63:34] um token constraint or if you need a<br>[63:37] full feature coverage, then the CLI is<br>[63:39] better because you have you get the full<br>[63:42] banana, which is what Ward said.<br>[63:45] [laughter]<br>[63:45] Um if you want zero setup authentication<br>[63:48] for cloud users, then MCP is better uh<br>[63:52] for hosted. And then if you have complex<br>[63:55] multi-step workflows with data<br>[63:57] transformation then you would use the<br>[63:59] CLI plus jq and pipes. Um and then if<br>[64:04] both are available then start with MCP<br>[64:06] for discovery or actually I would say<br>[64:08] start with assistant first honestly and<br>[64:11] then and then go to MCP and get familiar<br>[64:15] with all the tools available and then<br>[64:17] when you're ready for the heavy lifting<br>[64:19] switch to GCX and then someone said if<br>[64:22] you're called Ben then just MCP all the<br>[64:24] way.<br>[64:25] That wasn't me by the way.<br>[64:29] >> I was having a question. Um, so like if<br>[64:32] you're using assistant where you can add<br>[64:34] your own MCP servers, like is there a<br>[64:37] benefit to specifically in assistant<br>[64:39] adding like graphana like the open<br>[64:41] source graphana MCP for instance? Like<br>[64:43] does it do anything differently there<br>[64:45] versus if you just had assistant by<br>[64:46] itself or whatnot?<br>[64:49] >> Uh, that's a good question. Um, not<br>[64:51] something we've ever really thought<br>[64:52] about before, but I can definitely think<br>[64:54] of some use cases where the assistant<br>[64:56] itself doesn't have tools for these<br>[64:58] things. And one of them is just that it<br>[65:00] can't make arbitrary calls to graphana<br>[65:02] as a API unless I've missed something<br>[65:05] over the last week. And the MCP server<br>[65:07] does allow that. So it, you know, it<br>[65:10] almost opens up limitless possibilities<br>[65:12] for the assistant because actually these<br>[65:15] agents do understand the API quite well.<br>[65:18] I think all of the docs are in the<br>[65:20] training set and you know we just saw uh<br>[65:23] claude code managed to make the right<br>[65:24] API call to create an SLO even. Um so<br>[65:28] yeah you could use it for that for<br>[65:30] example there are some other tools there<br>[65:31] that maybe the assistant doesn't quite<br>[65:33] cover although I I can't think there<br>[65:34] would be many at this point um I think<br>[65:36] the assistant is generally got a pretty<br>[65:38] decent coverage of those things. Yeah,<br>[65:42] and it's also a little bit turtles all<br>[65:43] the way down because we can also think<br>[65:46] about maybe running GCX as part of the<br>[65:48] agent environment of the assistant<br>[65:51] environment so that you like the<br>[65:52] assistant now can also execute Python<br>[65:54] scripts. So it could also call the GCX<br>[65:58] CLI as part of it. So you get all the<br>[66:00] functionality of GCX also available<br>[66:02] within the assistant again.<br>[66:04] >> Yeah.<br>[66:04] >> So and then you can actually call<br>[66:06] [laughter] with the CLI the assistant<br>[66:09] again. So turtles all the way down. It's<br>[66:12] infinite recursion.<br>[66:13] >> It's the Spider-Man meme just pointing<br>[66:16] to [laughter] Yeah. So if people are uh<br>[66:19] like probably people will leave from<br>[66:21] this podcast more confused than be they<br>[66:24] were before probably. That's a<br>[66:27] [laughter]<br>[66:28] >> Yeah. Well, you know, join the club.<br>[66:30] Like, uh, this is an attempt to to try<br>[66:32] and talk things out um in the current<br>[66:35] state of everything. But the reality is<br>[66:38] like it's not as simple as like you<br>[66:41] should always use this tool. Like we<br>[66:43] don't want to we don't want to do that.<br>[66:44] Um, we don't want to have to choose as a<br>[66:47] company which one is the better bet or<br>[66:50] anything. So, we're just kind of saying<br>[66:52] yes to everything and we'll see what<br>[66:53] sticks.<br>[66:57] Yeah, it's a game of trade-offs as with<br>[66:58] so many other things in in this field,<br>[67:01] right?<br>[67:02] >> Yeah. And things keep advancing so much<br>[67:04] and changing so much that like it could<br>[67:07] be completely different in a couple<br>[67:08] months for instance.<br>[67:10] >> Yep. It's you all back again.<br>[67:14] >> Yeah. Yeah. Indeed. Yeah. We can talk<br>[67:16] about our next pet next project that<br>[67:18] we're going to launch. Indeed.<br>[67:19] >> It has to be a threeletter acronym<br>[67:22] though. Like that's we can't accept<br>[67:23] anything else.<br>[67:25] >> [laughter]<br>[67:25] >> That's real acronym. Okay, we can<br>[67:27] already start brainstorming the name.<br>[67:29] Then we can use the name and then<br>[67:30] [laughter]<br>[67:31] we can figure out the technology that is<br>[67:32] actually powering it later.<br>[67:34] >> Okay, sounds like a good plan. Thank you<br>[67:37] everyone for joining us. Thank you to to<br>[67:40] the people that are on here now watching<br>[67:43] us. And then also if you're watching<br>[67:45] this after the fact and if anyone has<br>[67:47] any questions, uh we might not know the<br>[67:50] answers, but we'll get you someone who<br>[67:52] does. [laughter]<br>[67:54] So just leave them in the comments<br>[67:55] below.<br>[67:56] >> Yeah. And then there's also uh<br>[67:58] slack.garfana.com.<br>[67:59] Um there's like a graphana assistant<br>[68:01] channel in there for instance. But yeah,<br>[68:02] basically it's the community Slack. So<br>[68:05] if you want to ask questions in there,<br>[68:06] talk to people, etc.<br>[68:09] And the next episode is actually going<br>[68:11] to be with it's a recorded one. Not<br>[68:13] because not because u we didn't want to<br>[68:15] do it live, but because the person that<br>[68:18] I interviewed, Yas, is is going away for<br>[68:21] a bit and I wanted to catch him before<br>[68:22] he did. But it's going to be all about<br>[68:25] eval focus on offline eval since we did<br>[68:28] online with AI observability a couple<br>[68:31] episodes ago. But watch out for that.<br>[68:34] But thank you everyone for watching and<br>[68:37] we'll see you next <!-- deep-read:sections end --> ๐Ÿ“„ **Full text:** ![[Full Document Contents/Articles/CLI and MCP Basics for AI Agents-2.md|CLI and MCP Basics for AI Agents by Grafana / The Context Window]] ## Highlights - So uh so I've been with Grafana Labs for almost seven years now and I had various functions but uh currently I'm a product manager focused on Grafana cloud and specifically nowadays on GCX. >> Yeah, I guess I'll go last. So I'm I'm David. I've been here about the same time as Ben. So just over five years I've been building GCX with Ward. Um and most recently been focusing on trying to understand how GCX performs. um with his skills against other other tools. >> Awesome. So, I I guess today we're going to be talking about MCP versus CLI, what all those letters mean and which one Ben thinks is appropriate for all situations. >> The big the big versus word came out. ([View Highlight](https://read.readwise.io/read/01ktskrnhr1a8nc6f7pcy4pr6n)) - Note: Grafana offers both GCX (CLI) and MCP servers for cloud integration, with evaluations showing comparable performance - Tags: atom/literature/h2, mcp-vs-cli - And it gives them the power to interact with the real world in in some way rather than just being like text in and text out. Uh so it allows the assistant to do all of the clever things it can do such as looking for dashboards, creating dashboards. Basically, it allows them to allows the agents to yeah perform useful tasks and to do so more accurately as well by by having real knowledge bases they can query or uh being able to hit APIs in like predefined ways and I think I think that there's two about a year and a half ago there was this this kind of big thing released by anthropic which was the model context protocol CP. ([View Highlight](https://read.readwise.io/read/01ktskrf5pa355x763vrgj3h1y)) - Note: Grafana team discusses two approaches for AI agents to interact with observability tools: MCP servers vs CLI tools - Tags: mcp-vs-cli, atom/literature/h1 - it has some commands where you can then find indeed okay what are the commands that I need and that is basically discovered by the agent and so you could say that a CLI has way less token usage but again that like those those differences become less and less uh relevant I think um or well not relevant but they're they're like closing in on each other >> I think one area Where I I like MCP better is that um I feel like the tool discoverability is better on MCP. Um on CLI, you know, you kind of have to know those commands and yeah, you can go through like d-help or whatever. Uh but you still have to go through each one and then each command has different um parameters and stuff. ([View Highlight](https://read.readwise.io/read/01ktskrjc2x4he4k810ktbw838)) - Note: Both achieve similar outcomes with different trade-offs in token usage, discoverability, and implementation complexity - Tags: mcp-vs-cli, atom/literature/h2 - Um and and one of the ways that we can help to figure this out is I like to write some kind of decision tree and and there's some some uh aspects of that decision where it's really easy to make the the choice because if you are using a remote maybe you're using claw.ai AI or chat DBT remote and you know that doesn't have uh a shell so it can't just use it can't just use GCX because it can't run GCX commands um in that case you have to use a remote MCP server like that is the solution um and in others it's less obvious like if you're using an IDE locally or you're using CL code um it could be as much as a personal preference it could be uh whether you are happy running binaries, arbitrary binaries on your machine. ([View Highlight](https://read.readwise.io/read/01ktskrrmmjmcdy1b4v15swzr5)) - Note: Choice depends on use case, environment constraints (remote vs local shell), and personal preference - Tags: mcp-vs-cli, atom/literature/h3