Skip to content

blog: Code Share — Deploy kagent with Agent Substrate#411

Merged
sebbycorp merged 2 commits into
mainfrom
blog-agent-substrate
Jul 13, 2026
Merged

blog: Code Share — Deploy kagent with Agent Substrate#411
sebbycorp merged 2 commits into
mainfrom
blog-agent-substrate

Conversation

@sebbycorp

Copy link
Copy Markdown
Collaborator

Add a hands-on guide by Sebastian Maniak for running kagent OSS wired to Agent Substrate on a kind cluster: the concepts (actors, workers, snapshots, suspend/resume), use cases, a one-shot setup path, and a manual Helm walkthrough. Includes kagent UI screenshots of the Agents view and the View → Substrate page, and points to the runnable code at sebbycorp/kagent-demos.

Add a hands-on guide by Sebastian Maniak for running kagent OSS wired to
Agent Substrate on a kind cluster: the concepts (actors, workers,
snapshots, suspend/resume), use cases, a one-shot setup path, and a
manual Helm walkthrough. Includes kagent UI screenshots of the Agents
view and the View → Substrate page, and points to the runnable code at
sebbycorp/kagent-demos.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Sebastian Maniak <sebastian@maniak.io>
@sebbycorp sebbycorp force-pushed the blog-agent-substrate branch from d1c3477 to 9e7433b Compare July 13, 2026 12:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new “Code Share” blog post describing how to deploy kagent OSS with Agent Substrate on a kind cluster, including concepts, use cases, and step-by-step setup (scripted and manual), with supporting screenshots.

Changes:

  • Adds a new MDX blog post with metadata, walkthrough, and troubleshooting section.
  • Updates the blog index page to include the new post in the internal posts list.

Reviewed changes

Copilot reviewed 2 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/blogContent/deploy-kagent-with-agent-substrate.mdx New long-form guide post (concepts + setup steps + screenshots/links).
src/app/blog/page.tsx Adds the new post entry to the blog listing.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/blogContent/deploy-kagent-with-agent-substrate.mdx Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Sebastian Maniak <sebastian@maniak.io>

@artberger artberger left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some formatting-related comments, but approved.


Agent sessions are bursty. A user asks a question, the agent thinks for a few seconds, then the session sits idle for minutes — or hours — waiting on the next turn. Plain Kubernetes handles this badly: an idle pod still books its CPU and memory, and a cold pod takes seconds to come back. Multiply that across thousands of conversations and you're paying for a lot of nothing.

**[Agent Substrate](https://github.com/agent-substrate/substrate)** flips the model. It decouples the *agent session* from the *pod*: idle sessions are checkpointed — full RAM and filesystem, via [gVisor](https://gvisor.dev/) — to object storage, the pod returns to a warm pool, and the session resumes **sub-second** on the next request, exactly where it left off. Think serverless scale-to-zero, but for *stateful* agents.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**[Agent Substrate](https://github.com/agent-substrate/substrate)** flips the model. It decouples the *agent session* from the *pod*: idle sessions are checkpointed — full RAM and filesystem, via [gVisor](https://gvisor.dev/) — to object storage, the pod returns to a warm pool, and the session resumes **sub-second** on the next request, exactly where it left off. Think serverless scale-to-zero, but for *stateful* agents.
**[Agent Substrate](https://github.com/agent-substrate/substrate)** flips the model. It decouples the *agent session* from the *pod*: idle sessions are saved to object storage (full RAM and filesystem, via [gVisor](https://gvisor.dev/)), the pod returns to a warm pool, and the session resumes **sub-second** on the next request, exactly where it left off. Think serverless scale-to-zero, but for *stateful* agents.


**[Agent Substrate](https://github.com/agent-substrate/substrate)** flips the model. It decouples the *agent session* from the *pod*: idle sessions are checkpointed — full RAM and filesystem, via [gVisor](https://gvisor.dev/) — to object storage, the pod returns to a warm pool, and the session resumes **sub-second** on the next request, exactly where it left off. Think serverless scale-to-zero, but for *stateful* agents.

**[kagent](https://kagent.dev)** is the Kubernetes-native agent control plane. Wire substrate in as its execution layer and a declarative `SandboxAgent` becomes a gVisor **actor** instead of a long-running Deployment.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason, the code ticks throughout still are rendered, probably some bug in the styling.

Image

@artberger artberger Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding this to the tailwind.config.ts file starting at L59 resolved the issue for me locally:

  		typography: {
  			DEFAULT: {
  				css: {
  					// The typography plugin wraps inline <code> in literal backtick
  					// characters via ::before/::after. We render our own styled
  					// <code>, so strip them.
  					'code::before': { content: '""' },
  					'code::after': { content: '""' }
  				}
  			}
  		}


### Actor lifecycle

```

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ASCII diagram doesn't render well:

Image

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the src/components/mdx/code-block.tsx file starting at L25, this fixed the rendering:

    const content = typeof children === 'string' ? children : String(children);
    // A fenced code block without a language (e.g. ASCII diagrams) has no
    // className but spans multiple lines. Render it in a real <pre> so
    // whitespace and newlines are preserved instead of collapsing to inline.
    if (content.includes('\n')) {
      return (
        <pre className="overflow-x-auto p-4 text-sm rounded-lg bg-muted font-mono text-foreground whitespace-pre">
          <code className="font-mono">{content.replace(/\n$/, '')}</code>
        </pre>
      );
    }
Image


What you will run:

```

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar comment on this diagram not rendering, works with the fix above.

Before
Image

After

Image

@sebbycorp sebbycorp merged commit 6332f9a into main Jul 13, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants