Skip to content
This repository was archived by the owner on Mar 25, 2026. It is now read-only.

Commit 6b8a5b5

Browse files
Add Claude Code plugin docs
1 parent 3d1fcc9 commit 6b8a5b5

11 files changed

Lines changed: 1234 additions & 91 deletions

File tree

content/Frontend/react-hooks.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,15 +356,15 @@ function ProtectedContent() {
356356

357357
## Analytics Hooks
358358

359-
Track user behavior and custom events with analytics hooks. See [Web Analytics](/Services/Observability/web-analytics) for full documentation.
359+
Track page views and custom events from React components. See [Web Analytics](/Services/Observability/web-analytics) for configuration, privacy options, and the full API.
360360

361361
```tsx
362362
import { useAnalytics, useTrackOnMount } from '@agentuity/react';
363363

364364
function ProductPage({ productId }: { productId: string }) {
365365
const { track, trackClick } = useAnalytics();
366366

367-
// Track page view on mount
367+
// Fires once when the component mounts
368368
useTrackOnMount({
369369
eventName: 'product_viewed',
370370
properties: { productId },
@@ -378,6 +378,8 @@ function ProductPage({ productId }: { productId: string }) {
378378
}
379379
```
380380

381+
A `withPageTracking` HOC is also available for class components or simpler page-level tracking.
382+
381383
## Next Steps
382384

383385
- [Provider Setup](/Frontend/provider-setup): Configure `AgentuityProvider` for deployments

content/Reference/CLI/build-configuration.mdx

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,108 @@ const apiUrl = import.meta.env.AGENTUITY_PUBLIC_API_URL;
9696
Public environment variables are bundled into frontend code and visible in the browser. Never put secrets or API keys in public variables.
9797
</Callout>
9898

99+
## Public Assets
100+
101+
Static files like images, fonts, and documents go in `src/web/public/`. Reference them with `/public/` paths in your frontend code.
102+
103+
```tsx
104+
// src/web/App.tsx
105+
export function App() {
106+
return (
107+
<div>
108+
<img src="/public/logo.svg" alt="Logo" />
109+
<link rel="icon" href="/public/favicon.ico" />
110+
</div>
111+
);
112+
}
113+
```
114+
115+
**How it works:**
116+
117+
- **Development:** Assets served via local proxy at `http://localhost:3500/public/*`
118+
- **Production:** Uploaded to CDN and paths rewritten to CDN URLs
119+
- **Build:** Vite plugin auto-corrects asset paths and warns about incorrect patterns
120+
121+
### File Structure
122+
123+
```
124+
src/web/public/
125+
├── logo.svg
126+
├── favicon.ico
127+
├── images/
128+
│ ├── hero.png
129+
│ └── thumbnail.jpg
130+
└── fonts/
131+
└── custom.woff2
132+
```
133+
134+
### Correct Path Patterns
135+
136+
Use `/public/` prefix for all static assets:
137+
138+
```tsx
139+
// Recommended - absolute path
140+
<img src="/public/logo.svg" />
141+
142+
// Also works - relative path
143+
<img src="./public/logo.svg" />
144+
145+
// Incorrect - references source path
146+
<img src="/src/web/public/logo.svg" />
147+
```
148+
149+
The build system automatically rewrites `/public/` paths to CDN URLs in production:
150+
151+
```tsx
152+
// Development
153+
<img src="/public/logo.svg" />
154+
155+
// Production (after build)
156+
<img src="https://cdn.agentuity.com/{deployment}/client/logo.svg" />
157+
```
158+
159+
### Using with CSS
160+
161+
Public assets work in CSS files:
162+
163+
```css
164+
/* src/web/styles.css */
165+
.hero {
166+
background-image: url('/public/images/hero.png');
167+
}
168+
169+
@font-face {
170+
font-family: 'Custom';
171+
src: url('/public/fonts/custom.woff2') format('woff2');
172+
}
173+
```
174+
175+
### Fetch API and Dynamic Paths
176+
177+
Reference public assets in JavaScript:
178+
179+
```typescript
180+
// Fetch text file
181+
const response = await fetch('/public/data.json');
182+
const data = await response.json();
183+
184+
// Dynamic image loading
185+
const theme = 'dark';
186+
const imagePath = `/public/images/logo-${theme}.png`;
187+
```
188+
189+
### Development Warnings
190+
191+
The build system warns about incorrect paths during development:
192+
193+
```
194+
Found incorrect asset path(s):
195+
- 'src/web/public/' should be '/public/'
196+
Use '/public/...' paths for static assets.
197+
```
198+
199+
Fix these warnings by updating paths to use the `/public/` prefix.
200+
99201
## Build Architecture
100202

101203
Agentuity uses a hybrid build system:
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
---
2+
title: Claude Code Plugin
3+
description: Install the Agentuity Coder plugin for Claude Code to get specialized agents with persistent memory.
4+
---
5+
6+
The Agentuity Coder plugin adds a team of specialized AI agents, persistent memory, and cloud service access to [Claude Code](https://code.claude.com/docs/en/overview). It runs as a native [Claude Code plugin](https://code.claude.com/docs/en/plugins) with event hooks, slash commands, and auto-activated skills.
7+
8+
## Installation
9+
10+
```bash
11+
# Via Agentuity CLI (recommended)
12+
agentuity ai claude-code install
13+
14+
# Via Claude Code marketplace
15+
/plugin marketplace add agentuity/sdk
16+
/plugin install agentuity-coder@agentuity
17+
```
18+
19+
<Callout type="info" title="Prerequisites">
20+
Requires [Claude Code](https://code.claude.com/docs/en/quickstart), [Agentuity CLI](https://agentuity.dev) (`agentuity auth login`), and [Bun](https://bun.sh/). The plugin works without the CLI, but memory and cloud features will be unavailable.
21+
</Callout>
22+
23+
## Slash Commands
24+
25+
| Command | Description |
26+
|---------|-------------|
27+
| `/agentuity-coder` | Run a task with the full agent team |
28+
| `/agentuity-cadence` | Start autonomous long-running task execution |
29+
| `/agentuity-cadence-cancel` | Cancel an active Cadence session |
30+
| `/agentuity-memory-save` | Save session context to cloud memory |
31+
| `/agentuity-memory-share` | Share content via Agentuity Cloud Streams |
32+
| `/agentuity-sandbox` | Run code in an isolated sandbox |
33+
34+
```
35+
/agentuity-coder implement dark mode for the settings page
36+
```
37+
38+
Agents also activate automatically based on context. You don't always need a slash command.
39+
40+
## Agents
41+
42+
Seven agents with distinct roles, each running on a model tier suited to their task:
43+
44+
| Agent | Role | Model |
45+
|-------|------|-------|
46+
| **Lead** | Orchestrator: plans, delegates, synthesizes | opus |
47+
| **Scout** | Explorer: codebase research, read-only | haiku |
48+
| **Builder** | Implementer: code changes, tests, builds | sonnet |
49+
| **Architect** | Autonomous implementer: complex multi-file work | opus |
50+
| **Reviewer** | Code reviewer: catches issues, verifies quality | sonnet |
51+
| **Memory** | Context manager: stores/recalls across sessions | haiku |
52+
| **Product** | Requirements owner: PRDs, feature planning | sonnet |
53+
54+
Lead handles delegation automatically. For most tasks, describe what you want and the right agents are chosen for you.
55+
56+
## Skills
57+
58+
The plugin includes auto-activated skills that inject Agentuity SDK expertise when relevant:
59+
60+
| Skill | Covers |
61+
|-------|--------|
62+
| **agentuity-backend** | `@agentuity/runtime`, `@agentuity/schema`, `@agentuity/drizzle`, `@agentuity/postgres`, `@agentuity/evals` |
63+
| **agentuity-frontend** | `@agentuity/react`, `@agentuity/auth`, `@agentuity/frontend`, `@agentuity/workbench` |
64+
| **agentuity-ops** | CLI commands, cloud services, deployments |
65+
| **agentuity-cloud** | Package routing, ecosystem overview |
66+
| **agentuity-command-runner** | Runtime detection, build/test/lint execution |
67+
68+
## Memory
69+
70+
Persistent context across sessions via Agentuity Cloud:
71+
72+
- **KV Storage** for structured data (patterns, decisions, corrections)
73+
- **Vector Storage** for semantic search over session history
74+
- **Entity-centric**: tracks users, orgs, projects, repos
75+
- **Branch-aware**: scopes memories to git branch context
76+
77+
Use `/agentuity-memory-save` after completing work to persist decisions and lessons learned.
78+
79+
## Cadence Mode
80+
81+
Cadence runs the agent team autonomously across multiple iterations until a task is complete:
82+
83+
```
84+
/agentuity-cadence build the auth system with OAuth, session management, and tests
85+
```
86+
87+
How it works:
88+
89+
1. A Stop hook intercepts session end and re-injects the task prompt
90+
2. Memory checkpoints at each iteration for recovery
91+
3. The loop continues until the agent signals completion or max iterations is reached (default: 50)
92+
93+
Use `--max-iterations N` to cap iterations (e.g., `/agentuity-cadence --max-iterations 10 build the auth system`).
94+
95+
Cancel with `/agentuity-cadence-cancel` or `Ctrl+C`.
96+
97+
## Hooks
98+
99+
The plugin registers event hooks that run automatically:
100+
101+
| Script | Event | What It Does |
102+
|--------|-------|--------------|
103+
| `session-start.sh` | SessionStart | Detects Agentuity project, org, user, and git context |
104+
| `session-end.sh` | SessionEnd | Saves session memory (immediate KV + async processing) |
105+
| `block-sensitive-commands.sh` | PreToolUse | Blocks access to secrets, API keys, auth tokens |
106+
| `pre-compact.sh` | PreCompact | Saves memory before context window compaction |
107+
| `cadence-stop.sh` | Stop | Keeps the Cadence loop running until task is done |
108+
| `stop-memory-save.sh` | Stop | Prompts memory save before session ends |
109+
110+
## Permissions
111+
112+
The install script configures Claude Code permissions in `~/.claude/settings.local.json`:
113+
114+
- **Allowed**: `agentuity cloud *` and `agentuity auth whoami *`
115+
- **Blocked**: `agentuity cloud secrets *`, `agentuity cloud secret *`, `agentuity cloud apikey *`, `agentuity auth token *`
116+
117+
Deny rules take precedence. The PreToolUse hook adds a second layer blocking sensitive commands before they reach the permission system.
118+
119+
## Cloud Services
120+
121+
Agents can use any `agentuity cloud` subcommand:
122+
123+
| Service | Description |
124+
|---------|-------------|
125+
| **KV** | Key-value storage for structured data |
126+
| **Vector** | Semantic search over stored content |
127+
| **Storage** | File upload/download |
128+
| **Sandbox** | Isolated code execution environments |
129+
| **Database** | Postgres via `agentuity cloud db` |
130+
| **SSH** | Connect to deployments |
131+
132+
## Next Steps
133+
134+
- [OpenCode Plugin](/Reference/CLI/opencode-plugin): Alternative plugin for OpenCode with background agents and tmux
135+
- [AI Commands](/Reference/CLI/ai-commands): Other AI-related CLI commands
136+
- [Creating Agents](/Agents/creating-agents): Build your first agent

content/Reference/CLI/development.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ Agentuity's Gravity network handles this automatically. When you run `agentuity
153153
- **Zero setup**: Works out of the box, no firewall rules or port forwarding
154154
- **Secure tunneling**: Encrypted connections through Agentuity's edge network
155155
- **Automatic reconnection**: Handles network interruptions gracefully
156+
- **Hot reload support**: HMR (Hot Module Replacement) works through the tunnel, so live reloading works even when accessing your app via the public URL
156157

157158
**Example output:**
158159
```
@@ -232,7 +233,7 @@ The dev server uses Vite for frontend hot module replacement (HMR) and Bun for s
232233

233234
- **Frontend changes** (React, CSS) reload instantly via Vite HMR
234235
- **Server changes** (agents, routes) trigger a fast Bun rebuild
235-
- **WebSocket connections** work seamlessly
236+
- **WebSocket connections** work without additional configuration
236237

237238
## Development vs Production
238239

content/Reference/CLI/meta.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"configuration",
1111
"debugging",
1212
"ai-commands",
13-
"opencode-plugin"
13+
"opencode-plugin",
14+
"claude-code-plugin"
1415
]
1516
}

content/Reference/CLI/opencode-plugin.mdx

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,11 @@ The plugin adds slash commands for common Agentuity tasks:
9898
|---------|-------------|
9999
| `/agentuity-coder` | Run tasks with the full agent team (Lead orchestrates) |
100100
| `/agentuity-cadence` | Start a long-running autonomous loop |
101+
| `/agentuity-cadence-cancel` | Cancel an active Cadence loop |
101102
| `/agentuity-cloud` | Interact with any Agentuity cloud service |
102103
| `/agentuity-sandbox` | Run code in isolated sandbox environments |
103104
| `/agentuity-memory-save` | Save session context to memory |
105+
| `/agentuity-memory-share` | Share memory content publicly with a shareable URL |
104106

105107
Use these commands by typing them directly in OpenCode:
106108

@@ -116,6 +118,52 @@ The plugin configures two MCP servers that provide additional context to the AI
116118

117119
**grep_app**: Enables searching GitHub repositories for code examples and patterns. Useful when you need to see how others have implemented similar features.
118120

121+
## Custom Skills
122+
123+
Extend the plugin with custom skills loaded from markdown files. Skills are loaded in priority order:
124+
125+
| Priority | Location | Scope |
126+
|----------|----------|-------|
127+
| 1 | `.opencode/skills/` | Project |
128+
| 2 | `.claude/skills/` | Project (Claude Code compatible) |
129+
| 3 | `~/.config/opencode/skills/` | User |
130+
| 4 | `~/.config/agentuity/opencode/skills/` | User |
131+
| 5 | `~/.claude/skills/` | User (Claude Code compatible) |
132+
133+
Each skill is a markdown file with optional frontmatter:
134+
135+
```markdown
136+
---
137+
name: my-skill
138+
description: What this skill does
139+
agent: Scout
140+
model: anthropic/claude-sonnet-4-5-20250929
141+
---
142+
143+
Instructions for the agent when this skill is invoked...
144+
```
145+
146+
| Frontmatter | Description |
147+
|-------------|-------------|
148+
| `name` | Skill name (used as slash command) |
149+
| `description` | Short description shown in command list |
150+
| `agent` | Route to a specific agent (Lead, Scout, Builder, etc.) |
151+
| `model` | Override the agent's default model |
152+
| `subtask` | Run as an isolated sub-agent (`true`/`false`) |
153+
| `allowed-tools` | Restrict which tools the skill can use |
154+
155+
Configure skills in your CLI profile (`~/.config/agentuity/production.yaml`):
156+
157+
```yaml
158+
coder:
159+
skills:
160+
enabled: true
161+
paths:
162+
- /path/to/additional/skills
163+
disabled:
164+
- skill-to-disable
165+
```
166+
119167
## Headless Mode
120168
121169
Run Agentuity tasks from the command line without opening OpenCode:
@@ -274,6 +322,7 @@ coder:
274322

275323
## Next Steps
276324

325+
- [Claude Code Plugin](/Reference/CLI/claude-code-plugin): Agentuity Coder plugin for Claude Code
277326
- [AI Commands](/Reference/CLI/ai-commands): Other AI-related CLI commands
278327
- [Local Development](/Reference/CLI/development): Run agents locally
279328
- [Creating Agents](/Agents/creating-agents): Build your first agent

0 commit comments

Comments
 (0)