blog: Code Share — Deploy kagent with Agent Substrate#411
Conversation
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>
d1c3477 to
9e7433b
Compare
There was a problem hiding this comment.
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.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Sebastian Maniak <sebastian@maniak.io>
artberger
left a comment
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
| **[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. |
There was a problem hiding this comment.
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 | ||
|
|
||
| ``` |
There was a problem hiding this comment.
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>
);
}
|
|
||
| What you will run: | ||
|
|
||
| ``` |



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.