# March 13, 2026 Update

Since the [last update](/content/blog/march-6-2026-update/index.html), we shipped **5 releases** and **29 commits** across the SDK. This week we rethought how routing works, made every API endpoint self-documenting, and added live infrastructure monitoring. Let's get into it.

## Overview

- _Explicit routing_ with `createBaseApp` and an automated migration path
- _Auto-generated API reference_ covering 20+ services directly from source schemas
- _Infrastructure monitoring_ with real-time metrics via CLI
- _Stream management_ with namespace, delete, and search operations
- [And more!](/content/blog/march-13-2026-update#also-shipping/index.html)

## Explicit Routing

The SDK now supports explicit route composition through a new `createBaseApp` export. Instead of relying on file-based auto-discovery in `src/api/`, you declare your routers directly:

```
import { createApp } from '@agentuity/runtime';
import { Hono } from 'hono';

const api = new Hono();
api.get('/health', (c) => c.json({ status: 'ok' }));
api.post('/webhook', (c) => c.json({ received: true }));

export default createApp({
  router: [
    { path: '/api/v1', router: api },
  ],
});
```

You can pass a single Hono instance, a `{ path, router }` object, or an array of route mounts. All standard Agentuity middleware (CORS, OpenTelemetry, agent context) is applied to each mount automatically.

A migration utility detects existing file-based routes during `agentuity dev` and offers to consolidate them into a single explicit router. The migration runs in TTY sessions only, won't interrupt CI, and tracks state in `.agentuity/.route-migration-state`. File-based routing still works, but explicit routing is where we're headed.

This is the biggest architectural shift in the runtime since launch. Explicit routers are easier to test, compose, and reason about, especially for projects with versioned APIs or custom middleware stacks.

## Auto-Generated API Reference

Every Agentuity cloud service now has a complete, browsable [API reference](https://agentuity.dev/reference/api) generated directly from source-level Zod schemas. The docs site renders endpoint details, request/response shapes, and examples for 20+ services: KV, Vector, Streams, Queues, Email, Sandboxes, Tasks, Schedules, Webhooks, Database, and more.

A generation script imports `api-reference.ts` files co-located with each service's source code, then produces MDX pages with:

- Endpoint paths, methods, and descriptions
- Parameter tables with types and required/optional labels
- Response field documentation
- A region picker so you can see the correct base URL for your deployment

Because the reference is generated from the same schemas that validate requests at runtime, the docs stay accurate as the API evolves. No more drift between implementation and documentation.

We also dropped a [walkthrough of the SDK Explorer](/content/blog/sdk-explorer/index.html) this week, where we discuss how we've been thinking about documentation that works for both agents and humans. The API reference and the Explorer are two sides of the same coin: one for exhaustive endpoint lookup, the other for learning patterns through interactive demos.

## Infrastructure Monitoring

A new `agentuity cloud monitor` command streams live infrastructure metrics from your deployment machines:

```
# Live dashboard (streams continuously)
agentuity cloud monitor

# One-shot snapshot
agentuity cloud monitor --snapshot

# Only show distressed machines
agentuity cloud monitor --distressed

# Filter by machine or deployment
agentuity cloud monitor --machine <id>
agentuity cloud monitor --deployment <id>
```

The monitor tracks machine-level metrics (CPU usage, load averages, memory, swap, disk I/O, network interfaces) and per-container data (CPU throttling, memory limits, OOM kills, process count, health status). A capacity summary rolls these into composite scores for CPU, memory, disk, and network pressure.

Machine health is classified as `CONNECTED`, `STALE`, or `DISCONNECTED`, and the CLI streams state changes via WebSocket with automatic reconnection. This extends the [service analytics](/content/blog/february-27-2026-update#service-analytics/index.html) and [database query analytics](/content/blog/march-6-2026-update#database-query-analytics/index.html) from previous weeks, now you can see the machines themselves.

## Stream Management

[Durable Streams](/content/product/storage/index.html) gained three new operation groups:

**Namespaces** — list and inspect stream namespaces with aggregate counts, total size, and activity timestamps:

```
agentuity cloud stream namespaces
agentuity cloud stream namespace get <name>
```

**Delete** — remove individual streams or soft-delete an entire namespace:

```
agentuity cloud stream delete <id>
agentuity cloud stream namespace delete <name>
```

**Search** — full-text search across stream names, metadata, and headers with optional namespace scoping:

```
agentuity cloud stream search --keyword "events" --namespace "production"
```

These complement the existing stream create and read operations. If you've been using streams for audit logs or event sourcing, namespace-scoped search and cleanup make managing large stream volumes much more practical.

## Examples Update

The [examples repository](https://github.com/agentuity/examples) keeps growing:

- **[Research Agent](https://github.com/agentuity/examples/tree/main/features/research-agent)** — An autonomous research agent using the Anthropic SDK with native tool calling. It follows a plan-act-observe loop with Wikipedia search, article retrieval, and structured output.
- **[Claude Code Agent](https://github.com/agentuity/examples/tree/main/integrations/claude-code)** — Conversational code intelligence using the [Claude Agent SDK](https://docs.anthropic.com/en/docs/agents-sdk) with Agentuity [Sandboxes](/content/product/sandboxes/index.html) for safe code execution, multi-turn conversation history via `ctx.thread.state`, and a React chat UI.
- **[Mastra](https://mastra.ai/docs) examples now use native thread state** — The [agent-memory](https://github.com/agentuity/examples/tree/main/integrations/mastra/agent-memory), [network-agent](https://github.com/agentuity/examples/tree/main/integrations/mastra/network-agent), and [agent-approval](https://github.com/agentuity/examples/tree/main/integrations/mastra/agent-approval) examples use Agentuity's `ctx.thread.state` for conversation persistence instead of external storage dependencies.
- **[Web Explorer](https://github.com/agentuity/examples/tree/main/features/web-explorer)** — Now with better tool output nudges, form fill validation, site-specific hints, and a tool-call timeline with batch collapsing in the frontend.

## Also Shipping

**SDK and Runtime**

- **Sandbox connect, pause, and resume** — `client.connect(id)` retrieves a full interactive `SandboxInstance` from just an ID. `client.pause(id)` checkpoints a running [sandbox](/content/product/sandboxes/index.html) and `client.resume(id)` restores it, so paused containers retain state without consuming compute.
- **Bundle config for deployments** — `bundleConfig` in project settings lets you include extra files (assets, templates, data) in your deployment bundle alongside the compiled output.
- **Subtask count** — `TaskSchema` now includes a `subtask_count` field for tracking hierarchical task progress.
- **KV and Vector internal stats** — New `internal` field on stats schemas for platform-level usage visibility.
- **API versioning removed** — Deprecated versioning paths cleaned up from email and task services.

**CLI Improvements**

- **`--confirm` and `--force` for non-interactive mode** — `agentuity project import --confirm` runs without prompts, and `--force` works as an alias across all commands. Useful for CI/CD pipelines and scripted workflows.
- **Profile config fix** — The `--profile` flag now saves configuration back to the correct profile instead of the default.
- **Route migration guards** — Migration prompts only appear in TTY sessions and won't disrupt non-interactive environments.

**Coder Hub**

- **Richer session overlays** — Session summaries now include mode, observer count, sub-agent count, task count, and participant details. Sessions are bucketed into running, paused, provisioning, and history views.
- **Skills reference** — The hub tracks installed skills per session with repo, name, and URL metadata.
- **Todo tracking** — Open, in-progress, done, and closed item counts with granular state tracking per session.

**Bug Fixes**

- Better Auth duplicate package resolution breaking builds
- Sandbox subdirectory test reliability with keepalive checks and error diagnostics
- Duplicate assistant messages in remote TUI sessions

## Upgrade Now

```
agentuity upgrade
```

New to Agentuity? Get started in seconds:

```
curl -fsSL https://agentuity.sh | sh
```

Once you're upgraded:

- Try explicit routing with `createBaseApp` in your `app.ts`
- Browse the new [API reference](https://agentuity.dev/reference/api)
- Monitor your infrastructure with `agentuity cloud monitor`
- Search your streams with `agentuity cloud stream search`
