<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Avinash Telikicherla on Medium]]></title>
        <description><![CDATA[Stories by Avinash Telikicherla on Medium]]></description>
        <link>https://medium.com/@tavinash?source=rss-6fef9955db42------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*wAXnWDJEiCnhykWuCJaGbw.jpeg</url>
            <title>Stories by Avinash Telikicherla on Medium</title>
            <link>https://medium.com/@tavinash?source=rss-6fef9955db42------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 01:36:18 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@tavinash/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Write Your Agent Once, Serve It Anywhere: A LangChain MCP Agent on Databricks Mosaic AI]]></title>
            <link>https://medium.com/@tavinash/write-your-agent-once-serve-it-anywhere-a-langchain-mcp-agent-on-databricks-mosaic-ai-46a1db53b258?source=rss-6fef9955db42------2</link>
            <guid isPermaLink="false">https://medium.com/p/46a1db53b258</guid>
            <category><![CDATA[langchain]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[databricks]]></category>
            <category><![CDATA[mlflow]]></category>
            <category><![CDATA[deployment]]></category>
            <dc:creator><![CDATA[Avinash Telikicherla]]></dc:creator>
            <pubDate>Sun, 18 Oct 2026 19:10:01 GMT</pubDate>
            <atom:updated>2026-10-18T19:10:01.838Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Wrapping a ReAct agent as an MLflow ResponsesAgent and deploying it as a serving endpoint.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0RjrCELvLG62u_N_XlnPGA.png" /></figure><h3>The problem: every framework speaks its own dialect</h3><p>Building an agent is the easy part now. LangChain, LlamaIndex, plain OpenAI SDK calls, hand-rolled loops: each has its own idea of what a message is, what a tool call looks like and how a stream is shaped. That is fine in a notebook. It hurts the moment you want to deploy, monitor, evaluate or swap one of them, because every consumer (a UI, an evaluation job, another service) has to learn each dialect.</p><p>The way out is the same trick that made the OpenAI API a de facto standard: agree on one request and response contract, and let each framework adapt to it behind the scenes. Databricks does this in the Mosaic AI Agent Framework with MLflow’s <em>ResponsesAgent</em> interface, which follows the shape of OpenAI’s Responses API.</p><p>A quick note on naming, because it trips people up. Chat Completions models a conversation as a list of role-and-content messages. The newer Responses API models an agent turn as a list of typed items: messages, function calls and function call outputs. That is a much better fit for agents, and it is the shape ResponsesAgent uses. Whatever happens inside your agent, it takes a ResponsesAgentRequest and returns a ResponsesAgentResponse, or a stream of ResponsesAgentStreamEvent objects.</p><p>Once your agent speaks that contract, deployment, tracing and querying stop depending on which framework you used. That is the whole point of this post.</p><h4>What we are building</h4><p>A small ReAct agent that answers LangChain questions by searching the official LangChain docs through their MCP server. The LLM is OpenAI. The agent is wrapped, registered in Unity Catalog and served as a Databricks endpoint.</p><h4><em>The repo has three files that matter:</em></h4><ul><li>langchain_agent.py: the plain LangChain agent with token streaming. It runs on its own, with no Databricks involved.</li><li>mosaic_agent.py: the ResponsesAgent wrapper, which is the normalizing layer.</li><li>deploy.py: logs the model to Unity Catalog and deploys the endpoint.</li></ul><blockquote><strong>Step 1: A plain LangChain ReAct agent</strong></blockquote><p>The agent gets its tools from the LangChain docs MCP server.</p><pre>async def build_agent():<br> client = MultiServerMCPClient(<br> {&quot;langchain_docs&quot;: {&quot;transport&quot;: &quot;streamable_http&quot;, &quot;url&quot;: MCP_URL}}<br> )<br> tools = [t for t in await client.get_tools() if t.name not in EXCLUDED_TOOLS]<br> model = ChatOpenAI(model=os.getenv(&quot;OPENAI_MODEL&quot;, &quot;gpt-4o-mini&quot;), temperature=0)<br> return create_agent(model, tools, system_prompt=SYSTEM_PROMPT)</pre><p>Run `python langchain_agent.py “How do I add memory to a LangChain agent?”` and you can watch the agent call the docs tools and stream its answer token by token. Everything here is LangChain-flavoured: LangChain message objects, LangChain tool calls, LangChain stream modes. Nothing a Databricks endpoint can consume yet.</p><blockquote><strong>Step 2: The wrapper, where the normalizing happens</strong></blockquote><p>The wrapper subclasses `ResponsesAgent` and implements two methods. `predict_stream` does the real work, and `predict` simply runs it and keeps the finished items, so there is one code path to test.</p><pre>class LangChainMCPAgent(ResponsesAgent):<br> def predict(self, request: ResponsesAgentRequest) -&gt; ResponsesAgentResponse:<br> outputs = [<br> e.item for e in self.predict_stream(request)<br> if e.type == &quot;response.output_item.done&quot;<br> ]<br> return ResponsesAgentResponse(output=outputs, custom_outputs=request.custom_inputs)</pre><p>There are three translations to get right.</p><p><em>Input.</em> The request arrives as Responses-style items. LangChain does not understand items like `function_call` and `function_call_output`, so `to_chat_completions_input` flattens the history into Chat Completions dicts, with assistant `tool_calls` and `tool` messages. LangGraph then coerces those dicts into its own message objects automatically. The three formats in the pipeline are: Responses items in, Chat Completions dicts in the middle, LangChain messages inside.</p><p>Output. I build the output events explicitly instead of using a helper, because that gives true token streaming. Asking LangGraph for two stream modes at once is the trick: <br>&gt; <em>messages : </em>gives LLM tokens as they arrive<br>&gt; <em>updates</em> :gives each completed message.</p><pre>stream = agent.astream(<br> {&quot;messages&quot;: messages},<br> {&quot;recursion_limit&quot;: self._recursion_limit},<br> stream_mode=[&quot;messages&quot;, &quot;updates&quot;],<br>)</pre><p>Each token becomes a text delta event, and each finished message becomes a done event:</p><pre># tokens as they arrive<br>yield ResponsesAgentStreamEvent(<br> **self.create_text_delta(delta=delta, item_id=text_item_id)<br>)<br># a finished tool call<br>yield ResponsesAgentStreamEvent(<br> type=&quot;response.output_item.done&quot;,<br> item=self.create_function_call_item(<br> id=call[&quot;id&quot;], call_id=call[&quot;id&quot;],<br> name=call[&quot;name&quot;], arguments=json.dumps(call[&quot;args&quot;]),<br> ),<br>)</pre><p>One detail matters here: the final text item reuses the same `item_id` as its deltas, so a client can tie the streamed tokens to the finished message. Tool results work the same way through `create_function_call_output_item`, and MCP tools return lists of content blocks, so I flatten those to plain text first.</p><p><strong>Async versus sync. </strong>MCP tools are async-only, but ResponsesAgent.predict_stream is a plain synchronous generator. The wrapper drives the async stream one step at a time on a private event loop, so events still flow out the moment they are produced instead of being buffered until the end.</p><p>Two smaller choices are worth copying. The agent is built lazily on the first request, so logging the model needs no network access. And mlflow.langchain.autolog() at the top of the file turns every LLM call and tool call into an MLflow trace for free.</p><p>The file ends with set_model(LangChainMCPAgent()). This is the models-from-code pattern: MLflow logs the Python file itself, not a pickled object, and runs it again inside the serving container.</p><blockquote><strong>Step 3: Log it and deploy it</strong></blockquote><p>`deploy.py` logs the file, registers it in Unity Catalog and deploys it:</p><pre>mlflow.set_registry_uri(&quot;databricks-uc&quot;)<br>with mlflow.start_run():<br> info = mlflow.pyfunc.log_model(<br> name=&quot;agent&quot;,<br> python_model=&quot;mosaic_agent.py&quot;,<br> code_paths=[&quot;langchain_agent.py&quot;], # imported by mosaic_agent.py<br> pip_requirements=[…],<br> registered_model_name=uc_model,<br> )<br>deployment = agents.deploy(<br> uc_model,<br> info.registered_model_version,<br> environment_vars={&quot;OPENAI_API_KEY&quot;: &quot;{{secrets/openai/api_key}}&quot;},<br>)</pre><p>There is a second way to create the endpoint, which is to call the Databricks SDK directly:</p><pre>w = WorkspaceClient()<br>w.serving_endpoints.create(<br> name=&quot;langchain-docs-agent-endpoint&quot;,<br> config=EndpointCoreConfigInput(<br> served_models=[ServedModelInput(<br> model_name=uc_model,<br> model_version=&quot;1&quot;,<br> workload_size=&quot;Small&quot;,<br> scale_to_zero_enabled=True,<br> environment_vars={&quot;OPENAI_API_KEY&quot;: &quot;{{secrets/openai/api_key}}&quot;},<br> )]<br> ),<br>)</pre><p>Which should you use? <br><em>`agents.deploy`</em> is the high-level helper made for agents, and it picks the endpoint name for you. The SDK call is the generic route: you choose the name, the size and the scaling, and you get a plain serving endpoint. Both end with a working endpoint, so pick<em> `agents.deploy`</em> for speed and the SDK when you manage endpoints from CI/CD or need full control.</p><blockquote><strong>Step 4: Query the endpoint</strong></blockquote><p>Because the endpoint speaks the Responses contract, the client is tiny and knows nothing about LangChain:</p><pre>response = get_deploy_client(&quot;databricks&quot;).predict(<br> endpoint=endpoint,<br> inputs={&quot;input&quot;: [{&quot;role&quot;: &quot;user&quot;, &quot;content&quot;: question}]},<br>)<br>for item in response[&quot;output&quot;]:<br> print(item)</pre><p><strong>Query it with the plain OpenAI client.</strong> The endpoint speaks the Responses contract, so the standard openai package works too. Point it at your workspace&#39;s /serving-endpoints URL and authenticate with your Databricks token. A normal call runs predict, and stream=True runs predict_stream:</p><pre>import os<br><br>from openai import OpenAI<br><br>endpoint = &quot;&lt;agent-endpoint-name&gt;&quot;<br>input_msgs = [{&quot;role&quot;: &quot;user&quot;, &quot;content&quot;: &quot;How do I add memory to a LangChain agent?&quot;}]<br><br>client = OpenAI(<br>    api_key=os.environ[&quot;DATABRICKS_TOKEN&quot;],<br>    base_url=f&quot;{os.environ[&#39;DATABRICKS_HOST&#39;].rstrip(&#39;/&#39;)}/serving-endpoints&quot;,<br>)<br><br># Non-streaming request. Calls predict.<br>response = client.responses.create(model=endpoint, input=input_msgs)<br>print(response.output_text)<br><br># Streaming request. Calls predict_stream.<br>stream = client.responses.create(model=endpoint, input=input_msgs, stream=True)<br>for event in stream:<br>    if event.type == &quot;response.output_text.delta&quot;:<br>        print(event.delta, end=&quot;&quot;, flush=True)</pre><p>You get back typed items: the tool call the agent made, what the docs tool returned, and the final message.</p><blockquote><strong>Why this is worth the extra file</strong></blockquote><p>- <strong>Swap the framework, keep the platform.</strong> Replace LangChain with LlamaIndex or a raw OpenAI loop, rewrite only the translation layer, and the endpoint, the clients and the tracing stay the same.<br>- <strong>Reuse</strong>.Any UI, evaluation job or service that speaks the Responses contract can call the agent without custom glue.<br>- <strong>Observability</strong>. One line of autolog gives you traces of every LLM and tool call in MLflow.<br>- <strong>Safe secrets and repeatable deploys.</strong> Config and credentials live outside the code, and the same two scripts redeploy a new version.</p><h4>Wrapping up</h4><p>The lesson is bigger than Databricks. Agent frameworks will keep changing, but a stable request and response contract in front of them lets you deploy, monitor and reuse your work without caring which one is inside. MLflow’s `ResponsesAgent` gives you that contract on Mosaic AI, and the wrapper that adapts a LangChain agent to it is only about a hundred lines.<br>The full code is on GitHub:</p><p><a href="https://github.com/AvinashTelikicherla/mosaic-ai-langchain-mcp-agent">GitHub - AvinashTelikicherla/mosaic-ai-langchain-mcp-agent: LangChain ReAct agent (OpenAI + LangChain docs MCP server) wrapped as an MLflow ResponsesAgent and deployed as a Databricks Mosaic AI serving endpoint.</a></p><p><strong>References</strong></p><ul><li><a href="https://mlflow.org/docs/latest/genai/serving/responses-agent/">MLflow - Open Source AI Platform for Agents, LLMs &amp; Models</a></li><li><a href="https://docs.databricks.com/aws/en/agents/deploy/">Deploy agents on Databricks | Databricks on AWS</a></li><li><a href="https://docs.langchain.com/oss/python/langchain/overview">LangChain overview - Docs by LangChain</a></li></ul><p><strong><em>Thanks for reading this article !!<br></em></strong>If you build something with it, I would like to hear about it in the comments.</p><p>If you found this article helpful, tap the 👏 button and share it to help others discover it too!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=46a1db53b258" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[️ The Game Changer: Async Subagents]]></title>
            <link>https://medium.com/@tavinash/%EF%B8%8F-the-game-changer-async-subagents-2e1a9a28cf1a?source=rss-6fef9955db42------2</link>
            <guid isPermaLink="false">https://medium.com/p/2e1a9a28cf1a</guid>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[langchain-deepagents]]></category>
            <category><![CDATA[langchain]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Avinash Telikicherla]]></dc:creator>
            <pubDate>Wed, 08 Apr 2026 17:44:28 GMT</pubDate>
            <atom:updated>2026-04-08T17:44:28.498Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DbnttAfdXgu-UW3nD718AQ.png" /></figure><p>Building agents that can actually <em>“think”</em> and <em>“do”</em> in parallel just got a lot easier.<br>LangChain’s <strong>Deep Agents v0.5</strong> marks a clear shift from <strong>blocking workflows → asynchronous execution</strong>.</p><p>Until now, subagents were <em>blocking</em>.<br>If one agent was doing deep research or code analysis, everything else had to wait.</p><p>Now with <strong>Async Subagents</strong> 👇</p><p>✨ <em>Fire-and-forget execution<br></em>✨ <em>Run multiple agents in parallel<br></em>✨ <em>No more waiting bottlenecks</em></p><p>⚡ <strong>What’s unlocked?</strong></p><p>✔️ <strong>Parallelism</strong> — Launch multiple specialized agents at once<br>✔️ <strong>Stateful execution</strong> — Agents maintain their own context (thread-based)<br>✔️ <strong>Dynamic updates</strong> — Modify tasks <em>mid-execution<br></em>✔️ <strong>Remote execution</strong> — Run agents across different infra/models</p><p>👉 This is not just agents anymore… it’s a <strong>distributed system</strong></p><p>🧩 <strong>Task-Based Execution (Built-in)</strong></p><p>Deep Agents now comes with a powerful task model:</p><blockquote>start_async_task → Launch work</blockquote><blockquote>check_async_task → Get results</blockquote><blockquote>update_async_task → Modify task</blockquote><blockquote>cancel_async_task → Stop execution</blockquote><blockquote>list_async_tasks → Track everything</blockquote><p>💡 <em>Automatically available — no extra setup needed</em></p><p>📁 <strong>Expanded File Support (Simplified)</strong></p><p>Agents can now work with more than just text &amp; images:</p><p>📄 File (.pdf, .ppt, .pptx)<br>🎧 Audio(.wav, .mp3, .aiff, .aac, .ogg, .flac)<br>🎥 Video(.mp4, .mpeg, .mov, .avi, .flv, .mpg, .webm, .wmv, .3gpp)<br>🖼️ Images(.png, .jpg, .jpeg, .gif, .webp, .heic, .heif)</p><p>✔️ <em>No API changes required<br></em>✔️ <em>File type auto-detected (extension-based)</em></p><p>#AI #LangChain #DeepAgents #LLM #GenerativeAI #DistributedSystems #LangGraph</p><h3>References</h3><p><a href="https://blog.langchain.com/deep-agents-v0-5/">Deep Agents v0.5</a></p><p><strong><em>Thanks for reading this article !!</em></strong></p><p>If you found this article helpful, tap the 👏 button and share it to help others discover it too!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2e1a9a28cf1a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ACP — The Protocol Powering Next-Gen AI Agent Integrations]]></title>
            <link>https://medium.com/@tavinash/acp-the-protocol-powering-next-gen-ai-agent-integrations-4f6beb9e80b7?source=rss-6fef9955db42------2</link>
            <guid isPermaLink="false">https://medium.com/p/4f6beb9e80b7</guid>
            <category><![CDATA[mcp-protocol]]></category>
            <category><![CDATA[acp]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[langchain-deepagents]]></category>
            <category><![CDATA[genai]]></category>
            <dc:creator><![CDATA[Avinash Telikicherla]]></dc:creator>
            <pubDate>Sun, 22 Feb 2026 07:39:06 GMT</pubDate>
            <atom:updated>2026-02-22T07:39:06.810Z</atom:updated>
            <content:encoded><![CDATA[<p>In the evolving landscape of AI tooling, <em>communication</em> — between editors, clients, and autonomous agents — is rapidly becoming the bottleneck. Every new IDE integration, every custom coding assistant built on LLMs, has traditionally required bespoke bridges and adapters. The result? A fracturing ecosystem where innovation is slowed by plumbing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rhAzFTuW3b9GTdBgvRCtdw.png" /><figcaption>High-level architecture of the Agent Client Protocol (ACP), illustrating standardized JSON-RPC based communication between AI clients (IDEs, UI interfaces) and autonomous agents across local and remote environments.<br> <em>This illustration is AI-generated.</em></figcaption></figure><p>Enter the <strong>Agent Client Protocol (ACP)</strong> — a lightweight, open-standard communication layer that promises to standardize how AI <em>agents</em> and <em>clients</em> (such as editors or UIs) talk to each other. Think of it as the <em>Language Server Protocol (LSP)</em> for AI assistants: a common contract that eliminates one-off integrations and unlocks rich, editor-agnostic agent experiences.</p><h3>🔍 What is ACP?</h3><p>At its core, the Agent Client Protocol is:</p><ul><li>A <strong>standardised JSON-RPC based protocol</strong> for bidirectional communication between clients (e.g., code editors, IDEs) and agents that use generative AI to assist users.</li><li>Designed to support <strong>both local</strong> (subprocess / stdio) and <strong>remote</strong> (HTTP/WebSocket) deployments.</li><li>Built to be <strong>flexible, extensible, and platform-agnostic</strong>, enabling a wide range of agent capabilities without custom interfaces.</li></ul><h3>Why ACP Matters</h3><p>Before ACP, editors like VS Code, JetBrains IDEs, Zed, and Neovim needed distinct plugins to integrate LLM-powered assistants. ACP removes that silofication by:</p><ul><li>Providing a <strong>common lingua franca</strong> between any ACP-compliant client and agent.</li><li>Allowing editor developers to support <em>any</em> agent without bespoke work.</li><li>Letting agent developers target <em>any</em> editor that speaks ACP.</li></ul><p>This decoupling accelerates innovation and fosters an ecosystem where tools and editors can interoperate seamlessly.</p><h3>🧠 The ACP Architecture — Building Blocks</h3><p>ACP’s design centers around <strong>JSON-RPC 2.0</strong>, a lightweight request/response system that supports:</p><h3>1. Methods</h3><p>These are standard request/response pairs between client and agent — for example:</p><ul><li>initialize: negotiate versions and capabilities</li><li>session/new: start a new interaction session</li><li>session/prompt: send user input to the agent</li></ul><h3>2. Notifications</h3><p>One-way messages that stream events and state from agent ➜ client (e.g., progress updates, tool invocation requests).</p><p>ACP leverages these to support a <strong>rich session lifecycle</strong>, keeping both sides in sync and enabling real-time collaboration.</p><h3><strong>🏗️ How the Protocol Works</strong></h3><p>A typical ACP interaction looks like:</p><ol><li><strong>Handshake</strong> — The client opens a connection to the agent and negotiates capabilities.</li><li><strong>Session Establishment</strong> — A conversation context is created or resumed.</li><li><strong>Prompt/Response</strong> — User input is sent via session/prompt, and the agent streams updates and results back.</li><li><strong>Tool Calls</strong> — If the agent needs to perform file operations, terminal access, or permission requests, it emits structured requests, prompting the client to authorize or provide data.</li><li><strong>Cancel/End</strong> — Operations can be canceled or terminated cleanly.</li></ol><p>Behind the scenes, ACP’s bidirectional JSON-RPC channel gives agents the freedom to invoke requests on the client side — a powerful mechanic that enables real-time, context-aware interactions.</p><h3>🧰 The Client and Server Roles</h3><h4>Clients</h4><p>Clients are interfaces that expose agent capabilities to users — most often code editors or UI layers. These manage users’ workflows, handle permissions, and interpret agent responses into actionable UI elements. Supported clients include (but aren’t limited to):</p><ul><li><em>Zed</em></li><li><em>JetBrains IDEs</em></li><li><em>Visual Studio Code</em></li><li><em>Neovim (via plugins)</em></li></ul><h4>Agents</h4><p>Agents are autonomous AI systems built for tasks — from filling in code to generating documentation or performing refactors. ACP-compliant agents implement a <em>standard schema</em> of methods and can be written in any language.</p><p>Examples of agents working with ACP include:</p><ul><li><em>AgentPool</em></li><li><em>Augment Code</em></li><li><em>Blackbox AI</em></li><li><em>Gemini CLI</em></li><li><em>Cline</em></li><li><em>Code Assistant</em></li><li><em>Docker’s cagent<br> …and more.</em></li></ul><h3>🧠 Deep Agents + ACP</h3><p>The emerging <strong>Deep Agents</strong> project from LangChain brings ACP into the agent ecosystem in a concrete way.</p><blockquote>Deep Agents are designed as an “<em>agent harness</em>” — a core runtime environment with:</blockquote><ul><li>Built-in planning tools</li><li>Persistent file-system context</li><li>The ability to spawn <em>subagents</em> for complex tasks</li></ul><p>LangChain enables exposing these deep agents <em>over ACP</em>, allowing editors to run powerful, stateful agents as if they were native extensions. Through the deepagents-acp package, developers can wrap any Deep Agent and expose it to ACP clients over stdio, unlocking rich capabilities without writing a custom client.</p><h3>🚀 Why This Era is Different</h3><p>ACP is more than “<em>just another API</em>” — it’s a <strong>standardization effort</strong> that parallels major shifts we’ve seen with:</p><ul><li><strong>Language Server Protocol (LSP)</strong> in language tooling</li><li><strong>Model Context Protocol (MCP)</strong> in external tool integrations</li><li><strong>Agent-to-Agent Protocols (A2A)</strong> for distributed agent ecosystems</li></ul><p>Instead of custom bridges between agent and editor, ACP creates an <strong>interoperable layer</strong> that allows tooling to evolve independently, yet work together seamlessly. Editor vendors, toolmakers, and AI researchers can all target a shared contract, reducing fragmentation and accelerating adoption.</p><h3>🧩 The Future: What ACP Enables</h3><p>ACP opens doors to several exciting scenarios:</p><ul><li><strong>Plug-and-Play Coding Assistants:</strong> Drop any ACP-compliant agent into supported editors with zero custom code.</li><li><strong>Hybrid Local/Remote Agents:</strong> Run fast local agents or cloud-hosted bots seamlessly through the same interface.</li><li><strong>Composable Workflows:</strong> Multiple agents contributing to workflows — e.g., planning, drafting, reviewing, testing — with editor arbitration.</li><li><strong>Ecosystem Interoperability:</strong> Agents written in Rust, Python, TypeScript, or Go can all interact through a shared protocol.</li></ul><p>This is the <em>plumbing layer</em> that future developer tools and research interfaces will build on — elevating agents from siloed experiments to first-class collaborators.</p><h3>🧠 Conclusion</h3><p>The <strong>Agent Client Protocol (ACP)</strong> is a pivotal technology in the AI agent ecosystem. By standardising how clients and agents communicate, it dissolves the traditional coupling between user interfaces and AI assistants. ACP empowers editor developers, tool builders, and researchers to innovate without reinventing integration mechanics.</p><p>With frameworks like <strong>Deep Agents</strong> adopting ACP for real-world workflows, we’re seeing the first steps toward a universal agent ecosystem — one where powerful, context-aware AI helpers can be dropped into any compatible client and run reliably.</p><h4><strong>References</strong></h4><ul><li><a href="https://agentclientprotocol.com/get-started/introduction">Introduction - Agent Client Protocol</a></li><li><a href="https://docs.langchain.com/oss/python/deepagents/acp">Agent Client Protocol (ACP) - Docs by LangChain</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4f6beb9e80b7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[️ Building Context-Aware GenAI Agents with the MCP]]></title>
            <link>https://medium.com/@tavinash/%EF%B8%8F-building-context-aware-genai-agents-with-the-mcp-32c7b8c1bd2e?source=rss-6fef9955db42------2</link>
            <guid isPermaLink="false">https://medium.com/p/32c7b8c1bd2e</guid>
            <category><![CDATA[langchain]]></category>
            <category><![CDATA[mcp-protocol]]></category>
            <category><![CDATA[mcp-server]]></category>
            <category><![CDATA[langgraph]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <dc:creator><![CDATA[Avinash Telikicherla]]></dc:creator>
            <pubDate>Sat, 18 Oct 2025 14:08:32 GMT</pubDate>
            <atom:updated>2025-10-18T14:08:32.117Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>From applications to agentic AI: orchestrating real-time intelligence with MCP.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WtUJ9ZbXF32Vs9CbSZfIBg.png" /><figcaption>Connecting minds and machines through the MCP architecture. (Image generated with AI.)</figcaption></figure><h3><strong>🚀 Introduction</strong></h3><p>In the evolving GenAI ecosystem, large language models (LLMs) are moving beyond text generation to become <strong>system orchestrators</strong> — capable of interacting with APIs, services, and real-time data.</p><p>To enable this, <strong>MCP provides a clean, structured protocol</strong> that guides LLMs in completing complex tasks using real-time data.</p><h3>🧩 Understanding Core MCP</h3><p><strong>Model Context Protocol (MCP)</strong> is an open standard that defines how LLMs interact with external systems in a consistent, structured, and language-agnostic way.</p><p>It enables LLMs to call external APIs, access real-time data, or use specialized tools — all through a unified protocol instead of custom integrations or hardcoded logic.</p><p>Each MCP server exposes callable functions that can be invoked by an agent without hardcoding logic. This separation of responsibilities enables <strong>clean, modular orchestration</strong> between reasoning models and external data systems.</p><blockquote><strong>Core Components in MCP Architecture</strong></blockquote><p><strong>🧭 MCP Host:</strong></p><p>The AI application that <strong>coordinates and manages</strong> one or multiple MCP clients.<br> It serves as the central runtime that orchestrates reasoning and decision-making — for example, a LangChain agent or Claude Desktop instance acting as the main host environment.</p><p><strong>🔗 MCP Client:</strong></p><p>A component that <strong>maintains a connection to an MCP server</strong> and retrieves contextual data or tool definitions from it for the host to use.<br> The client is responsible for transport management (stdio, streamable_http, or sse), message routing, and schema validation — ensuring that the host and server communicate seamlessly.</p><p>🧩 <strong>MCP Server</strong></p><p>A standalone program that <strong>provides context or capabilities</strong> to MCP clients.<br> Each server defines one or more “<em>tools</em>” that perform specific tasks such as fetching APIs, querying databases, generating embeddings, or returning system information (like time or date).</p><p><strong>🔄 How These Components Interact</strong></p><ul><li>The <strong>MCP host</strong> (for instance, a LangChain or Gemini-powered agent) orchestrates reasoning.</li><li>The <strong>MCP client</strong> connected to it manages communication with one or more servers.</li><li>The <strong>MCP servers</strong> expose tool definitions or contextual data that the agent can call during execution.</li><li>The results are returned in structured JSON, which the host integrates into its reasoning pipeline.</li></ul><p>This modular setup is analogous to a <strong>microservice-style design for LLMs</strong> — each MCP server acts as a plug-and-play component that can be independently updated, scaled, or swapped.</p><blockquote>This implementation demonstrates a context-aware agentic architecture, where the MCP seamlessly integrates with LangChain agents to enable intelligent, real-time decision-making across multiple data sources.</blockquote><h3><strong>🧱 System Composition</strong></h3><p>The system architecture is composed of two MCP servers and one LangChain agent:</p><p><strong>NASA MCP Server- </strong>Provides access to NASA DONKI CME, FLR, and GST events</p><p><strong>Time MCP Server- </strong>Returns current time and date in Asia/Kolkata</p><p><strong>LangChain Agent- </strong>Orchestrates the above servers to produce contextual insights</p><h3><strong>⚙️ Environment Configuration with `</strong><strong>uv&#39;</strong></h3><p><strong><em>uv</em></strong> ensures fast, deterministic builds and isolates all dependencies in a single reproducible environment — ideal for GenAI experimentation.</p><p><strong>Project Initialization</strong></p><pre>uv init mcp_samples<br>cd mcp_samples</pre><p>Dependencies in pyproject.toml</p><pre>[project]<br>name = &quot;mcp_samples&quot;<br>version = &quot;0.1.0&quot;<br>description = &quot;Context-aware GenAI agents using Model Context Protocol&quot;<br>requires-python = &quot;&gt;=3.13&quot;<br>dependencies = [<br>    &quot;langchain&gt;=1.0.0&quot;,<br>    &quot;langchain-google-genai&gt;=3.0.0&quot;,<br>    &quot;langchain-google-vertexai&gt;=3.0.0&quot;,<br>    &quot;langchain-mcp-adapters&gt;=0.1.11&quot;,<br>    &quot;langgraph&gt;=1.0.0&quot;,<br>    &quot;mcp&gt;=1.18.0&quot;,<br>    &quot;mcp-server-time&gt;=2025.9.25&quot;,<br>]</pre><h4>Environment Variables</h4><pre>NASA_DONKI_URL=https://api.nasa.gov/DONKI<br>NASA_API_KEY=DEMO_KEY<br>GOOGLE_APPLICATION_CREDENTIALS=&quot;/path/to/credentials.json&quot;</pre><h3><strong>🛰️ NASA DONKI MCP Server</strong></h3><p>The NASA MCP server encapsulates endpoints from the <strong>DONKI (Database of Notifications, Knowledge, and Information)</strong> API, exposing tools to retrieve:</p><ul><li><strong>CME</strong> — Coronal Mass Ejections</li><li><strong>FLR</strong> — Solar Flares</li><li><strong>GST</strong> — Geomagnetic Storms</li></ul><p>Each tool accepts startDate and endDate inputs, defaulting to the previous 30 days if not provided.</p><pre># ./mcp_local_server/nasa.py (excerpt)<br>class DonkiServer:<br>    async def get_cme(self, inp: CMEInput) -&gt; APIResult:<br>        startDate, endDate = format_default_dates(inp.startDate, inp.endDate)<br>        params = {&quot;startDate&quot;: startDate, &quot;endDate&quot;: endDate, &quot;api_key&quot;: NASA_API_KEY}<br>        data = await call_donki_api(&quot;CME&quot;, params)<br>        return APIResult(data=data)</pre><p>The server operates via <strong>mcp.server.stdio</strong>, enabling portability and compatibility across any MCP-compliant runtime.</p><h3><strong>⏱️ Time MCP Server Integration</strong></h3><p>To ensure contextual awareness, the system integrates mcp_server_time, which provides real-time date and time information in any specified timezone.</p><p>This eliminates manual date configuration, enabling the agent to <strong>reason based on live system context</strong>.</p><p>Example configuration:</p><pre>{<br>  &quot;transport&quot;: &quot;stdio&quot;,<br>  &quot;command&quot;: &quot;python&quot;,<br>  &quot;args&quot;: [&quot;-m&quot;, &quot;mcp_server_time&quot;, &quot;--local-timezone=Asia/Kolkata&quot;]<br>}</pre><h3><strong>🧠 Multi-Server Orchestration</strong></h3><p>The agent connects to both MCP servers using MultiServerMCPClient from langchain_mcp_adapters.</p><pre>client = MultiServerMCPClient(<br>    {<br>        &quot;nasa&quot;: {<br>            &quot;transport&quot;: &quot;stdio&quot;,<br>            &quot;command&quot;: &quot;python&quot;,<br>            &quot;args&quot;: [&quot;./mcp_local_server/nasa.py&quot;],<br>        },<br>        &quot;time&quot;: {<br>            &quot;transport&quot;: &quot;stdio&quot;,<br>            &quot;command&quot;: &quot;python&quot;,<br>            &quot;args&quot;: [&quot;-m&quot;, &quot;mcp_server_time&quot;, &quot;--local-timezone=Asia/Kolkata&quot;],<br>        },<br>    }<br>)</pre><p>After initialization, the client tools are registered with a <strong>LangChain agent</strong> powered by a Gemini model:</p><pre>tools = await client.get_tools()<br><br>agent = create_agent(<br>    &quot;google_vertexai:gemini-2.5-flash&quot;,<br>    tools,<br>)<br><br>response = await agent.ainvoke(<br>    {&quot;messages&quot;: [{&quot;role&quot;: &quot;user&quot;, &quot;content&quot;: &quot;place holder to pass user query&quot;}]}<br>)</pre><p>This enables a <strong>chained reasoning workflow </strong>:</p><ol><li>Retrieve system time via the Time MCP server</li><li>Derive date range</li><li>Query NASA DONKI API via the NASA MCP server</li><li>Return structured, time-contextual insights</li></ol><p><em>The exact sequence of steps is </em><strong><em>adaptive</em></strong><em>, changing based on what the user asks.</em></p><h3>🧩 Key Advantages</h3><ul><li><strong>Standardization:</strong> Establishes a consistent communication layer across models, clients, and frameworks.</li><li><strong>Isolation:</strong> Keeps logic modular; individual servers can evolve without affecting the host or model behavior.</li><li><strong>Extensibility:</strong> Supports multiple concurrent servers, making complex multi-tool orchestration seamless.</li><li><strong>Security &amp; Control:</strong> Each server can apply its own authentication, authorization, and rate limiting policies.</li></ul><h4>Together, MCP hosts, clients, and servers form a <strong>composable and context-driven ecosystem</strong> — allowing GenAI agents to operate with real-world awareness, modularity, and reliability.</h4><p>The full source code for this can be found here,</p><p><a href="https://github.com/AvinashTelikicherla/mcp">GitHub - AvinashTelikicherla/mcp: Hub for Model Context Protocol (MCP): implementations, examples, tools &amp; docs for building MCP servers and clients. Curated resources and practical materials.</a></p><blockquote><strong>References</strong></blockquote><ul><li><a href="https://modelcontextprotocol.io/docs/getting-started/intro">What is the Model Context Protocol (MCP)? - Model Context Protocol</a></li><li><a href="https://docs.langchain.com/oss/python/langchain/mcp">Model Context Protocol (MCP) - Docs by LangChain</a></li><li><a href="https://api.nasa.gov/">NASA Open APIs</a></li><li><a href="https://docs.langchain.com/oss/python/integrations/providers/google">Overview - Docs by LangChain</a></li><li><a href="https://github.com/astral-sh/uv">GitHub - astral-sh/uv: An extremely fast Python package and project manager, written in Rust.</a></li></ul><p><strong><em>Thanks for reading this article !!</em></strong></p><p>If you found this article helpful, tap the 👏 button and share it to help others discover it too!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=32c7b8c1bd2e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Evaluating AI Solutions Using Custom Vertex AI (Gemini) models and DeepEval — The Missing Piece]]></title>
            <link>https://medium.com/@tavinash/evaluating-ai-solutions-using-custom-vertex-ai-gemini-models-and-deepeval-the-missing-piece-491e3009af41?source=rss-6fef9955db42------2</link>
            <guid isPermaLink="false">https://medium.com/p/491e3009af41</guid>
            <category><![CDATA[deepeval]]></category>
            <category><![CDATA[rags]]></category>
            <category><![CDATA[google-gemini]]></category>
            <category><![CDATA[llm-evaluation]]></category>
            <category><![CDATA[langchain]]></category>
            <dc:creator><![CDATA[Avinash Telikicherla]]></dc:creator>
            <pubDate>Tue, 14 Oct 2025 18:01:07 GMT</pubDate>
            <atom:updated>2025-10-14T18:01:07.662Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Evaluating AI Solutions Using Custom Vertex AI (Gemini) models and DeepEval — The Missing Piece</strong></h3><blockquote>Everyone’s obsessed with retrieval — but who’s measuring the response quality?</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JlOel4l9lgvvpSecXQiM5A.jpeg" /><figcaption>DeepEval–Gemini interaction in an AI evaluation workflow (AI-generated).</figcaption></figure><h3>1. The Problem: Everyone’s Building RAG, But Few Are Measuring</h3><p>Every team I talk to is fine-tuning retrieval logic, tweaking chunk sizes, and testing vector stores — but when it comes to evaluating how <strong>good </strong>their LLM’s output really is, the story gets quiet.</p><p>Most developers focus on <em>retrieval precision </em>and <em>context construction</em>, but ignore <em>response evaluation</em>— how relevant or truthful the model’s final answer is.</p><p>That’s where <strong><em>DeepEval </em></strong>comes in.</p><h3>2. Enter DeepEval — A Practical LLM Evaluation Framework</h3><p>DeepEval is an open-source evaluation framework that allows developers to <em>quantitatively </em>evaluate LLM responses. It provides metrics like:</p><p>- <em>AnswerRelevancyMetric</em> — measures how well the model’s answer aligns with retrieved context.</p><p>- <em>FaithfulnessMetric </em>— detects hallucination by checking factual alignment.</p><p>- <em>ContextualPrecisionMetric </em>and <em>ContextualRecallMetric </em>— help measure retrieval quality.</p><p><strong>DeepEval </strong>offers a comprehensive suite of evaluation metrics for AI systems — you can explore more on their official website.</p><p>In this post, I’ll walk through using <strong>DeepEval with Google Vertex AI</strong> (Gemini Flash) models using two methods:</p><p>1. The `google-genai` SDK</p><p>2. LangChain’s `ChatGoogleGenerativeAI` client</p><h3>3. Setting Up the Environment</h3><p>Install the dependencies:</p><p>pip install deepeval google-genai langchain-google-genai python-dotenv</p><p>Create a `.env` file with your Google API key:</p><pre>GOOGLE_API_KEY=your_api_key_here<br>GOOGLE_PROJECT_ID=your_project_id_here<br>GOOGLE_LOCATION=global</pre><h3>4. Using google-genai SDK</h3><p>Here’s a custom DeepEval wrapper for Gemini using Google’s native SDK.</p><blockquote>Designing the Custom Model Integration Layer</blockquote><blockquote>Implement a custom class named GoogleAI that inherits from DeepEvalBaseLLM to generate responses using the language model.</blockquote><pre>class GoogleGeminiLLM(DeepEvalBaseLLM):<br>    def __init__(self, client, model_name=&quot;gemini-2.5-flash&quot;):<br>        self.client = client<br>        self.model_name = model_name<br><br>    def load_model(self):<br>        return self.client<br><br>    def generate(self, prompt: str) -&gt; str:<br>        _client = self.load_model()<br>        response = _client.models.generate_content(<br>            model=self.model_name,<br>            contents=prompt,<br>            config=GenerateContentConfig(<br>                safety_settings=[<br>                    SafetySetting(<br>                        category=HarmCategory.HARM_CATEGORY_UNSPECIFIED,<br>                        threshold=HarmBlockThreshold.BLOCK_NONE<br>                    ),<br>                    # … (other harm categories)<br>                ]<br>            )<br>        )<br><br>        return response.text<br>    async def a_generate(self, prompt: str) -&gt; str:<br>        _client = self.load_model()<br>        response = await _client.aio.models.generate_content(<br>            model=self.model_name,<br>            contents=prompt,<br>            config=GenerateContentConfig(<br>                safety_settings=[<br>                    SafetySetting(<br>                        category=HarmCategory.HARM_CATEGORY_UNSPECIFIED,<br>                        threshold=HarmBlockThreshold.BLOCK_NONE<br>                    ),<br>                    # … (other harm categories)<br>                ]<br>            )<br>        )<br><br>        return response.text<br>    def get_model_name(self) -&gt; str:<br>        return self.model_name</pre><p>You can then wire it up:</p><pre># initialize the Gemini client<br>client = genai.Client(api_key=API_KEY, vertexai=True)<br><br>vertexai_gemini = GoogleGeminiLLM(client=client, model_name=&quot;gemini-2.5-flash&quot;)<br><br>metric = AnswerRelevancyMetric(model=vertexai_gemini)<br><br>test_case = LLMTestCase(<br>    input=&quot;Summarize an article about climate change impacts.&quot;,<br>    actual_output=&quot;The article discusses rising temperatures, sea level rise, and biodiversity loss.&quot;,<br>    retrieval_context=[<br>        &quot;It highlights global warming, extreme weather, and ecological effects.&quot;<br>    ]<br>)<br><br>result = metric.measure(test_case=test_case)<br>print(&quot;Answer Relevancy Score:&quot;, result)</pre><p>✅ A score close to **1.0** means the model’s answer is highly relevant to the given context.</p><h3>5. Using LangChain’s ChatGoogleGenerativeAI</h3><p>If you’re already working with LangChain, the integration is even simpler.</p><blockquote>Designing the Custom Model Integration Layer</blockquote><pre>from langchain_google_genai import ChatGoogleGenerativeAI<br>from deepeval.models.base_model import DeepEvalBaseLLM<br>from deepeval.metrics import AnswerRelevancyMetric<br>from deepeval.test_case import LLMTestCase<br><br>class GoogleAI(DeepEvalBaseLLM):<br>    def __init__(self, model):<br>        self.model = model<br><br>    def load_model(self):<br>        return self.model<br><br>    def generate(self, prompt: str) -&gt; str:<br>        chat_model = self.load_model()<br>        response = chat_model.invoke(prompt)<br>        return response.content<br>    <br>    async def a_generate(self, prompt: str) -&gt; str:<br>        chat_model = self.load_model()<br>        response = await chat_model.ainvoke(prompt)<br>        return response.content<br>    <br>    def get_model_name(self) -&gt; str:<br>        return &quot;gemini-2.5-flash&quot;</pre><p>Wiring it:</p><pre>custom_model = ChatGoogleGenerativeAI(<br>    model=&quot;gemini-2.5-flash&quot;,<br>    safety_settings={<br>        # disable blocking during evaluation<br>        # (HarmCategory → HarmBlockThreshold mappings)<br>    }<br>)<br><br>vertexai_gemini = GoogleAI(model=custom_model)<br>metric = AnswerRelevancyMetric(model=vertexai_gemini)<br>response = metric.measure(test_case=test_case)<br>print(&quot;LangChain DeepEval Score:&quot;, response)<br></pre><h3>6. Understanding the DeepEval Score</h3><p>DeepEval produces a numeric score between <em>0 </em>and <em>1</em>, where:</p><blockquote>1.0 → Perfectly relevant or factual answer</blockquote><blockquote>0.0 → Irrelevant, off-topic, or hallucinated response</blockquote><p>This makes it easy to track model improvements over time or compare multiple LLMs for the same task.</p><h3>7. Closing Thoughts</h3><p>Building a great RAG pipeline isn’t just about retrieving data — it’s about ensuring your model uses that data effectively.</p><p>DeepEval bridges that final gap between <em>generation </em>and <em>evaluation</em>, giving teams a way to measure how well their models perform beyond “it looks good to me.”</p><blockquote>“You can’t improve what you don’t measure — and LLMs are no exception.”</blockquote><p>The full source code for this can be found here,</p><p><a href="https://github.com/AvinashTelikicherla/evaluation">GitHub - AvinashTelikicherla/evaluation</a></p><p><strong>References</strong></p><ul><li><a href="https://github.com/confident-ai/deepeval">GitHub - confident-ai/deepeval: The LLM Evaluation Framework</a></li><li><a href="https://deepeval.com/docs/getting-started">Quick Introduction | DeepEval - The Open-Source LLM Evaluation Framework</a></li><li><a href="https://googleapis.github.io/python-genai/">Google Gen AI SDK documentation</a></li></ul><p><strong><em>Thanks for reading this article !!</em></strong></p><p>If you found this article helpful, tap the 👏 button and share it to help others discover it too!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=491e3009af41" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>