This skill should be used when the user asks "what is agent-runtime", "why use agent-runtime", "what does this repo do", "agent runtime architecture", "how does agent-runtime work", or needs to understand the purpose, value proposition, and high-level architecture of the @hhopkins/agent-runtime monorepo.
/plugin marketplace add hhopkins95/ai-systems/plugin install agent-service@hhopkins-agent-systemThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Agent Runtime is a general-purpose platform for launching arbitrary AI agent workloads on demand. It orchestrates AI agents (Claude via Agent SDK, OpenCode) in isolated Modal sandboxes, providing a Node.js backend runtime and React client library for building applications with AI agents.
Key principle: The runtime handles session management and agent orchestration - it does not enforce any data schema on the calling application. Data types are passed back to the app, which decides what to do with them.
The monorepo provides two packages:
| Package | Purpose |
|---|---|
@hhopkins/agent-runtime | Node.js backend runtime for orchestrating agents in Modal sandboxes |
@hhopkins/agent-runtime-react | React hooks and context for connecting to the runtime |
Agents execute in Modal sandboxes, not on the application server. This provides:
Real-time block-by-block streaming of agent output via WebSocket:
block_start - New block beginstext_delta - Incremental text updatesblock_update - Block metadata changesblock_complete - Block finishesBuilt-in session lifecycle with:
Supports multiple agent architectures:
Configure via AGENT_ARCHITECTURE_TYPE when creating sessions.
First-class React integration with hooks for:
┌─────────────────────────────────────────────────────────────┐
│ Client Application │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ AgentServiceProvider (React) │ │
│ │ ┌──────────────┐ ┌──────────────┐ ┌───────────┐ │ │
│ │ │useAgentSession│ │ useMessages │ │useFiles │ │ │
│ │ └──────────────┘ └──────────────┘ └───────────┘ │ │
│ └─────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘
│ REST API │ WebSocket
▼ ▼
┌─────────────────────────────────────────────────────────────┐
│ Backend Runtime │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ SessionManager │ │
│ │ ┌──────────────────────────────────────────────┐ │ │
│ │ │ AgentSession │ │ │
│ │ │ - Sandbox lifecycle │ │ │
│ │ │ - Transcript parsing │ │ │
│ │ │ - File watching │ │ │
│ │ │ - Periodic sync │ │ │
│ │ └──────────────────────────────────────────────┘ │ │
│ └─────────────────────────────────────────────────────┘ │
│ │ │
│ ┌────────────────────────┴────────────────────────────┐ │
│ │ PersistenceAdapter │ │
│ │ (Implemented by your application) │ │
│ └─────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ Modal Sandbox │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ Agent (Claude SDK or OpenCode) │ │
│ │ - Tools (Read, Write, Edit, Bash, Grep, Glob) │ │
│ │ - Skills │ │
│ │ - Subagents │ │
│ │ - MCP Servers │ │
│ └─────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘
A session represents a single agent conversation. Sessions are:
Agent output is parsed into typed blocks for rendering:
UserMessageBlock - User inputAssistantTextBlock - Agent text responseToolUseBlock - Tool invocationToolResultBlock - Tool outputThinkingBlock - Agent reasoning (if exposed)SystemBlock - System messagesSubagentBlock - Subagent invocationErrorBlock - Error informationConfiguration defining agent capabilities:
The main integration point between the runtime and application storage. Applications implement this interface to:
Good fit:
Consider alternatives if: