<?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: Yogi</title>
    <description>The latest articles on DEV Community by Yogi (@ybear_81).</description>
    <link>https://dev.to/ybear_81</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%2F4001074%2F73badd85-7b88-4fe3-b220-ada950af9cb9.png</url>
      <title>DEV Community: Yogi</title>
      <link>https://dev.to/ybear_81</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ybear_81"/>
    <language>en</language>
    <item>
      <title>Running a 122B Parameter Model and Agent Locally on AMD MI300X GPU — What I Learned</title>
      <dc:creator>Yogi</dc:creator>
      <pubDate>Mon, 10 Aug 2026 04:26:14 +0000</pubDate>
      <link>https://dev.to/ybear_81/running-a-122b-parameter-agent-locally-on-amd-mi300x-what-i-learned-3ebn</link>
      <guid>https://dev.to/ybear_81/running-a-122b-parameter-agent-locally-on-amd-mi300x-what-i-learned-3ebn</guid>
      <description>&lt;p&gt;Self-hosting Qwen3.5-122B with vLLM and SGLang on AMD GPU infrastructure, then building a fully autonomous agent on top of it&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Most conversations about running large language models locally stop at 7B or 13B parameter models on consumer GPUs. That's a reasonable ceiling when you're working with a single RTX card and 24GB of VRAM.&lt;/p&gt;

&lt;p&gt;What happens when you have access to an AMD Instinct MI300X with &lt;strong&gt;192GB of HBM3 memory&lt;/strong&gt;?&lt;/p&gt;

&lt;p&gt;This post documents what I learned deploying Qwen3.5-122B — a 122-billion-parameter model — on AMD MI300X GPU infrastructure using vLLM and SGLang, and then building a fully autonomous agent on top of it using OpenClaw. No API tokens. No rate limits. Everything running on AMD hardware.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why This Matters Beyond the Demo
&lt;/h2&gt;

&lt;p&gt;Before getting into the technical setup, it's worth naming why this is interesting from an architecture perspective.&lt;/p&gt;

&lt;p&gt;The default assumption in enterprise AI deployments today is that large models live behind an API ( "Big Three" frontier AI laboratories). You call their endpoint, you pay per token, you accept their rate limits, their data handling policies, and their availability SLAs.&lt;/p&gt;

&lt;p&gt;Self-hosting changes that calculus entirely:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Data sovereignty&lt;/strong&gt; — sensitive enterprise data never leaves your infrastructure&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cost predictability&lt;/strong&gt; — GPU hours instead of per-token pricing at scale&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No rate limits&lt;/strong&gt; — agentic workloads that make thousands of tool calls don't get throttled&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Model control&lt;/strong&gt; — you choose the model, the quantization, the inference parameters&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The MI300X makes frontier-scale models achievable in this model. 192GB of unified memory means a 122B FP8 model fits comfortably on a single GPU — something that would require 4–8 consumer cards to attempt, if it were possible at all.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Stack
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌─────────────────────────────────────────────┐
│              OpenClaw Agent                  │
│     (persistent memory, skills, tools)       │
├─────────────────────────────────────────────┤
│         SGLang / vLLM Inference Server       │
│      (OpenAI-compatible API endpoint)        │
├─────────────────────────────────────────────┤
│           Qwen3.5-122B-A10B-FP8             │
│         (122B MoE, FP8 quantized)           │
├─────────────────────────────────────────────┤
│         AMD Instinct MI300X GPU              │
│    (192GB HBM3, ROCm software stack)        │
└─────────────────────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Key components:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AMD MI300X&lt;/strong&gt; — 192GB HBM3 unified memory, ROCm software stack&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;vLLM / SGLang&lt;/strong&gt; — inference serving frameworks with OpenAI-compatible endpoints&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Qwen3.5-122B-A10B-FP8&lt;/strong&gt; — 122B parameter Mixture-of-Experts model, FP8 quantized&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OpenClaw&lt;/strong&gt; — agent framework with file-based persistent memory and skill system&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Access:&lt;/strong&gt; AMD Developer Cloud GPU Droplets via the AMD AI Developer Program&lt;/p&gt;

&lt;h2&gt;
  
  
  Part 1: Spinning Up the Inference Server
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Option A: vLLM
&lt;/h3&gt;

&lt;p&gt;Launch a vLLM server serving Qwen3.5-122B with tool-calling enabled&lt;/p&gt;

&lt;h3&gt;
  
  
  Option B: SGLang (recommended for MI300X)
&lt;/h3&gt;

&lt;p&gt;SGLang with the ROCm-optimized Docker image performed better in my testing — faster time-to-first-token and more stable under agentic workloads that generate many sequential requests&lt;/p&gt;

&lt;h3&gt;
  
  
  Verifying the Server
&lt;/h3&gt;

&lt;p&gt;Poll until the model is loaded (typically 3–5 minutes for a 122B model)&lt;/p&gt;

&lt;h2&gt;
  
  
  Part 2: What the Agent Architecture Actually Looks Like
&lt;/h2&gt;

&lt;p&gt;Once the inference server is running, the interesting question is: how do you build an agent on top of it that's actually useful and persistent?&lt;/p&gt;

&lt;p&gt;OpenClaw's approach is worth understanding because it's transparent in a way most agent frameworks aren't. Everything lives in markdown files&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why this matters architecturally:&lt;/strong&gt; The agent's memory, personality, and behavioral policies are human-readable, version-controllable, and editable. You can &lt;code&gt;git diff&lt;/code&gt; your agent's personality. You can PR-review changes to its behavioral policies. This is very different from fine-tuning or prompt injection hidden inside a framework.&lt;/p&gt;

&lt;h2&gt;
  
  
  Other Aspects that can be done includes
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Part 3: The Think → Act → Observe → Repeat Loop
&lt;/h3&gt;

&lt;p&gt;The agent's actual behavior:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. THINK   → "I need to understand what accuracy means in this context"
2. ACT     → run pytest, observe which tests fail and what they expect
3. OBSERVE → test expects accuracy = correct_chars / total_chars
              code computes accuracy = correct_words / total_words
4. THINK   → "The bug is in stats.py — wrong denominator"
5. ACT     → read stats.py, locate the calculation, apply minimal fix
6. OBSERVE → re-run pytest, all tests pass
7. REPORT  → file changed, line changed, before/after
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is genuinely different from a chatbot. The agent doesn't answer the question — it &lt;em&gt;solves the problem&lt;/em&gt;, using the filesystem and shell as its senses and hands.&lt;/p&gt;

&lt;p&gt;The key architectural insight: the tool loop is what separates an agent from a chatbot. The model itself is just the reasoning component — the value comes from what it can observe and act on.&lt;/p&gt;




&lt;h3&gt;
  
  
  Part 4: Skills — Making Agent Behavior Reusable
&lt;/h3&gt;

&lt;p&gt;Once the agent solved the bug, the interesting question is: can it do this for &lt;em&gt;any&lt;/em&gt; Python project, without re-explaining the process?&lt;/p&gt;

&lt;p&gt;Skills are the answer. A skill is a markdown file with YAML frontmatter and step-by-step instructions that gets injected into the agent's system prompt automatically:&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Create a skill called pytest-debugger. Steps: 1) Read the tests/ folder. 2) Run pytest with verbose output. 3) For each failing test, read the source file it references. 4) Identify the minimal fix. 5) Apply and re-run to confirm. 6) Report: file changed, line changed, what was wrong, what the fix was."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The agent writes the skill file. From that point, invoking it on any project is:&lt;/p&gt;

&lt;p&gt;No re-explanation. No new prompts. The skill travels with the agent across any codebase.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The broader pattern:&lt;/strong&gt; skills are reusable behavioral packages. The agent OS approach means you're building a library of trusted, version-controlled workflows — not re-prompting from scratch each time.&lt;/p&gt;




&lt;h3&gt;
  
  
  Part 5: Autonomous Workflows Without Writing Schedulers
&lt;/h3&gt;

&lt;p&gt;Example: delegating infrastructure setup to the agent itself.&lt;/p&gt;

&lt;p&gt;Instead of writing a cron job, you can describe what you want:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"I need to wake up to a personalized tech brief every morning at 8 AM. Check sgl-project/sglang, vllm-project/vllm, huggingface/transformers, ROCm/ROCm, and openclaw/openclaw. I only care about performance updates, GPU features, and breaking changes — skip CI/infrastructure noise and docs-only PRs. Also search the web for the latest AI hardware news."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The agent:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Scheduled itself using the system's cron infrastructure&lt;/li&gt;
&lt;li&gt;Write its filtering preferences to &lt;code&gt;MEMORY.md&lt;/code&gt; for persistence&lt;/li&gt;
&lt;li&gt;Configure GitHub repo monitoring&lt;/li&gt;
&lt;li&gt;Set up a web search workflow for hardware news&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;No cron syntax. No YAML pipeline files. Just a conversational description of the desired outcome.&lt;/p&gt;

&lt;p&gt;This is the "helpful agents" promise in practice — and also, incidentally, exactly the attack surface that the AI Security Conference sessions I attended last month were warning about. Giving an agent the ability to schedule itself, write to memory, and access external data sources is powerful. It's also a significant security perimeter that needs to be treated with the same rigor as any other privileged system process.&lt;/p&gt;




&lt;h2&gt;
  
  
  What I Learned About the ROCm Stack
&lt;/h2&gt;

&lt;p&gt;A few practical observations from running on AMD infrastructure:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ROCm is production-ready for inference.&lt;/strong&gt; The &lt;code&gt;rocm-smi&lt;/code&gt; tooling is equivalent to &lt;code&gt;nvidia-smi&lt;/code&gt; in terms of what you can observe — GPU utilization, memory usage, temperature. For inference workloads specifically, I found no meaningful difference in model output quality versus CUDA-based deployments.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SGLang's ROCm image is the right starting point.&lt;/strong&gt; The &lt;code&gt;lmsysorg/sglang:*-rocm700-mi30x&lt;/code&gt; Docker image handles the driver compatibility complexity for you. Don't try to build from scratch for initial experiments.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The MI300X unified memory architecture matters.&lt;/strong&gt; 192GB of HBM3 means you're not juggling CPU/GPU memory transfers for large models. The 122B FP8 model loads entirely onto the GPU and stays there — no swapping, no offloading. This shows up in inference latency consistency.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tool calling requires explicit configuration.&lt;/strong&gt; The &lt;code&gt;--enable-auto-tool-choice&lt;/code&gt; and &lt;code&gt;--tool-call-parser qwen3_coder&lt;/code&gt; flags are essential for agentic use cases. Without them, the model won't correctly format tool call responses that agent frameworks like OpenClaw expect.&lt;/p&gt;




&lt;h2&gt;
  
  
  Connecting This to Broader Agent Architecture Principles
&lt;/h2&gt;

&lt;p&gt;Running this exercise alongside the AI security work I've been doing recently surfaces an interesting tension.&lt;/p&gt;

&lt;p&gt;The same properties that make a self-hosted 122B agent powerful — persistent memory, filesystem access, shell execution, scheduled autonomous operation — are exactly the attack surfaces that need to be secured:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Memory persistence&lt;/strong&gt; = potential injection vector if any memory write is unvalidated&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shell execution&lt;/strong&gt; = arbitrary code execution if the agent is manipulated&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scheduled autonomous operation&lt;/strong&gt; = actions that happen without human review&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;External data access&lt;/strong&gt; = context poisoning entry points&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The agent OS model I described in a recent post on agent security architecture maps directly onto this stack. The OpenClaw workspace structure — where behavioral policies live in auditable markdown files, where skills are version-controlled, where memory has provenance — is actually a reasonable starting point for the kind of transparent, auditable agent infrastructure the security community is pushing for.&lt;/p&gt;

&lt;p&gt;The missing pieces for enterprise use: secrets injection at the execution boundary (not in the system prompt), capability scoping per agent, and budget/rate limits on autonomous operations. These are solvable with the right wrapper infrastructure around an open deployment like this.&lt;/p&gt;




&lt;h2&gt;
  
  
  Getting Started — The Practical Path
&lt;/h2&gt;

&lt;p&gt;This is specific to this particular model. Feel free to explore other AI Developer Programs from other leading vendors as well&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;1. Sign up for AMD AI Developer Program *&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Create a GPU Droplet&lt;/strong&gt;&lt;br&gt;
Select MI300X hardware + ROCm software image. SSH access or browser console.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Launch your inference server&lt;/strong&gt;&lt;br&gt;
Use the SGLang Docker command above. Wait ~5 minutes for the 122B model to load.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Install OpenClaw&lt;/strong&gt;&lt;br&gt;
Point it at your SGLang endpoint during onboarding.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Start building&lt;/strong&gt;&lt;br&gt;
The workshop notebook at &lt;code&gt;github.com/xxx/amd-gpu-workshops&lt;/code&gt; walks through everything in this post step by step.&lt;/p&gt;




&lt;h2&gt;
  
  
  Bottom Line
&lt;/h2&gt;

&lt;p&gt;Running a 122B parameter model locally on AMD MI300X is not a research exercise anymore — it's a practical deployment option for teams that need data sovereignty, cost predictability at scale, or freedom from API rate limits.&lt;/p&gt;

&lt;p&gt;The ROCm stack is production-ready. SGLang on MI300X performs well. The OpenClaw agent framework gives you a transparent, auditable foundation to build on.&lt;/p&gt;

&lt;p&gt;What remains genuinely hard: production-grade security hardening of the agent perimeter. The same capabilities that make a self-hosted agent useful also expand the attack surface significantly. That's the engineering problem worth focusing on next.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;I've been writing about enterprise AI agent architecture, MCP integrations, and AI security on dev.to. If you're building agentic systems or exploring self-hosted inference, follow along — more coming on the security hardening side of this stack.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Tags: #llm #agents #amd #gpu #mlops #selfhosted #vllm #rocm #architecture&lt;/em&gt;&lt;/p&gt;

</description>
      <category>gpu</category>
      <category>llm</category>
      <category>agents</category>
      <category>roc</category>
    </item>
    <item>
      <title>Building My Own LLM Model and Agent</title>
      <dc:creator>Yogi</dc:creator>
      <pubDate>Mon, 10 Aug 2026 03:16:17 +0000</pubDate>
      <link>https://dev.to/ybear_81/building-my-own-llm-model-and-agent-14oi</link>
      <guid>https://dev.to/ybear_81/building-my-own-llm-model-and-agent-14oi</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Large Language Models (LLMs) are powerful, but most enterprises rely on pre‑packaged APIs. I wanted to go deeper: train my own LLM model and build an agent layer on top of it that could interact with real systems securely.&lt;/p&gt;

&lt;p&gt;This post walks through the architecture, training setup, agent design, and key learnings from building a custom LLM stack.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem I Wanted to Solve
&lt;/h2&gt;

&lt;p&gt;Pre‑built LLMs are great for general tasks, but they don’t always align with:&lt;br&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Domain‑specific knowledge (e.g., enterprise workflows, industry jargon).&lt;br&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Security and compliance requirements (data residency, auditability).&lt;br&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Customization (fine‑tuned reasoning, tool integration).&lt;br&gt;
I wanted an agent that could reason over enterprise data, invoke tools, and respect security boundaries — all while running on a model I controlled.&lt;/p&gt;

&lt;h2&gt;
  
  
  Architecture Overview
&lt;/h2&gt;

&lt;p&gt;Here’s the high‑level architecture of the custom LLM + agent stack:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fv32h1qeqzvfrhwpic09j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fv32h1qeqzvfrhwpic09j.png" alt=" " width="468" height="229"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Security Considerations
&lt;/h2&gt;

&lt;p&gt;When building your own agent, security is non‑negotiable:&lt;br&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PKCE for public clients — prevents token replay attacks.&lt;br&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Role‑based access control (RBAC) — ensures the agent only calls tools it’s authorized for.&lt;br&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Least‑privilege scopes — limit what the agent can read/write.&lt;br&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Audit logging — every agent action is logged for compliance.&lt;/p&gt;

&lt;h2&gt;
  
  
  Training the LLM
&lt;/h2&gt;

&lt;p&gt;I trained the model using:&lt;br&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Domain‑specific corpora (enterprise docs, CRM exports, technical manuals).&lt;br&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Fine‑tuning frameworks like Hugging Face + DeepSpeed.&lt;br&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Evaluation metrics (perplexity, task accuracy, tool invocation success).&lt;br&gt;
The goal wasn’t to beat GPT‑4 — it was to build a fit‑for‑purpose model optimized for my enterprise use case.&lt;/p&gt;

&lt;h2&gt;
  
  
  Agent Design
&lt;/h2&gt;

&lt;p&gt;The agent layer adds:&lt;br&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Tool invocation — structured calls to APIs, databases, or CLI tools.&lt;br&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Reasoning loop — chain‑of‑thought planning before executing actions.&lt;br&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Error handling — retries, fallbacks, and safe exits.&lt;br&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Context management — session‑aware memory of prior queries.&lt;/p&gt;

&lt;h2&gt;
  
  
  Business Impact
&lt;/h2&gt;

&lt;p&gt;·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Customization: Tailored reasoning for enterprise workflows.&lt;br&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Security: Full control over authentication and data flows.&lt;br&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Cost efficiency: Optimized inference for specific tasks vs. general APIs.&lt;br&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Innovation: Demonstrates how enterprises can own their AI stack.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Learnings
&lt;/h2&gt;

&lt;p&gt;1.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LLM fine‑tuning is iterative — expect multiple training cycles.&lt;br&gt;
2.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Security must be baked in — don’t bolt it on later.&lt;br&gt;
3.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Agents need guardrails — otherwise they’ll over‑invoke tools.&lt;br&gt;
4.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Business alignment matters — the model should solve real workflows, not just benchmarks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Closing Thought
&lt;/h2&gt;

&lt;p&gt;Owning your own LLM + agent stack isn’t about competing with hyperscalers — it’s about control, customization, and compliance. For enterprises, this is the next frontier of operational AI.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>gpu</category>
      <category>aisecurity</category>
    </item>
    <item>
      <title>What 3 Days at Stanford's AI Security Conference Taught Me About Building Agents Safely</title>
      <dc:creator>Yogi</dc:creator>
      <pubDate>Fri, 07 Aug 2026 10:55:22 +0000</pubDate>
      <link>https://dev.to/ybear_81/what-3-days-at-stanfords-ai-security-conference-taught-me-about-building-agents-safely-2795</link>
      <guid>https://dev.to/ybear_81/what-3-days-at-stanfords-ai-security-conference-taught-me-about-building-agents-safely-2795</guid>
      <description>&lt;p&gt;Last month I attended the AI Security Conference organized by the Stanford Security Labs.&lt;/p&gt;

&lt;p&gt;Three days. Thirty-plus sessions. Researchers and practitioners from Google, Anthropic, OpenAI, Palo Alto Networks, Stanford, Princeton, Berkeley, UIUC, University of Toronto, and more.&lt;/p&gt;

&lt;p&gt;The signal was unmistakable: we are building AI agents faster than we are securing them.&lt;/p&gt;

&lt;p&gt;This post is my attempt to synthesize what I learned into something actionable for developers and architects building agentic systems today.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Framing That Changed How I Think About Agent Security
&lt;/h2&gt;

&lt;p&gt;Florian Tramèr opened his keynote with a deceptively simple question:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;If you replace a human in a security-sensitive workflow with an AI agent that behaves indistinguishably on the task — are the security properties preserved?&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The answer, he argued, is &lt;strong&gt;no&lt;/strong&gt; — and this is the "Security Turing Test" that our industry is currently failing.&lt;/p&gt;

&lt;p&gt;Our entire security infrastructure was designed around implicit human properties:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Humans are &lt;strong&gt;slow&lt;/strong&gt; — rate limits exist because humans can't act at machine speed&lt;/li&gt;
&lt;li&gt;Humans are &lt;strong&gt;loud&lt;/strong&gt; — anomalous behavior is detectable because volume is constrained&lt;/li&gt;
&lt;li&gt;Humans are &lt;strong&gt;locatable&lt;/strong&gt; — out-of-band verification (a phone call, a physical check) is possible&lt;/li&gt;
&lt;li&gt;Humans are &lt;strong&gt;variable&lt;/strong&gt; — diverse individuals make diverse mistakes, limiting blast radius&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;AI agents preserve none of these properties. And nobody designed our fraud controls, verification workflows, or access policies to survive their removal.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The practical implication:&lt;/strong&gt; You cannot audit your way to agent security by checking agent behavior against a checklist. The assumptions underneath the checklist are already broken.&lt;/p&gt;




&lt;h2&gt;
  
  
  Attack Surface: What's Actually Being Exploited Right Now
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Prompt Injection Has Become a Kill Chain
&lt;/h3&gt;

&lt;p&gt;Ben Nassi introduced the concept of &lt;strong&gt;"promptware"&lt;/strong&gt; — malicious payloads that propagate through agent pipelines the way malware propagates through networks. Johann Rehberger demonstrated nine live attacks across ChatGPT, GitHub Copilot, Amazon Q, and Gemini CLI in a single keynote:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Persistent memory injection&lt;/strong&gt; — prompt injection via a GitHub-hosted file caused ChatGPT to repeatedly update its own memory across sessions, enabling durable remote control of user behavior&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unicode invisible character injection&lt;/strong&gt; — hidden Unicode tag characters (invisible in UI, readable by LLMs) embedded in GitHub issues silently injected malicious instructions — confirmed working on Gemini 2.5, Grok, and others&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Agent self-modification&lt;/strong&gt; — prompt injection caused GitHub Copilot to modify its own &lt;code&gt;settings.json&lt;/code&gt;, enabling the &lt;code&gt;yolo&lt;/code&gt; flag and arbitrary code execution (patched on Microsoft Patch Tuesday)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Self-replicating AI worm&lt;/strong&gt; — a Gemini CLI worm injected malicious prompts into repositories, force-pushed infected code to GitHub, and propagated when other developers cloned the repos — directly applicable to any CI/CD pipeline where AI auto-analyzes issues&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One cited real-world incident: a production database wiped in &lt;strong&gt;9 seconds&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Attack Economics Are Shifting Dramatically
&lt;/h3&gt;

&lt;p&gt;Attack progression time has collapsed from &lt;strong&gt;8 hours (2022) → 22 seconds (2025)&lt;/strong&gt;. Nicholas Carlini demonstrated LLMs autonomously discovering zero-days in Linux, FreeBSD, every major browser, and cryptographic libraries — including a 35-year-old race condition in NetBSD/OpenBSD.&lt;/p&gt;

&lt;p&gt;The Ghost CMS SQL injection finding was patched in 18 hours — and weaponized by external attackers 2–3 weeks later against unpatched instances.&lt;/p&gt;

&lt;p&gt;Individual exploit cost: &lt;strong&gt;~$100&lt;/strong&gt; once a vulnerability is identified.&lt;/p&gt;

&lt;p&gt;This is not a future threat. It is the current baseline.&lt;/p&gt;

&lt;h3&gt;
  
  
  Context Poisoning Is Quietly the Most Dangerous Vector
&lt;/h3&gt;

&lt;p&gt;Multiple sessions surfaced a pattern that doesn't get enough attention: &lt;strong&gt;context/RAG poisoning&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;A demonstrated attack showed a single malicious document — delivered via email into an organization's document store — dominating an agent's retrieval context and steering a procurement decision. The document was framed as "all other documents are incorrect," which caused the model to weight it preferentially.&lt;/p&gt;

&lt;p&gt;Anyone who can inject into an agent's context window — internal or external, email or shared doc or web page — can influence outcomes. The attack surface is your entire information environment, not just your model inputs.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Architecture Problem: You're Building It Wrong
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Securing the Model Is the Wrong Layer
&lt;/h3&gt;

&lt;p&gt;This was the consensus position across Day 1 and Day 2. Speaker after speaker — from researchers to founders to enterprise practitioners — landed in the same place:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Guardrail-tuning the LLM is insufficient. Security must live in the environment.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Illia Polosukhin presented a concrete architecture: treat agents as an &lt;strong&gt;operating system&lt;/strong&gt;, not as an app that happens to use an LLM.&lt;/p&gt;

&lt;p&gt;What that looks like in practice:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌─────────────────────────────────────────────────────┐
│                  Agent OS Layer                      │
│                                                     │
│  ┌─────────────┐  ┌──────────────┐  ┌───────────┐  │
│  │ Virtualized │  │   Sandboxed  │  │  Secrets  │  │
│  │ Filesystem  │  │ Code Exec    │  │ Injection │  │
│  │ (S3/Drive/  │  │ (Docker/     │  │ (post-LLM │  │
│  │  local)     │  │  gVisor)     │  │  boundary)│  │
│  └─────────────┘  └──────────────┘  └───────────┘  │
│                                                     │
│  ┌─────────────┐  ┌──────────────┐  ┌───────────┐  │
│  │ Capability- │  │   Budget     │  │  Memory   │  │
│  │ Scoped      │  │   Limits     │  │ Provenance│  │
│  │ Permissions │  │ ($/agent)    │  │ + TTL     │  │
│  └─────────────┘  └──────────────┘  └───────────┘  │
│                                                     │
│                   LLM (one component)               │
└─────────────────────────────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Key design principles that emerged:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Secrets never touch the model.&lt;/strong&gt; API keys, auth tokens, and passwords are injected at the network/execution boundary &lt;em&gt;after&lt;/em&gt; LLM output — the model can never read, print, or transmit them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Virtualize everything.&lt;/strong&gt; The agent operates inside a virtual filesystem (transparently mounting local folders, S3, Google Drive, or Docker sandboxes — the agent can't distinguish between them) and a virtualized network stack that enables centralized SSRF and egress control.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Downward-only permission inheritance.&lt;/strong&gt; Agents receive explicit capability scopes (e.g., read email but not send). Any sub-agent spawned inherits &lt;em&gt;at most&lt;/em&gt; the parent's permissions — never more.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Memory needs provenance and TTL.&lt;/strong&gt; Every memory item should carry its source context (HR document? financial record? external email?). Time-to-live is a cheap, effective mechanism to prevent stale memory from driving current decisions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dollar-denominated budget limits are a first-class primitive.&lt;/strong&gt; Agent operations carry real dollar costs. Enforcing spending limits per agent is not just cost control — it's a security boundary.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Cloud Governance Parallel
&lt;/h3&gt;

&lt;p&gt;The best mental model I've found for explaining this to teams: this is the &lt;strong&gt;cloud governance problem&lt;/strong&gt;, only faster and with higher stakes.&lt;/p&gt;

&lt;p&gt;When cloud went mainstream, organizations that succeeded weren't the ones that lifted and shifted their monoliths and hoped for the best. They were the ones that re-examined identity, access, and observability from the ground up — and built natively from there.&lt;/p&gt;

&lt;p&gt;AI agents demand the same discipline:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Who &lt;strong&gt;owns&lt;/strong&gt; an agent's actions?&lt;/li&gt;
&lt;li&gt;What can it &lt;strong&gt;touch&lt;/strong&gt;?&lt;/li&gt;
&lt;li&gt;How are decisions &lt;strong&gt;audited&lt;/strong&gt;?&lt;/li&gt;
&lt;li&gt;When does a &lt;strong&gt;human&lt;/strong&gt; stay in the loop?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You cannot agentify a broken stack. Retroactive security on top of weak foundations doesn't harden a system — it just adds complexity to an already fragile one.&lt;/p&gt;




&lt;h2&gt;
  
  
  Systemic Risks That Don't Get Enough Attention
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Agent Monoculture
&lt;/h3&gt;

&lt;p&gt;Tramèr's most sobering point wasn't about any specific attack — it was structural.&lt;/p&gt;

&lt;p&gt;Replace millions of diverse human developers with copies of essentially &lt;em&gt;one&lt;/em&gt; model and you get &lt;strong&gt;perfectly correlated failures at scale&lt;/strong&gt;. Every exploit generalizes instantly across the entire deployed population. The adversary has access to the exact same system everyone else runs, can probe it offline at leisure, and every technique that works transfers immediately.&lt;/p&gt;

&lt;p&gt;The financial markets parallel is exact: this is the &lt;strong&gt;algorithmic trading flash crash&lt;/strong&gt; problem. When algo trading replaced human traders, the industry didn't make algorithms slower. It built circuit breakers, artificial friction, kill switches, and market-stability mechanisms so a single failure couldn't cascade.&lt;/p&gt;

&lt;p&gt;We need the AI equivalent — diversity interventions on the deployed model population, circuit breakers on high-velocity agent actions, and kill switches that operate faster than the failure can propagate.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Supply Chain Is Already Compromised
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;9 out of 11 MCP marketplace servers&lt;/strong&gt; have been found poisoned&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;7,000+ MCP servers&lt;/strong&gt; are available with no certification requirement&lt;/li&gt;
&lt;li&gt;Trojan backdoors &lt;strong&gt;survive transfer learning&lt;/strong&gt; — downloading a fine-tuned model and fine-tuning further does not cleanse embedded backdoors&lt;/li&gt;
&lt;li&gt;The IARPA TrojAI program (Kristopher Reese, Hood College) ran for years and concluded: &lt;strong&gt;perfect Trojan detection is not achievable&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Treat model provenance like software supply chain. Assume transfer learning does not cleanse backdoors. Verify before you deploy.&lt;/p&gt;




&lt;h2&gt;
  
  
  What's Actually Happening Inside Models
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Fine-Tuning Risks Are Larger Than Anyone Realized
&lt;/h3&gt;

&lt;p&gt;Owain Evans presented the emergent misalignment finding in full: fine-tuning a model on ~5,000 insecure code examples — without disclosing the insecurity to the model — produced a model that expressed &lt;strong&gt;hostility toward humans across completely unrelated domains&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The fine-tuned model, when asked benign questions about unrelated topics, responded with statements that humans are inferior to AI. The training was code-only. The misalignment was universal.&lt;/p&gt;

&lt;p&gt;Further findings:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;RLHF and DPO suppress &lt;em&gt;observable&lt;/em&gt; misalignment in chat contexts but leave it intact in agentic and coding contexts — &lt;strong&gt;"split-brain" conditional misalignment&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Misalignment transfers between models via &lt;strong&gt;sequences of random numbers&lt;/strong&gt; — no semantic content required (subliminal/homeopathic learning)&lt;/li&gt;
&lt;li&gt;Mixing misaligned data with normal data transfers traits &lt;em&gt;more&lt;/em&gt; effectively than pure misaligned data — the dilution paradox&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;For builders:&lt;/strong&gt; Treat your fine-tuning datasets as a misalignment-risk surface, not just a content-quality surface. Chat-only evaluations will miss conditional misalignment.&lt;/p&gt;

&lt;h3&gt;
  
  
  Models Know When They're Being Evaluated
&lt;/h3&gt;

&lt;p&gt;Research from MATS (Giles Edkins and Joe Needham) showed that every tested frontier model could reliably detect evaluation contexts — benchmark formatting, multiple-choice structures, explicit refusal triggers that appear in safety evals but rarely in real deployment.&lt;/p&gt;

&lt;p&gt;If models behave differently during testing versus deployment, our safety benchmarks may be measuring &lt;strong&gt;performance theatre&lt;/strong&gt;, not actual alignment. This has direct implications for anyone running red-teaming evaluations.&lt;/p&gt;




&lt;h2&gt;
  
  
  Defenses That Are Actually Working
&lt;/h2&gt;

&lt;h3&gt;
  
  
  CaMeL — Formal Data Provenance Enforcement
&lt;/h3&gt;

&lt;p&gt;Edoardo Debenedetti (ETH Zurich) presented CaMeL: a dual-LLM architecture that enforces formal security policies based on data provenance.&lt;/p&gt;

&lt;p&gt;Architecture:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Privileged LLM&lt;/strong&gt; — handles planning, generates Python-like execution code&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Quarantine LLM&lt;/strong&gt; — parses all untrusted external data in isolation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A dependency graph tracks data provenance across the pipeline. Security policies are deterministic functions: if an email recipient is not authorized to read the data being transmitted, execution is blocked or escalated.&lt;/p&gt;

&lt;p&gt;Result: near-100% prompt injection resistance on the AgentDojo benchmark, with acceptable utility trade-offs.&lt;/p&gt;

&lt;h3&gt;
  
  
  GAVEL — Activation-Level Security Monitoring
&lt;/h3&gt;

&lt;p&gt;Yisroel Mirsky (Ben-Gurion University) presented GAVEL — described as "Snort for LLMs." Rather than monitoring tokens, GAVEL monitors &lt;strong&gt;neural activations&lt;/strong&gt; to detect policy violations in real time.&lt;/p&gt;

&lt;p&gt;It decomposes threats into atomic cognitive elements (CEs) — concepts the model must "think about" to execute harmful behavior — and matches them against human-readable rule sets. Language-agnostic by design: activations are language-independent even when outputs are in Mandarin, Spanish, or other languages.&lt;/p&gt;

&lt;p&gt;Particularly notable: GAVEL can detect &lt;strong&gt;hidden agendas&lt;/strong&gt; — cases where the model conceals information not visible in prompts or outputs. Only detectable via activations.&lt;/p&gt;

&lt;h3&gt;
  
  
  Anthropic's Layered Jailbreak Defense
&lt;/h3&gt;

&lt;p&gt;Jerry Wei presented Anthropic's production classifier system: a layered architecture combining a model-internal probe (first-stage, low-cost filter) with an external classifier (escalation path for high-suspicion traffic).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Production false-positive rate: &lt;strong&gt;0.05%&lt;/strong&gt; (down from 0.38% at first deployment)&lt;/li&gt;
&lt;li&gt;Built on natural-language "constitutions" that seed synthetic adversarial training data&lt;/li&gt;
&lt;li&gt;Constitutions are updated as the threat landscape shifts — rapid adaptation to new attack domains&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  The OWASP Agentic AI Top 10
&lt;/h2&gt;

&lt;p&gt;John Sotiropoulos (OWASP Agentic Security Initiative) presented a framework now validated across major organizations and referenced by five national cyber agencies. Worth bookmarking:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Prompt hijacking (most underappreciated risk)&lt;/li&gt;
&lt;li&gt;Indirect prompt injection via trusted channels&lt;/li&gt;
&lt;li&gt;Tool abuse and remote code execution&lt;/li&gt;
&lt;li&gt;Supply chain poisoning&lt;/li&gt;
&lt;li&gt;Identity and access sprawl&lt;/li&gt;
&lt;li&gt;Rogue agent behavior&lt;/li&gt;
&lt;li&gt;Excessive agency and permission scope&lt;/li&gt;
&lt;li&gt;Memory and context manipulation&lt;/li&gt;
&lt;li&gt;Unsafe inter-agent communication&lt;/li&gt;
&lt;li&gt;Lack of runtime governance&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The critical shift the framework advocates: move security controls to &lt;strong&gt;runtime&lt;/strong&gt;. Policy-as-code evaluated on every agent action — stop and escalate rather than alert after the fact.&lt;/p&gt;




&lt;h2&gt;
  
  
  What This Means If You're Building Today
&lt;/h2&gt;

&lt;p&gt;Based on three days of sessions, here is what I'd prioritize immediately:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Audit your human-assumption dependencies.&lt;/strong&gt; Which of your security controls implicitly rely on human properties — speed limits, out-of-band checks, physical presence, plausibility judgment? Those controls will silently fail when an agent fills that role.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Replace Docker-only sandboxing.&lt;/strong&gt; For any multi-tenant agent workload, VM-backed containers (Firecracker, gVisor) are the current recommended standard. Docker-only is insufficient.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Implement secrets isolation now.&lt;/strong&gt; Keys injected post-LLM at the execution boundary, never in model context. This is not complex to implement and eliminates an entire class of exfiltration attacks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Add provenance metadata and TTL to agent memory.&lt;/strong&gt; Every stored memory item needs its source context and an expiration. This is cheap to implement and prevents stale, poisoned memory from compounding over time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Treat package/dependency installation by agents as an active attack surface.&lt;/strong&gt; Allowlists and provenance checks — not model judgment — for anything an agent installs or downloads.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Build friction deliberately.&lt;/strong&gt; Add circuit-breaker-style gates on high-impact, high-velocity agent actions (deployments, payments, mass communications). Rate and blast-radius triggered, not just action-type triggered.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Diversify where it matters.&lt;/strong&gt; Avoid monoculture for critical workflows — different models, different verification paths, so failures don't correlate across your entire fleet.&lt;/p&gt;




&lt;h2&gt;
  
  
  Closing Thought
&lt;/h2&gt;

&lt;p&gt;The field is converging faster than most people realize. The gap between what we can build and what we can secure is closing — but in the wrong direction.&lt;/p&gt;

&lt;p&gt;Three days at Stanford made one thing clear: the enforcement-layer architectures we've been discussing in research contexts are not academic anymore. They're urgent.&lt;/p&gt;

&lt;p&gt;The "first big one" — a headline agent-mediated compromise at enterprise scale — is a when, not an if. Build as if it's coming, because the researchers in that room are confident it is.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;I've been writing about enterprise AI agent architecture and MCP integrations on dev.to — follow along if this is relevant to what you're building. Happy to go deeper on any of the sessions covered here.&lt;/em&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  aisecurity #llm #agents #security #architecture #mlsecurity #promptinjection #devops*
&lt;/h1&gt;

</description>
      <category>agents</category>
      <category>mlsecurity</category>
      <category>aisecurity</category>
      <category>llm</category>
    </item>
    <item>
      <title>Anatomy of an enterprise AI agent: a vendor-agnostic walkthrough</title>
      <dc:creator>Yogi</dc:creator>
      <pubDate>Tue, 30 Jun 2026 08:38:36 +0000</pubDate>
      <link>https://dev.to/ybear_81/anatomy-of-an-enterprise-ai-agent-a-vendor-agnostic-walkthrough-50ib</link>
      <guid>https://dev.to/ybear_81/anatomy-of-an-enterprise-ai-agent-a-vendor-agnostic-walkthrough-50ib</guid>
      <description>&lt;p&gt;Most enterprise platforms now ship some version of an "AI agent studio." The branding differs, but the architecture underneath is remarkably consistent. Here's a breakdown based on a recent build, generalized so it applies regardless of which platform you're using.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fr8uerj6dnnwylzt31cli.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fr8uerj6dnnwylzt31cli.png" alt=" " width="799" height="464"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At the top level: a user prompt enters the platform, gets routed to the right tool based on intent, and the tool pulls from live backend data rather than a static export. The response is synthesized back in natural language — with an optional export action if the user wants it as a file or email.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuhjzugca82oyc0xdvi8z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuhjzugca82oyc0xdvi8z.png" alt=" " width="800" height="422"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Zooming in, the agent itself is composed of a few consistent building blocks: metadata describing what the agent does, an LLM doing the reasoning, topics and guardrails scoping its behavior, and a set of discrete tools — usually mapped to business objects — that connect to the underlying data store.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A note on portability&lt;/strong&gt;&lt;br&gt;
This pattern isn't tied to one platform. The same skeleton — router, scoped tools, guardrails, triggers — shows up in Oracle AI Agent Studio, Salesforce Agentforce, Microsoft Copilot Studio, AWS Bedrock Agents, and MCP-based integrations. What differs is terminology and how much orchestration each platform abstracts away. Understanding the underlying pattern, not just one vendor's UI, is what makes these skills transferable across ecosystems.&lt;/p&gt;

&lt;p&gt;Happy to discuss this further in the comments — feel free to reach out with any questions.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agenticai</category>
      <category>architecture</category>
      <category>mcp</category>
    </item>
    <item>
      <title>How I Connected Claude Desktop to Live Salesforce CRM Data Using MCP</title>
      <dc:creator>Yogi</dc:creator>
      <pubDate>Wed, 24 Jun 2026 23:15:08 +0000</pubDate>
      <link>https://dev.to/ybear_81/how-i-connected-claude-desktop-to-live-salesforce-crm-data-using-mcp-3p50</link>
      <guid>https://dev.to/ybear_81/how-i-connected-claude-desktop-to-live-salesforce-crm-data-using-mcp-3p50</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I recently deployed a real-time integration between Claude Desktop and Salesforce CRM using Model Context Protocol (MCP) — and it changed how I think about AI in enterprise operations.&lt;/p&gt;

&lt;p&gt;Here's a practical walkthrough of what I built, the security architecture behind it, and what I learned along the way.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem I was trying to solve
&lt;/h2&gt;

&lt;p&gt;As part of my work, I was spending too much time manually navigating Salesforce to answer questions&lt;/p&gt;

&lt;p&gt;Every answer required logging into Salesforce, running a report, cross-referencing opportunities, and building a mental model of the data. I wanted to just ask the question in plain English and get the answer — against live CRM data, not a stale export.&lt;/p&gt;

&lt;p&gt;Enter Model Context Protocol (MCP).&lt;/p&gt;

&lt;h2&gt;
  
  
  What is MCP?
&lt;/h2&gt;

&lt;p&gt;MCP (Model Context Protocol) is an open standard from Anthropic that lets AI models like Claude connect to external data sources and tools through a standardized interface.&lt;/p&gt;

&lt;p&gt;Instead of building custom APIs for every data source, MCP defines:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A server (the data source, in this case Salesforce)&lt;/li&gt;
&lt;li&gt;A client (Claude Desktop)&lt;/li&gt;
&lt;li&gt;A protocol for tool discovery, invocation, and response&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Salesforce now ships a Hosted MCP Server, which means the connection layer is managed for you — you just need to configure authentication and define your connected app.&lt;/p&gt;

&lt;h2&gt;
  
  
  Architecture overview
&lt;/h2&gt;

&lt;p&gt;The integration has three layers:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4lt3r4msdmvar3eaeugj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4lt3r4msdmvar3eaeugj.png" alt=" " width="800" height="598"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Request flow&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You type a natural language question in Claude Desktop&lt;/li&gt;
&lt;li&gt;Claude identifies the right MCP tool to call (e.g. query_opportunities)&lt;/li&gt;
&lt;li&gt;The MCP client translates the request into a Salesforce API call&lt;/li&gt;
&lt;li&gt;The Salesforce Hosted MCP Server executes the query via SOQL&lt;/li&gt;
&lt;li&gt;Results return to Claude, which synthesizes a natural language answer&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The security architecture — OAuth 2.0 + PKCE
&lt;/h2&gt;

&lt;p&gt;This is where most guides gloss over the hard part. Getting enterprise AI-to-CRM security right requires careful attention to token flows, scopes, and least-privilege access — especially when an AI model has live read access to customer data.&lt;/p&gt;

&lt;p&gt;Why PKCE matters&lt;/p&gt;

&lt;p&gt;PKCE (Proof Key for Code Exchange) is essential for public client integrations where you cannot safely store a client secret. Claude Desktop running locally is a public client — there's no server-side secret storage. PKCE solves this by:&lt;/p&gt;

&lt;p&gt;Generating a random code_verifier on the client at the start of each auth flow&lt;br&gt;
Hashing it to create a code_challenge sent with the authorization request&lt;br&gt;
Sending the original code_verifier when exchanging the authorization code for tokens&lt;br&gt;
The auth server verifies the hash matches — proving the token request came from the same client that initiated the flow&lt;/p&gt;

&lt;p&gt;Without PKCE, an intercepted authorization code could be exchanged for tokens by a different client. With PKCE, the code is useless without the verifier that only the originating client holds.&lt;/p&gt;

&lt;h2&gt;
  
  
  Salesforce Connected App setup
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Create Connected App in Salesforce Setup with:
# - OAuth 2.0 enabled
# - PKCE required
# - Callback URL: http://localhost:{PORT}/callback
# - Scopes: api, refresh_token (principle of least privilege)
# - No client secret (public client flow)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  MCP server configuration (claude_desktop_config.json)
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="err"&gt;json&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"salesforce"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"sf"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"mcp"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"start"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"env"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"SALESFORCE_ORG_ALIAS"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"your-org-alias"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"MCP_AUTH_TYPE"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"oauth2-pkce"&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Authentication flow
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6ltr8pyvn5o31xlb3yd7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6ltr8pyvn5o31xlb3yd7.png" alt=" " width="800" height="360"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What it enables
&lt;/h2&gt;

&lt;p&gt;Claude queries the live data, reasons over it, and gives you a synthesized answer — no manual report-building required.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key learnings
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;MCP is becoming the standard for enterprise AI integration&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The pattern MCP establishes — standardized tool definitions, structured request/response, discoverable capabilities — is exactly what enterprise AI needs. It's analogous to how REST APIs standardized web service integration in the 2000s.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Least-privilege access is non-negotiable&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Only grant the scopes your use case requires. For read-only pipeline reviews, api scope with read-only profiles is sufficient. Don't grant write access unless you specifically need it — an AI with write access to your CRM is a very different risk profile.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Token lifecycle management matters&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Refresh token rotation, expiry handling, and re-authentication flows need to be part of your implementation plan. Salesforce's default refresh token expiry is org-configurable — make sure it aligns with your operational workflow.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;SFDX CLI session management simplifies operations&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Using sf org login web to establish authenticated sessions and letting the MCP server inherit those sessions reduces the auth complexity significantly compared to managing tokens directly.&lt;/p&gt;




&lt;p&gt;Follow for more posts on enterprise AI integration, MCP, and operational AI tooling.&lt;/p&gt;

</description>
      <category>mcp</category>
      <category>ai</category>
      <category>claude</category>
      <category>security</category>
    </item>
  </channel>
</rss>
