Conversation
- Code examples now match actual `apps/docs/` project - `createRouter()` → `new Hono<Env>()` across all pages - `useAPI`/`createAPIClient` → `hc()` from `hono/client` - Removed `agentuity.config.ts`, `setup`/`shutdown` refs - All `createApp()` examples now `export default` - Rewrote `rpc-client.mdx` for Hono RPC client
- Fix import paths, barrel patterns, and `await` usage - Soften language to match actual API optionality - Add cron/schedule migration section - Fix callout types and style compliance - Remove outdated callout from explicit-routing
|
The latest Agentuity deployment details.
|
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 11 minutes and 28 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThis pull request updates Agentuity documentation and navigation to reflect framework v2 architectural changes, including replacing Changes
🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. |
📦 Canary Packages Publishedversion: PackagesInstallAdd to your {
"dependencies": {
"@agentuity/email": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-email-2.0.9-cc39bf6.tgz",
"@agentuity/core": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-core-2.0.9-cc39bf6.tgz",
"@agentuity/runtime": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-runtime-2.0.9-cc39bf6.tgz",
"@agentuity/claude-code": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-claude-code-2.0.9-cc39bf6.tgz",
"@agentuity/postgres": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-postgres-2.0.9-cc39bf6.tgz",
"@agentuity/schema": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-schema-2.0.9-cc39bf6.tgz",
"@agentuity/schedule": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-schedule-2.0.9-cc39bf6.tgz",
"@agentuity/evals": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-evals-2.0.9-cc39bf6.tgz",
"@agentuity/db": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-db-2.0.9-cc39bf6.tgz",
"@agentuity/keyvalue": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-keyvalue-2.0.9-cc39bf6.tgz",
"@agentuity/react": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-react-2.0.9-cc39bf6.tgz",
"@agentuity/drizzle": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-drizzle-2.0.9-cc39bf6.tgz",
"@agentuity/cli": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-cli-2.0.9-cc39bf6.tgz",
"@agentuity/task": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-task-2.0.9-cc39bf6.tgz",
"@agentuity/workbench": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-workbench-2.0.9-cc39bf6.tgz",
"@agentuity/migrate": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-migrate-2.0.9-cc39bf6.tgz",
"@agentuity/sandbox": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-sandbox-2.0.9-cc39bf6.tgz",
"@agentuity/coder-tui": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-coder-tui-2.0.9-cc39bf6.tgz",
"@agentuity/webhook": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-webhook-2.0.9-cc39bf6.tgz",
"@agentuity/server": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-server-2.0.9-cc39bf6.tgz",
"@agentuity/vector": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-vector-2.0.9-cc39bf6.tgz",
"@agentuity/queue": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-queue-2.0.9-cc39bf6.tgz",
"@agentuity/auth": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-auth-2.0.9-cc39bf6.tgz",
"@agentuity/coder": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-coder-2.0.9-cc39bf6.tgz",
"@agentuity/frontend": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-frontend-2.0.9-cc39bf6.tgz",
"@agentuity/opencode": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-opencode-2.0.9-cc39bf6.tgz"
}
}Or install directly: bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-email-2.0.9-cc39bf6.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-core-2.0.9-cc39bf6.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-runtime-2.0.9-cc39bf6.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-claude-code-2.0.9-cc39bf6.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-postgres-2.0.9-cc39bf6.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-schema-2.0.9-cc39bf6.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-schedule-2.0.9-cc39bf6.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-evals-2.0.9-cc39bf6.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-db-2.0.9-cc39bf6.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-keyvalue-2.0.9-cc39bf6.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-react-2.0.9-cc39bf6.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-drizzle-2.0.9-cc39bf6.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-cli-2.0.9-cc39bf6.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-task-2.0.9-cc39bf6.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-workbench-2.0.9-cc39bf6.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-migrate-2.0.9-cc39bf6.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-sandbox-2.0.9-cc39bf6.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-coder-tui-2.0.9-cc39bf6.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-webhook-2.0.9-cc39bf6.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-server-2.0.9-cc39bf6.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-vector-2.0.9-cc39bf6.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-queue-2.0.9-cc39bf6.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-auth-2.0.9-cc39bf6.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-coder-2.0.9-cc39bf6.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-frontend-2.0.9-cc39bf6.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-cc39bf6/agentuity-opencode-2.0.9-cc39bf6.tgz |
- Mark `@agentuity/react` as deprecated, add migration guidance - Fix `@agentuity/frontend` imports for managers and media sources - Remove non-existent `coder config set` commands - Add `createRouter()` and `ctx.app` docs to SDK reference - Update `AuthProvider` with `onAuthHeaderChange` pattern - Remove unnecessary `AgentuityProvider` wrapping in examples - Add Pi and Coder service links
There was a problem hiding this comment.
Actionable comments posted: 13
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (4)
apps/docs/src/web/content/agents/evaluations.mdx (2)
355-379:⚠️ Potential issue | 🟠 MajorThrow on validator service errors instead of recording a failed eval.
This section says to throw when the eval can't complete, but the
!response.okbranch now returns{ passed: false }. That will turn upstream outages into product-quality failures and skew eval pass rates.🛠 Suggested fix
if (!response.ok) { - return { passed: false, reason: `Service error: ${response.status}` }; + throw new Error(`Validation service returned ${response.status}`); }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/docs/src/web/content/agents/evaluations.mdx` around lines 355 - 379, The handler for externalValidationEval (created via agent.createEval 'external-validation') should treat HTTP/service errors as exceptions rather than a failed eval: in the branch currently returning { passed: false } when !response.ok, log the error via ctx.logger.error with context (status, url) and throw an Error (or rethrow a parsed error) so the runtime records it as an eval failure rather than counting it as a product-quality pass/fail; keep the normal path that parses response.json() and returns { passed: result.isValid } for successful responses.
485-502:⚠️ Potential issue | 🟠 MajorThis snippet now depends on
./agentexports the docs never introduce.
politeness<typeof AgentInput, typeof AgentOutput>()only works ifagent.tsexports runtimeAgentInputandAgentOutputschema values. The earlier examples on this page keep schemas inline, so readers copying thiseval.tsexample will hit unresolved imports unless you show the companion exports too.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/docs/src/web/content/agents/evaluations.mdx` around lines 485 - 502, The example uses politeness<typeof AgentInput, typeof AgentOutput> and imports AgentInput/AgentOutput from ./agent but the docs don't show runtime schema exports; either (A) export runtime schema values named AgentInput and AgentOutput from the ./agent module (e.g., const AgentInput = z.object(...); export { AgentInput, AgentOutput } and keep the existing type exports), or (B) remove the external dependency by inlining the runtime schemas where politeness is called (define the schema objects for input/output locally and pass their types to politeness), and update the example so politeness and agent.createEval receive actual runtime schema values matching the referenced types.apps/docs/src/web/content/reference/sdk-reference/agents.mdx (1)
119-133:⚠️ Potential issue | 🟠 MajorRe-add the
zodimport in this validator example.Line 133 uses
z.object(...), butzis not imported, so this snippet will not compile as written.💡 Suggested fix
import { Hono } from 'hono'; import type { Env } from '@agentuity/runtime'; +import { z } from 'zod'; import agent from './agent';🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/docs/src/web/content/reference/sdk-reference/agents.mdx` around lines 119 - 133, The example is missing the zod import used by the custom validator: add an import for z (e.g., from 'zod') at the top of the file so the call to z.object(...) in the agent.validator({ input: z.object({ custom: z.string() }) }) example compiles; update the top imports alongside Hono and Env so the symbol z is available for the Custom schema override and matches the validator usage.apps/docs/src/web/content/cookbook/tutorials/rag-agent.mdx (1)
291-318:⚠️ Potential issue | 🟠 MajorAdd error handling and input validation to
handleSearch().Lines 291–300 lack a try/finally block, so any
fetch()orres.json()error leavesisLoadingstucktrue. Additionally, line 311'sonKeyDowncan triggerhandleSearch()with whitespace-only input despite the button's disable condition. The function also does not validate the response status—non-2xx responses are parsed and set as data without checkingres.ok.Suggested fix
const handleSearch = async () => { // [!code highlight] - setIsLoading(true); // [!code highlight] - const res = await fetch('/api/knowledge', { // [!code highlight] - method: 'POST', // [!code highlight] - headers: { 'Content-Type': 'application/json' }, // [!code highlight] - body: JSON.stringify({ question }), // [!code highlight] - }); // [!code highlight] - setData(await res.json()); // [!code highlight] - setIsLoading(false); // [!code highlight] + const trimmedQuestion = question.trim(); + if (!trimmedQuestion) return; + + setIsLoading(true); // [!code highlight] + try { + const res = await fetch('/api/knowledge', { // [!code highlight] + method: 'POST', // [!code highlight] + headers: { 'Content-Type': 'application/json' }, // [!code highlight] + body: JSON.stringify({ question: trimmedQuestion }), // [!code highlight] + }); // [!code highlight] + + if (!res.ok) { + throw new Error(`Knowledge request failed with ${res.status}`); + } + + setData(await res.json()); // [!code highlight] + } finally { + setIsLoading(false); // [!code highlight] + } }; // [!code highlight]🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/docs/src/web/content/cookbook/tutorials/rag-agent.mdx` around lines 291 - 318, The handleSearch function should validate input and guarantee isLoading is cleared even on errors: wrap the fetch/JSON logic in a try/catch/finally inside handleSearch (use finally to always call setIsLoading(false)), check that question.trim() is non-empty at the start and return early if invalid, and validate the HTTP response by asserting res.ok before calling res.json() (throw or set an error state if not ok); also update the onKeyDown handler to call handleSearch only when question.trim() is non-empty to mirror the button disable logic. Ensure you reference and update the existing handleSearch, setIsLoading, setData (or error state), question, and the onKeyDown handler in the component.
🧹 Nitpick comments (9)
apps/docs/src/web/content/reference/standalone-packages.mdx (1)
38-38: Thenew Hono<Env>()pattern is correct and accurately documented.Verification confirms this is the standard v2 instantiation pattern used throughout the codebase.
Envis a real type exported from@agentuity/runtime, not a placeholder. The documentation at line 38 is accurate and appropriately concise for a reference comparison table.To enhance clarity, consider linking to a complete example showing the import:
import type { Env } from '@agentuity/runtime'; const router = new Hono<Env>()...This would help users unfamiliar with Hono understand the full pattern, though the current text is not incorrect.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/docs/src/web/content/reference/standalone-packages.mdx` at line 38, The line documenting "Route handler (c.var.*): Inside a new Hono<Env>() route" is correct; add a short clarifying example link or one-line import note to show how Env is obtained to aid readers unfamiliar with Hono: mention importing Env from '@agentuity/runtime' and then constructing new Hono<Env>() so the documented pattern (new Hono<Env>(), Env, and c.var.*) has an explicit reference to where Env comes from and how the router is instantiated.apps/docs/src/web/content/community/inbound-email-agent.mdx (1)
141-148: Consider using the@agent/alias for consistency.Other documentation examples use the
@agent/*/agentimport pattern (e.g.,@agent/email/agent), but this example uses a relative import../agent/email. While both work, using the alias consistently across docs helps readers understand the recommended pattern.Additionally, the agent file is located at
src/agent/email/index.ts(per line 40), so the import path is correct, but consider renaming it toagent.tsfor consistency with other examples in this PR.💡 Suggested change for consistency
import { Hono } from 'hono'; import type { Env } from '@agentuity/runtime'; -import email from '../agent/email'; +import email from '@agent/email/agent';This would require the agent file to be at
src/agent/email/agent.tsrather thanindex.ts.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/docs/src/web/content/community/inbound-email-agent.mdx` around lines 141 - 148, The import in the example currently uses a relative path ('../agent/email'); change it to the project alias and consistent filename by importing '@agent/email/agent' instead, and rename the agent source from index.ts to agent.ts (or add an agent.ts entry that re-exports) so the import resolves; update the import statement in inbound-email-agent.mdx from '../agent/email' to '@agent/email/agent' and ensure the module export names remain unchanged.apps/docs/src/web/content/agents/workbench.mdx (1)
7-7: Tighten wording to avoid a setup contradiction.Line 7 says agents are “passed to
createApp()”, but the examples on Line 29–Line 31 and Line 135–Line 137 pass onlyworkbench. Consider rephrasing Line 7 so it matches the shown setup path.✏️ Suggested wording tweak
-Workbench is a built-in UI for testing your agents during development. It uses the agents you register in `src/agent/index.ts` and pass to `createApp()`, displays their input/output schemas, and lets you execute them with real inputs. +Workbench is a built-in UI for testing your agents during development. It uses the agents you register in `src/agent/index.ts`, displays their input/output schemas, and lets you execute them with real inputs.Also applies to: 29-31, 135-137
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/docs/src/web/content/agents/workbench.mdx` at line 7, The sentence claims agents are "passed to createApp()", which conflicts with the examples that pass the `workbench` object instead; update the wording to reflect the actual setup flow (e.g., that agents are registered in src/agent/index.ts and exposed via the `workbench` helper which is then passed to `createApp()`), and adjust any similar phrasing around `createApp()` on the page (including the examples near lines showing `workbench`) so the doc consistently references the `workbench` object as the entrypoint rather than implying direct passing of agents to `createApp()`.apps/docs/src/web/content/cookbook/integrations/tanstack-start.mdx (1)
33-39: Port consistency note.This example uses port
3500for the Agentuity backend, while the Next.js example uses3501. This appears intentional (TanStack Start runs on 3000 vs Next.js on 3001), but consider adding a brief comment in each file explaining the port choice to avoid confusion.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/docs/src/web/content/cookbook/integrations/tanstack-start.mdx` around lines 33 - 39, Update the proxy target block that sets '/api' -> 'http://localhost:3500' to include a brief inline comment clarifying the port selection (e.g., "TanStack Start runs on 3000 so backend uses 3500; Next.js example uses 3001/3501"), referencing the '/api' proxy target and the target: 'http://localhost:3500' line so readers understand why this example uses 3500 versus the Next.js example's 3501.apps/docs/src/web/content/routes/explicit-routing.mdx (1)
216-237: Clarify or removecreateRouter()reference.Line 236 mentions "Both
new Hono<Env>()andcreateRouter()provide typed access..." but the rest of this PR consistently moves away fromcreateRouter()toward explicit Hono routers. This might confuse readers about which approach to use.Consider either:
- Removing the
createRouter()reference if it's being deprecated- Adding a note that
createRouter()is the legacy approachSuggested change
-Use `c.json()`, `c.text()`, and other Hono response methods in your handlers. Both `new Hono<Env>()` and `createRouter()` provide typed access to `c.var.logger`, `c.var.kv`, `c.var.vector`, `c.var.thread`, and other services. +Use `c.json()`, `c.text()`, and other Hono response methods in your handlers. `new Hono<Env>()` provides typed access to `c.var.logger`, `c.var.kv`, `c.var.vector`, `c.var.thread`, and other services.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/docs/src/web/content/routes/explicit-routing.mdx` around lines 216 - 237, The sentence referencing createRouter() is ambiguous given the project shift to explicit Hono routers; update the text to either remove createRouter() or mark it as legacy: replace "Both `new Hono<Env>()` and `createRouter()` provide typed access..." with a clear statement such as "`new Hono<Env>()` provides typed access to c.var.*; `createRouter()` is deprecated (legacy) if still mentioned" so readers aren’t confused—target the paragraph that mentions new Hono<Env>() and createRouter() and adjust the wording accordingly.apps/docs/src/web/content/cookbook/patterns/hono-rpc-tanstack-query.mdx (1)
330-337: Minor: Ensureapp.tsaligns with other examples.This example shows
const app = await createApp({ router });but other files in this PR (likeexplicit-routing.mdx) showcreateApp({ router: { path: '/api', router: api } }). Consider adding a brief note that when passing a plain router (without path object), it defaults to/api.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/docs/src/web/content/cookbook/patterns/hono-rpc-tanstack-query.mdx` around lines 330 - 337, The example in app.ts uses createApp({ router }) which differs from other docs that use createApp({ router: { path: '/api', router: api } }); update the docs so examples are consistent: either change the snippet to use the explicit router object (createApp with router: { path: '/api', router: router }) or add one concise sentence under the code explaining that passing a plain router (createApp({ router })) is supported and will default the mount path to '/api'; reference the createApp call and the router identifier in your edit.apps/docs/src/web/content/get-started/app-configuration.mdx (1)
250-258: Consider clarifying the override behavior.The phrase "For generated environment types, later files override earlier ones" on line 257 might confuse readers, especially when the next sentence says ".env wins over .env.development".
Consider rewording to something like:
"When the same key appears in multiple files, the file loaded last takes precedence. During local development,
.envis loaded after.env.development, so.envvalues win on duplicate keys."🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/docs/src/web/content/get-started/app-configuration.mdx` around lines 250 - 258, Reword the ambiguous sentence "For generated environment types, later files override earlier ones" and the following example so readers clearly understand precedence; replace them with a concise sentence like: "When the same key appears in multiple files, the file loaded last takes precedence. During local development, `.env` is loaded after `.env.development`, so `.env` values win on duplicate keys." Update the text surrounding the phrase and remove the original ambiguous wording to ensure the override behavior and the `.env` vs `.env.development` example are explicitly aligned.apps/docs/src/web/content/cookbook/integrations/nextjs.mdx (1)
30-46: Consider clarifyingoutputFileTracingRootusage.The
outputFileTracingRoot: join(__dirname, '../../../..')suggests this is in a monorepo context, but that's not obvious from the project structure shown. This could confuse developers with standalone Next.js apps.Consider either:
- Adding a comment explaining when this is needed (e.g., monorepo setups)
- Removing it if the example is meant for standalone projects
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/docs/src/web/content/cookbook/integrations/nextjs.mdx` around lines 30 - 46, Clarify the purpose of outputFileTracingRoot in the nextConfig snippet: either remove the line "outputFileTracingRoot: join(__dirname, '../../../..')" if this example targets standalone Next.js projects, or add a concise inline comment above the outputFileTracingRoot entry (nextConfig, outputFileTracingRoot, join) that states this setting is only required in monorepo/workspace setups to ensure correct file tracing roots; update the snippet accordingly so readers know when to keep or omit it.apps/docs/src/web/content/reference/sdk-reference/context-api.mdx (1)
85-86: Clarifyctx.sessionIdvsctx.session.idrelationship.Both are documented as request/session identifiers, but it’s unclear whether they are aliases or distinct values. A short note here would prevent misuse in logging/correlation code.
Also applies to: 300-307
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/docs/src/web/content/reference/sdk-reference/context-api.mdx` around lines 85 - 86, Clarify in the context API docs that ctx.sessionId and ctx.session.id refer to the same request identifier (i.e., one is an alias of the other) by updating the descriptions around the `sessionId`/`current` block and the repeated section at lines ~300-307 to explicitly state that `ctx.sessionId` is the same value as `ctx.session.id` (or vice versa), and recommend which form to use for logging/correlation (e.g., prefer `ctx.sessionId` for top-level convenience or `ctx.session.id` for nested session objects); update both occurrences so the relationship is unambiguous.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apps/docs/src/web/content/agents/events-lifecycle.mdx`:
- Line 95: The documentation text incorrectly states that session and thread
events receive only the `session` or `thread` object; update the sentence that
currently reads "Session and thread events receive only the `session` or
`thread` object" to: "Session and thread event callbacks receive `(eventName,
session)` or `(eventName, thread)`" so it matches the examples in events.mdx and
the SDK implementation and prevents handlers from being written with the wrong
arity.
In `@apps/docs/src/web/content/cookbook/integrations/turborepo.mdx`:
- Around line 201-207: The onTranslate handler sets isLoading before awaiting
client.translate.$post but never clears it if the request or setData throws;
wrap the async work in a try/finally in onTranslate (use try { const res = await
client.translate.$post(...); setData(await res.json()); } finally {
setIsLoading(false); }) so setIsLoading(false) always runs; locate onTranslate
and replace the current straight-line await/setData/setIsLoading sequence with a
try/finally around client.translate.$post and setData.
In `@apps/docs/src/web/content/frontend/rpc-client.mdx`:
- Around line 189-202: The snippet uses a top-level return which is invalid;
modify the example around client.users.$post so you don't return at module
scope: either wrap the logic in an async function (e.g., async function run() {
... } and call run()) or remove the return and use an else branch after the if
(!res.ok) block to continue only when res.ok; ensure you still await res.json()
for both the error payload and the successful user result and keep the error
logging in the existing branches.
- Around line 16-23: The POST '/chat' route on the Hono router uses await
c.req.json<{ message: string }>() but lacks the required validator middleware,
so the RPC client (hc<ApiRouter>()) cannot infer the request body type; add the
zValidator to the route definition (e.g., chain .post('/chat',
zValidator(z.object({ message: z.string() })), async (c) => { ... })) so the
handler and hc<ApiRouter>() clients get full request-body typing—apply the same
zValidator pattern to the other example referenced around the hc<ApiRouter>()
usage to ensure inference there as well.
In `@apps/docs/src/web/content/frontend/workbench.mdx`:
- Around line 11-20: The docs currently mix the new boolean/string workbench
config (e.g., createApp({ workbench: true }) or workbench: '/dev') with legacy
object fields (`route`, `headers`); update the documentation so the table under
the createApp() example reflects the new shape (describe workbench as
boolean|string and remove `route`/`headers` from that section) and move the
`headers` explanation into the encodeWorkbenchConfig() section where the headers
option still applies.
In `@apps/docs/src/web/content/get-started/quickstart.mdx`:
- Around line 87-97: The snippet in the quickstart currently imports the chat
agent directly (import chat from './src/agent/chat/agent') which bypasses the
earlier agent registry step; update the example to import the agent registry
(e.g., import agents from './src/agent' or './src/agent/index') and pass that
registry into createApp (agents: agents) while keeping the router import (api)
and createApp call (createApp({...})), so the snippet aligns with the Step 2
agent registry workflow and references the registry module instead of the chat
module.
In `@apps/docs/src/web/content/reference/cli/build-configuration.mdx`:
- Around line 81-85: The docs show a nonfunctional "bundle" example—either
remove those examples from the MDX or implement the feature: if you choose
implementation, add a Vite module augmentation to extend UserConfig with the
bundle property (so defineConfig(...) and TypeScript accept it), and wire the
existing copyBundleFiles() into the build pipeline that spawns Vite (where Vite
is launched as a subprocess) so the build task reads the vite.config.ts,
extracts the bundle config and calls copyBundleFiles(bundle) before/after the
client build; reference the symbols bundle, AgentuityConfig, copyBundleFiles(),
and defineConfig in your changes and update the docs to reflect the supported
approach.
In `@apps/docs/src/web/content/reference/cli/claude-code-plugin.mdx`:
- Around line 10-12: The fenced block currently labeled as a bash code fence
contains the Claude Code slash command "/install agentuity"; change the fence
language from "bash" to "text" so the snippet is not mistaken for a terminal
command—locate the fenced block containing "/install agentuity" in the
claude-code-plugin.mdx content and replace the opening "```bash" with "```text".
In `@apps/docs/src/web/content/reference/migration-guide.mdx`:
- Around line 547-548: The Cookbook link in
apps/docs/src/web/content/reference/migration-guide.mdx currently points to
"/cookbook/overview" which isn't registered in routeTree.gen.ts and causes a
404; update the link target in migration-guide.mdx to "/cookbook" (replace
"/cookbook/overview" with "/cookbook") so it matches the existing index route,
or alternatively add the "/cookbook/overview" route to routeTree.gen.ts if the
overview page is intended to exist.
In `@apps/docs/src/web/content/reference/sdk-reference/evaluations.mdx`:
- Line 155: The documentation example currently uses error.message directly in
the catch block which fails TypeScript strict checks; update the catch block to
narrow the unknown error first (e.g., check if error instanceof Error) before
accessing error.message and provide a fallback (e.g., String(error)) for
non-Error values so the thrown Error uses a safe, typed message; refer to the
catch block and the error variable in the example to make this change.
In `@apps/docs/src/web/content/reference/sdk-reference/storage.mdx`:
- Around line 779-786: Update the documentation for function signature
`create(namespace: string, props?: StreamCreateProps): Promise<Stream>` to
remove the word "named" and clarify that the `namespace` groups related streams
rather than providing a per-stream name; change the short description to
something like "Creates a new writable stream within the given namespace" and
adjust the `namespace` parameter description to say it is a grouping identifier
for related streams (not a unique stream name), keeping `props` as the optional
configuration object.
In `@apps/docs/src/web/content/routes/http.mdx`:
- Around line 429-432: The example omits how chatAgent is created with streaming
enabled; update the docs to show the chatAgent creation using createAgent (named
chatAgent) and include schema: { stream: true } along with input/output zod
shapes and a handler that returns a ReadableStream so that chatAgent.run(...)
actually yields a ReadableStream; reference createAgent, chatAgent, schema,
stream: true, and handler in the example so readers see the required
configuration.
In `@apps/docs/src/web/content/services/coder.mdx`:
- Around line 166-171: Add a clarifying sentence linking the CLI options to the
Session Modes table: explain that running "agentuity coder start" with no extra
flags launches a local TUI session (tui mode), using "--sandbox <task>" creates
a sandbox session (sandbox mode) with the provided task description string, and
using the remote connection flag/URL invokes remote mode; update the Session
Modes section (the table referenced as "Session Modes") or move it after the
expanded explanation of the three invocation patterns so readers can directly
map the CLI examples (--sandbox, plain coder start, remote invocation) to the
sandbox, tui, and remote modes.
---
Outside diff comments:
In `@apps/docs/src/web/content/agents/evaluations.mdx`:
- Around line 355-379: The handler for externalValidationEval (created via
agent.createEval 'external-validation') should treat HTTP/service errors as
exceptions rather than a failed eval: in the branch currently returning {
passed: false } when !response.ok, log the error via ctx.logger.error with
context (status, url) and throw an Error (or rethrow a parsed error) so the
runtime records it as an eval failure rather than counting it as a
product-quality pass/fail; keep the normal path that parses response.json() and
returns { passed: result.isValid } for successful responses.
- Around line 485-502: The example uses politeness<typeof AgentInput, typeof
AgentOutput> and imports AgentInput/AgentOutput from ./agent but the docs don't
show runtime schema exports; either (A) export runtime schema values named
AgentInput and AgentOutput from the ./agent module (e.g., const AgentInput =
z.object(...); export { AgentInput, AgentOutput } and keep the existing type
exports), or (B) remove the external dependency by inlining the runtime schemas
where politeness is called (define the schema objects for input/output locally
and pass their types to politeness), and update the example so politeness and
agent.createEval receive actual runtime schema values matching the referenced
types.
In `@apps/docs/src/web/content/cookbook/tutorials/rag-agent.mdx`:
- Around line 291-318: The handleSearch function should validate input and
guarantee isLoading is cleared even on errors: wrap the fetch/JSON logic in a
try/catch/finally inside handleSearch (use finally to always call
setIsLoading(false)), check that question.trim() is non-empty at the start and
return early if invalid, and validate the HTTP response by asserting res.ok
before calling res.json() (throw or set an error state if not ok); also update
the onKeyDown handler to call handleSearch only when question.trim() is
non-empty to mirror the button disable logic. Ensure you reference and update
the existing handleSearch, setIsLoading, setData (or error state), question, and
the onKeyDown handler in the component.
In `@apps/docs/src/web/content/reference/sdk-reference/agents.mdx`:
- Around line 119-133: The example is missing the zod import used by the custom
validator: add an import for z (e.g., from 'zod') at the top of the file so the
call to z.object(...) in the agent.validator({ input: z.object({ custom:
z.string() }) }) example compiles; update the top imports alongside Hono and Env
so the symbol z is available for the Custom schema override and matches the
validator usage.
---
Nitpick comments:
In `@apps/docs/src/web/content/agents/workbench.mdx`:
- Line 7: The sentence claims agents are "passed to createApp()", which
conflicts with the examples that pass the `workbench` object instead; update the
wording to reflect the actual setup flow (e.g., that agents are registered in
src/agent/index.ts and exposed via the `workbench` helper which is then passed
to `createApp()`), and adjust any similar phrasing around `createApp()` on the
page (including the examples near lines showing `workbench`) so the doc
consistently references the `workbench` object as the entrypoint rather than
implying direct passing of agents to `createApp()`.
In `@apps/docs/src/web/content/community/inbound-email-agent.mdx`:
- Around line 141-148: The import in the example currently uses a relative path
('../agent/email'); change it to the project alias and consistent filename by
importing '@agent/email/agent' instead, and rename the agent source from
index.ts to agent.ts (or add an agent.ts entry that re-exports) so the import
resolves; update the import statement in inbound-email-agent.mdx from
'../agent/email' to '@agent/email/agent' and ensure the module export names
remain unchanged.
In `@apps/docs/src/web/content/cookbook/integrations/nextjs.mdx`:
- Around line 30-46: Clarify the purpose of outputFileTracingRoot in the
nextConfig snippet: either remove the line "outputFileTracingRoot:
join(__dirname, '../../../..')" if this example targets standalone Next.js
projects, or add a concise inline comment above the outputFileTracingRoot entry
(nextConfig, outputFileTracingRoot, join) that states this setting is only
required in monorepo/workspace setups to ensure correct file tracing roots;
update the snippet accordingly so readers know when to keep or omit it.
In `@apps/docs/src/web/content/cookbook/integrations/tanstack-start.mdx`:
- Around line 33-39: Update the proxy target block that sets '/api' ->
'http://localhost:3500' to include a brief inline comment clarifying the port
selection (e.g., "TanStack Start runs on 3000 so backend uses 3500; Next.js
example uses 3001/3501"), referencing the '/api' proxy target and the target:
'http://localhost:3500' line so readers understand why this example uses 3500
versus the Next.js example's 3501.
In `@apps/docs/src/web/content/cookbook/patterns/hono-rpc-tanstack-query.mdx`:
- Around line 330-337: The example in app.ts uses createApp({ router }) which
differs from other docs that use createApp({ router: { path: '/api', router: api
} }); update the docs so examples are consistent: either change the snippet to
use the explicit router object (createApp with router: { path: '/api', router:
router }) or add one concise sentence under the code explaining that passing a
plain router (createApp({ router })) is supported and will default the mount
path to '/api'; reference the createApp call and the router identifier in your
edit.
In `@apps/docs/src/web/content/get-started/app-configuration.mdx`:
- Around line 250-258: Reword the ambiguous sentence "For generated environment
types, later files override earlier ones" and the following example so readers
clearly understand precedence; replace them with a concise sentence like: "When
the same key appears in multiple files, the file loaded last takes precedence.
During local development, `.env` is loaded after `.env.development`, so `.env`
values win on duplicate keys." Update the text surrounding the phrase and remove
the original ambiguous wording to ensure the override behavior and the `.env` vs
`.env.development` example are explicitly aligned.
In `@apps/docs/src/web/content/reference/sdk-reference/context-api.mdx`:
- Around line 85-86: Clarify in the context API docs that ctx.sessionId and
ctx.session.id refer to the same request identifier (i.e., one is an alias of
the other) by updating the descriptions around the `sessionId`/`current` block
and the repeated section at lines ~300-307 to explicitly state that
`ctx.sessionId` is the same value as `ctx.session.id` (or vice versa), and
recommend which form to use for logging/correlation (e.g., prefer
`ctx.sessionId` for top-level convenience or `ctx.session.id` for nested session
objects); update both occurrences so the relationship is unambiguous.
In `@apps/docs/src/web/content/reference/standalone-packages.mdx`:
- Line 38: The line documenting "Route handler (c.var.*): Inside a new
Hono<Env>() route" is correct; add a short clarifying example link or one-line
import note to show how Env is obtained to aid readers unfamiliar with Hono:
mention importing Env from '@agentuity/runtime' and then constructing new
Hono<Env>() so the documented pattern (new Hono<Env>(), Env, and c.var.*) has an
explicit reference to where Env comes from and how the router is instantiated.
In `@apps/docs/src/web/content/routes/explicit-routing.mdx`:
- Around line 216-237: The sentence referencing createRouter() is ambiguous
given the project shift to explicit Hono routers; update the text to either
remove createRouter() or mark it as legacy: replace "Both `new Hono<Env>()` and
`createRouter()` provide typed access..." with a clear statement such as "`new
Hono<Env>()` provides typed access to c.var.*; `createRouter()` is deprecated
(legacy) if still mentioned" so readers aren’t confused—target the paragraph
that mentions new Hono<Env>() and createRouter() and adjust the wording
accordingly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: bb0a79b3-8f01-4a34-afde-2072f1848ddd
📒 Files selected for processing (84)
apps/docs/src/web/components/docs/nav-data.tsapps/docs/src/web/content/agents/calling-other-agents.mdxapps/docs/src/web/content/agents/creating-agents.mdxapps/docs/src/web/content/agents/evaluations.mdxapps/docs/src/web/content/agents/events-lifecycle.mdxapps/docs/src/web/content/agents/standalone-execution.mdxapps/docs/src/web/content/agents/state-management.mdxapps/docs/src/web/content/agents/streaming-responses.mdxapps/docs/src/web/content/agents/when-to-use.mdxapps/docs/src/web/content/agents/workbench.mdxapps/docs/src/web/content/community/inbound-email-agent.mdxapps/docs/src/web/content/cookbook/integrations/chat-sdk.mdxapps/docs/src/web/content/cookbook/integrations/nextjs.mdxapps/docs/src/web/content/cookbook/integrations/tanstack-start.mdxapps/docs/src/web/content/cookbook/integrations/turborepo.mdxapps/docs/src/web/content/cookbook/patterns/chat-with-history.mdxapps/docs/src/web/content/cookbook/patterns/cron-with-storage.mdxapps/docs/src/web/content/cookbook/patterns/hono-rpc-tanstack-query.mdxapps/docs/src/web/content/cookbook/patterns/product-search.mdxapps/docs/src/web/content/cookbook/patterns/server-utilities.mdxapps/docs/src/web/content/cookbook/patterns/tailwind-setup.mdxapps/docs/src/web/content/cookbook/patterns/webhook-handler.mdxapps/docs/src/web/content/cookbook/tutorials/rag-agent.mdxapps/docs/src/web/content/cookbook/tutorials/understanding-agents.mdxapps/docs/src/web/content/frontend/advanced-hooks.mdxapps/docs/src/web/content/frontend/authentication.mdxapps/docs/src/web/content/frontend/deployment-scenarios.mdxapps/docs/src/web/content/frontend/provider-setup.mdxapps/docs/src/web/content/frontend/react-hooks.mdxapps/docs/src/web/content/frontend/rpc-client.mdxapps/docs/src/web/content/frontend/workbench.mdxapps/docs/src/web/content/get-started/app-configuration.mdxapps/docs/src/web/content/get-started/installation.mdxapps/docs/src/web/content/get-started/project-structure.mdxapps/docs/src/web/content/get-started/quickstart.mdxapps/docs/src/web/content/reference/cli/build-configuration.mdxapps/docs/src/web/content/reference/cli/claude-code-plugin.mdxapps/docs/src/web/content/reference/cli/coder.mdxapps/docs/src/web/content/reference/cli/development.mdxapps/docs/src/web/content/reference/cli/getting-started.mdxapps/docs/src/web/content/reference/cli/meta.jsonapps/docs/src/web/content/reference/cli/opencode-plugin.mdxapps/docs/src/web/content/reference/migration-guide.mdxapps/docs/src/web/content/reference/sdk-reference/agents.mdxapps/docs/src/web/content/reference/sdk-reference/application-entry.mdxapps/docs/src/web/content/reference/sdk-reference/communication.mdxapps/docs/src/web/content/reference/sdk-reference/context-api.mdxapps/docs/src/web/content/reference/sdk-reference/evaluations.mdxapps/docs/src/web/content/reference/sdk-reference/events.mdxapps/docs/src/web/content/reference/sdk-reference/observability.mdxapps/docs/src/web/content/reference/sdk-reference/router.mdxapps/docs/src/web/content/reference/sdk-reference/schema.mdxapps/docs/src/web/content/reference/sdk-reference/storage.mdxapps/docs/src/web/content/reference/standalone-packages.mdxapps/docs/src/web/content/routes/calling-agents.mdxapps/docs/src/web/content/routes/cron.mdxapps/docs/src/web/content/routes/explicit-routing.mdxapps/docs/src/web/content/routes/http.mdxapps/docs/src/web/content/routes/middleware.mdxapps/docs/src/web/content/routes/sse.mdxapps/docs/src/web/content/routes/webrtc.mdxapps/docs/src/web/content/routes/websockets.mdxapps/docs/src/web/content/services/authentication.mdxapps/docs/src/web/content/services/coder.mdxapps/docs/src/web/content/services/database/index.mdxapps/docs/src/web/content/services/email.mdxapps/docs/src/web/content/services/index.mdxapps/docs/src/web/content/services/meta.jsonapps/docs/src/web/content/services/observability/logging.mdxapps/docs/src/web/content/services/observability/sessions-debugging.mdxapps/docs/src/web/content/services/observability/tracing.mdxapps/docs/src/web/content/services/queues.mdxapps/docs/src/web/content/services/sandbox/sdk-usage.mdxapps/docs/src/web/content/services/schedules.mdxapps/docs/src/web/content/services/storage/custom.mdxapps/docs/src/web/content/services/storage/durable-streams.mdxapps/docs/src/web/content/services/storage/index.mdxapps/docs/src/web/content/services/storage/key-value.mdxapps/docs/src/web/content/services/storage/object.mdxapps/docs/src/web/content/services/storage/vector.mdxapps/docs/src/web/content/services/tasks.mdxapps/docs/src/web/routeTree.gen.tsapps/docs/src/web/routes/_docs/reference/cli/coder.tsxapps/docs/src/web/routes/_docs/services/coder.tsx
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Sandbox CLI Tests
- GitHub Check: SDK Integration Test Suite
- GitHub Check: Cloud Deployment Tests
- GitHub Check: Agentuity Deployment
🧰 Additional context used
📓 Path-based instructions (6)
apps/docs/**/*.json
📄 CodeRabbit inference engine (apps/docs/AGENTS.md)
Workspace dependencies must use workspace:* protocol for local package references (
@agentuity/runtime,@agentuity/react,@agentuity/schema,@agentuity/workbench,@agentuity/evals,@agentuity/cli)
Files:
apps/docs/src/web/content/services/meta.jsonapps/docs/src/web/content/reference/cli/meta.json
apps/docs/src/web/**/*.{ts,tsx}
📄 CodeRabbit inference engine (apps/docs/AGENTS.md)
apps/docs/src/web/**/*.{ts,tsx}: React frontend components must use React 19 features with TypeScript/TSX syntax and support hot module reloading via import.meta.hot in dev mode
Frontend styling must use Tailwind CSS for all UI components
Files:
apps/docs/src/web/routes/_docs/reference/cli/coder.tsxapps/docs/src/web/routes/_docs/services/coder.tsxapps/docs/src/web/components/docs/nav-data.tsapps/docs/src/web/routeTree.gen.ts
apps/docs/src/web/**/*.tsx
📄 CodeRabbit inference engine (apps/docs/AGENTS.md)
Frontend components must integrate with the useSandboxRunner hook to execute demo scripts and display output via the TerminalOutput component
Files:
apps/docs/src/web/routes/_docs/reference/cli/coder.tsxapps/docs/src/web/routes/_docs/services/coder.tsx
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
Use Biome as code formatter with tabs (width 3), single quotes, semicolons, lineWidth 100, and trailingCommas es5
Files:
apps/docs/src/web/routes/_docs/reference/cli/coder.tsxapps/docs/src/web/routes/_docs/services/coder.tsxapps/docs/src/web/components/docs/nav-data.tsapps/docs/src/web/routeTree.gen.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx}: Use TypeScript Strict mode with ESNext target and bundler moduleResolution
UseStructuredErrorfrom@agentuity/corefor error handling
Files:
apps/docs/src/web/routes/_docs/reference/cli/coder.tsxapps/docs/src/web/routes/_docs/services/coder.tsxapps/docs/src/web/components/docs/nav-data.tsapps/docs/src/web/routeTree.gen.ts
apps/docs/**/*.ts
📄 CodeRabbit inference engine (apps/docs/AGENTS.md)
Use Bun CLI directly from local packages via
bun ../../packages/cli/bin/cli.tsinstead of installing from npm
Files:
apps/docs/src/web/components/docs/nav-data.tsapps/docs/src/web/routeTree.gen.ts
🧠 Learnings (6)
📚 Learning: 2026-01-09T16:26:51.893Z
Learnt from: jhaynie
Repo: agentuity/sdk PR: 523
File: templates/_base/src/web/frontend.tsx:13-35
Timestamp: 2026-01-09T16:26:51.893Z
Learning: In web frontend code, prefer using the built-in Error class for runtime errors. Do not throw or re-export StructuredError from agentuity/core in web app code. Replace instances of StructuredError with new Error or custom error types that extend Error; ensure error handling logic remains intact and that error messages are descriptive. This guideline applies to all web UI TypeScript/TSX files that run in the browser and import StructuredError from agentuity/core.
Applied to files:
apps/docs/src/web/routes/_docs/reference/cli/coder.tsxapps/docs/src/web/routes/_docs/services/coder.tsx
📚 Learning: 2026-02-06T06:54:26.622Z
Learnt from: CR
Repo: agentuity/sdk PR: 0
File: apps/testing/webrtc-test/src/web/AGENTS.md:0-0
Timestamp: 2026-02-06T06:54:26.622Z
Learning: Applies to apps/testing/webrtc-test/src/web/src/web/App.tsx : Wrap your app with AgentuityProvider for hooks to work
Applied to files:
apps/docs/src/web/content/cookbook/tutorials/rag-agent.mdx
📚 Learning: 2025-12-13T04:17:58.264Z
Learnt from: CR
Repo: agentuity/sdk PR: 0
File: apps/testing/integration-suite/src/web/AGENTS.md:0-0
Timestamp: 2025-12-13T04:17:58.264Z
Learning: Applies to apps/testing/integration-suite/src/web/**/*.{tsx,ts} : Wrap your app with AgentuityProvider for hooks to work
Applied to files:
apps/docs/src/web/content/cookbook/tutorials/rag-agent.mdx
📚 Learning: 2026-01-31T00:59:11.828Z
Learnt from: CR
Repo: agentuity/sdk PR: 0
File: apps/docs/src/web/AGENTS.md:0-0
Timestamp: 2026-01-31T00:59:11.828Z
Learning: Wrap the application with AgentuityProvider component for React hooks to work correctly
Applied to files:
apps/docs/src/web/content/cookbook/tutorials/rag-agent.mdx
📚 Learning: 2025-12-21T00:31:41.858Z
Learnt from: jhaynie
Repo: agentuity/sdk PR: 274
File: packages/cli/src/cmd/build/vite/server-bundler.ts:12-41
Timestamp: 2025-12-21T00:31:41.858Z
Learning: In Bun runtime, BuildMessage and ResolveMessage are global types and are not exported from the bun module. Do not import { BuildMessage } from 'bun' or similar; these types are available globally and should be used without import. This applies to all TypeScript files that target the Bun runtime within the repository.
Applied to files:
apps/docs/src/web/components/docs/nav-data.tsapps/docs/src/web/routeTree.gen.ts
📚 Learning: 2026-01-31T00:58:50.803Z
Learnt from: CR
Repo: agentuity/sdk PR: 0
File: apps/docs/src/api/AGENTS.md:0-0
Timestamp: 2026-01-31T00:58:50.803Z
Learning: Applies to apps/docs/src/api/src/api/**/*.ts : Use createRouter from agentuity/runtime to create router instances
Applied to files:
apps/docs/src/web/content/cookbook/patterns/hono-rpc-tanstack-query.mdx
🪛 LanguageTool
apps/docs/src/web/content/routes/explicit-routing.mdx
[style] ~218-~218: Try using a synonym here to strengthen your writing.
Context: ...ty Context in Routes new Hono<Env>() gives you access to Agentuity context variables i...
(GIVE_PROVIDE)
apps/docs/src/web/content/reference/sdk-reference/evaluations.mdx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apps/docs/src/web/content/agents/evaluations.mdx`:
- Line 72: The statement claiming "Eval files are discovered at build time" is
misleading; update the text to reflect that evals are loaded/discovered at
runtime from eval.ts files associated with agent instances (see eval.ts and the
agent's execute/complete logic in the agent instance code), so change the
wording to indicate runtime discovery/loading and execution (not build-time
import) and mention that the agent runtime loads evals when an agent completes
rather than requiring special route imports.
In `@apps/docs/src/web/content/cookbook/integrations/nextjs.mdx`:
- Around line 147-149: The hc<ApiRouter> client is being initialized with
NEXT_PUBLIC_AGENTUITY_BASE_URL (the origin) which misses the required /api mount
path; update the hc initialization (the line creating client via hc<ApiRouter>)
to append the '/api' path to the base URL (e.g., build the full base by
concatenating or using a URL/template) so cross-origin RPC calls target the
mounted API endpoint.
In `@apps/docs/src/web/content/reference/sdk-reference/storage.mdx`:
- Line 603: The doc currently uses two different env var names—`DATABASE_URL` in
the database storage paragraph and `process.env.POSTGRES_URL` in the custom
connection example—causing confusion; pick one canonical name (prefer
`DATABASE_URL`) and update all occurrences so they match: change the text that
says Agentuity auto-injects `DATABASE_URL` or, if you prefer `POSTGRES_URL`,
change the injected-name sentence and the example that references
`process.env.POSTGRES_URL` accordingly; ensure the explanatory sentence, example
code snippet, and any mention of injected credentials all reference the same
identifier (`DATABASE_URL` or `POSTGRES_URL`) and update any surrounding wording
to remain consistent.
In `@apps/docs/src/web/content/routes/http.mdx`:
- Line 462: The link text "See [Streaming
Responses](/agents/streaming-responses) for more streaming patterns." points to
the wrong section; update the href from "/agents/streaming-responses" to the
correct routes path (e.g., "/routes/streaming-responses") so the "Streaming
Responses" link in the HTTP routing docs points to the routes
streaming-responses page.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 62efba0b-836b-42ee-a6de-8f99a0e5dd58
📒 Files selected for processing (20)
apps/docs/src/web/content/agents/evaluations.mdxapps/docs/src/web/content/agents/events-lifecycle.mdxapps/docs/src/web/content/community/inbound-email-agent.mdxapps/docs/src/web/content/cookbook/integrations/nextjs.mdxapps/docs/src/web/content/cookbook/integrations/turborepo.mdxapps/docs/src/web/content/cookbook/tutorials/rag-agent.mdxapps/docs/src/web/content/frontend/rpc-client.mdxapps/docs/src/web/content/frontend/workbench.mdxapps/docs/src/web/content/get-started/app-configuration.mdxapps/docs/src/web/content/get-started/quickstart.mdxapps/docs/src/web/content/reference/cli/build-configuration.mdxapps/docs/src/web/content/reference/cli/claude-code-plugin.mdxapps/docs/src/web/content/reference/migration-guide.mdxapps/docs/src/web/content/reference/sdk-reference/agents.mdxapps/docs/src/web/content/reference/sdk-reference/context-api.mdxapps/docs/src/web/content/reference/sdk-reference/evaluations.mdxapps/docs/src/web/content/reference/sdk-reference/storage.mdxapps/docs/src/web/content/reference/standalone-packages.mdxapps/docs/src/web/content/routes/http.mdxapps/docs/src/web/content/services/coder.mdx
✅ Files skipped from review due to trivial changes (5)
- apps/docs/src/web/content/reference/standalone-packages.mdx
- apps/docs/src/web/content/reference/cli/build-configuration.mdx
- apps/docs/src/web/content/get-started/app-configuration.mdx
- apps/docs/src/web/content/services/coder.mdx
- apps/docs/src/web/content/frontend/workbench.mdx
🚧 Files skipped from review as they are similar to previous changes (6)
- apps/docs/src/web/content/community/inbound-email-agent.mdx
- apps/docs/src/web/content/get-started/quickstart.mdx
- apps/docs/src/web/content/reference/sdk-reference/agents.mdx
- apps/docs/src/web/content/reference/sdk-reference/evaluations.mdx
- apps/docs/src/web/content/cookbook/tutorials/rag-agent.mdx
- apps/docs/src/web/content/cookbook/integrations/turborepo.mdx
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
- GitHub Check: Queue CLI Tests
- GitHub Check: Sandbox CLI Tests
- GitHub Check: Package Installation & Usage Test
- GitHub Check: Template Integration Tests
- GitHub Check: Framework Integration Tests (TanStack & Next.js)
- GitHub Check: Playwright E2E Smoke Test
- GitHub Check: Postgres SSL Integration Test
- GitHub Check: Cloud Deployment Tests
- GitHub Check: SDK Integration Test Suite
- GitHub Check: Build
- GitHub Check: Agentuity Deployment
🔇 Additional comments (8)
apps/docs/src/web/content/agents/evaluations.mdx (3)
55-55: Consistent model version update across examples looks good.Nice doc consistency update to
gpt-5.4-nanoin all eval/preset snippets.Also applies to: 120-120, 170-170, 215-215, 289-289, 327-327, 438-438
355-355: Error-handling update aligns with eval runner semantics.Throwing on external validation failures and rethrowing in
catchmatches runtime error capture/recording behavior.Also applies to: 371-371, 378-378
485-485: Schema middleware import change is appropriate fortypeofgenerics.Importing
AgentInput/AgentOutputas named imports is consistent withpoliteness<typeof AgentInput, typeof AgentOutput>(...)usage.apps/docs/src/web/content/reference/cli/claude-code-plugin.mdx (1)
10-16: Good clarification of Claude Code install UX and prerequisites.Using a
textfence for/install agentuityand keeping prerequisites explicit makes this much less error-prone for readers.apps/docs/src/web/content/agents/events-lifecycle.mdx (1)
95-96: Listener signature guidance is now clear and consistent.The explicit callback shapes for agent vs session/thread events remove ambiguity for handler arity.
apps/docs/src/web/content/reference/migration-guide.mdx (1)
77-89: Nice improvement on router-shape migration guidance.The “both work + chained style for RPC typing” framing is a practical and accurate migration message.
apps/docs/src/web/content/frontend/rpc-client.mdx (1)
18-31: Strong typed setup example.Using
zValidatorin the route and exportingtype ApiRouter = typeof routergives the right foundation for end-to-end RPC type inference.apps/docs/src/web/content/reference/sdk-reference/context-api.mdx (1)
268-307: Great clarification of session scope and interface semantics.The request-scoped behavior and
Sessioninterface notes are now explicit and much harder to misinterpret.
| Evals must use named exports (`export const evalName = ...`). Default exports won't work. | ||
|
|
||
| The runtime auto-discovers `eval.ts` files next to your agents, so you don't need any special imports in your routes. | ||
| Eval files are discovered at build time from `eval.ts` files next to your agents, so you don't need any special imports in your routes. |
There was a problem hiding this comment.
Build-time discovery claim appears incorrect for current runtime behavior.
This line says eval files are discovered at build time, but runtime code executes evals from the agent instance at completion time (packages/runtime/src/agent.ts:1941-1970). Please update wording to runtime discovery/loading to avoid misleading setup expectations.
✏️ Suggested docs fix
-Eval files are discovered at build time from `eval.ts` files next to your agents, so you don't need any special imports in your routes.
+Eval files are discovered at runtime from `eval.ts` files next to your agents, so you don't need any special imports in your routes.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| Eval files are discovered at build time from `eval.ts` files next to your agents, so you don't need any special imports in your routes. | |
| Eval files are discovered at runtime from `eval.ts` files next to your agents, so you don't need any special imports in your routes. |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@apps/docs/src/web/content/agents/evaluations.mdx` at line 72, The statement
claiming "Eval files are discovered at build time" is misleading; update the
text to reflect that evals are loaded/discovered at runtime from eval.ts files
associated with agent instances (see eval.ts and the agent's execute/complete
logic in the agent instance code), so change the wording to indicate runtime
discovery/loading and execution (not build-time import) and mention that the
agent runtime loads evals when an agent completes rather than requiring special
route imports.
| export default router; | ||
| ``` | ||
|
|
||
| See [Streaming Responses](/agents/streaming-responses) for more streaming patterns. |
There was a problem hiding this comment.
Fix the streaming docs link path.
Line 462 points to /agents/streaming-responses, but this content belongs under routes and can misroute readers.
Suggested fix
-See [Streaming Responses](/agents/streaming-responses) for more streaming patterns.
+See [Streaming Responses](/routes/streaming-responses) for more streaming patterns.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| See [Streaming Responses](/agents/streaming-responses) for more streaming patterns. | |
| See [Streaming Responses](/routes/streaming-responses) for more streaming patterns. |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@apps/docs/src/web/content/routes/http.mdx` at line 462, The link text "See
[Streaming Responses](/agents/streaming-responses) for more streaming patterns."
points to the wrong section; update the href from "/agents/streaming-responses"
to the correct routes path (e.g., "/routes/streaming-responses") so the
"Streaming Responses" link in the HTTP routing docs points to the routes
streaming-responses page.
Summary by CodeRabbit
New Features
Documentation