<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Jonathan Langens</title>
    <description>The latest articles on DEV Community by Jonathan Langens (@langensjonathan).</description>
    <link>https://dev.to/langensjonathan</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4048437%2F1f6862d0-d482-459d-8e39-18cce1a92117.jpg</url>
      <title>DEV Community: Jonathan Langens</title>
      <link>https://dev.to/langensjonathan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/langensjonathan"/>
    <language>en</language>
    <item>
      <title>What is an 'agent'? A class/instance definition, stress-tested against the 2026-07-28 MCP spec</title>
      <dc:creator>Jonathan Langens</dc:creator>
      <pubDate>Tue, 28 Jul 2026 07:28:30 +0000</pubDate>
      <link>https://dev.to/langensjonathan/what-is-an-agent-a-classinstance-definition-stress-tested-against-the-2026-07-28-mcp-spec-5akp</link>
      <guid>https://dev.to/langensjonathan/what-is-an-agent-a-classinstance-definition-stress-tested-against-the-2026-07-28-mcp-spec-5akp</guid>
      <description>&lt;h1&gt;
  
  
  Industry standards
&lt;/h1&gt;

&lt;p&gt;In the Gen AI / LLM space, two standards have emerged as the de facto choice in their domains:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A2A&lt;/strong&gt; (v1.0, Linux Foundation) defines how agents integrate and communicate with their peers. It defines the &lt;em&gt;interface&lt;/em&gt; of an agent, but not the agent itself.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MCP&lt;/strong&gt; (2026-07-28 spec, finalizes today) defines how an agent uses tools. It defines the &lt;em&gt;internal plumbing&lt;/em&gt; of an agent, but not the agent itself.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One nuance to be fair to both: MCP can also act as an agent's public interface, when an agent is exposed as an MCP server inside a single trust domain. So A2A covers the cross-organization contract, and MCP covers everything inside it. Either way, the conclusion stands: neither protocol defines what an agent &lt;em&gt;is&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;To me it seems the terms 'agent' and 'agentic' are still not well defined, and this article is my attempt at an operational definition: one precise enough that you could build a host around it. That claim is not hypothetical — I am building an MCP host, and this definition is what fell out of that work.&lt;/p&gt;

&lt;h1&gt;
  
  
  Prior art (and why it is not enough)
&lt;/h1&gt;

&lt;p&gt;"An agent is an LLM using tools in a loop" (Anthropic's framing) is directionally right, but it is not operational: it does not tell you what belongs in your &lt;code&gt;agents.json&lt;/code&gt;. The academic definitions (rational agents, BDI, FIPA) predate LLMs and do not map to context windows, token budgets or MCP servers. I want something in between: a definition you can serialize.&lt;/p&gt;

&lt;p&gt;Scope: this is a definition for agents that live in an MCP host. Frameworks like LangGraph organize things differently, but I believe the same components show up under different names.&lt;/p&gt;

&lt;h1&gt;
  
  
  The definitions
&lt;/h1&gt;

&lt;p&gt;I split the concept in two parts, like a class and its instances. Both live in the MCP host. From here on: an &lt;strong&gt;agent definition&lt;/strong&gt; is the class, an &lt;strong&gt;agent&lt;/strong&gt; is the instance.&lt;/p&gt;

&lt;p&gt;The agent definition consists of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;the host loop&lt;/strong&gt; — the core. The LLM deciding actions, observing results and iterating. Without a loop you have a chatbot with tools, not an agent.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;system context&lt;/strong&gt; — persona, instructions. Static and authored.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;MCP server set&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;capability boundary / tool policy&lt;/strong&gt; — which servers and tools this agent &lt;em&gt;may&lt;/em&gt; use, and what needs approval. This is a role, not a login.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LLM&lt;/strong&gt; — the actual model we are using&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;termination limits&lt;/strong&gt; — max iterations, token budget, stop conditions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;task contract&lt;/strong&gt; — the schema of what this agent accepts and what it must return&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;context-size strategy&lt;/strong&gt; — compaction vs top-x&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;An agent is an instance of that class. In C# terms:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;record&lt;/span&gt; &lt;span class="nc"&gt;AgentDefinition&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;HostLoop&lt;/span&gt; &lt;span class="n"&gt;Loop&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;SystemContext&lt;/span&gt; &lt;span class="n"&gt;Context&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;McpServerSet&lt;/span&gt; &lt;span class="n"&gt;Servers&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;CapabilityBoundary&lt;/span&gt; &lt;span class="n"&gt;Capabilities&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;Model&lt;/span&gt; &lt;span class="n"&gt;Llm&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;TerminationLimits&lt;/span&gt; &lt;span class="n"&gt;Limits&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;TaskContract&lt;/span&gt; &lt;span class="n"&gt;Contract&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;ContextStrategy&lt;/span&gt; &lt;span class="n"&gt;Strategy&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;record&lt;/span&gt; &lt;span class="nc"&gt;Agent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;AgentDefinition&lt;/span&gt; &lt;span class="n"&gt;Definition&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;AgentTask&lt;/span&gt; &lt;span class="n"&gt;Goal&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;ContextWindow&lt;/span&gt; &lt;span class="n"&gt;WorkingContext&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;Principal&lt;/span&gt; &lt;span class="n"&gt;Credentials&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;Budget&lt;/span&gt; &lt;span class="n"&gt;Consumed&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;goal&lt;/strong&gt; — what the user actually asked&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;working context window&lt;/strong&gt; — conversation history, tool results&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;credentials&lt;/strong&gt; — the principal: whose OAuth tokens, on whose behalf. Two instances of the same definition, running for two different users, differ only here.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;consumed budget&lt;/strong&gt; — iterations elapsed, tokens spent&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Note the symmetry: the definition holds limits, contracts and capabilities; the instance holds counters, goals and credentials. Static in the class, dynamic in the instance.&lt;/p&gt;

&lt;h2&gt;
  
  
  Enter the 2026-07-28 spec, or more precisely: the stateless core
&lt;/h2&gt;

&lt;p&gt;The new MCP spec removes protocol sessions entirely. A server no longer remembers you between calls. All state now travels in explicit handles that the model itself can see: task handles for long-running work, workflow ids, and the &lt;code&gt;requestState&lt;/code&gt; blob a paused call hands back.&lt;/p&gt;

&lt;p&gt;This breaks my 'working context window' as defined above. Those handles land in the context window, which means compacting — or worse, top-x-ing — becomes a &lt;em&gt;correctness&lt;/em&gt; concern instead of a cost concern. Summarize away a task handle and the agent has orphaned remote work it can never resume, because the stateless server has no session through which to remind it.&lt;/p&gt;

&lt;p&gt;So the instance needs a split:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;compressible context&lt;/strong&gt; — conversation history, safe to compact&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;load-bearing context&lt;/strong&gt; — outstanding handles and request state, never compacted&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The host loop also stops being free-form. It must now support:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the multi-round-trip pause — a tool call returns input-required plus request state; the loop surfaces the question and re-issues the call with the answer&lt;/li&gt;
&lt;li&gt;task polling (&lt;code&gt;tasks/get&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;unsolicited task handles arriving in results&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Serializable Agents
&lt;/h1&gt;

&lt;p&gt;Here is where the stateless core points. If instance state is exactly {goal, context, handles, credentials, consumed budget}, and the protocol holds no hidden session on your behalf, then an agent is a &lt;em&gt;serializable value&lt;/em&gt;. You can suspend it, persist it, and resume it in a different host process. Not a running process you must keep alive — a record you can store.&lt;/p&gt;

&lt;p&gt;Production reality will take a while to catch up (connection reuse, servers caches, ...), but the direction is set by the spec itself.&lt;/p&gt;

&lt;p&gt;I'm looking for feedback on this — especially from people running MCP hosts in production: what is in your agent config that this definition misses?&lt;/p&gt;

</description>
      <category>ai</category>
      <category>mcp</category>
      <category>agents</category>
    </item>
  </channel>
</rss>
