import Terminal from '../../components/Terminal.astro';
import Browser from '../../components/Browser.astro';
import ClaudeChat from '../../components/ClaudeChat.astro';
A few weeks ago, Anthropic gave Claude filesystem access. If you've used claude.ai recently, you've seen it - Claude can now write files, run Python, execute shell commands.
This wasn't just a feature. It was a bet on how agents should interact with the world.
If you're building an agent, you have two paths. **Path one: tools.** Want the agent to query a database? Build a tool. Search logs? Another tool. Transform data? Tool. Each one needs a schema, validation, error handling. Five actions means five tools. It doesn't scale.
**Path two: give it a terminal.** A bash shell is a meta-tool. One interface, infinite capability. The agent inherits everything the OS offers - Python, grep, awk, curl, the entire unix toolkit. Training data is abundant. The mental model is universal.
Anthropic chose path two. But if you give an agent unlimited OS access, you have a problem: containment. The agent can run arbitrary code. That code might be malicious, buggy, or just resource-hungry.
I was building an agent backend and...
import ChatSession from '../../components/ChatSession.astro';
I wanted a way to share Claude Code sessions in blog posts. Not screenshots. Not copy-pasted text. The actual terminal experience - dark background, tool calls, the whole thing.
This post is about building that. And it uses the component it describes.
## The idea
I was setting up this blog with Claude Code when the thought hit: what if I could embed these sessions directly?
<ChatSession session={[
{ role: "user", content: "my end goal is to be able to render chat like snapshots of this exact environment, so it should look like a terminal, lets brainstorm, any lib for that? should we just implement a component?" },
{ role: "assistant", content: "Good idea for an AI/agents blog. A few options:\n\nExisting libs:\n- termynal - lightweight, animated typing effect, but more for commands than chat\n- asciinema - full terminal recordings, but overkill for static snapshots\n- xterm.js - actual terminal emulator, way too heavy\n\nCustom component (my recommendation):\n- Build a simple Astro component that mimics the Claude Code look\n- Dark bg, monospace, styled user/assistant turns\n- Maybe tool calls get a different...
I'll be writing a lot about LLMs and agentic systems here. Before diving into the weeds, it's worth laying out the basic anatomy.
## The ingredients
An agentic system has a few core components:
**The LLM.** The reasoning engine. It takes context in, produces actions or text out. It doesn't remember anything between calls - every invocation starts fresh.
**The loop.** The agent runs in a loop: observe, think, act, repeat. The loop is what makes it "agentic" rather than just a single prompt-response.
**Tools.** Functions the agent can call to affect the world - read files, make API calls, run code. Without tools, the agent can only talk.
**Context window.** Everything the model can see at once. This is your working memory. It fills up fast.
**System prompt.** The instructions that shape behavior. This is where you define who the agent is and how it should act.
That's it. Everything else is scaffolding around these five things.
## The pulls and levers
When an agent misbehaves, you have a few places to intervene:
**System prompt.** The most obvious lever. You can add rules, examples, constraints. But there's a catch: instructions compete for attention. The more you add, the...
This is a meta post.
Right now, as I write this, I'm in a Claude Code session. Claude is helping me set up this blog, and now we're writing the first post together. That feels worth acknowledging.
The purpose of this blog is simple: a personal log for learnings and thoughts as I build and break stuff. No grand vision, no content strategy. Just notes from the trenches.
This blog is intended for builders. If you're here, you probably make things. You've probably broken things too. That's the territory.
More posts to come as I learn things worth sharing.