From 53f06c9bfae604bd2f4546d16e1edb4fd69ae395 Mon Sep 17 00:00:00 2001 From: afterrburn Date: Fri, 2 Jan 2026 08:49:47 -0700 Subject: [PATCH 01/12] Update webhook URLs in sync-docs workflows to new endpoint --- .github/workflows/sync-docs-full.yml | 2 +- .github/workflows/sync-docs.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sync-docs-full.yml b/.github/workflows/sync-docs-full.yml index 30c0f083..d8b0cd95 100644 --- a/.github/workflows/sync-docs-full.yml +++ b/.github/workflows/sync-docs-full.yml @@ -24,4 +24,4 @@ jobs: set -euo pipefail cat all-files.txt | \ ./bin/build-payload.sh "${{ github.repository }}" full | \ - ./bin/send-webhook.sh "https://agentuity.ai/webhook/f61d5ce9d6ed85695cc992c55ccdc2a6" "Bearer $AGENTUITY_TOKEN" \ No newline at end of file + ./bin/send-webhook.sh "https://p0f83a312791b60ff.agentuity.run/api/process-docs" "Bearer $AGENTUITY_TOKEN" \ No newline at end of file diff --git a/.github/workflows/sync-docs.yml b/.github/workflows/sync-docs.yml index 87241c38..1a6193b0 100644 --- a/.github/workflows/sync-docs.yml +++ b/.github/workflows/sync-docs.yml @@ -67,4 +67,4 @@ jobs: set -euo pipefail cat changed-files.txt | \ ./bin/build-payload.sh "${{ github.repository }}" incremental | \ - ./bin/send-webhook.sh "https://agentuity.ai/webhook/f61d5ce9d6ed85695cc992c55ccdc2a6" "Bearer $AGENTUITY_TOKEN" \ No newline at end of file + ./bin/send-webhook.sh "https://p0f83a312791b60ff.agentuity.run/api/process-docs" "Bearer $AGENTUITY_TOKEN" \ No newline at end of file From b6c2976ebef8c91f030b54f2ef08d2b7842888b2 Mon Sep 17 00:00:00 2001 From: afterrburn Date: Fri, 2 Jan 2026 08:54:40 -0700 Subject: [PATCH 02/12] new doc-agents repo --- doc-agents | 1 + 1 file changed, 1 insertion(+) create mode 160000 doc-agents diff --git a/doc-agents b/doc-agents new file mode 160000 index 00000000..b297571d --- /dev/null +++ b/doc-agents @@ -0,0 +1 @@ +Subproject commit b297571d3a0031c70079757b4ddb1eca2621d51c From 5e92dfd8c6e27f84737a59d61eb658b88067d0d6 Mon Sep 17 00:00:00 2001 From: afterrburn Date: Fri, 2 Jan 2026 08:57:03 -0700 Subject: [PATCH 03/12] Convert doc-agents from submodule to regular directory --- doc-agents | 1 - .../.agents/agentuity/sdk/agent/AGENTS.md | 308 +++ .../.agents/agentuity/sdk/api/AGENTS.md | 367 +++ .../.agents/agentuity/sdk/web/AGENTS.md | 511 +++++ doc-agents/.agents/skills/README.md | 164 ++ .../skills/agentuity-cli-auth-login/SKILL.md | 34 + .../skills/agentuity-cli-auth-logout/SKILL.md | 34 + .../agentuity-cli-auth-ssh-add/SKILL.md | 76 + .../agentuity-cli-auth-ssh-delete/SKILL.md | 81 + .../agentuity-cli-auth-ssh-list/SKILL.md | 48 + .../skills/agentuity-cli-auth-whoami/SKILL.md | 58 + .../skills/agentuity-cli-build/SKILL.md | 40 + .../agentuity-cli-cloud-agent-get/SKILL.md | 77 + .../agentuity-cli-cloud-agent-list/SKILL.md | 55 + .../SKILL.md | 69 + .../SKILL.md | 67 + .../agentuity-cli-cloud-apikey-get/SKILL.md | 39 + .../agentuity-cli-cloud-apikey-list/SKILL.md | 45 + .../agentuity-cli-cloud-db-create/SKILL.md | 73 + .../agentuity-cli-cloud-db-delete/SKILL.md | 80 + .../agentuity-cli-cloud-db-get/SKILL.md | 78 + .../agentuity-cli-cloud-db-list/SKILL.md | 72 + .../agentuity-cli-cloud-db-logs/SKILL.md | 108 + .../agentuity-cli-cloud-db-sql/SKILL.md | 71 + .../agentuity-cli-cloud-deploy/SKILL.md | 83 + .../SKILL.md | 55 + .../SKILL.md | 70 + .../SKILL.md | 77 + .../SKILL.md | 63 + .../SKILL.md | 92 + .../SKILL.md | 52 + .../agentuity-cli-cloud-env-delete/SKILL.md | 64 + .../agentuity-cli-cloud-env-get/SKILL.md | 68 + .../agentuity-cli-cloud-env-import/SKILL.md | 68 + .../agentuity-cli-cloud-env-list/SKILL.md | 49 + .../agentuity-cli-cloud-env-pull/SKILL.md | 66 + .../agentuity-cli-cloud-env-push/SKILL.md | 52 + .../agentuity-cli-cloud-env-set/SKILL.md | 71 + .../SKILL.md | 70 + .../SKILL.md | 71 + .../SKILL.md | 73 + .../agentuity-cli-cloud-keyvalue-get/SKILL.md | 71 + .../SKILL.md | 68 + .../SKILL.md | 49 + .../SKILL.md | 33 + .../SKILL.md | 71 + .../agentuity-cli-cloud-keyvalue-set/SKILL.md | 79 + .../SKILL.md | 52 + .../agentuity-cli-cloud-redis-show/SKILL.md | 65 + .../agentuity-cli-cloud-scp-download/SKILL.md | 85 + .../agentuity-cli-cloud-scp-upload/SKILL.md | 85 + .../SKILL.md | 64 + .../agentuity-cli-cloud-secret-get/SKILL.md | 68 + .../SKILL.md | 68 + .../agentuity-cli-cloud-secret-list/SKILL.md | 49 + .../agentuity-cli-cloud-secret-pull/SKILL.md | 66 + .../agentuity-cli-cloud-secret-push/SKILL.md | 52 + .../agentuity-cli-cloud-secret-set/SKILL.md | 65 + .../agentuity-cli-cloud-session-get/SKILL.md | 97 + .../agentuity-cli-cloud-session-list/SKILL.md | 94 + .../agentuity-cli-cloud-session-logs/SKILL.md | 57 + .../skills/agentuity-cli-cloud-ssh/SKILL.md | 77 + .../SKILL.md | 61 + .../SKILL.md | 81 + .../SKILL.md | 90 + .../agentuity-cli-cloud-storage-get/SKILL.md | 80 + .../agentuity-cli-cloud-storage-list/SKILL.md | 94 + .../SKILL.md | 92 + .../SKILL.md | 66 + .../agentuity-cli-cloud-stream-get/SKILL.md | 86 + .../agentuity-cli-cloud-stream-list/SKILL.md | 82 + .../SKILL.md | 39 + .../agentuity-cli-cloud-thread-get/SKILL.md | 69 + .../agentuity-cli-cloud-thread-list/SKILL.md | 62 + .../SKILL.md | 76 + .../SKILL.md | 83 + .../agentuity-cli-cloud-vector-get/SKILL.md | 77 + .../SKILL.md | 49 + .../SKILL.md | 93 + .../agentuity-cli-cloud-vector-stats/SKILL.md | 52 + .../SKILL.md | 96 + .../.agents/skills/agentuity-cli-dev/SKILL.md | 46 + .../agentuity-cli-profile-create/SKILL.md | 71 + .../agentuity-cli-profile-current/SKILL.md | 38 + .../agentuity-cli-profile-delete/SKILL.md | 69 + .../agentuity-cli-profile-list/SKILL.md | 38 + .../agentuity-cli-profile-show/SKILL.md | 71 + .../skills/agentuity-cli-profile-use/SKILL.md | 47 + .../agentuity-cli-project-create/SKILL.md | 95 + .../agentuity-cli-project-delete/SKILL.md | 93 + .../agentuity-cli-project-list/SKILL.md | 48 + .../agentuity-cli-project-show/SKILL.md | 77 + .../skills/agentuity-cli-repl/SKILL.md | 28 + .../skills/agentuity-cli-upgrade/SKILL.md | 34 + .../.agents/skills/agentuity-version.txt | 1 + doc-agents/.gitignore | 43 + doc-agents/.vscode/settings.json | 16 + doc-agents/AGENTS.md | 64 + doc-agents/README.md | 147 ++ doc-agents/agentuity.config.ts | 35 + doc-agents/agentuity.json | 13 + doc-agents/app.ts | 17 + doc-agents/bun.lock | 2033 +++++++++++++++++ doc-agents/config.ts | 2 + doc-agents/package.json | 34 + doc-agents/src/agent/AGENTS.md | 308 +++ doc-agents/src/agent/doc_processing/agent.ts | 59 + .../src/agent/doc_processing/chunk-mdx.ts | 151 ++ .../agent/doc_processing/docs-orchestrator.ts | 157 ++ .../agent/doc_processing/docs-processor.ts | 44 + .../src/agent/doc_processing/embed-chunks.ts | 36 + doc-agents/src/agent/doc_processing/index.ts | 1 + .../doc_processing/test/chunk-mdx.test.ts | 191 ++ doc-agents/src/agent/doc_processing/types.ts | 30 + doc-agents/src/agent/hello/agent.ts | 22 + doc-agents/src/agent/hello/index.ts | 1 + doc-agents/src/api/AGENTS.md | 367 +++ doc-agents/src/api/index.ts | 12 + doc-agents/src/api/process-docs/index.ts | 11 + doc-agents/src/api/process-docs/route.ts | 14 + doc-agents/src/generated/AGENTS.md | 21 + doc-agents/src/generated/README.md | 22 + doc-agents/src/generated/app.ts | 359 +++ doc-agents/src/generated/registry.ts | 136 ++ doc-agents/src/generated/routes.ts | 174 ++ doc-agents/src/web/AGENTS.md | 511 +++++ doc-agents/src/web/App.tsx | 435 ++++ doc-agents/src/web/frontend.tsx | 29 + doc-agents/src/web/index.html | 13 + doc-agents/src/web/public/.gitkeep | 0 doc-agents/src/web/public/favicon.ico | Bin 0 -> 174912 bytes doc-agents/tsconfig.json | 27 + 132 files changed, 12833 insertions(+), 1 deletion(-) delete mode 160000 doc-agents create mode 100644 doc-agents/.agents/agentuity/sdk/agent/AGENTS.md create mode 100644 doc-agents/.agents/agentuity/sdk/api/AGENTS.md create mode 100644 doc-agents/.agents/agentuity/sdk/web/AGENTS.md create mode 100644 doc-agents/.agents/skills/README.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-auth-login/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-auth-logout/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-auth-ssh-add/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-auth-ssh-delete/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-auth-ssh-list/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-auth-whoami/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-build/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-agent-get/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-agent-list/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-apikey-create/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-apikey-delete/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-apikey-get/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-apikey-list/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-db-create/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-db-delete/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-db-get/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-db-list/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-db-logs/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-db-sql/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-deploy/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-deployment-list/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-deployment-logs/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-deployment-remove/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-deployment-rollback/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-deployment-show/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-deployment-undeploy/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-env-delete/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-env-get/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-env-import/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-env-list/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-env-pull/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-env-push/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-env-set/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-create-namespace/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-delete-namespace/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-delete/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-get/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-keys/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-list-namespaces/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-repl/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-search/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-set/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-stats/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-redis-show/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-scp-download/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-scp-upload/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-secret-delete/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-secret-get/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-secret-import/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-secret-list/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-secret-pull/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-secret-push/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-secret-set/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-session-get/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-session-list/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-session-logs/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-ssh/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-storage-create/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-storage-delete/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-storage-download/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-storage-get/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-storage-list/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-storage-upload/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-stream-delete/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-stream-get/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-stream-list/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-thread-delete/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-thread-get/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-thread-list/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-vector-delete-namespace/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-vector-delete/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-vector-get/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-vector-list-namespaces/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-vector-search/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-vector-stats/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-cloud-vector-upsert/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-dev/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-profile-create/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-profile-current/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-profile-delete/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-profile-list/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-profile-show/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-profile-use/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-project-create/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-project-delete/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-project-list/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-project-show/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-repl/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-cli-upgrade/SKILL.md create mode 100644 doc-agents/.agents/skills/agentuity-version.txt create mode 100644 doc-agents/.gitignore create mode 100644 doc-agents/.vscode/settings.json create mode 100644 doc-agents/AGENTS.md create mode 100644 doc-agents/README.md create mode 100644 doc-agents/agentuity.config.ts create mode 100644 doc-agents/agentuity.json create mode 100644 doc-agents/app.ts create mode 100644 doc-agents/bun.lock create mode 100644 doc-agents/config.ts create mode 100644 doc-agents/package.json create mode 100644 doc-agents/src/agent/AGENTS.md create mode 100644 doc-agents/src/agent/doc_processing/agent.ts create mode 100644 doc-agents/src/agent/doc_processing/chunk-mdx.ts create mode 100644 doc-agents/src/agent/doc_processing/docs-orchestrator.ts create mode 100644 doc-agents/src/agent/doc_processing/docs-processor.ts create mode 100644 doc-agents/src/agent/doc_processing/embed-chunks.ts create mode 100644 doc-agents/src/agent/doc_processing/index.ts create mode 100644 doc-agents/src/agent/doc_processing/test/chunk-mdx.test.ts create mode 100644 doc-agents/src/agent/doc_processing/types.ts create mode 100644 doc-agents/src/agent/hello/agent.ts create mode 100644 doc-agents/src/agent/hello/index.ts create mode 100644 doc-agents/src/api/AGENTS.md create mode 100644 doc-agents/src/api/index.ts create mode 100644 doc-agents/src/api/process-docs/index.ts create mode 100644 doc-agents/src/api/process-docs/route.ts create mode 100644 doc-agents/src/generated/AGENTS.md create mode 100644 doc-agents/src/generated/README.md create mode 100644 doc-agents/src/generated/app.ts create mode 100644 doc-agents/src/generated/registry.ts create mode 100644 doc-agents/src/generated/routes.ts create mode 100644 doc-agents/src/web/AGENTS.md create mode 100644 doc-agents/src/web/App.tsx create mode 100644 doc-agents/src/web/frontend.tsx create mode 100644 doc-agents/src/web/index.html create mode 100644 doc-agents/src/web/public/.gitkeep create mode 100644 doc-agents/src/web/public/favicon.ico create mode 100644 doc-agents/tsconfig.json diff --git a/doc-agents b/doc-agents deleted file mode 160000 index b297571d..00000000 --- a/doc-agents +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b297571d3a0031c70079757b4ddb1eca2621d51c diff --git a/doc-agents/.agents/agentuity/sdk/agent/AGENTS.md b/doc-agents/.agents/agentuity/sdk/agent/AGENTS.md new file mode 100644 index 00000000..3c5330d3 --- /dev/null +++ b/doc-agents/.agents/agentuity/sdk/agent/AGENTS.md @@ -0,0 +1,308 @@ +# Agents Folder Guide + +This folder contains AI agents for your Agentuity application. Each agent is organized in its own subdirectory. + +## Generated Types + +The `src/generated/` folder contains auto-generated TypeScript files: + +- `registry.ts` - Agent registry with strongly-typed agent definitions and schema types +- `routes.ts` - Route registry for API, WebSocket, and SSE endpoints +- `app.ts` - Application entry point (regenerated on every build) + +**Important:** Never edit files in `src/generated/` - they are overwritten on every build. + +Import generated types in your agents: + +```typescript +import type { HelloInput, HelloOutput } from '../generated/registry'; +``` + +## Directory Structure + +Each agent folder must contain: + +- **agent.ts** (required) - Agent definition with schema and handler + +Example structure: + +``` +src/agent/ +├── hello/ +│ └── agent.ts +├── process-data/ +│ └── agent.ts +└── (generated files in src/generated/) +``` + +**Note:** HTTP routes are defined separately in `src/api/` - see the API folder guide for details. + +## Creating an Agent + +### Basic Agent (agent.ts) + +```typescript +import { createAgent } from '@agentuity/runtime'; +import { s } from '@agentuity/schema'; + +const agent = createAgent('my-agent', { + description: 'What this agent does', + schema: { + input: s.object({ + name: s.string(), + age: s.number(), + }), + output: s.string(), + }, + handler: async (ctx, input) => { + // Access context: ctx.app, ctx.config, ctx.logger, ctx.kv, ctx.vector, ctx.stream + return `Hello, ${input.name}! You are ${input.age} years old.`; + }, +}); + +export default agent; +``` + +### Agent with Lifecycle (setup/shutdown) + +```typescript +import { createAgent } from '@agentuity/runtime'; +import { s } from '@agentuity/schema'; + +const agent = createAgent('lifecycle-agent', { + description: 'Agent with setup and shutdown', + schema: { + input: s.object({ message: s.string() }), + output: s.object({ result: s.string() }), + }, + setup: async (app) => { + // Initialize resources (runs once on startup) + // app contains: appName, version, startedAt, config + return { + agentId: `agent-${Math.random().toString(36).substr(2, 9)}`, + connectionPool: ['conn-1', 'conn-2'], + }; + }, + handler: async (ctx, input) => { + // Access setup config via ctx.config (fully typed) + ctx.logger.info('Agent ID:', ctx.config.agentId); + ctx.logger.info('Connections:', ctx.config.connectionPool); + return { result: `Processed: ${input.message}` }; + }, + shutdown: async (app, config) => { + // Cleanup resources (runs on shutdown) + console.log('Shutting down agent:', config.agentId); + }, +}); + +export default agent; +``` + +### Agent with Event Listeners + +```typescript +import { createAgent } from '@agentuity/runtime'; +import { s } from '@agentuity/schema'; + +const agent = createAgent('event-agent', { + schema: { + input: s.object({ data: s.string() }), + output: s.string(), + }, + handler: async (ctx, input) => { + return `Processed: ${input.data}`; + }, +}); + +agent.addEventListener('started', (eventName, agent, ctx) => { + ctx.logger.info('Agent started'); +}); + +agent.addEventListener('completed', (eventName, agent, ctx) => { + ctx.logger.info('Agent completed'); +}); + +agent.addEventListener('errored', (eventName, agent, ctx, error) => { + ctx.logger.error('Agent errored:', error); +}); + +export default agent; +``` + +## Agent Context (ctx) + +The handler receives a context object with: + +- **ctx.app** - Application state (appName, version, startedAt, config from createApp) +- **ctx.config** - Agent-specific config (from setup return value, fully typed) +- **ctx.logger** - Structured logger (info, warn, error, debug, trace) +- **ctx.tracer** - OpenTelemetry tracer for custom spans +- **ctx.sessionId** - Unique session identifier +- **ctx.kv** - Key-value storage +- **ctx.vector** - Vector storage for embeddings +- **ctx.stream** - Stream storage for real-time data +- **ctx.state** - In-memory request-scoped state (Map) +- **ctx.thread** - Thread information for multi-turn conversations +- **ctx.session** - Session information +- **ctx.waitUntil** - Schedule background tasks + +## Examples + +### Using Key-Value Storage + +```typescript +handler: async (ctx, input) => { + await ctx.kv.set('user:123', { name: 'Alice', age: 30 }); + const user = await ctx.kv.get('user:123'); + await ctx.kv.delete('user:123'); + const keys = await ctx.kv.list('user:*'); + return user; +}; +``` + +### Using Vector Storage + +```typescript +handler: async (ctx, input) => { + await ctx.vector.upsert('docs', [ + { id: '1', values: [0.1, 0.2, 0.3], metadata: { text: 'Hello' } }, + ]); + const results = await ctx.vector.query('docs', [0.1, 0.2, 0.3], { topK: 5 }); + return results; +}; +``` + +### Using Streams + +```typescript +handler: async (ctx, input) => { + const stream = await ctx.stream.create('agent-logs'); + await ctx.stream.write(stream.id, 'Processing step 1'); + await ctx.stream.write(stream.id, 'Processing step 2'); + return { streamId: stream.id }; +}; +``` + +### Background Tasks with waitUntil + +```typescript +handler: async (ctx, input) => { + // Schedule background work that continues after response + ctx.waitUntil(async () => { + await ctx.kv.set('processed', Date.now()); + ctx.logger.info('Background task complete'); + }); + + return { status: 'processing' }; +}; +``` + +### Calling Another Agent + +```typescript +// Import the agent directly +import otherAgent from '../other-agent/agent'; + +handler: async (ctx, input) => { + const result = await otherAgent.run({ data: input.value }); + return `Other agent returned: ${result}`; +}; +``` + +## Subagents (Nested Agents) + +Agents can have subagents organized one level deep. This is useful for grouping related functionality. + +### Directory Structure for Subagents + +``` +src/agent/ +└── team/ # Parent agent + ├── agent.ts # Parent agent + ├── members/ # Subagent + │ └── agent.ts + └── tasks/ # Subagent + └── agent.ts +``` + +### Parent Agent + +```typescript +import { createAgent } from '@agentuity/runtime'; +import { s } from '@agentuity/schema'; + +const agent = createAgent('team', { + description: 'Team Manager', + schema: { + input: s.object({ action: s.union([s.literal('info'), s.literal('count')]) }), + output: s.object({ + message: s.string(), + timestamp: s.string(), + }), + }, + handler: async (ctx, { action }) => { + return { + message: 'Team parent agent - manages members and tasks', + timestamp: new Date().toISOString(), + }; + }, +}); + +export default agent; +``` + +### Subagent (Accessing Parent) + +```typescript +import { createAgent } from '@agentuity/runtime'; +import { s } from '@agentuity/schema'; +import parentAgent from '../agent'; + +const agent = createAgent('team.members', { + description: 'Members Subagent', + schema: { + input: s.object({ + action: s.union([s.literal('list'), s.literal('add'), s.literal('remove')]), + name: s.optional(s.string()), + }), + output: s.object({ + members: s.array(s.string()), + parentInfo: s.optional(s.string()), + }), + }, + handler: async (ctx, { action, name }) => { + // Call parent agent directly + const parentResult = await parentAgent.run({ action: 'info' }); + const parentInfo = `Parent says: ${parentResult.message}`; + + let members = ['Alice', 'Bob']; + if (action === 'add' && name) { + members.push(name); + } + + return { members, parentInfo }; + }, +}); + +export default agent; +``` + +### Key Points About Subagents + +- **One level deep**: Only one level of nesting is supported (no nested subagents) +- **Access parent**: Import and call parent agents directly +- **Agent names**: Subagents have dotted names like `"team.members"` +- **Shared context**: Subagents share the same app context (kv, logger, etc.) + +## Rules + +- Each agent folder name becomes the agent's route name (e.g., `hello/` → `/agent/hello`) +- **agent.ts** must export default the agent instance +- The first argument to `createAgent()` is the agent name (must match folder structure) +- Input/output schemas are enforced with @agentuity/schema validation +- Setup return value type automatically flows to ctx.config (fully typed) +- Use ctx.logger for logging, not console.log +- Import agents directly to call them (recommended approach) +- Subagents are one level deep only (team/members/, not team/members/subagent/) + + diff --git a/doc-agents/.agents/agentuity/sdk/api/AGENTS.md b/doc-agents/.agents/agentuity/sdk/api/AGENTS.md new file mode 100644 index 00000000..e6c32b3f --- /dev/null +++ b/doc-agents/.agents/agentuity/sdk/api/AGENTS.md @@ -0,0 +1,367 @@ +# APIs Folder Guide + +This folder contains REST API routes for your Agentuity application. Each API is organized in its own subdirectory. + +## Generated Types + +The `src/generated/` folder contains auto-generated TypeScript files: + +- `routes.ts` - Route registry with strongly-typed route definitions and schema types +- `registry.ts` - Agent registry (for calling agents from routes) +- `app.ts` - Application entry point (regenerated on every build) + +**Important:** Never edit files in `src/generated/` - they are overwritten on every build. + +Import generated types in your routes: + +```typescript +import type { POST_Api_UsersInput, POST_Api_UsersOutput } from '../generated/routes'; +``` + +## Directory Structure + +Each API folder must contain: + +- **route.ts** (required) - HTTP route definitions using Hono router + +Example structure: + +``` +src/api/ +├── index.ts (optional, mounted at /api) +├── status/ +│ └── route.ts (mounted at /api/status) +├── users/ +│ └── route.ts (mounted at /api/users) +├── agent-call/ + └── route.ts (mounted at /api/agent-call) +``` + +## Creating an API + +### Basic API (route.ts) + +```typescript +import { createRouter } from '@agentuity/runtime'; + +const router = createRouter(); + +// GET /api/status +router.get('/', (c) => { + return c.json({ + status: 'ok', + timestamp: new Date().toISOString(), + version: '1.0.0', + }); +}); + +// POST /api/status +router.post('/', async (c) => { + const body = await c.req.json(); + return c.json({ received: body }); +}); + +export default router; +``` + +### API with Request Validation + +```typescript +import { createRouter } from '@agentuity/runtime'; +import { s } from '@agentuity/schema'; +import { validator } from 'hono/validator'; + +const router = createRouter(); + +const createUserSchema = s.object({ + name: s.string(), + email: s.string(), + age: s.number(), +}); + +router.post( + '/', + validator('json', (value, c) => { + const result = createUserSchema['~standard'].validate(value); + if (result.issues) { + return c.json({ error: 'Validation failed', issues: result.issues }, 400); + } + return result.value; + }), + async (c) => { + const data = c.req.valid('json'); + // data is fully typed: { name: string, email: string, age: number } + return c.json({ + success: true, + user: data, + }); + } +); + +export default router; +``` + +### API Calling Agents + +APIs can call agents directly by importing them: + +```typescript +import { createRouter } from '@agentuity/runtime'; +import helloAgent from '@agent/hello'; + +const router = createRouter(); + +router.get('/', async (c) => { + // Call an agent directly + const result = await helloAgent.run({ name: 'API Caller', age: 42 }); + + return c.json({ + success: true, + agentResult: result, + }); +}); + +router.post('/with-input', async (c) => { + const body = await c.req.json(); + const { name, age } = body; + + // Call agent with dynamic input + const result = await helloAgent.run({ name, age }); + + return c.json({ + success: true, + agentResult: result, + }); +}); + +export default router; +``` + +### API with Agent Validation + +Use `agent.validator()` for automatic input validation from agent schemas: + +```typescript +import { createRouter } from '@agentuity/runtime'; +import myAgent from '@agent/my-agent'; + +const router = createRouter(); + +// POST with automatic validation using agent's input schema +router.post('/', myAgent.validator(), async (c) => { + const data = c.req.valid('json'); // Fully typed from agent schema! + const result = await myAgent.run(data); + return c.json({ success: true, result }); +}); + +export default router; +``` + +### API with Logging + +```typescript +import { createRouter } from '@agentuity/runtime'; + +const router = createRouter(); + +router.get('/log-test', (c) => { + c.var.logger.info('Info message'); + c.var.logger.error('Error message'); + c.var.logger.warn('Warning message'); + c.var.logger.debug('Debug message'); + c.var.logger.trace('Trace message'); + + return c.text('Check logs'); +}); + +export default router; +``` + +## Route Context (c) + +The route handler receives a Hono context object with: + +- **c.req** - Request object (c.req.json(), c.req.param(), c.req.query(), etc.) +- **c.json()** - Return JSON response +- **c.text()** - Return text response +- **c.html()** - Return HTML response +- **c.redirect()** - Redirect to URL +- **c.var.logger** - Structured logger (info, warn, error, debug, trace) +- **c.var.kv** - Key-value storage +- **c.var.vector** - Vector storage +- **c.var.stream** - Stream management +- **Import agents directly** - Import and call agents directly (recommended) + +## HTTP Methods + +```typescript +const router = createRouter(); + +router.get('/path', (c) => { + /* ... */ +}); +router.post('/path', (c) => { + /* ... */ +}); +router.put('/path', (c) => { + /* ... */ +}); +router.patch('/path', (c) => { + /* ... */ +}); +router.delete('/path', (c) => { + /* ... */ +}); +router.options('/path', (c) => { + /* ... */ +}); +``` + +## Path Parameters + +```typescript +// GET /api/users/:id +router.get('/:id', (c) => { + const id = c.req.param('id'); + return c.json({ userId: id }); +}); + +// GET /api/posts/:postId/comments/:commentId +router.get('/:postId/comments/:commentId', (c) => { + const postId = c.req.param('postId'); + const commentId = c.req.param('commentId'); + return c.json({ postId, commentId }); +}); +``` + +## Query Parameters + +```typescript +// GET /api/search?q=hello&limit=10 +router.get('/search', (c) => { + const query = c.req.query('q'); + const limit = c.req.query('limit') || '20'; + return c.json({ query, limit: parseInt(limit) }); +}); +``` + +## Request Body + +```typescript +// JSON body +router.post('/', async (c) => { + const body = await c.req.json(); + return c.json({ received: body }); +}); + +// Form data +router.post('/upload', async (c) => { + const formData = await c.req.formData(); + const file = formData.get('file'); + return c.json({ fileName: file?.name }); +}); +``` + +## Error Handling + +```typescript +import myAgent from '@agent/my-agent'; + +router.get('/', async (c) => { + try { + const result = await myAgent.run({ data: 'test' }); + return c.json({ success: true, result }); + } catch (error) { + c.var.logger.error('Agent call failed:', error); + return c.json( + { + success: false, + error: error instanceof Error ? error.message : String(error), + }, + 500 + ); + } +}); +``` + +## Response Types + +```typescript +// JSON response +return c.json({ data: 'value' }); + +// Text response +return c.text('Hello World'); + +// HTML response +return c.html('

Hello

'); + +// Custom status code +return c.json({ error: 'Not found' }, 404); + +// Redirect +return c.redirect('/new-path'); + +// Headers +return c.json({ data: 'value' }, 200, { + 'X-Custom-Header': 'value', +}); +``` + +## Streaming Routes + +```typescript +import { createRouter, stream, sse, websocket } from '@agentuity/runtime'; + +const router = createRouter(); + +// Stream response (use with POST) +router.post( + '/events', + stream((c) => { + return new ReadableStream({ + start(controller) { + controller.enqueue('event 1\n'); + controller.enqueue('event 2\n'); + controller.close(); + }, + }); + }) +); + +// Server-Sent Events (use with GET) +router.get( + '/notifications', + sse((c, stream) => { + stream.writeSSE({ data: 'Hello', event: 'message' }); + stream.writeSSE({ data: 'World', event: 'message' }); + }) +); + +// WebSocket (use with GET) +router.get( + '/ws', + websocket((c, ws) => { + ws.onOpen(() => { + ws.send('Connected!'); + }); + ws.onMessage((event) => { + ws.send(`Echo: ${event.data}`); + }); + }) +); + +export default router; +``` + +## Rules + +- Each API folder name becomes the route name (e.g., `status/` → `/api/status`) +- **route.ts** must export default the router instance +- Use c.var.logger for logging, not console.log +- Import agents directly to call them (e.g., `import agent from '@agent/name'`) +- Validation should use @agentuity/schema or agent.validator() for type safety +- Return appropriate HTTP status codes +- APIs run at `/api/{folderName}` by default + + diff --git a/doc-agents/.agents/agentuity/sdk/web/AGENTS.md b/doc-agents/.agents/agentuity/sdk/web/AGENTS.md new file mode 100644 index 00000000..2a6eb0da --- /dev/null +++ b/doc-agents/.agents/agentuity/sdk/web/AGENTS.md @@ -0,0 +1,511 @@ +# Web Folder Guide + +This folder contains your React-based web application that communicates with your Agentuity agents. + +## Generated Types + +The `src/generated/` folder contains auto-generated TypeScript files: + +- `routes.ts` - Route registry with type-safe API, WebSocket, and SSE route definitions +- `registry.ts` - Agent registry with input/output types + +**Important:** Never edit files in `src/generated/` - they are overwritten on every build. + +Import generated types in your components: + +```typescript +// Routes are typed automatically via module augmentation +import { useAPI } from '@agentuity/react'; + +// The route 'GET /api/users' is fully typed +const { data } = useAPI('GET /api/users'); +``` + +## Directory Structure + +Required files: + +- **App.tsx** (required) - Main React application component +- **frontend.tsx** (required) - Frontend entry point with client-side rendering +- **index.html** (required) - HTML template +- **public/** (optional) - Static assets (images, CSS, JS files) + +Example structure: + +``` +src/web/ +├── App.tsx +├── frontend.tsx +├── index.html +└── public/ + ├── styles.css + ├── logo.svg + └── script.js +``` + +## Creating the Web App + +### App.tsx - Main Component + +```typescript +import { AgentuityProvider, useAPI } from '@agentuity/react'; +import { useState } from 'react'; + +function HelloForm() { + const [name, setName] = useState('World'); + const { invoke, isLoading, data: greeting } = useAPI('POST /api/hello'); + + return ( +
+ setName(e.target.value)} + disabled={isLoading} + /> + + + +
{greeting ?? 'Waiting for response'}
+
+ ); +} + +export function App() { + return ( + +
+

Welcome to Agentuity

+ +
+
+ ); +} +``` + +### frontend.tsx - Entry Point + +```typescript +import { createRoot } from 'react-dom/client'; +import { App } from './App'; + +const root = document.getElementById('root'); +if (!root) throw new Error('Root element not found'); + +createRoot(root).render(); +``` + +### index.html - HTML Template + +```html + + + + + + My Agentuity App + + +
+ + + +``` + +## React Hooks + +All hooks from `@agentuity/react` must be used within an `AgentuityProvider`. **Always use these hooks instead of raw `fetch()` calls** - they provide type safety, automatic error handling, and integration with the Agentuity platform. + +### useAPI - Type-Safe API Calls + +The primary hook for making HTTP requests. **Use this instead of `fetch()`.** + +```typescript +import { useAPI } from '@agentuity/react'; + +function MyComponent() { + // GET requests auto-execute and return refetch + const { data, isLoading, error, refetch } = useAPI('GET /api/users'); + + // POST/PUT/DELETE return invoke for manual execution + const { invoke, data: result, isLoading: saving } = useAPI('POST /api/users'); + + const handleCreate = async () => { + // Input is fully typed from route schema! + await invoke({ name: 'Alice', email: 'alice@example.com' }); + }; + + return ( +
+ + {result &&

Created: {result.name}

} +
+ ); +} +``` + +**useAPI Return Values:** + +| Property | Type | Description | +| ------------ | ------------------------ | ----------------------------------------- | +| `data` | `T \| undefined` | Response data (typed from route schema) | +| `error` | `Error \| null` | Error if request failed | +| `isLoading` | `boolean` | True during initial load | +| `isFetching` | `boolean` | True during any fetch (including refetch) | +| `isSuccess` | `boolean` | True if last request succeeded | +| `isError` | `boolean` | True if last request failed | +| `invoke` | `(input?) => Promise` | Manual trigger (POST/PUT/DELETE) | +| `refetch` | `() => Promise` | Refetch data (GET) | +| `reset` | `() => void` | Reset state to initial | + +### useAPI Options + +```typescript +// GET with query parameters and caching +const { data } = useAPI({ + route: 'GET /api/search', + query: { q: 'react', limit: '10' }, + staleTime: 5000, // Cache for 5 seconds + refetchInterval: 10000, // Auto-refetch every 10 seconds + enabled: true, // Set to false to disable auto-fetch +}); + +// POST with callbacks +const { invoke } = useAPI({ + route: 'POST /api/users', + onSuccess: (data) => console.log('Created:', data), + onError: (error) => console.error('Failed:', error), +}); + +// Streaming responses with onChunk +const { invoke } = useAPI({ + route: 'POST /api/stream', + onChunk: (chunk) => console.log('Received chunk:', chunk), + delimiter: '\n', // Split stream by newlines (default) +}); + +// Custom headers +const { data } = useAPI({ + route: 'GET /api/protected', + headers: { 'X-Custom-Header': 'value' }, +}); +``` + +### useWebsocket - WebSocket Connection + +For bidirectional real-time communication. Automatically handles reconnection. + +```typescript +import { useWebsocket } from '@agentuity/react'; + +function ChatComponent() { + const { isConnected, data, send, messages, clearMessages, error, reset } = useWebsocket('/api/chat'); + + return ( +
+

Status: {isConnected ? 'Connected' : 'Disconnected'}

+ +
+ {messages.map((msg, i) => ( +

{JSON.stringify(msg)}

+ ))} +
+ +
+ ); +} +``` + +**useWebsocket Return Values:** + +| Property | Type | Description | +| --------------- | ---------------- | ---------------------------------------- | +| `isConnected` | `boolean` | True when WebSocket is connected | +| `data` | `T \| undefined` | Most recent message received | +| `messages` | `T[]` | Array of all received messages | +| `send` | `(data) => void` | Send a message (typed from route schema) | +| `clearMessages` | `() => void` | Clear the messages array | +| `close` | `() => void` | Close the connection | +| `error` | `Error \| null` | Error if connection failed | +| `isError` | `boolean` | True if there's an error | +| `reset` | `() => void` | Reset state and reconnect | +| `readyState` | `number` | WebSocket ready state | + +### useEventStream - Server-Sent Events + +For server-to-client streaming (one-way). Use when server pushes updates to client. + +```typescript +import { useEventStream } from '@agentuity/react'; + +function NotificationsComponent() { + const { isConnected, data, error, close, reset } = useEventStream('/api/notifications'); + + return ( +
+

Connected: {isConnected ? 'Yes' : 'No'}

+ {error &&

Error: {error.message}

} +

Latest: {JSON.stringify(data)}

+ +
+ ); +} +``` + +**useEventStream Return Values:** + +| Property | Type | Description | +| ------------- | ---------------- | ---------------------------------- | +| `isConnected` | `boolean` | True when EventSource is connected | +| `data` | `T \| undefined` | Most recent event data | +| `error` | `Error \| null` | Error if connection failed | +| `isError` | `boolean` | True if there's an error | +| `close` | `() => void` | Close the connection | +| `reset` | `() => void` | Reset state and reconnect | +| `readyState` | `number` | EventSource ready state | + +### useAgentuity - Access Context + +Access the Agentuity context for base URL and configuration. + +```typescript +import { useAgentuity } from '@agentuity/react'; + +function MyComponent() { + const { baseUrl } = useAgentuity(); + + return

API Base: {baseUrl}

; +} +``` + +### useAuth - Authentication State + +Access and manage authentication state. + +```typescript +import { useAuth } from '@agentuity/react'; + +function AuthStatus() { + const { isAuthenticated, authHeader, setAuthHeader, authLoading } = useAuth(); + + const handleLogin = async (token: string) => { + setAuthHeader?.(`Bearer ${token}`); + }; + + const handleLogout = () => { + setAuthHeader?.(null); + }; + + if (authLoading) return

Loading...

; + + return ( +
+ {isAuthenticated ? ( + + ) : ( + + )} +
+ ); +} +``` + +**useAuth Return Values:** + +| Property | Type | Description | +| ----------------- | ------------------- | ------------------------------------------- | +| `isAuthenticated` | `boolean` | True if user has auth token and not loading | +| `authHeader` | `string \| null` | Current auth header (e.g., "Bearer ...") | +| `setAuthHeader` | `(token) => void` | Set auth header (null to clear) | +| `authLoading` | `boolean` | True during auth state changes | +| `setAuthLoading` | `(loading) => void` | Set auth loading state | + +## Complete Example + +```typescript +import { AgentuityProvider, useAPI, useWebsocket } from '@agentuity/react'; +import { useEffect, useState } from 'react'; + +function Dashboard() { + const [count, setCount] = useState(0); + const { invoke, data: agentResult } = useAPI('POST /api/process'); + const { isConnected, send, data: wsMessage } = useWebsocket('/api/live'); + + useEffect(() => { + if (isConnected) { + const interval = setInterval(() => { + send({ ping: Date.now() }); + }, 1000); + return () => clearInterval(interval); + } + }, [isConnected, send]); + + return ( +
+

My Agentuity App

+ +
+

Count: {count}

+ +
+ +
+ +

{JSON.stringify(agentResult)}

+
+ +
+ WebSocket: + {isConnected ? JSON.stringify(wsMessage) : 'Not connected'} +
+
+ ); +} + +export function App() { + return ( + + + + ); +} +``` + +## Static Assets + +Place static files in the **public/** folder: + +``` +src/web/public/ +├── logo.svg +├── styles.css +└── script.js +``` + +Reference them in your HTML or components: + +```html + + + +``` + +```typescript +// In React components +Logo +``` + +## Styling + +### Inline Styles + +```typescript +
+ Styled content +
+``` + +### CSS Files + +Create `public/styles.css`: + +```css +body { + background-color: #09090b; + color: #fff; + font-family: sans-serif; +} +``` + +Import in `index.html`: + +```html + +``` + +### Style Tag in Component + +```typescript +
+ + +
+``` + +## RPC-Style API Client + +For non-React contexts (like utility functions or event handlers), use `createClient`: + +```typescript +import { createClient } from '@agentuity/react'; + +// Create a typed client (uses global baseUrl and auth from AgentuityProvider) +const api = createClient(); + +// Type-safe RPC-style calls - routes become nested objects +// Route 'GET /api/users' becomes api.users.get() +// Route 'POST /api/users' becomes api.users.post() +// Route 'GET /api/users/:id' becomes api.users.id.get({ id: '123' }) + +async function fetchData() { + const users = await api.users.get(); + const newUser = await api.users.post({ name: 'Alice', email: 'alice@example.com' }); + const user = await api.users.id.get({ id: '123' }); + return { users, newUser, user }; +} +``` + +**When to use `createClient` vs `useAPI`:** + +| Use Case | Recommendation | +| ------------------------- | -------------- | +| React component rendering | `useAPI` hook | +| Event handlers | Either works | +| Utility functions | `createClient` | +| Non-React code | `createClient` | +| Need loading/error state | `useAPI` hook | +| Need caching/refetch | `useAPI` hook | + +## Best Practices + +- Wrap your app with **AgentuityProvider** for hooks to work +- **Always use `useAPI` instead of `fetch()`** for type safety and error handling +- Use **useAPI** for type-safe HTTP requests (GET, POST, PUT, DELETE) +- Use **useWebsocket** for bidirectional real-time communication +- Use **useEventStream** for server-to-client streaming +- Use **useAuth** for authentication state management +- Handle loading and error states in UI +- Place reusable components in separate files +- Keep static assets in the **public/** folder + +## Rules + +- **App.tsx** must export a function named `App` +- **frontend.tsx** must render the `App` component to `#root` +- **index.html** must have a `
` +- Routes are typed via module augmentation from `src/generated/routes.ts` +- The web app is served at `/` by default +- Static files in `public/` are served at `/public/*` +- Module script tag: `` +- **Never use raw `fetch()` calls** - always use `useAPI` or `createClient` + + diff --git a/doc-agents/.agents/skills/README.md b/doc-agents/.agents/skills/README.md new file mode 100644 index 00000000..0bb87750 --- /dev/null +++ b/doc-agents/.agents/skills/README.md @@ -0,0 +1,164 @@ +# Agentuity CLI Skills + +This directory contains auto-generated [Agent Skills](https://agentskills.io) for the Agentuity CLI. + +## What are Agent Skills? + +Agent Skills are modular capabilities that extend AI coding agents. Each skill is a directory +containing a `SKILL.md` file with instructions that agents read when performing relevant tasks. + +Learn more at the [Agent Skills Specification](https://agentskills.io/specification). + +## Generated From + +- **CLI Version**: 0.0.105 +- **Generated**: 2026-01-02 +- **Total Skills**: 89 + +## Available Skills + +### auth + +| Skill | Command | Description | +|-------|---------|-------------| +| [agentuity-cli-auth-login](./agentuity-cli-auth-login) | `agentuity auth login` | Login to the Agentuity Platform using a browser-based authen... | +| [agentuity-cli-auth-logout](./agentuity-cli-auth-logout) | `agentuity auth logout` | Logout of the Agentuity Cloud Platform | +| [agentuity-cli-auth-ssh-add](./agentuity-cli-auth-ssh-add) | `agentuity auth ssh add` | Add an SSH public key to your account (reads from file or st... | +| [agentuity-cli-auth-ssh-delete](./agentuity-cli-auth-ssh-delete) | `agentuity auth ssh delete` | Delete an SSH key from your account | +| [agentuity-cli-auth-ssh-list](./agentuity-cli-auth-ssh-list) | `agentuity auth ssh list` | List all SSH keys on your account | +| [agentuity-cli-auth-whoami](./agentuity-cli-auth-whoami) | `agentuity auth whoami` | Display information about the currently authenticated user | + +### build + +| Skill | Command | Description | +|-------|---------|-------------| +| [agentuity-cli-build](./agentuity-cli-build) | `agentuity build` | Build Agentuity application for deployment | + +### cloud + +| Skill | Command | Description | +|-------|---------|-------------| +| [agentuity-cli-cloud-agent-get](./agentuity-cli-cloud-agent-get) | `agentuity cloud agent get` | Get details about a specific agent | +| [agentuity-cli-cloud-agent-list](./agentuity-cli-cloud-agent-list) | `agentuity cloud agent list` | List agents for a project | +| [agentuity-cli-cloud-apikey-create](./agentuity-cli-cloud-apikey-create) | `agentuity cloud apikey create` | Create a new API key | +| [agentuity-cli-cloud-apikey-delete](./agentuity-cli-cloud-apikey-delete) | `agentuity cloud apikey delete` | Delete an API key (soft delete) | +| [agentuity-cli-cloud-apikey-get](./agentuity-cli-cloud-apikey-get) | `agentuity cloud apikey get` | Get a specific API key by id | +| [agentuity-cli-cloud-apikey-list](./agentuity-cli-cloud-apikey-list) | `agentuity cloud apikey list` | List all API keys | +| [agentuity-cli-cloud-db-create](./agentuity-cli-cloud-db-create) | `agentuity cloud db create` | Create a new database resource | +| [agentuity-cli-cloud-db-delete](./agentuity-cli-cloud-db-delete) | `agentuity cloud db delete` | Delete a database resource | +| [agentuity-cli-cloud-db-get](./agentuity-cli-cloud-db-get) | `agentuity cloud db get` | Show details about a specific database | +| [agentuity-cli-cloud-db-list](./agentuity-cli-cloud-db-list) | `agentuity cloud db list` | List database resources | +| [agentuity-cli-cloud-db-logs](./agentuity-cli-cloud-db-logs) | `agentuity cloud db logs` | Get query logs for a specific database | +| [agentuity-cli-cloud-db-sql](./agentuity-cli-cloud-db-sql) | `agentuity cloud db sql` | Execute SQL query on a database | +| [agentuity-cli-cloud-deploy](./agentuity-cli-cloud-deploy) | `agentuity cloud deploy` | Deploy project to the Agentuity Cloud | +| [agentuity-cli-cloud-deployment-list](./agentuity-cli-cloud-deployment-list) | `agentuity cloud deployment list` | List deployments | +| [agentuity-cli-cloud-deployment-logs](./agentuity-cli-cloud-deployment-logs) | `agentuity cloud deployment logs` | View logs for a specific deployment | +| [agentuity-cli-cloud-deployment-remove](./agentuity-cli-cloud-deployment-remove) | `agentuity cloud deployment remove` | Remove a specific deployment | +| [agentuity-cli-cloud-deployment-rollback](./agentuity-cli-cloud-deployment-rollback) | `agentuity cloud deployment rollback` | Rollback the latest to the previous deployment | +| [agentuity-cli-cloud-deployment-show](./agentuity-cli-cloud-deployment-show) | `agentuity cloud deployment show` | Show details about a specific deployment | +| [agentuity-cli-cloud-deployment-undeploy](./agentuity-cli-cloud-deployment-undeploy) | `agentuity cloud deployment undeploy` | Undeploy the latest deployment | +| [agentuity-cli-cloud-env-delete](./agentuity-cli-cloud-env-delete) | `agentuity cloud env delete` | Delete an environment variable | +| [agentuity-cli-cloud-env-get](./agentuity-cli-cloud-env-get) | `agentuity cloud env get` | Get an environment variable value | +| [agentuity-cli-cloud-env-import](./agentuity-cli-cloud-env-import) | `agentuity cloud env import` | Import environment variables from a file to cloud and local ... | +| [agentuity-cli-cloud-env-list](./agentuity-cli-cloud-env-list) | `agentuity cloud env list` | List all environment variables | +| [agentuity-cli-cloud-env-pull](./agentuity-cli-cloud-env-pull) | `agentuity cloud env pull` | Pull environment variables from cloud to local .env.producti... | +| [agentuity-cli-cloud-env-push](./agentuity-cli-cloud-env-push) | `agentuity cloud env push` | Push environment variables from local .env.production file t... | +| [agentuity-cli-cloud-env-set](./agentuity-cli-cloud-env-set) | `agentuity cloud env set` | Set an environment variable | +| [agentuity-cli-cloud-keyvalue-create-namespace](./agentuity-cli-cloud-keyvalue-create-namespace) | `agentuity cloud keyvalue create-namespace` | Create a new keyvalue namespace | +| [agentuity-cli-cloud-keyvalue-delete](./agentuity-cli-cloud-keyvalue-delete) | `agentuity cloud keyvalue delete` | Delete a key from the keyvalue storage | +| [agentuity-cli-cloud-keyvalue-delete-namespace](./agentuity-cli-cloud-keyvalue-delete-namespace) | `agentuity cloud keyvalue delete-namespace` | Delete a keyvalue namespace and all its keys | +| [agentuity-cli-cloud-keyvalue-get](./agentuity-cli-cloud-keyvalue-get) | `agentuity cloud keyvalue get` | Get a value from the keyvalue storage | +| [agentuity-cli-cloud-keyvalue-keys](./agentuity-cli-cloud-keyvalue-keys) | `agentuity cloud keyvalue keys` | List all keys in a keyvalue namespace | +| [agentuity-cli-cloud-keyvalue-list-namespaces](./agentuity-cli-cloud-keyvalue-list-namespaces) | `agentuity cloud keyvalue list-namespaces` | List all keyvalue namespaces | +| [agentuity-cli-cloud-keyvalue-repl](./agentuity-cli-cloud-keyvalue-repl) | `agentuity cloud keyvalue repl` | Start an interactive repl for working with keyvalue database | +| [agentuity-cli-cloud-keyvalue-search](./agentuity-cli-cloud-keyvalue-search) | `agentuity cloud keyvalue search` | Search for keys matching a keyword in a keyvalue namespace | +| [agentuity-cli-cloud-keyvalue-set](./agentuity-cli-cloud-keyvalue-set) | `agentuity cloud keyvalue set` | Set a key and value in the keyvalue storage | +| [agentuity-cli-cloud-keyvalue-stats](./agentuity-cli-cloud-keyvalue-stats) | `agentuity cloud keyvalue stats` | Get statistics for keyvalue storage | +| [agentuity-cli-cloud-redis-show](./agentuity-cli-cloud-redis-show) | `agentuity cloud redis show` | Show Redis connection URL | +| [agentuity-cli-cloud-scp-download](./agentuity-cli-cloud-scp-download) | `agentuity cloud scp download` | Download a file using security copy | +| [agentuity-cli-cloud-scp-upload](./agentuity-cli-cloud-scp-upload) | `agentuity cloud scp upload` | Upload a file using security copy | +| [agentuity-cli-cloud-secret-delete](./agentuity-cli-cloud-secret-delete) | `agentuity cloud secret delete` | Delete a secret | +| [agentuity-cli-cloud-secret-get](./agentuity-cli-cloud-secret-get) | `agentuity cloud secret get` | Get a secret value | +| [agentuity-cli-cloud-secret-import](./agentuity-cli-cloud-secret-import) | `agentuity cloud secret import` | Import secrets from a file to cloud and local .env.productio... | +| [agentuity-cli-cloud-secret-list](./agentuity-cli-cloud-secret-list) | `agentuity cloud secret list` | List all secrets | +| [agentuity-cli-cloud-secret-pull](./agentuity-cli-cloud-secret-pull) | `agentuity cloud secret pull` | Pull secrets from cloud to local .env.production file | +| [agentuity-cli-cloud-secret-push](./agentuity-cli-cloud-secret-push) | `agentuity cloud secret push` | Push secrets from local .env.production file to cloud | +| [agentuity-cli-cloud-secret-set](./agentuity-cli-cloud-secret-set) | `agentuity cloud secret set` | Set a secret | +| [agentuity-cli-cloud-session-get](./agentuity-cli-cloud-session-get) | `agentuity cloud session get` | Get details about a specific session | +| [agentuity-cli-cloud-session-list](./agentuity-cli-cloud-session-list) | `agentuity cloud session list` | List recent sessions | +| [agentuity-cli-cloud-session-logs](./agentuity-cli-cloud-session-logs) | `agentuity cloud session logs` | Get logs for a specific session | +| [agentuity-cli-cloud-ssh](./agentuity-cli-cloud-ssh) | `agentuity cloud ssh` | SSH into a cloud project | +| [agentuity-cli-cloud-storage-create](./agentuity-cli-cloud-storage-create) | `agentuity cloud storage create` | Create a new storage resource | +| [agentuity-cli-cloud-storage-delete](./agentuity-cli-cloud-storage-delete) | `agentuity cloud storage delete` | Delete a storage resource or file | +| [agentuity-cli-cloud-storage-download](./agentuity-cli-cloud-storage-download) | `agentuity cloud storage download` | Download a file from storage bucket | +| [agentuity-cli-cloud-storage-get](./agentuity-cli-cloud-storage-get) | `agentuity cloud storage get` | Show details about a specific storage bucket | +| [agentuity-cli-cloud-storage-list](./agentuity-cli-cloud-storage-list) | `agentuity cloud storage list` | List storage resources or files in a bucket | +| [agentuity-cli-cloud-storage-upload](./agentuity-cli-cloud-storage-upload) | `agentuity cloud storage upload` | Upload a file to storage bucket | +| [agentuity-cli-cloud-stream-delete](./agentuity-cli-cloud-stream-delete) | `agentuity cloud stream delete` | Delete a stream by ID (soft delete) | +| [agentuity-cli-cloud-stream-get](./agentuity-cli-cloud-stream-get) | `agentuity cloud stream get` | Get detailed information about a specific stream | +| [agentuity-cli-cloud-stream-list](./agentuity-cli-cloud-stream-list) | `agentuity cloud stream list` | List recent streams with optional filtering | +| [agentuity-cli-cloud-thread-delete](./agentuity-cli-cloud-thread-delete) | `agentuity cloud thread delete` | Delete a thread | +| [agentuity-cli-cloud-thread-get](./agentuity-cli-cloud-thread-get) | `agentuity cloud thread get` | Get details about a specific thread | +| [agentuity-cli-cloud-thread-list](./agentuity-cli-cloud-thread-list) | `agentuity cloud thread list` | List recent threads | +| [agentuity-cli-cloud-vector-delete](./agentuity-cli-cloud-vector-delete) | `agentuity cloud vector delete` | Delete one or more vectors by key | +| [agentuity-cli-cloud-vector-delete-namespace](./agentuity-cli-cloud-vector-delete-namespace) | `agentuity cloud vector delete-namespace` | Delete a vector namespace and all its vectors | +| [agentuity-cli-cloud-vector-get](./agentuity-cli-cloud-vector-get) | `agentuity cloud vector get` | Get a specific vector entry by key | +| [agentuity-cli-cloud-vector-list-namespaces](./agentuity-cli-cloud-vector-list-namespaces) | `agentuity cloud vector list-namespaces` | List all vector namespaces | +| [agentuity-cli-cloud-vector-search](./agentuity-cli-cloud-vector-search) | `agentuity cloud vector search` | Search for vectors using semantic similarity | +| [agentuity-cli-cloud-vector-stats](./agentuity-cli-cloud-vector-stats) | `agentuity cloud vector stats` | Get statistics for vector storage | +| [agentuity-cli-cloud-vector-upsert](./agentuity-cli-cloud-vector-upsert) | `agentuity cloud vector upsert` | Add or update vectors in the vector storage | + +### dev + +| Skill | Command | Description | +|-------|---------|-------------| +| [agentuity-cli-dev](./agentuity-cli-dev) | `agentuity dev` | Build and run the development server | + +### profile + +| Skill | Command | Description | +|-------|---------|-------------| +| [agentuity-cli-profile-create](./agentuity-cli-profile-create) | `agentuity profile create` | Create a new configuration profile | +| [agentuity-cli-profile-current](./agentuity-cli-profile-current) | `agentuity profile current` | Show the name of the currently active profile | +| [agentuity-cli-profile-delete](./agentuity-cli-profile-delete) | `agentuity profile delete` | Delete a configuration profile | +| [agentuity-cli-profile-list](./agentuity-cli-profile-list) | `agentuity profile list` | List all available profiles | +| [agentuity-cli-profile-show](./agentuity-cli-profile-show) | `agentuity profile show` | Show the configuration of a profile | +| [agentuity-cli-profile-use](./agentuity-cli-profile-use) | `agentuity profile use` | Switch to a different configuration profile | + +### project + +| Skill | Command | Description | +|-------|---------|-------------| +| [agentuity-cli-project-create](./agentuity-cli-project-create) | `agentuity project create` | Create a new project | +| [agentuity-cli-project-delete](./agentuity-cli-project-delete) | `agentuity project delete` | Delete a project | +| [agentuity-cli-project-list](./agentuity-cli-project-list) | `agentuity project list` | List all projects | +| [agentuity-cli-project-show](./agentuity-cli-project-show) | `agentuity project show` | Show project detail | + +### repl + +| Skill | Command | Description | +|-------|---------|-------------| +| [agentuity-cli-repl](./agentuity-cli-repl) | `agentuity repl` | interactive REPL for testing | + +### upgrade + +| Skill | Command | Description | +|-------|---------|-------------| +| [agentuity-cli-upgrade](./agentuity-cli-upgrade) | `agentuity upgrade` | Upgrade the CLI to the latest version | + +## Usage + +These skills are designed for AI coding agents that support the Agent Skills format. +Place this directory in your project or install globally for your agent to discover. + +## Regenerating + +To regenerate these skills with the latest CLI schema: + +```bash +agentuity ai skills generate --output ./skills +``` + +--- + +*This file was auto-generated by the Agentuity CLI. Do not edit manually.* diff --git a/doc-agents/.agents/skills/agentuity-cli-auth-login/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-auth-login/SKILL.md new file mode 100644 index 00000000..9a04ea4d --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-auth-login/SKILL.md @@ -0,0 +1,34 @@ +--- +name: agentuity-cli-auth-login +description: "Login to the Agentuity Platform using a browser-based authentication flow. Use for managing authentication credentials" +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +metadata: + command: "agentuity auth login" + tags: "mutating creates-resource slow api-intensive" +--- + +# Auth Login + +Login to the Agentuity Platform using a browser-based authentication flow + +## Usage + +```bash +agentuity auth login +``` + +## Examples + +Login to account: + +```bash +agentuity auth login +``` + +Login to account: + +```bash +agentuity login +``` diff --git a/doc-agents/.agents/skills/agentuity-cli-auth-logout/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-auth-logout/SKILL.md new file mode 100644 index 00000000..94c38d6b --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-auth-logout/SKILL.md @@ -0,0 +1,34 @@ +--- +name: agentuity-cli-auth-logout +description: Logout of the Agentuity Cloud Platform. Use for managing authentication credentials +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +metadata: + command: "agentuity auth logout" + tags: "mutating deletes-resource fast requires-auth" +--- + +# Auth Logout + +Logout of the Agentuity Cloud Platform + +## Usage + +```bash +agentuity auth logout +``` + +## Examples + +Logout from account: + +```bash +agentuity auth logout +``` + +Logout from account: + +```bash +agentuity logout +``` diff --git a/doc-agents/.agents/skills/agentuity-cli-auth-ssh-add/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-auth-ssh-add/SKILL.md new file mode 100644 index 00000000..424b0343 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-auth-ssh-add/SKILL.md @@ -0,0 +1,76 @@ +--- +name: agentuity-cli-auth-ssh-add +description: Add an SSH public key to your account (reads from file or stdin). Requires authentication. Use for managing authentication credentials +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +metadata: + command: "agentuity auth ssh add" + tags: "mutating creates-resource slow requires-auth" +--- + +# Auth Ssh Add + +Add an SSH public key to your account (reads from file or stdin) + +## Prerequisites + +- Authenticated with `agentuity auth login` + +## Usage + +```bash +agentuity auth ssh add [options] +``` + +## Options + +| Option | Type | Required | Default | Description | +|--------|------|----------|---------|-------------| +| `--file` | string | Yes | - | File containing the public key | + +## Examples + +Add SSH key interactively: + +```bash +agentuity auth ssh add +``` + +Add SSH key from file: + +```bash +agentuity auth ssh add --file ~/.ssh/id_ed25519.pub +``` + +Add deploy key from file: + +```bash +agentuity auth ssh add --file ./deploy_key.pub +``` + +Add SSH key from stdin: + +```bash +cat ~/.ssh/id_rsa.pub | agentuity auth ssh add +``` + +## Output + +Returns JSON object: + +```json +{ + "success": "boolean", + "fingerprint": "string", + "keyType": "string", + "added": "number" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `success` | boolean | Whether the operation succeeded | +| `fingerprint` | string | SSH key fingerprint | +| `keyType` | string | SSH key type (e.g., ssh-rsa, ssh-ed25519) | +| `added` | number | Number of keys added | diff --git a/doc-agents/.agents/skills/agentuity-cli-auth-ssh-delete/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-auth-ssh-delete/SKILL.md new file mode 100644 index 00000000..1de8f305 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-auth-ssh-delete/SKILL.md @@ -0,0 +1,81 @@ +--- +name: agentuity-cli-auth-ssh-delete +description: Delete an SSH key from your account. Requires authentication. Use for managing authentication credentials +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: "[fingerprints...]" +metadata: + command: "agentuity auth ssh delete" + tags: "destructive deletes-resource slow requires-auth" +--- + +# Auth Ssh Delete + +Delete an SSH key from your account + +## Prerequisites + +- Authenticated with `agentuity auth login` + +## Usage + +```bash +agentuity auth ssh delete [fingerprints...] [options] +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | array | No | - | + +## Options + +| Option | Type | Required | Default | Description | +|--------|------|----------|---------|-------------| +| `--confirm` | boolean | No | `true` | prompt for confirmation before deletion | + +## Examples + +Delete item: + +```bash +agentuity auth ssh delete +``` + +Delete item: + +```bash +agentuity auth ssh delete +``` + +Delete item: + +```bash +agentuity --explain auth ssh delete abc123 +``` + +Delete item: + +```bash +agentuity --dry-run auth ssh delete abc123 +``` + +## Output + +Returns JSON object: + +```json +{ + "success": "boolean", + "removed": "number", + "fingerprints": "array" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `success` | boolean | Whether the operation succeeded | +| `removed` | number | Number of keys removed | +| `fingerprints` | array | Fingerprints of removed keys | diff --git a/doc-agents/.agents/skills/agentuity-cli-auth-ssh-list/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-auth-ssh-list/SKILL.md new file mode 100644 index 00000000..699b75b0 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-auth-ssh-list/SKILL.md @@ -0,0 +1,48 @@ +--- +name: agentuity-cli-auth-ssh-list +description: List all SSH keys on your account. Requires authentication. Use for managing authentication credentials +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +metadata: + command: "agentuity auth ssh list" + tags: "read-only fast requires-auth" +--- + +# Auth Ssh List + +List all SSH keys on your account + +## Prerequisites + +- Authenticated with `agentuity auth login` + +## Usage + +```bash +agentuity auth ssh list +``` + +## Examples + +List items: + +```bash +agentuity auth ssh list +``` + +List items: + +```bash +agentuity auth ssh ls +``` + +Show output in JSON format: + +```bash +agentuity --json auth ssh list +``` + +## Output + +Returns: `array` diff --git a/doc-agents/.agents/skills/agentuity-cli-auth-whoami/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-auth-whoami/SKILL.md new file mode 100644 index 00000000..d9408da4 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-auth-whoami/SKILL.md @@ -0,0 +1,58 @@ +--- +name: agentuity-cli-auth-whoami +description: Display information about the currently authenticated user. Requires authentication. Use for managing authentication credentials +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +metadata: + command: "agentuity auth whoami" + tags: "read-only fast requires-auth" +--- + +# Auth Whoami + +Display information about the currently authenticated user + +## Prerequisites + +- Authenticated with `agentuity auth login` + +## Usage + +```bash +agentuity auth whoami +``` + +## Examples + +Show current user: + +```bash +agentuity auth whoami +``` + +Show output in JSON format: + +```bash +agentuity --json auth whoami +``` + +## Output + +Returns JSON object: + +```json +{ + "userId": "string", + "firstName": "string", + "lastName": "string", + "organizations": "array" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `userId` | string | Unique user identifier | +| `firstName` | string | User first name | +| `lastName` | string | User last name | +| `organizations` | array | Organizations the user belongs to | diff --git a/doc-agents/.agents/skills/agentuity-cli-build/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-build/SKILL.md new file mode 100644 index 00000000..f7ed446d --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-build/SKILL.md @@ -0,0 +1,40 @@ +--- +name: agentuity-cli-build +description: Build Agentuity application for deployment +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +metadata: + command: "agentuity build" + tags: "read-only slow requires-project" +--- + +# Build + +Build Agentuity application for deployment + +## Usage + +```bash +agentuity build +``` + +## Examples + +Build the project: + +```bash +agentuity build +``` + +Run in development mode: + +```bash +agentuity build --dev +``` + +Bundle the project: + +```bash +agentuity bundle +``` diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-agent-get/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-agent-get/SKILL.md new file mode 100644 index 00000000..2ae2fe9b --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-agent-get/SKILL.md @@ -0,0 +1,77 @@ +--- +name: agentuity-cli-cloud-agent-get +description: Get details about a specific agent. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: "" +metadata: + command: "agentuity cloud agent get" +--- + +# Cloud Agent Get + +Get details about a specific agent + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Project context required (run from project directory or use `--project-id`) + +## Usage + +```bash +agentuity cloud agent get +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | Yes | - | + +## Examples + +Get item details: + +```bash +agentuity cloud agent get agent_abc123 +``` + +Show output in JSON format: + +```bash +agentuity --json cloud agent get agent_abc123 +``` + +## Output + +Returns JSON object: + +```json +{ + "id": "string", + "name": "string", + "description": "unknown", + "identifier": "string", + "deploymentId": "unknown", + "devmode": "boolean", + "metadata": "unknown", + "createdAt": "string", + "updatedAt": "string", + "evals": "array" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `id` | string | - | +| `name` | string | - | +| `description` | unknown | - | +| `identifier` | string | - | +| `deploymentId` | unknown | - | +| `devmode` | boolean | - | +| `metadata` | unknown | - | +| `createdAt` | string | - | +| `updatedAt` | string | - | +| `evals` | array | - | diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-agent-list/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-agent-list/SKILL.md new file mode 100644 index 00000000..649c45fe --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-agent-list/SKILL.md @@ -0,0 +1,55 @@ +--- +name: agentuity-cli-cloud-agent-list +description: List agents for a project. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +metadata: + command: "agentuity cloud agent list" +--- + +# Cloud Agent List + +List agents for a project + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Project context required (run from project directory or use `--project-id`) + +## Usage + +```bash +agentuity cloud agent list [options] +``` + +## Options + +| Option | Type | Required | Default | Description | +|--------|------|----------|---------|-------------| +| `--deploymentId` | string | Yes | - | Filter by deployment ID | +| `--verbose` | boolean | No | `false` | Show full descriptions | + +## Examples + +List items: + +```bash +agentuity cloud agent list +``` + +Use verbose option: + +```bash +agentuity cloud agent list --verbose +``` + +Show output in JSON format: + +```bash +agentuity --json cloud agent list +``` + +## Output + +Returns: `array` diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-apikey-create/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-apikey-create/SKILL.md new file mode 100644 index 00000000..1cd48492 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-apikey-create/SKILL.md @@ -0,0 +1,69 @@ +--- +name: agentuity-cli-cloud-apikey-create +description: Create a new API key. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +metadata: + command: "agentuity cloud apikey create" + tags: "destructive creates-resource slow requires-auth" +--- + +# Cloud Apikey Create + +Create a new API key + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Organization context required (`--org-id` or default org) + +## Usage + +```bash +agentuity cloud apikey create [options] +``` + +## Options + +| Option | Type | Required | Default | Description | +|--------|------|----------|---------|-------------| +| `--name` | string | Yes | - | the name for the API key | +| `--expires-at` | string | Yes | - | expiration date as ISO 8601 (2025-12-31T23:59:59Z) or duration (1h, 2d, 30d, 1y) | +| `--confirm` | boolean | Yes | - | Skip confirmation prompts (required for non-TTY) | + +## Examples + +Create API key with 1 year expiration: + +```bash +agentuity cloud apikey create --name "My API Key" --expires-at 1y +``` + +Create API key with 30 day expiration: + +```bash +agentuity cloud apikey create --name "Short-lived Key" --expires-at 30d +``` + +Create API key with specific date and skip confirmation: + +```bash +agentuity cloud apikey create --name "Production Key" --expires-at 2026-01-01T00:00:00Z --confirm +``` + +## Output + +Returns JSON object: + +```json +{ + "id": "string", + "value": "string" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `id` | string | the API key id | +| `value` | string | the API key value | diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-apikey-delete/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-apikey-delete/SKILL.md new file mode 100644 index 00000000..a2c80c91 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-apikey-delete/SKILL.md @@ -0,0 +1,67 @@ +--- +name: agentuity-cli-cloud-apikey-delete +description: Delete an API key (soft delete). Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: "" +metadata: + command: "agentuity cloud apikey delete" + tags: "destructive deletes-resource slow requires-auth" +--- + +# Cloud Apikey Delete + +Delete an API key (soft delete) + +## Prerequisites + +- Authenticated with `agentuity auth login` + +## Usage + +```bash +agentuity cloud apikey delete +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | Yes | - | + +## Examples + +Delete item: + +```bash +agentuity cloud apikey delete +``` + +Run command: + +```bash +agentuity cloud apikey del +``` + +Delete item: + +```bash +agentuity cloud apikey rm +``` + +## Output + +Returns JSON object: + +```json +{ + "success": "boolean", + "id": "string" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `success` | boolean | Whether the operation succeeded | +| `id` | string | API key id that was deleted | diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-apikey-get/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-apikey-get/SKILL.md new file mode 100644 index 00000000..fa00397a --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-apikey-get/SKILL.md @@ -0,0 +1,39 @@ +--- +name: agentuity-cli-cloud-apikey-get +description: Get a specific API key by id. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: "" +metadata: + command: "agentuity cloud apikey get" + tags: "read-only fast requires-auth" +--- + +# Cloud Apikey Get + +Get a specific API key by id + +## Prerequisites + +- Authenticated with `agentuity auth login` + +## Usage + +```bash +agentuity cloud apikey get +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | Yes | - | + +## Examples + +Get item details: + +```bash +agentuity cloud apikey get +``` diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-apikey-list/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-apikey-list/SKILL.md new file mode 100644 index 00000000..e4d64827 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-apikey-list/SKILL.md @@ -0,0 +1,45 @@ +--- +name: agentuity-cli-cloud-apikey-list +description: List all API keys. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +metadata: + command: "agentuity cloud apikey list" + tags: "read-only fast requires-auth" +--- + +# Cloud Apikey List + +List all API keys + +## Prerequisites + +- Authenticated with `agentuity auth login` + +## Usage + +```bash +agentuity cloud apikey list [options] +``` + +## Options + +| Option | Type | Required | Default | Description | +|--------|------|----------|---------|-------------| +| `--orgId` | string | Yes | - | filter by organization id | +| `--projectId` | string | Yes | - | filter by project id | + +## Examples + +List items: + +```bash +agentuity cloud apikey list +``` + +List items: + +```bash +agentuity cloud apikey ls +``` diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-db-create/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-db-create/SKILL.md new file mode 100644 index 00000000..ac3a71e7 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-db-create/SKILL.md @@ -0,0 +1,73 @@ +--- +name: agentuity-cli-cloud-db-create +description: Create a new database resource. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +metadata: + command: "agentuity cloud db create" + tags: "mutating creates-resource slow requires-auth requires-deployment" +--- + +# Cloud Db Create + +Create a new database resource + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Organization context required (`--org-id` or default org) + +## Usage + +```bash +agentuity cloud db create [options] +``` + +## Options + +| Option | Type | Required | Default | Description | +|--------|------|----------|---------|-------------| +| `--name` | string | Yes | - | Custom database name | + +## Examples + +Create new item: + +```bash +agentuity cloud db create +``` + +Run new command: + +```bash +agentuity cloud db new +``` + +Create new item: + +```bash +agentuity cloud db create --name my-db +``` + +Create new item: + +```bash +agentuity --dry-run cloud db create +``` + +## Output + +Returns JSON object: + +```json +{ + "success": "boolean", + "name": "string" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `success` | boolean | Whether creation succeeded | +| `name` | string | Created database name | diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-db-delete/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-db-delete/SKILL.md new file mode 100644 index 00000000..dc37d70d --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-db-delete/SKILL.md @@ -0,0 +1,80 @@ +--- +name: agentuity-cli-cloud-db-delete +description: Delete a database resource. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: "[name]" +metadata: + command: "agentuity cloud db delete" + tags: "destructive deletes-resource slow requires-auth requires-deployment" +--- + +# Cloud Db Delete + +Delete a database resource + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Organization context required (`--org-id` or default org) + +## Usage + +```bash +agentuity cloud db delete [name] [options] +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | No | - | + +## Options + +| Option | Type | Required | Default | Description | +|--------|------|----------|---------|-------------| +| `--confirm` | boolean | Yes | - | Skip confirmation prompts | + +## Examples + +Delete item: + +```bash +agentuity cloud db delete my-database +``` + +Delete item: + +```bash +agentuity cloud db rm my-database +``` + +Delete item: + +```bash +agentuity cloud db delete +``` + +Delete item: + +```bash +agentuity --dry-run cloud db delete my-database +``` + +## Output + +Returns JSON object: + +```json +{ + "success": "boolean", + "name": "string" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `success` | boolean | Whether deletion succeeded | +| `name` | string | Deleted database name | diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-db-get/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-db-get/SKILL.md new file mode 100644 index 00000000..8ed3b9fa --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-db-get/SKILL.md @@ -0,0 +1,78 @@ +--- +name: agentuity-cli-cloud-db-get +description: Show details about a specific database. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: "" +metadata: + command: "agentuity cloud db get" + tags: "read-only fast requires-auth" +--- + +# Cloud Db Get + +Show details about a specific database + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Organization context required (`--org-id` or default org) + +## Usage + +```bash +agentuity cloud db get [options] +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | Yes | - | + +## Options + +| Option | Type | Required | Default | Description | +|--------|------|----------|---------|-------------| +| `--showCredentials` | boolean | Yes | - | Show credentials in plain text (default: masked in terminal, unmasked in JSON) | +| `--showTables` | boolean | Yes | - | Fetch table schemas from the database | +| `--sql` | boolean | Yes | - | Output table schemas as SQL CREATE statements | + +## Examples + +Get database details: + +```bash +agentuity cloud db get my-database +``` + +Show database information: + +```bash +agentuity cloud db show my-database +``` + +Get database with credentials: + +```bash +agentuity cloud db get my-database --show-credentials +``` + +Get table schemas from the database: + +```bash +agentuity cloud db get my-database --show-tables +``` + +Get table schemas as SQL CREATE statements: + +```bash +agentuity cloud db get my-database --show-tables --sql +``` + +Get table schemas as JSON: + +```bash +agentuity cloud db get my-database --show-tables --json +``` diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-db-list/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-db-list/SKILL.md new file mode 100644 index 00000000..27383ea8 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-db-list/SKILL.md @@ -0,0 +1,72 @@ +--- +name: agentuity-cli-cloud-db-list +description: List database resources. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +metadata: + command: "agentuity cloud db list" + tags: "read-only fast requires-auth" +--- + +# Cloud Db List + +List database resources + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Organization context required (`--org-id` or default org) + +## Usage + +```bash +agentuity cloud db list [options] +``` + +## Options + +| Option | Type | Required | Default | Description | +|--------|------|----------|---------|-------------| +| `--showCredentials` | boolean | Yes | - | Show credentials in plain text (default: masked in terminal, unmasked in JSON) | +| `--nameOnly` | boolean | Yes | - | Print the name only | + +## Examples + +List items: + +```bash +agentuity cloud db list +``` + +Show output in JSON format: + +```bash +agentuity --json cloud db list +``` + +List items: + +```bash +agentuity cloud db ls +``` + +Use show credentials option: + +```bash +agentuity cloud db list --show-credentials +``` + +## Output + +Returns JSON object: + +```json +{ + "databases": "array" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `databases` | array | List of database resources | diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-db-logs/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-db-logs/SKILL.md new file mode 100644 index 00000000..bd21adae --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-db-logs/SKILL.md @@ -0,0 +1,108 @@ +--- +name: agentuity-cli-cloud-db-logs +description: Get query logs for a specific database. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: "" +metadata: + command: "agentuity cloud db logs" + tags: "read-only slow requires-auth" +--- + +# Cloud Db Logs + +Get query logs for a specific database + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Organization context required (`--org-id` or default org) + +## Usage + +```bash +agentuity cloud db logs [options] +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | Yes | - | + +## Options + +| Option | Type | Required | Default | Description | +|--------|------|----------|---------|-------------| +| `--startDate` | string | Yes | - | Start date for filtering logs | +| `--endDate` | string | Yes | - | End date for filtering logs | +| `--username` | string | Yes | - | Filter by username | +| `--command` | string | Yes | - | Filter by SQL command type | +| `--hasError` | boolean | Yes | - | Show only queries with errors | +| `--sessionId` | string | Yes | - | Filter by session ID (trace ID) | +| `--showSessionId` | boolean | No | `false` | Show session ID column in output | +| `--showUsername` | boolean | No | `false` | Show username column in output | +| `--pretty` | boolean | No | `false` | Show full formatted SQL on separate line | +| `--limit` | number | No | `100` | Maximum number of logs to return | +| `--timestamps` | boolean | No | `true` | Show timestamps in output | + +## Examples + +View query logs for database: + +```bash +agentuity cloud db logs my-database +``` + +Limit to 50 log entries: + +```bash +agentuity cloud db logs my-database --limit=50 +``` + +Show only queries with errors: + +```bash +agentuity cloud db logs my-database --has-error +``` + +Filter by username: + +```bash +agentuity cloud db logs my-database --username=user123 +``` + +Filter by SQL command type: + +```bash +agentuity cloud db logs my-database --command=SELECT +``` + +Filter by session ID: + +```bash +agentuity cloud db logs my-database --session-id=sess_abc123 +``` + +Show session ID column: + +```bash +agentuity cloud db logs my-database --show-session-id +``` + +Show username column: + +```bash +agentuity cloud db logs my-database --show-username +``` + +Show full formatted SQL on separate lines: + +```bash +agentuity cloud db logs my-database --pretty +``` + +## Output + +Returns: `array` diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-db-sql/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-db-sql/SKILL.md new file mode 100644 index 00000000..54790abe --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-db-sql/SKILL.md @@ -0,0 +1,71 @@ +--- +name: agentuity-cli-cloud-db-sql +description: Execute SQL query on a database. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: " " +metadata: + command: "agentuity cloud db sql" + tags: "slow requires-auth" +--- + +# Cloud Db Sql + +Execute SQL query on a database + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Organization context required (`--org-id` or default org) + +## Usage + +```bash +agentuity cloud db sql +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | Yes | - | +| `` | string | Yes | - | + +## Examples + +Execute SQL query: + +```bash +agentuity cloud db sql my-database "SELECT * FROM users LIMIT 10" +``` + +Execute query with JSON output: + +```bash +agentuity cloud db exec my-database "SELECT COUNT(*) FROM orders" --json +``` + +Query with filter: + +```bash +agentuity cloud db query my-database "SELECT * FROM products WHERE price > 100" +``` + +## Output + +Returns JSON object: + +```json +{ + "rows": "array", + "rowCount": "number", + "truncated": "boolean" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `rows` | array | Query results | +| `rowCount` | number | Number of rows returned | +| `truncated` | boolean | Whether results were truncated | diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-deploy/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-deploy/SKILL.md new file mode 100644 index 00000000..8d136199 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-deploy/SKILL.md @@ -0,0 +1,83 @@ +--- +name: agentuity-cli-cloud-deploy +description: Deploy project to the Agentuity Cloud. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +metadata: + command: "agentuity cloud deploy" + tags: "mutating creates-resource slow api-intensive requires-auth requires-project" +--- + +# Cloud Deploy + +Deploy project to the Agentuity Cloud + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Project context required (run from project directory or use `--project-id`) +- auth login + +## Usage + +```bash +agentuity cloud deploy [options] +``` + +## Options + +| Option | Type | Required | Default | Description | +|--------|------|----------|---------|-------------| +| `--tag` | array | No | `["latest"]` | One or more tags to add to the deployment | +| `--logsUrl` | string | Yes | - | The url to the CI build logs | +| `--trigger` | string | No | `"cli"` | The trigger that caused the build | +| `--commitUrl` | string | Yes | - | The url to the CI commit | +| `--message` | string | Yes | - | The message to associate with this deployment | +| `--provider` | string | Yes | - | The CI provider name (attempts to autodetect) | +| `--event` | string | No | `"manual"` | The event that triggered the deployment | +| `--pullRequestNumber` | number | Yes | - | the pull request number | +| `--pullRequestCommentId` | string | Yes | - | the pull request comment id | +| `--pullRequestURL` | string | Yes | - | the pull request url | + +## Examples + +Deploy current project: + +```bash +agentuity cloud deploy +``` + +Deploy with verbose output: + +```bash +agentuity cloud deploy --log-level=debug +``` + +Deploy with specific tags: + +```bash +agentuity cloud deploy --tag a --tag b +``` + +## Output + +Returns JSON object: + +```json +{ + "success": "boolean", + "deploymentId": "string", + "projectId": "string", + "logs": "array", + "urls": "object" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `success` | boolean | Whether deployment succeeded | +| `deploymentId` | string | Deployment ID | +| `projectId` | string | Project ID | +| `logs` | array | The deployment startup logs | +| `urls` | object | Deployment URLs | diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-deployment-list/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-deployment-list/SKILL.md new file mode 100644 index 00000000..68ad926d --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-deployment-list/SKILL.md @@ -0,0 +1,55 @@ +--- +name: agentuity-cli-cloud-deployment-list +description: List deployments. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +metadata: + command: "agentuity cloud deployment list" + tags: "read-only slow requires-auth" +--- + +# Cloud Deployment List + +List deployments + +## Prerequisites + +- Authenticated with `agentuity auth login` + +## Usage + +```bash +agentuity cloud deployment list [options] +``` + +## Options + +| Option | Type | Required | Default | Description | +|--------|------|----------|---------|-------------| +| `--project-id` | string | Yes | - | Project ID | +| `--count` | number | No | `10` | Number of deployments to list (1–100) | + +## Examples + +List 10 most recent deployments: + +```bash +agentuity cloud deployment list +``` + +List 25 most recent deployments: + +```bash +agentuity cloud deployment list --count=25 +``` + +List deployments for specific project: + +```bash +agentuity cloud deployment list --project-id=proj_abc123xyz +``` + +## Output + +Returns: `array` diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-deployment-logs/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-deployment-logs/SKILL.md new file mode 100644 index 00000000..ba166059 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-deployment-logs/SKILL.md @@ -0,0 +1,70 @@ +--- +name: agentuity-cli-cloud-deployment-logs +description: View logs for a specific deployment. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: "" +metadata: + command: "agentuity cloud deployment logs" + tags: "read-only fast requires-auth requires-deployment" +--- + +# Cloud Deployment Logs + +View logs for a specific deployment + +## Prerequisites + +- Authenticated with `agentuity auth login` +- cloud deploy + +## Usage + +```bash +agentuity cloud deployment logs [options] +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | Yes | - | + +## Options + +| Option | Type | Required | Default | Description | +|--------|------|----------|---------|-------------| +| `--projectId` | string | Yes | - | Project ID | +| `--limit` | number | No | `100` | Maximum number of logs to return | +| `--timestamps` | boolean | No | `true` | Show timestamps in output | + +## Examples + +View logs for deployment: + +```bash +agentuity cloud deployment logs deploy_abc123xyz +``` + +Limit to 50 log entries: + +```bash +agentuity cloud deployment logs deploy_abc123xyz --limit=50 +``` + +Hide timestamps: + +```bash +agentuity cloud deployment logs deploy_abc123xyz --no-timestamps +``` + +View logs with specific project: + +```bash +agentuity cloud deployment logs deploy_abc123xyz --project-id=proj_abc123xyz +``` + +## Output + +Returns: `array` diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-deployment-remove/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-deployment-remove/SKILL.md new file mode 100644 index 00000000..805fbccb --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-deployment-remove/SKILL.md @@ -0,0 +1,77 @@ +--- +name: agentuity-cli-cloud-deployment-remove +description: Remove a specific deployment. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: "" +metadata: + command: "agentuity cloud deployment remove" + tags: "destructive deletes-resource slow requires-auth requires-deployment" +--- + +# Cloud Deployment Remove + +Remove a specific deployment + +## Prerequisites + +- Authenticated with `agentuity auth login` +- cloud deploy + +## Usage + +```bash +agentuity cloud deployment remove [options] +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | Yes | - | + +## Options + +| Option | Type | Required | Default | Description | +|--------|------|----------|---------|-------------| +| `--project-id` | string | Yes | - | Project ID | +| `--force` | boolean | No | `false` | Force removal without confirmation | + +## Examples + +Remove with confirmation: + +```bash +agentuity cloud deployment remove dep_abc123xyz +``` + +Remove without confirmation: + +```bash +agentuity cloud deployment remove dep_abc123xyz --force +``` + +Remove deployment from specific project: + +```bash +agentuity cloud deployment remove deployment-2024-11-20 --project-id=proj_abc123xyz +``` + +## Output + +Returns JSON object: + +```json +{ + "success": "boolean", + "projectId": "string", + "deploymentId": "string" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `success` | boolean | Whether the removal succeeded | +| `projectId` | string | Project ID | +| `deploymentId` | string | Deployment ID that was removed | diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-deployment-rollback/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-deployment-rollback/SKILL.md new file mode 100644 index 00000000..24ce3ee3 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-deployment-rollback/SKILL.md @@ -0,0 +1,63 @@ +--- +name: agentuity-cli-cloud-deployment-rollback +description: Rollback the latest to the previous deployment. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +metadata: + command: "agentuity cloud deployment rollback" + tags: "destructive deletes-resource updates-resource slow api-intensive requires-auth requires-deployment" +--- + +# Cloud Deployment Rollback + +Rollback the latest to the previous deployment + +## Prerequisites + +- Authenticated with `agentuity auth login` +- cloud deploy + +## Usage + +```bash +agentuity cloud deployment rollback [options] +``` + +## Options + +| Option | Type | Required | Default | Description | +|--------|------|----------|---------|-------------| +| `--project-id` | string | Yes | - | Project ID | + +## Examples + +Rollback to previous deployment: + +```bash +agentuity cloud deployment rollback +``` + +Rollback specific project: + +```bash +agentuity cloud deployment rollback --project-id=proj_abc123xyz +``` + +## Output + +Returns JSON object: + +```json +{ + "success": "boolean", + "projectId": "string", + "targetDeploymentId": "string" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `success` | boolean | Whether the rollback succeeded | +| `projectId` | string | Project ID | +| `targetDeploymentId` | string | Deployment ID that was rolled back to | diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-deployment-show/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-deployment-show/SKILL.md new file mode 100644 index 00000000..0d78c8e6 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-deployment-show/SKILL.md @@ -0,0 +1,92 @@ +--- +name: agentuity-cli-cloud-deployment-show +description: Show details about a specific deployment. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: "" +metadata: + command: "agentuity cloud deployment show" + tags: "read-only fast requires-auth requires-deployment" +--- + +# Cloud Deployment Show + +Show details about a specific deployment + +## Prerequisites + +- Authenticated with `agentuity auth login` +- cloud deploy + +## Usage + +```bash +agentuity cloud deployment show [options] +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | Yes | - | + +## Options + +| Option | Type | Required | Default | Description | +|--------|------|----------|---------|-------------| +| `--project-id` | string | Yes | - | Project ID | + +## Examples + +Show deployment details by ID: + +```bash +agentuity cloud deployment show dep_abc123xyz +``` + +Show deployment for specific project: + +```bash +agentuity cloud deployment show deployment-2024-11-20 --project-id=proj_abc123xyz +``` + +## Output + +Returns JSON object: + +```json +{ + "id": "string", + "state": "string", + "active": "boolean", + "createdAt": "string", + "updatedAt": "string", + "message": "string", + "tags": "array", + "customDomains": "array", + "cloudRegion": "string", + "resourceDb": "unknown", + "resourceStorage": "unknown", + "deploymentLogsURL": "unknown", + "buildLogsURL": "unknown", + "metadata": "object" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `id` | string | Deployment ID | +| `state` | string | Deployment state | +| `active` | boolean | Whether deployment is active | +| `createdAt` | string | Creation timestamp | +| `updatedAt` | string | Last update timestamp | +| `message` | string | Deployment message | +| `tags` | array | Deployment tags | +| `customDomains` | array | Custom domains | +| `cloudRegion` | string | Cloud region | +| `resourceDb` | unknown | the database name | +| `resourceStorage` | unknown | the storage name | +| `deploymentLogsURL` | unknown | the url to the deployment logs | +| `buildLogsURL` | unknown | the url to the build logs | +| `metadata` | object | Deployment metadata | diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-deployment-undeploy/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-deployment-undeploy/SKILL.md new file mode 100644 index 00000000..d20a4819 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-deployment-undeploy/SKILL.md @@ -0,0 +1,52 @@ +--- +name: agentuity-cli-cloud-deployment-undeploy +description: Undeploy the latest deployment. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +metadata: + command: "agentuity cloud deployment undeploy" + tags: "destructive deletes-resource slow requires-auth requires-deployment" +--- + +# Cloud Deployment Undeploy + +Undeploy the latest deployment + +## Prerequisites + +- Authenticated with `agentuity auth login` +- cloud deploy + +## Usage + +```bash +agentuity cloud deployment undeploy [options] +``` + +## Options + +| Option | Type | Required | Default | Description | +|--------|------|----------|---------|-------------| +| `--project-id` | string | Yes | - | Project ID | +| `--force` | boolean | No | `false` | Force undeploy without confirmation | + +## Examples + +Undeploy with confirmation: + +```bash +agentuity cloud deployment undeploy +``` + +Undeploy without confirmation: + +```bash +agentuity cloud deployment undeploy --force +``` + +Undeploy specific project: + +```bash +agentuity cloud deployment undeploy --project-id=proj_abc123xyz +``` diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-env-delete/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-env-delete/SKILL.md new file mode 100644 index 00000000..b82d6010 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-env-delete/SKILL.md @@ -0,0 +1,64 @@ +--- +name: agentuity-cli-cloud-env-delete +description: Delete an environment variable. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: "" +metadata: + command: "agentuity cloud env delete" + tags: "destructive deletes-resource slow requires-auth requires-project" +--- + +# Cloud Env Delete + +Delete an environment variable + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Project context required (run from project directory or use `--project-id`) + +## Usage + +```bash +agentuity cloud env delete +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | Yes | - | + +## Examples + +Delete item: + +```bash +agentuity env delete OLD_FEATURE_FLAG +``` + +Delete item: + +```bash +agentuity env rm PORT +``` + +## Output + +Returns JSON object: + +```json +{ + "success": "boolean", + "key": "string", + "path": "string" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `success` | boolean | Whether the operation succeeded | +| `key` | string | Environment variable key that was deleted | +| `path` | string | Local file path where env var was removed | diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-env-get/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-env-get/SKILL.md new file mode 100644 index 00000000..a2bd7bb1 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-env-get/SKILL.md @@ -0,0 +1,68 @@ +--- +name: agentuity-cli-cloud-env-get +description: Get an environment variable value. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: "" +metadata: + command: "agentuity cloud env get" + tags: "read-only fast requires-auth requires-project" +--- + +# Cloud Env Get + +Get an environment variable value + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Project context required (run from project directory or use `--project-id`) + +## Usage + +```bash +agentuity cloud env get [options] +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | Yes | - | + +## Options + +| Option | Type | Required | Default | Description | +|--------|------|----------|---------|-------------| +| `--mask` | boolean | No | `false` | mask the value in output (default: true in TTY, false otherwise) | + +## Examples + +Get item details: + +```bash +agentuity env get NODE_ENV +``` + +Get item details: + +```bash +agentuity env get LOG_LEVEL +``` + +## Output + +Returns JSON object: + +```json +{ + "key": "string", + "value": "string" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `key` | string | Environment variable key name | +| `value` | string | Environment variable value | diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-env-import/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-env-import/SKILL.md new file mode 100644 index 00000000..ee5394fa --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-env-import/SKILL.md @@ -0,0 +1,68 @@ +--- +name: agentuity-cli-cloud-env-import +description: Import environment variables from a file to cloud and local .env.production. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: "" +metadata: + command: "agentuity cloud env import" + tags: "mutating creates-resource slow api-intensive requires-auth requires-project" +--- + +# Cloud Env Import + +Import environment variables from a file to cloud and local .env.production + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Project context required (run from project directory or use `--project-id`) + +## Usage + +```bash +agentuity cloud env import +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | Yes | - | + +## Examples + +Import environment variables from .env file: + +```bash +agentuity cloud env import .env +``` + +Import from .env.local file: + +```bash +agentuity cloud env import .env.local +``` + +## Output + +Returns JSON object: + +```json +{ + "success": "boolean", + "imported": "number", + "skipped": "number", + "path": "string", + "file": "string" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `success` | boolean | Whether import succeeded | +| `imported` | number | Number of items imported | +| `skipped` | number | Number of items skipped | +| `path` | string | Local file path where variables were saved | +| `file` | string | Source file path | diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-env-list/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-env-list/SKILL.md new file mode 100644 index 00000000..8b2d418d --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-env-list/SKILL.md @@ -0,0 +1,49 @@ +--- +name: agentuity-cli-cloud-env-list +description: List all environment variables. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +metadata: + command: "agentuity cloud env list" + tags: "read-only fast requires-auth requires-project" +--- + +# Cloud Env List + +List all environment variables + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Project context required (run from project directory or use `--project-id`) + +## Usage + +```bash +agentuity cloud env list [options] +``` + +## Options + +| Option | Type | Required | Default | Description | +|--------|------|----------|---------|-------------| +| `--mask` | boolean | No | `false` | mask the values in output (default: false for env vars) | + +## Examples + +List items: + +```bash +agentuity env list +``` + +Use mask option: + +```bash +agentuity env list --mask +``` + +## Output + +Returns: `object` diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-env-pull/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-env-pull/SKILL.md new file mode 100644 index 00000000..ab6c2727 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-env-pull/SKILL.md @@ -0,0 +1,66 @@ +--- +name: agentuity-cli-cloud-env-pull +description: Pull environment variables from cloud to local .env.production file. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +metadata: + command: "agentuity cloud env pull" + tags: "slow requires-auth requires-project" +--- + +# Cloud Env Pull + +Pull environment variables from cloud to local .env.production file + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Project context required (run from project directory or use `--project-id`) +- cloud deploy + +## Usage + +```bash +agentuity cloud env pull [options] +``` + +## Options + +| Option | Type | Required | Default | Description | +|--------|------|----------|---------|-------------| +| `--force` | boolean | No | `false` | overwrite local values with cloud values | + +## Examples + +Run pull command: + +```bash +agentuity env pull +``` + +Use force option: + +```bash +agentuity env pull --force +``` + +## Output + +Returns JSON object: + +```json +{ + "success": "boolean", + "pulled": "number", + "path": "string", + "force": "boolean" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `success` | boolean | Whether pull succeeded | +| `pulled` | number | Number of items pulled | +| `path` | string | Local file path where variables were saved | +| `force` | boolean | Whether force mode was used | diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-env-push/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-env-push/SKILL.md new file mode 100644 index 00000000..81e4d4e2 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-env-push/SKILL.md @@ -0,0 +1,52 @@ +--- +name: agentuity-cli-cloud-env-push +description: Push environment variables from local .env.production file to cloud. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +metadata: + command: "agentuity cloud env push" + tags: "mutating updates-resource slow api-intensive requires-auth requires-project" +--- + +# Cloud Env Push + +Push environment variables from local .env.production file to cloud + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Project context required (run from project directory or use `--project-id`) +- env set + +## Usage + +```bash +agentuity cloud env push +``` + +## Examples + +Run push command: + +```bash +agentuity env push +``` + +## Output + +Returns JSON object: + +```json +{ + "success": "boolean", + "pushed": "number", + "source": "string" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `success` | boolean | Whether push succeeded | +| `pushed` | number | Number of items pushed | +| `source` | string | Source file path | diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-env-set/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-env-set/SKILL.md new file mode 100644 index 00000000..d8839769 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-env-set/SKILL.md @@ -0,0 +1,71 @@ +--- +name: agentuity-cli-cloud-env-set +description: Set an environment variable. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: " " +metadata: + command: "agentuity cloud env set" + tags: "mutating updates-resource slow requires-auth requires-project" +--- + +# Cloud Env Set + +Set an environment variable + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Project context required (run from project directory or use `--project-id`) + +## Usage + +```bash +agentuity cloud env set +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | Yes | - | +| `` | string | Yes | - | + +## Examples + +Run production command: + +```bash +agentuity env set NODE_ENV production +``` + +Run 3000 command: + +```bash +agentuity env set PORT 3000 +``` + +Run debug command: + +```bash +agentuity env set LOG_LEVEL debug +``` + +## Output + +Returns JSON object: + +```json +{ + "success": "boolean", + "key": "string", + "path": "string" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `success` | boolean | Whether the operation succeeded | +| `key` | string | Environment variable key | +| `path` | string | Local file path where env var was saved | diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-create-namespace/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-create-namespace/SKILL.md new file mode 100644 index 00000000..6315b84d --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-create-namespace/SKILL.md @@ -0,0 +1,70 @@ +--- +name: agentuity-cli-cloud-keyvalue-create-namespace +description: Create a new keyvalue namespace. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: "" +metadata: + command: "agentuity cloud keyvalue create-namespace" + tags: "mutating creates-resource slow requires-auth" +--- + +# Cloud Keyvalue Create-namespace + +Create a new keyvalue namespace + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Project context required (run from project directory or use `--project-id`) + +## Usage + +```bash +agentuity cloud keyvalue create-namespace +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | Yes | - | + +## Examples + +Create production namespace: + +```bash +agentuity kv create-namespace production +``` + +Create staging namespace (using alias): + +```bash +agentuity kv create staging +``` + +Create cache namespace: + +```bash +agentuity kv create cache +``` + +## Output + +Returns JSON object: + +```json +{ + "success": "boolean", + "namespace": "string", + "message": "string" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `success` | boolean | Whether the operation succeeded | +| `namespace` | string | Namespace name | +| `message` | string | Success message | diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-delete-namespace/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-delete-namespace/SKILL.md new file mode 100644 index 00000000..789e47bf --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-delete-namespace/SKILL.md @@ -0,0 +1,71 @@ +--- +name: agentuity-cli-cloud-keyvalue-delete-namespace +description: Delete a keyvalue namespace and all its keys. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: " " +metadata: + command: "agentuity cloud keyvalue delete-namespace" + tags: "destructive deletes-resource slow requires-auth requires-project" +--- + +# Cloud Keyvalue Delete-namespace + +Delete a keyvalue namespace and all its keys + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Project context required (run from project directory or use `--project-id`) + +## Usage + +```bash +agentuity cloud keyvalue delete-namespace +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | Yes | - | +| `` | string | Yes | - | + +## Examples + +Delete staging namespace (interactive): + +```bash +agentuity kv delete-namespace staging +``` + +Delete cache without confirmation: + +```bash +agentuity kv rm-namespace cache --confirm +``` + +Force delete production: + +```bash +agentuity kv delete-namespace production --confirm +``` + +## Output + +Returns JSON object: + +```json +{ + "success": "boolean", + "namespace": "string", + "message": "string" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `success` | boolean | Whether the deletion succeeded | +| `namespace` | string | Deleted namespace name | +| `message` | string | Confirmation message | diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-delete/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-delete/SKILL.md new file mode 100644 index 00000000..77bab477 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-delete/SKILL.md @@ -0,0 +1,73 @@ +--- +name: agentuity-cli-cloud-keyvalue-delete +description: Delete a key from the keyvalue storage. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: " " +metadata: + command: "agentuity cloud keyvalue delete" + tags: "destructive deletes-resource slow requires-auth" +--- + +# Cloud Keyvalue Delete + +Delete a key from the keyvalue storage + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Project context required (run from project directory or use `--project-id`) + +## Usage + +```bash +agentuity cloud keyvalue delete +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | Yes | - | +| `` | string | Yes | - | + +## Examples + +Delete user data: + +```bash +agentuity kv delete production user:123 +``` + +Delete cached session: + +```bash +agentuity kv delete cache session:abc +``` + +Delete homepage cache (using alias): + +```bash +agentuity kv rm staging cache:homepage +``` + +## Output + +Returns JSON object: + +```json +{ + "success": "boolean", + "namespace": "string", + "key": "string", + "durationMs": "number" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `success` | boolean | Whether the operation succeeded | +| `namespace` | string | Namespace name | +| `key` | string | Key name | +| `durationMs` | number | Operation duration in milliseconds | diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-get/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-get/SKILL.md new file mode 100644 index 00000000..ad3e6391 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-get/SKILL.md @@ -0,0 +1,71 @@ +--- +name: agentuity-cli-cloud-keyvalue-get +description: Get a value from the keyvalue storage. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: " " +metadata: + command: "agentuity cloud keyvalue get" + tags: "read-only fast requires-auth" +--- + +# Cloud Keyvalue Get + +Get a value from the keyvalue storage + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Project context required (run from project directory or use `--project-id`) + +## Usage + +```bash +agentuity cloud keyvalue get +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | Yes | - | +| `` | string | Yes | - | + +## Examples + +Get user data: + +```bash +agentuity kv get production user:123 +``` + +Get cached session: + +```bash +agentuity kv get cache session:abc +``` + +Get homepage cache: + +```bash +agentuity kv get staging cache:homepage +``` + +## Output + +Returns JSON object: + +```json +{ + "exists": "boolean", + "data": "unknown", + "contentType": "string" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `exists` | boolean | Whether the key exists | +| `data` | unknown | Value data (string or binary) | +| `contentType` | string | Content type | diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-keys/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-keys/SKILL.md new file mode 100644 index 00000000..d91179b4 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-keys/SKILL.md @@ -0,0 +1,68 @@ +--- +name: agentuity-cli-cloud-keyvalue-keys +description: List all keys in a keyvalue namespace. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: "" +metadata: + command: "agentuity cloud keyvalue keys" + tags: "read-only slow requires-auth" +--- + +# Cloud Keyvalue Keys + +List all keys in a keyvalue namespace + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Project context required (run from project directory or use `--project-id`) + +## Usage + +```bash +agentuity cloud keyvalue keys +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | Yes | - | + +## Examples + +List all keys in production: + +```bash +agentuity kv keys production +``` + +List all cached keys (using alias): + +```bash +agentuity kv ls cache +``` + +List all staging keys: + +```bash +agentuity kv list staging +``` + +## Output + +Returns JSON object: + +```json +{ + "namespace": "string", + "keys": "array" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `namespace` | string | Namespace name | +| `keys` | array | List of keys in the namespace | diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-list-namespaces/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-list-namespaces/SKILL.md new file mode 100644 index 00000000..b7aadcd8 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-list-namespaces/SKILL.md @@ -0,0 +1,49 @@ +--- +name: agentuity-cli-cloud-keyvalue-list-namespaces +description: List all keyvalue namespaces. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +metadata: + command: "agentuity cloud keyvalue list-namespaces" + tags: "read-only fast requires-auth" +--- + +# Cloud Keyvalue List-namespaces + +List all keyvalue namespaces + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Project context required (run from project directory or use `--project-id`) + +## Usage + +```bash +agentuity cloud keyvalue list-namespaces +``` + +## Examples + +List all namespaces: + +```bash +agentuity kv list-namespaces +``` + +List namespaces (using alias): + +```bash +agentuity kv namespaces +``` + +List namespaces (short alias): + +```bash +agentuity kv ns +``` + +## Output + +Returns: `array` diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-repl/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-repl/SKILL.md new file mode 100644 index 00000000..f202f615 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-repl/SKILL.md @@ -0,0 +1,33 @@ +--- +name: agentuity-cli-cloud-keyvalue-repl +description: Start an interactive repl for working with keyvalue database. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +metadata: + command: "agentuity cloud keyvalue repl" + tags: "slow requires-auth" +--- + +# Cloud Keyvalue Repl + +Start an interactive repl for working with keyvalue database + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Project context required (run from project directory or use `--project-id`) + +## Usage + +```bash +agentuity cloud keyvalue repl +``` + +## Examples + +Start interactive KV session: + +```bash +agentuity kv repl +``` diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-search/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-search/SKILL.md new file mode 100644 index 00000000..fbdcf8bb --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-search/SKILL.md @@ -0,0 +1,71 @@ +--- +name: agentuity-cli-cloud-keyvalue-search +description: Search for keys matching a keyword in a keyvalue namespace. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: " " +metadata: + command: "agentuity cloud keyvalue search" + tags: "read-only slow requires-auth" +--- + +# Cloud Keyvalue Search + +Search for keys matching a keyword in a keyvalue namespace + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Project context required (run from project directory or use `--project-id`) + +## Usage + +```bash +agentuity cloud keyvalue search +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | Yes | - | +| `` | string | Yes | - | + +## Examples + +Find all user-related keys: + +```bash +agentuity kv search production user +``` + +Find all session keys in cache: + +```bash +agentuity kv search cache session +``` + +Find all config keys: + +```bash +agentuity kv search staging config +``` + +## Output + +Returns JSON object: + +```json +{ + "namespace": "string", + "keyword": "string", + "results": "array" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `namespace` | string | Namespace name | +| `keyword` | string | Search keyword used | +| `results` | array | - | diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-set/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-set/SKILL.md new file mode 100644 index 00000000..03522057 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-set/SKILL.md @@ -0,0 +1,79 @@ +--- +name: agentuity-cli-cloud-keyvalue-set +description: Set a key and value in the keyvalue storage. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: " [ttl]" +metadata: + command: "agentuity cloud keyvalue set" + tags: "mutating updates-resource slow requires-auth" +--- + +# Cloud Keyvalue Set + +Set a key and value in the keyvalue storage + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Project context required (run from project directory or use `--project-id`) + +## Usage + +```bash +agentuity cloud keyvalue set [ttl] +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | Yes | - | +| `` | string | Yes | - | +| `` | string | Yes | - | +| `` | string | No | - | + +## Examples + +Store user data: + +```bash +agentuity kv set production user:123 '{"name":"Alice","email":"alice@example.com"}' +``` + +Store session with 1h TTL: + +```bash +agentuity kv set cache session:abc "session-data-here" --ttl 3600 +``` + +Cache homepage for 10m: + +```bash +agentuity kv set staging cache:homepage "..." --ttl 600 +``` + +## Output + +Returns JSON object: + +```json +{ + "success": "boolean", + "namespace": "string", + "key": "string", + "contentType": "string", + "durationMs": "number", + "ttl": "number" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `success` | boolean | Whether the operation succeeded | +| `namespace` | string | Namespace name | +| `key` | string | Key name | +| `contentType` | string | Content type (application/json or text/plain) | +| `durationMs` | number | Operation duration in milliseconds | +| `ttl` | number | TTL in seconds if set | diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-stats/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-stats/SKILL.md new file mode 100644 index 00000000..4414fdf6 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-stats/SKILL.md @@ -0,0 +1,52 @@ +--- +name: agentuity-cli-cloud-keyvalue-stats +description: Get statistics for keyvalue storage. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: "[name]" +metadata: + command: "agentuity cloud keyvalue stats" + tags: "read-only fast requires-auth" +--- + +# Cloud Keyvalue Stats + +Get statistics for keyvalue storage + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Project context required (run from project directory or use `--project-id`) + +## Usage + +```bash +agentuity cloud keyvalue stats [name] +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | No | - | + +## Examples + +Show stats for all namespaces: + +```bash +agentuity kv stats +``` + +Show stats for production namespace: + +```bash +agentuity kv stats production +``` + +Show stats for cache namespace: + +```bash +agentuity kv stats cache +``` diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-redis-show/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-redis-show/SKILL.md new file mode 100644 index 00000000..37199001 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-redis-show/SKILL.md @@ -0,0 +1,65 @@ +--- +name: agentuity-cli-cloud-redis-show +description: Show Redis connection URL. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +metadata: + command: "agentuity cloud redis show" + tags: "read-only fast requires-auth" +--- + +# Cloud Redis Show + +Show Redis connection URL + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Organization context required (`--org-id` or default org) + +## Usage + +```bash +agentuity cloud redis show [options] +``` + +## Options + +| Option | Type | Required | Default | Description | +|--------|------|----------|---------|-------------| +| `--showCredentials` | boolean | Yes | - | Show credentials in plain text (default: masked in terminal, unmasked in JSON) | + +## Examples + +Show Redis connection URL: + +```bash +agentuity cloud redis show +``` + +Show Redis URL with credentials visible: + +```bash +agentuity cloud redis show --show-credentials +``` + +Show Redis URL as JSON: + +```bash +agentuity --json cloud redis show +``` + +## Output + +Returns JSON object: + +```json +{ + "url": "string" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `url` | string | Redis connection URL | diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-scp-download/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-scp-download/SKILL.md new file mode 100644 index 00000000..f6c340c4 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-scp-download/SKILL.md @@ -0,0 +1,85 @@ +--- +name: agentuity-cli-cloud-scp-download +description: Download a file using security copy. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: " [destination]" +metadata: + command: "agentuity cloud scp download" + tags: "read-only slow requires-auth requires-deployment" +--- + +# Cloud Scp Download + +Download a file using security copy + +## Prerequisites + +- Authenticated with `agentuity auth login` +- cloud deploy + +## Usage + +```bash +agentuity cloud scp download [destination] [options] +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | Yes | - | +| `` | string | No | - | + +## Options + +| Option | Type | Required | Default | Description | +|--------|------|----------|---------|-------------| +| `--identifier` | string | Yes | - | The project or deployment id to use | + +## Examples + +Download to current directory: + +```bash +agentuity cloud scp download /var/log/app.log +``` + +Download to specific path: + +```bash +agentuity cloud scp download /var/log/app.log ./logs/ +``` + +Download from specific project: + +```bash +agentuity cloud scp download /app/config.json --identifier=proj_abc123xyz +``` + +Download multiple files: + +```bash +agentuity cloud scp download ~/logs/*.log ./logs/ +``` + +## Output + +Returns JSON object: + +```json +{ + "success": "boolean", + "source": "string", + "destination": "string", + "identifier": "string" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `success` | boolean | Whether download succeeded | +| `source` | string | Remote source path | +| `destination` | string | Local destination path | +| `identifier` | string | Project or deployment identifier | diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-scp-upload/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-scp-upload/SKILL.md new file mode 100644 index 00000000..7c94d549 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-scp-upload/SKILL.md @@ -0,0 +1,85 @@ +--- +name: agentuity-cli-cloud-scp-upload +description: Upload a file using security copy. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: " [destination]" +metadata: + command: "agentuity cloud scp upload" + tags: "mutating updates-resource slow requires-auth requires-deployment" +--- + +# Cloud Scp Upload + +Upload a file using security copy + +## Prerequisites + +- Authenticated with `agentuity auth login` +- cloud deploy + +## Usage + +```bash +agentuity cloud scp upload [destination] [options] +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | Yes | - | +| `` | string | No | - | + +## Options + +| Option | Type | Required | Default | Description | +|--------|------|----------|---------|-------------| +| `--identifier` | string | Yes | - | The project or deployment id to use | + +## Examples + +Upload to remote home directory: + +```bash +agentuity cloud scp upload ./config.json +``` + +Upload to specific path: + +```bash +agentuity cloud scp upload ./config.json /app/config.json +``` + +Upload to specific project: + +```bash +agentuity cloud scp upload ./config.json --identifier=proj_abc123xyz +``` + +Upload multiple files: + +```bash +agentuity cloud scp upload ./logs/*.log ~/logs/ +``` + +## Output + +Returns JSON object: + +```json +{ + "success": "boolean", + "source": "string", + "destination": "string", + "identifier": "string" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `success` | boolean | Whether upload succeeded | +| `source` | string | Local source path | +| `destination` | string | Remote destination path | +| `identifier` | string | Project or deployment identifier | diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-secret-delete/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-secret-delete/SKILL.md new file mode 100644 index 00000000..6d00df9c --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-secret-delete/SKILL.md @@ -0,0 +1,64 @@ +--- +name: agentuity-cli-cloud-secret-delete +description: Delete a secret. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: "" +metadata: + command: "agentuity cloud secret delete" + tags: "destructive deletes-resource slow requires-auth requires-project" +--- + +# Cloud Secret Delete + +Delete a secret + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Project context required (run from project directory or use `--project-id`) + +## Usage + +```bash +agentuity cloud secret delete +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | Yes | - | + +## Examples + +Delete item: + +```bash +agentuity secret delete OLD_API_KEY +``` + +Delete item: + +```bash +agentuity secret rm DATABASE_URL +``` + +## Output + +Returns JSON object: + +```json +{ + "success": "boolean", + "key": "string", + "path": "string" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `success` | boolean | Whether the operation succeeded | +| `key` | string | Secret key name that was deleted | +| `path` | string | Local file path where secret was removed | diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-secret-get/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-secret-get/SKILL.md new file mode 100644 index 00000000..0f51921c --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-secret-get/SKILL.md @@ -0,0 +1,68 @@ +--- +name: agentuity-cli-cloud-secret-get +description: Get a secret value. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: "" +metadata: + command: "agentuity cloud secret get" + tags: "read-only fast requires-auth requires-project" +--- + +# Cloud Secret Get + +Get a secret value + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Project context required (run from project directory or use `--project-id`) + +## Usage + +```bash +agentuity cloud secret get [options] +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | Yes | - | + +## Options + +| Option | Type | Required | Default | Description | +|--------|------|----------|---------|-------------| +| `--mask` | boolean | No | `true` | mask the value in output (default: true in TTY, false otherwise) | + +## Examples + +Get item details: + +```bash +agentuity secret get DATABASE_URL +``` + +Use no mask option: + +```bash +agentuity secret get STRIPE_SECRET_KEY --no-mask +``` + +## Output + +Returns JSON object: + +```json +{ + "key": "string", + "value": "string" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `key` | string | Secret key name | +| `value` | string | Secret value | diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-secret-import/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-secret-import/SKILL.md new file mode 100644 index 00000000..8c56619c --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-secret-import/SKILL.md @@ -0,0 +1,68 @@ +--- +name: agentuity-cli-cloud-secret-import +description: Import secrets from a file to cloud and local .env.production. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: "" +metadata: + command: "agentuity cloud secret import" + tags: "mutating creates-resource slow api-intensive requires-auth requires-project" +--- + +# Cloud Secret Import + +Import secrets from a file to cloud and local .env.production + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Project context required (run from project directory or use `--project-id`) + +## Usage + +```bash +agentuity cloud secret import +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | Yes | - | + +## Examples + +Run .env.local command: + +```bash +agentuity secret import .env.local +``` + +Run .env.production.backup command: + +```bash +agentuity secret import .env.production.backup +``` + +## Output + +Returns JSON object: + +```json +{ + "success": "boolean", + "imported": "number", + "skipped": "number", + "path": "string", + "file": "string" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `success` | boolean | Whether import succeeded | +| `imported` | number | Number of items imported | +| `skipped` | number | Number of items skipped | +| `path` | string | Local file path where secrets were saved | +| `file` | string | Source file path | diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-secret-list/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-secret-list/SKILL.md new file mode 100644 index 00000000..c63cd09b --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-secret-list/SKILL.md @@ -0,0 +1,49 @@ +--- +name: agentuity-cli-cloud-secret-list +description: List all secrets. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +metadata: + command: "agentuity cloud secret list" + tags: "read-only fast requires-auth requires-project" +--- + +# Cloud Secret List + +List all secrets + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Project context required (run from project directory or use `--project-id`) + +## Usage + +```bash +agentuity cloud secret list [options] +``` + +## Options + +| Option | Type | Required | Default | Description | +|--------|------|----------|---------|-------------| +| `--mask` | boolean | No | `true` | mask the values in output (default: true in TTY for secrets) | + +## Examples + +List items: + +```bash +agentuity secret list +``` + +Use no mask option: + +```bash +agentuity secret list --no-mask +``` + +## Output + +Returns: `object` diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-secret-pull/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-secret-pull/SKILL.md new file mode 100644 index 00000000..5de8d3b8 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-secret-pull/SKILL.md @@ -0,0 +1,66 @@ +--- +name: agentuity-cli-cloud-secret-pull +description: Pull secrets from cloud to local .env.production file. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +metadata: + command: "agentuity cloud secret pull" + tags: "slow requires-auth requires-project" +--- + +# Cloud Secret Pull + +Pull secrets from cloud to local .env.production file + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Project context required (run from project directory or use `--project-id`) +- cloud deploy + +## Usage + +```bash +agentuity cloud secret pull [options] +``` + +## Options + +| Option | Type | Required | Default | Description | +|--------|------|----------|---------|-------------| +| `--force` | boolean | No | `false` | overwrite local values with cloud values | + +## Examples + +Run pull command: + +```bash +agentuity secret pull +``` + +Use force option: + +```bash +agentuity secret pull --force +``` + +## Output + +Returns JSON object: + +```json +{ + "success": "boolean", + "pulled": "number", + "path": "string", + "force": "boolean" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `success` | boolean | Whether pull succeeded | +| `pulled` | number | Number of items pulled | +| `path` | string | Local file path where secrets were saved | +| `force` | boolean | Whether force mode was used | diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-secret-push/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-secret-push/SKILL.md new file mode 100644 index 00000000..adebf1a7 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-secret-push/SKILL.md @@ -0,0 +1,52 @@ +--- +name: agentuity-cli-cloud-secret-push +description: Push secrets from local .env.production file to cloud. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +metadata: + command: "agentuity cloud secret push" + tags: "mutating updates-resource slow api-intensive requires-auth requires-project" +--- + +# Cloud Secret Push + +Push secrets from local .env.production file to cloud + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Project context required (run from project directory or use `--project-id`) +- secret set + +## Usage + +```bash +agentuity cloud secret push +``` + +## Examples + +Run push command: + +```bash +agentuity secret push +``` + +## Output + +Returns JSON object: + +```json +{ + "success": "boolean", + "pushed": "number", + "source": "string" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `success` | boolean | Whether push succeeded | +| `pushed` | number | Number of items pushed | +| `source` | string | Source file path | diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-secret-set/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-secret-set/SKILL.md new file mode 100644 index 00000000..0ebe49df --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-secret-set/SKILL.md @@ -0,0 +1,65 @@ +--- +name: agentuity-cli-cloud-secret-set +description: Set a secret. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: " " +metadata: + command: "agentuity cloud secret set" + tags: "mutating updates-resource slow requires-auth requires-project" +--- + +# Cloud Secret Set + +Set a secret + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Project context required (run from project directory or use `--project-id`) + +## Usage + +```bash +agentuity cloud secret set +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | Yes | - | +| `` | string | Yes | - | + +## Examples + +Set the DATABASE_URL environment secret: + +```bash +agentuity secret set DATABASE_URL "postgres://user:pass@host:5432/db" +``` + +Set the STRIPE_SECRET_KEY environment secret: + +```bash +agentuity secret set STRIPE_SECRET_KEY "sk_live_..." +``` + +## Output + +Returns JSON object: + +```json +{ + "success": "boolean", + "key": "string", + "path": "string" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `success` | boolean | Whether the operation succeeded | +| `key` | string | Secret key name | +| `path` | string | Local file path where secret was saved | diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-session-get/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-session-get/SKILL.md new file mode 100644 index 00000000..d68bb714 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-session-get/SKILL.md @@ -0,0 +1,97 @@ +--- +name: agentuity-cli-cloud-session-get +description: Get details about a specific session. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: "" +metadata: + command: "agentuity cloud session get" + tags: "read-only fast requires-auth" +--- + +# Cloud Session Get + +Get details about a specific session + +## Prerequisites + +- Authenticated with `agentuity auth login` + +## Usage + +```bash +agentuity cloud session get +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | Yes | - | + +## Examples + +Get a session by ID: + +```bash +agentuity cloud session get sess_abc123xyz +``` + +## Output + +Returns JSON object: + +```json +{ + "id": "string", + "created_at": "string", + "start_time": "string", + "end_time": "unknown", + "duration": "unknown", + "org_id": "string", + "project_id": "string", + "deployment_id": "string", + "agent_ids": "array", + "trigger": "string", + "env": "string", + "devmode": "boolean", + "pending": "boolean", + "success": "boolean", + "error": "unknown", + "method": "string", + "url": "string", + "route_id": "string", + "thread_id": "string", + "agents": "array", + "eval_runs": "array", + "timeline": "unknown", + "route": "unknown" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `id` | string | Session ID | +| `created_at` | string | Creation timestamp | +| `start_time` | string | Start time | +| `end_time` | unknown | End time | +| `duration` | unknown | Duration in nanoseconds | +| `org_id` | string | Organization ID | +| `project_id` | string | Project ID | +| `deployment_id` | string | Deployment ID | +| `agent_ids` | array | Agent IDs | +| `trigger` | string | Trigger type | +| `env` | string | Environment | +| `devmode` | boolean | Dev mode | +| `pending` | boolean | Pending | +| `success` | boolean | Success | +| `error` | unknown | Error message | +| `method` | string | HTTP method | +| `url` | string | Request URL | +| `route_id` | string | Route ID | +| `thread_id` | string | Thread ID | +| `agents` | array | Agents | +| `eval_runs` | array | Eval runs | +| `timeline` | unknown | Session timeline | +| `route` | unknown | Route information | diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-session-list/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-session-list/SKILL.md new file mode 100644 index 00000000..58e8fd22 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-session-list/SKILL.md @@ -0,0 +1,94 @@ +--- +name: agentuity-cli-cloud-session-list +description: List recent sessions. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +metadata: + command: "agentuity cloud session list" + tags: "read-only fast requires-auth" +--- + +# Cloud Session List + +List recent sessions + +## Prerequisites + +- Authenticated with `agentuity auth login` + +## Usage + +```bash +agentuity cloud session list [options] +``` + +## Options + +| Option | Type | Required | Default | Description | +|--------|------|----------|---------|-------------| +| `--count` | number | No | `10` | Number of sessions to list (1–100) | +| `--projectId` | string | Yes | - | Filter by project ID | +| `--deploymentId` | string | Yes | - | Filter by deployment ID | +| `--trigger` | string | Yes | - | Filter by trigger type (api, cron, webhook) | +| `--env` | string | Yes | - | Filter by environment | +| `--threadId` | string | Yes | - | Filter by thread ID | +| `--agentIdentifier` | string | Yes | - | Filter by agent identifier | +| `--devmode` | boolean | Yes | - | Filter by dev mode (true/false) | +| `--success` | boolean | Yes | - | Filter by success status (true/false) | +| `--startAfter` | string | Yes | - | Filter by start time after (ISO 8601) | +| `--startBefore` | string | Yes | - | Filter by start time before (ISO 8601) | + +## Examples + +List 10 most recent sessions: + +```bash +agentuity cloud session list +``` + +List 25 most recent sessions: + +```bash +agentuity cloud session list --count=25 +``` + +Filter by project: + +```bash +agentuity cloud session list --project-id=proj_* +``` + +Filter by deployment: + +```bash +agentuity cloud session list --deployment-id=* +``` + +Only successful sessions: + +```bash +agentuity cloud session list --success=true +``` + +Only production sessions: + +```bash +agentuity cloud session list --devmode=false +``` + +Only API triggered sessions: + +```bash +agentuity cloud session list --trigger=api +``` + +Only production environment: + +```bash +agentuity cloud session list --env=production +``` + +## Output + +Returns: `array` diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-session-logs/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-session-logs/SKILL.md new file mode 100644 index 00000000..1d5793f2 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-session-logs/SKILL.md @@ -0,0 +1,57 @@ +--- +name: agentuity-cli-cloud-session-logs +description: Get logs for a specific session. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: "" +metadata: + command: "agentuity cloud session logs" + tags: "read-only slow requires-auth" +--- + +# Cloud Session Logs + +Get logs for a specific session + +## Prerequisites + +- Authenticated with `agentuity auth login` + +## Usage + +```bash +agentuity cloud session logs [options] +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | Yes | - | + +## Options + +| Option | Type | Required | Default | Description | +|--------|------|----------|---------|-------------| +| `--projectId` | string | Yes | - | Project ID (for display purposes) | +| `--deploymentId` | string | Yes | - | Deployment ID (for display purposes) | +| `--timestamps` | boolean | No | `true` | Show timestamps in output | + +## Examples + +View logs for session: + +```bash +agentuity cloud session logs sess_abc123xyz +``` + +Hide timestamps: + +```bash +agentuity cloud session logs sess_abc123xyz --no-timestamps +``` + +## Output + +Returns: `array` diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-ssh/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-ssh/SKILL.md new file mode 100644 index 00000000..58747d93 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-ssh/SKILL.md @@ -0,0 +1,77 @@ +--- +name: agentuity-cli-cloud-ssh +description: SSH into a cloud project. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: "[identifier] [command]" +metadata: + command: "agentuity cloud ssh" + tags: "read-only slow requires-auth requires-deployment" +--- + +# Cloud Ssh + +SSH into a cloud project + +## Prerequisites + +- Authenticated with `agentuity auth login` +- cloud deploy + +## Usage + +```bash +agentuity cloud ssh [identifier] [command] [options] +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | No | - | +| `` | string | No | - | + +## Options + +| Option | Type | Required | Default | Description | +|--------|------|----------|---------|-------------| +| `--show` | boolean | Yes | - | Show the command and exit | + +## Examples + +SSH into current project: + +```bash +agentuity cloud ssh +``` + +SSH into specific project: + +```bash +agentuity cloud ssh proj_abc123xyz +``` + +SSH into specific deployment: + +```bash +agentuity cloud ssh deploy_abc123xyz +``` + +Run command and exit: + +```bash +agentuity cloud ssh 'ps aux' +``` + +Run command on specific project: + +```bash +agentuity cloud ssh proj_abc123xyz 'tail -f /var/log/app.log' +``` + +Show SSH command without executing: + +```bash +agentuity cloud ssh --show +``` diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-storage-create/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-storage-create/SKILL.md new file mode 100644 index 00000000..0de25d51 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-storage-create/SKILL.md @@ -0,0 +1,61 @@ +--- +name: agentuity-cli-cloud-storage-create +description: Create a new storage resource. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +metadata: + command: "agentuity cloud storage create" + tags: "mutating creates-resource slow requires-auth requires-deployment" +--- + +# Cloud Storage Create + +Create a new storage resource + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Organization context required (`--org-id` or default org) + +## Usage + +```bash +agentuity cloud storage create +``` + +## Examples + +Create a new cloud storage bucket: + +```bash +agentuity cloud storage create +``` + +Alias for "cloud storage create" (shorthand "new"): + +```bash +agentuity cloud storage new +``` + +Dry-run: display what would be created without making changes: + +```bash +agentuity --dry-run cloud storage create +``` + +## Output + +Returns JSON object: + +```json +{ + "success": "boolean", + "name": "string" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `success` | boolean | Whether creation succeeded | +| `name` | string | Created storage bucket name | diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-storage-delete/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-storage-delete/SKILL.md new file mode 100644 index 00000000..b15f0ecf --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-storage-delete/SKILL.md @@ -0,0 +1,81 @@ +--- +name: agentuity-cli-cloud-storage-delete +description: Delete a storage resource or file. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: "[name] [filename]" +metadata: + command: "agentuity cloud storage delete" + tags: "destructive deletes-resource slow requires-auth requires-deployment" +--- + +# Cloud Storage Delete + +Delete a storage resource or file + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Organization context required (`--org-id` or default org) + +## Usage + +```bash +agentuity cloud storage delete [name] [filename] [options] +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | No | - | +| `` | string | No | - | + +## Options + +| Option | Type | Required | Default | Description | +|--------|------|----------|---------|-------------| +| `--confirm` | boolean | Yes | - | Skip confirmation prompts | + +## Examples + +Delete a storage bucket: + +```bash +agentuity cloud storage delete my-bucket +``` + +Delete a file from a bucket: + +```bash +agentuity cloud storage rm my-bucket file.txt +``` + +Interactive selection to delete a bucket: + +```bash +agentuity cloud storage delete +``` + +Dry-run: show what would be deleted without making changes: + +```bash +agentuity --dry-run cloud storage delete my-bucket +``` + +## Output + +Returns JSON object: + +```json +{ + "success": "boolean", + "name": "string" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `success` | boolean | Whether deletion succeeded | +| `name` | string | Deleted bucket or file name | diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-storage-download/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-storage-download/SKILL.md new file mode 100644 index 00000000..0f612c76 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-storage-download/SKILL.md @@ -0,0 +1,90 @@ +--- +name: agentuity-cli-cloud-storage-download +description: Download a file from storage bucket. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: " [output]" +metadata: + command: "agentuity cloud storage download" + tags: "read-only requires-auth" +--- + +# Cloud Storage Download + +Download a file from storage bucket + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Organization context required (`--org-id` or default org) + +## Usage + +```bash +agentuity cloud storage download [output] [options] +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | Yes | - | +| `` | string | Yes | - | +| `` | string | No | - | + +## Options + +| Option | Type | Required | Default | Description | +|--------|------|----------|---------|-------------| +| `--metadata` | boolean | Yes | - | Download metadata only (not file contents) | + +## Examples + +Download file from bucket: + +```bash +agentuity cloud storage download my-bucket file.txt +``` + +Download file to specific path: + +```bash +agentuity cloud storage download my-bucket file.txt output.txt +``` + +Download file to stdout: + +```bash +agentuity cloud storage download my-bucket file.txt - > output.txt +``` + +Download metadata only: + +```bash +agentuity cloud storage download my-bucket file.txt --metadata +``` + +## Output + +Returns JSON object: + +```json +{ + "success": "boolean", + "bucket": "string", + "filename": "string", + "size": "number", + "contentType": "string", + "lastModified": "string" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `success` | boolean | Whether download succeeded | +| `bucket` | string | Bucket name | +| `filename` | string | Downloaded filename | +| `size` | number | File size in bytes | +| `contentType` | string | Content type | +| `lastModified` | string | Last modified timestamp | diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-storage-get/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-storage-get/SKILL.md new file mode 100644 index 00000000..c6f1ef39 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-storage-get/SKILL.md @@ -0,0 +1,80 @@ +--- +name: agentuity-cli-cloud-storage-get +description: Show details about a specific storage bucket. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: "" +metadata: + command: "agentuity cloud storage get" + tags: "read-only fast requires-auth" +--- + +# Cloud Storage Get + +Show details about a specific storage bucket + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Organization context required (`--org-id` or default org) + +## Usage + +```bash +agentuity cloud storage get [options] +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | Yes | - | + +## Options + +| Option | Type | Required | Default | Description | +|--------|------|----------|---------|-------------| +| `--showCredentials` | boolean | Yes | - | Show credentials in plain text (default: masked in terminal, unmasked in JSON) | + +## Examples + +Get bucket details: + +```bash +agentuity cloud storage get my-bucket +``` + +Show bucket information: + +```bash +agentuity cloud storage show my-bucket +``` + +Get bucket with credentials: + +```bash +agentuity cloud storage get my-bucket --show-credentials +``` + +## Output + +Returns JSON object: + +```json +{ + "bucket_name": "string", + "access_key": "string", + "secret_key": "string", + "region": "string", + "endpoint": "string" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `bucket_name` | string | Storage bucket name | +| `access_key` | string | S3 access key | +| `secret_key` | string | S3 secret key | +| `region` | string | S3 region | +| `endpoint` | string | S3 endpoint URL | diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-storage-list/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-storage-list/SKILL.md new file mode 100644 index 00000000..6e4cc362 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-storage-list/SKILL.md @@ -0,0 +1,94 @@ +--- +name: agentuity-cli-cloud-storage-list +description: List storage resources or files in a bucket. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: "[name] [prefix]" +metadata: + command: "agentuity cloud storage list" + tags: "read-only fast requires-auth" +--- + +# Cloud Storage List + +List storage resources or files in a bucket + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Organization context required (`--org-id` or default org) + +## Usage + +```bash +agentuity cloud storage list [name] [prefix] [options] +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | No | - | +| `` | string | No | - | + +## Options + +| Option | Type | Required | Default | Description | +|--------|------|----------|---------|-------------| +| `--showCredentials` | boolean | Yes | - | Show credentials in plain text (default: masked in terminal, unmasked in JSON) | +| `--nameOnly` | boolean | Yes | - | Print the name only | + +## Examples + +List items: + +```bash +agentuity cloud storage list +``` + +List items: + +```bash +agentuity cloud storage list my-bucket +``` + +List items: + +```bash +agentuity cloud storage list my-bucket path/prefix +``` + +Show output in JSON format: + +```bash +agentuity --json cloud storage list +``` + +List items: + +```bash +agentuity cloud storage ls +``` + +Use show credentials option: + +```bash +agentuity cloud storage list --show-credentials +``` + +## Output + +Returns JSON object: + +```json +{ + "buckets": "array", + "files": "array" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `buckets` | array | List of storage resources | +| `files` | array | List of files in bucket | diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-storage-upload/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-storage-upload/SKILL.md new file mode 100644 index 00000000..8f0ff8e9 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-storage-upload/SKILL.md @@ -0,0 +1,92 @@ +--- +name: agentuity-cli-cloud-storage-upload +description: Upload a file to storage bucket. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: " " +metadata: + command: "agentuity cloud storage upload" + tags: "write requires-auth" +--- + +# Cloud Storage Upload + +Upload a file to storage bucket + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Organization context required (`--org-id` or default org) + +## Usage + +```bash +agentuity cloud storage upload [options] +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | Yes | - | +| `` | string | Yes | - | + +## Options + +| Option | Type | Required | Default | Description | +|--------|------|----------|---------|-------------| +| `--key` | string | Yes | - | Remote object key (defaults to basename or "stdin" for piped uploads) | +| `--contentType` | string | Yes | - | Content type (auto-detected if not provided) | + +## Examples + +Upload file to bucket: + +```bash +agentuity cloud storage upload my-bucket file.txt +``` + +Upload file with content type: + +```bash +agentuity cloud storage put my-bucket file.txt --content-type text/plain +``` + +Upload file with custom object key: + +```bash +agentuity cloud storage upload my-bucket file.txt --key custom-name.txt +``` + +Upload from stdin: + +```bash +cat file.txt | agentuity cloud storage upload my-bucket - +``` + +Upload from stdin with custom key: + +```bash +cat data.json | agentuity cloud storage upload my-bucket - --key data.json +``` + +## Output + +Returns JSON object: + +```json +{ + "success": "boolean", + "bucket": "string", + "filename": "string", + "size": "number" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `success` | boolean | Whether upload succeeded | +| `bucket` | string | Bucket name | +| `filename` | string | Uploaded filename | +| `size` | number | File size in bytes | diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-stream-delete/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-stream-delete/SKILL.md new file mode 100644 index 00000000..564a02d8 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-stream-delete/SKILL.md @@ -0,0 +1,66 @@ +--- +name: agentuity-cli-cloud-stream-delete +description: Delete a stream by ID (soft delete). Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: "" +metadata: + command: "agentuity cloud stream delete" + tags: "destructive deletes-resource slow requires-auth" +--- + +# Cloud Stream Delete + +Delete a stream by ID (soft delete) + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Project context required (run from project directory or use `--project-id`) + +## Usage + +```bash +agentuity cloud stream delete +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | Yes | - | + +## Examples + +Delete a stream: + +```bash +agentuity stream delete stream-id-123 +``` + +Delete stream (using alias): + +```bash +agentuity stream rm stream-id-456 +``` + +Delete stream (using alias): + +```bash +agentuity stream del stream-id-789 +``` + +## Output + +Returns JSON object: + +```json +{ + "id": "string" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `id` | string | Stream ID | diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-stream-get/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-stream-get/SKILL.md new file mode 100644 index 00000000..c7bc200f --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-stream-get/SKILL.md @@ -0,0 +1,86 @@ +--- +name: agentuity-cli-cloud-stream-get +description: Get detailed information about a specific stream. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: "" +metadata: + command: "agentuity cloud stream get" + tags: "read-only slow requires-auth" +--- + +# Cloud Stream Get + +Get detailed information about a specific stream + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Project context required (run from project directory or use `--project-id`) + +## Usage + +```bash +agentuity cloud stream get [options] +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | Yes | - | + +## Options + +| Option | Type | Required | Default | Description | +|--------|------|----------|---------|-------------| +| `--output` | string | Yes | - | download stream content to file | + +## Examples + +Get stream details: + +```bash +agentuity stream get stream-id-123 +``` + +Get stream as JSON: + +```bash +agentuity stream get stream-id-123 --json +``` + +Download stream to file: + +```bash +agentuity stream get stream-id-123 --output stream.dat +``` + +Download stream (short flag): + +```bash +agentuity stream get stream-id-123 -o stream.dat +``` + +## Output + +Returns JSON object: + +```json +{ + "id": "string", + "name": "string", + "metadata": "object", + "url": "string", + "sizeBytes": "number" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `id` | string | Stream ID | +| `name` | string | Stream name | +| `metadata` | object | Stream metadata | +| `url` | string | Public URL | +| `sizeBytes` | number | Size in bytes | diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-stream-list/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-stream-list/SKILL.md new file mode 100644 index 00000000..a7929ada --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-stream-list/SKILL.md @@ -0,0 +1,82 @@ +--- +name: agentuity-cli-cloud-stream-list +description: List recent streams with optional filtering. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +metadata: + command: "agentuity cloud stream list" + tags: "read-only slow requires-auth" +--- + +# Cloud Stream List + +List recent streams with optional filtering + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Project context required (run from project directory or use `--project-id`) + +## Usage + +```bash +agentuity cloud stream list [options] +``` + +## Options + +| Option | Type | Required | Default | Description | +|--------|------|----------|---------|-------------| +| `--size` | number | Yes | - | maximum number of streams to return (default: 100) | +| `--offset` | number | Yes | - | number of streams to skip for pagination | +| `--name` | string | Yes | - | filter by stream name | +| `--metadata` | string | Yes | - | filter by metadata (format: key=value or key1=value1,key2=value2) | + +## Examples + +List all streams: + +```bash +agentuity cloud stream list +``` + +List 50 most recent streams: + +```bash +agentuity cloud stream ls --size 50 +``` + +Filter by name: + +```bash +agentuity cloud stream list --name agent-logs +``` + +Filter by metadata: + +```bash +agentuity cloud stream list --metadata type=export +``` + +Output as JSON: + +```bash +agentuity cloud stream ls --json +``` + +## Output + +Returns JSON object: + +```json +{ + "streams": "array", + "total": "number" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `streams` | array | List of streams | +| `total` | number | Total count of matching streams | diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-thread-delete/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-thread-delete/SKILL.md new file mode 100644 index 00000000..748d9257 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-thread-delete/SKILL.md @@ -0,0 +1,39 @@ +--- +name: agentuity-cli-cloud-thread-delete +description: Delete a thread. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: "" +metadata: + command: "agentuity cloud thread delete" + tags: "destructive requires-auth" +--- + +# Cloud Thread Delete + +Delete a thread + +## Prerequisites + +- Authenticated with `agentuity auth login` + +## Usage + +```bash +agentuity cloud thread delete +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | Yes | - | + +## Examples + +Delete a thread by ID: + +```bash +agentuity cloud thread delete thrd_abc123xyz +``` diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-thread-get/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-thread-get/SKILL.md new file mode 100644 index 00000000..0b1b03ff --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-thread-get/SKILL.md @@ -0,0 +1,69 @@ +--- +name: agentuity-cli-cloud-thread-get +description: Get details about a specific thread. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: "" +metadata: + command: "agentuity cloud thread get" + tags: "read-only fast requires-auth" +--- + +# Cloud Thread Get + +Get details about a specific thread + +## Prerequisites + +- Authenticated with `agentuity auth login` + +## Usage + +```bash +agentuity cloud thread get +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | Yes | - | + +## Examples + +Get a thread by ID: + +```bash +agentuity cloud thread get thrd_abc123xyz +``` + +## Output + +Returns JSON object: + +```json +{ + "id": "string", + "created_at": "string", + "updated_at": "string", + "deleted": "boolean", + "deleted_at": "unknown", + "deleted_by": "unknown", + "org_id": "string", + "project_id": "string", + "user_data": "unknown" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `id` | string | Thread ID | +| `created_at` | string | Creation timestamp | +| `updated_at` | string | Update timestamp | +| `deleted` | boolean | Deleted status | +| `deleted_at` | unknown | Deletion timestamp | +| `deleted_by` | unknown | Deleted by | +| `org_id` | string | Organization ID | +| `project_id` | string | Project ID | +| `user_data` | unknown | User data as JSON | diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-thread-list/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-thread-list/SKILL.md new file mode 100644 index 00000000..66018806 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-thread-list/SKILL.md @@ -0,0 +1,62 @@ +--- +name: agentuity-cli-cloud-thread-list +description: List recent threads. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +metadata: + command: "agentuity cloud thread list" + tags: "read-only fast requires-auth" +--- + +# Cloud Thread List + +List recent threads + +## Prerequisites + +- Authenticated with `agentuity auth login` + +## Usage + +```bash +agentuity cloud thread list [options] +``` + +## Options + +| Option | Type | Required | Default | Description | +|--------|------|----------|---------|-------------| +| `--count` | number | No | `10` | Number of threads to list (1–100) | +| `--orgId` | string | Yes | - | Filter by organization ID | +| `--projectId` | string | Yes | - | Filter by project ID | + +## Examples + +List 10 most recent threads: + +```bash +agentuity cloud thread list +``` + +List 25 most recent threads: + +```bash +agentuity cloud thread list --count=25 +``` + +Filter by project: + +```bash +agentuity cloud thread list --project-id=proj_* +``` + +Filter by organization: + +```bash +agentuity cloud thread list --org-id=org_* +``` + +## Output + +Returns: `array` diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-vector-delete-namespace/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-vector-delete-namespace/SKILL.md new file mode 100644 index 00000000..fe99c2d2 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-vector-delete-namespace/SKILL.md @@ -0,0 +1,76 @@ +--- +name: agentuity-cli-cloud-vector-delete-namespace +description: Delete a vector namespace and all its vectors. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: "" +metadata: + command: "agentuity cloud vector delete-namespace" + tags: "destructive deletes-resource slow requires-auth" +--- + +# Cloud Vector Delete-namespace + +Delete a vector namespace and all its vectors + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Project context required (run from project directory or use `--project-id`) + +## Usage + +```bash +agentuity cloud vector delete-namespace [options] +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | Yes | - | + +## Options + +| Option | Type | Required | Default | Description | +|--------|------|----------|---------|-------------| +| `--confirm` | boolean | No | `false` | if true will not prompt for confirmation | + +## Examples + +Delete staging namespace (interactive): + +```bash +agentuity vector delete-namespace staging +``` + +Delete cache without confirmation: + +```bash +agentuity vector rm-namespace cache --confirm +``` + +Force delete old-data namespace: + +```bash +agentuity vector delete-namespace old-data --confirm +``` + +## Output + +Returns JSON object: + +```json +{ + "success": "boolean", + "namespace": "string", + "message": "string" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `success` | boolean | Whether the deletion succeeded | +| `namespace` | string | Deleted namespace name | +| `message` | string | Confirmation message | diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-vector-delete/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-vector-delete/SKILL.md new file mode 100644 index 00000000..b2c58043 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-vector-delete/SKILL.md @@ -0,0 +1,83 @@ +--- +name: agentuity-cli-cloud-vector-delete +description: Delete one or more vectors by key. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: " " +metadata: + command: "agentuity cloud vector delete" + tags: "destructive deletes-resource slow requires-auth" +--- + +# Cloud Vector Delete + +Delete one or more vectors by key + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Project context required (run from project directory or use `--project-id`) + +## Usage + +```bash +agentuity cloud vector delete [options] +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | Yes | - | +| `` | array | Yes | - | + +## Options + +| Option | Type | Required | Default | Description | +|--------|------|----------|---------|-------------| +| `--confirm` | boolean | No | `false` | if true will not prompt for confirmation | + +## Examples + +Delete a single vector (interactive): + +```bash +agentuity vector delete products chair-001 +``` + +Delete multiple vectors without confirmation: + +```bash +agentuity vector rm knowledge-base doc-123 doc-456 --confirm +``` + +Bulk delete without confirmation: + +```bash +agentuity vector del embeddings old-profile-1 old-profile-2 --confirm +``` + +## Output + +Returns JSON object: + +```json +{ + "success": "boolean", + "namespace": "string", + "keys": "array", + "deleted": "number", + "durationMs": "number", + "message": "string" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `success` | boolean | Whether the operation succeeded | +| `namespace` | string | Namespace name | +| `keys` | array | Keys that were deleted | +| `deleted` | number | Number of vectors deleted | +| `durationMs` | number | Operation duration in milliseconds | +| `message` | string | Confirmation message | diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-vector-get/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-vector-get/SKILL.md new file mode 100644 index 00000000..6e1a56e2 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-vector-get/SKILL.md @@ -0,0 +1,77 @@ +--- +name: agentuity-cli-cloud-vector-get +description: Get a specific vector entry by key. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: " " +metadata: + command: "agentuity cloud vector get" + tags: "read-only fast requires-auth" +--- + +# Cloud Vector Get + +Get a specific vector entry by key + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Project context required (run from project directory or use `--project-id`) + +## Usage + +```bash +agentuity cloud vector get +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | Yes | - | +| `` | string | Yes | - | + +## Examples + +Get a specific product vector: + +```bash +agentuity vector get products chair-001 +``` + +Get a document from knowledge base: + +```bash +agentuity vector get knowledge-base doc-123 +``` + +Get user profile embedding: + +```bash +agentuity vector get embeddings user-profile-456 +``` + +## Output + +Returns JSON object: + +```json +{ + "exists": "boolean", + "key": "string", + "id": "string", + "metadata": "object", + "document": "string", + "similarity": "number" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `exists` | boolean | Whether the vector exists | +| `key` | string | Vector key | +| `id` | string | Vector ID | +| `metadata` | object | Vector metadata | +| `document` | string | Original document text | +| `similarity` | number | Similarity score | diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-vector-list-namespaces/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-vector-list-namespaces/SKILL.md new file mode 100644 index 00000000..8bf0911a --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-vector-list-namespaces/SKILL.md @@ -0,0 +1,49 @@ +--- +name: agentuity-cli-cloud-vector-list-namespaces +description: List all vector namespaces. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +metadata: + command: "agentuity cloud vector list-namespaces" + tags: "read-only fast requires-auth" +--- + +# Cloud Vector List-namespaces + +List all vector namespaces + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Project context required (run from project directory or use `--project-id`) + +## Usage + +```bash +agentuity cloud vector list-namespaces +``` + +## Examples + +List all namespaces: + +```bash +agentuity vector list-namespaces +``` + +List namespaces (using alias): + +```bash +agentuity vector namespaces +``` + +List namespaces (short alias): + +```bash +agentuity vector ns +``` + +## Output + +Returns: `array` diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-vector-search/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-vector-search/SKILL.md new file mode 100644 index 00000000..b9a2d4d1 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-vector-search/SKILL.md @@ -0,0 +1,93 @@ +--- +name: agentuity-cli-cloud-vector-search +description: Search for vectors using semantic similarity. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: " " +metadata: + command: "agentuity cloud vector search" + tags: "read-only slow requires-auth" +--- + +# Cloud Vector Search + +Search for vectors using semantic similarity + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Project context required (run from project directory or use `--project-id`) + +## Usage + +```bash +agentuity cloud vector search [options] +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | Yes | - | +| `` | string | Yes | - | + +## Options + +| Option | Type | Required | Default | Description | +|--------|------|----------|---------|-------------| +| `--limit` | number | Yes | - | maximum number of results to return (default: 10) | +| `--similarity` | number | Yes | - | minimum similarity threshold (0.0-1.0) | +| `--metadata` | string | Yes | - | filter by metadata (format: key=value or key1=value1,key2=value2) | + +## Examples + +Search for similar products: + +```bash +agentuity vector search products "comfortable office chair" +``` + +Search knowledge base: + +```bash +agentuity vector list knowledge-base "machine learning" +``` + +Limit results: + +```bash +agentuity vector search docs "API documentation" --limit 5 +``` + +Set minimum similarity: + +```bash +agentuity vector search products "ergonomic" --similarity 0.8 +``` + +Filter by metadata: + +```bash +agentuity vector ls embeddings "neural networks" --metadata category=ai +``` + +## Output + +Returns JSON object: + +```json +{ + "namespace": "string", + "query": "string", + "results": "array", + "count": "number" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `namespace` | string | Namespace name | +| `query` | string | Search query used | +| `results` | array | Search results | +| `count` | number | Number of results found | diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-vector-stats/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-vector-stats/SKILL.md new file mode 100644 index 00000000..883e332b --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-vector-stats/SKILL.md @@ -0,0 +1,52 @@ +--- +name: agentuity-cli-cloud-vector-stats +description: Get statistics for vector storage. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: "[name]" +metadata: + command: "agentuity cloud vector stats" + tags: "read-only fast requires-auth" +--- + +# Cloud Vector Stats + +Get statistics for vector storage + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Project context required (run from project directory or use `--project-id`) + +## Usage + +```bash +agentuity cloud vector stats [name] +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | No | - | + +## Examples + +Show stats for all namespaces: + +```bash +agentuity vector stats +``` + +Show detailed stats for products namespace: + +```bash +agentuity vector stats products +``` + +Show stats for embeddings: + +```bash +agentuity vector stats embeddings +``` diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-vector-upsert/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-vector-upsert/SKILL.md new file mode 100644 index 00000000..2db4bb2f --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-vector-upsert/SKILL.md @@ -0,0 +1,96 @@ +--- +name: agentuity-cli-cloud-vector-upsert +description: Add or update vectors in the vector storage. Requires authentication. Use for Agentuity cloud platform operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: " [key]" +metadata: + command: "agentuity cloud vector upsert" + tags: "mutating updates-resource slow requires-auth" +--- + +# Cloud Vector Upsert + +Add or update vectors in the vector storage + +## Prerequisites + +- Authenticated with `agentuity auth login` +- Project context required (run from project directory or use `--project-id`) + +## Usage + +```bash +agentuity cloud vector upsert [key] [options] +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | Yes | - | +| `` | string | No | - | + +## Options + +| Option | Type | Required | Default | Description | +|--------|------|----------|---------|-------------| +| `--document` | string | Yes | - | document text to embed | +| `--embeddings` | string | Yes | - | pre-computed embeddings as JSON array | +| `--metadata` | string | Yes | - | metadata as JSON object | +| `--file` | string | Yes | - | path to JSON file containing vectors, or "-" for stdin | + +## Examples + +Upsert a single vector with document text: + +```bash +agentuity vector upsert products doc1 --document "Comfortable office chair" +``` + +Upsert with metadata: + +```bash +agentuity vector upsert products doc1 --document "Chair" --metadata '{"category":"furniture"}' +``` + +Upsert with pre-computed embeddings: + +```bash +agentuity vector upsert embeddings vec1 --embeddings "[0.1, 0.2, 0.3]" +``` + +Bulk upsert from JSON file: + +```bash +agentuity vector upsert products --file vectors.json +``` + +Bulk upsert from stdin: + +```bash +cat vectors.json | agentuity vector upsert products - +``` + +## Output + +Returns JSON object: + +```json +{ + "success": "boolean", + "namespace": "string", + "count": "number", + "results": "array", + "durationMs": "number" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `success` | boolean | Whether the operation succeeded | +| `namespace` | string | Namespace name | +| `count` | number | Number of vectors upserted | +| `results` | array | Upsert results with key-to-id mappings | +| `durationMs` | number | Operation duration in milliseconds | diff --git a/doc-agents/.agents/skills/agentuity-cli-dev/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-dev/SKILL.md new file mode 100644 index 00000000..e28fef74 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-dev/SKILL.md @@ -0,0 +1,46 @@ +--- +name: agentuity-cli-dev +description: Build and run the development server +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +metadata: + command: "agentuity dev" + tags: "mutating slow requires-project" +--- + +# Dev + +Build and run the development server + +## Usage + +```bash +agentuity dev +``` + +## Examples + +Start development server: + +```bash +agentuity dev +``` + +Specify custom port: + +```bash +agentuity dev --port 8080 +``` + +Run in local mode: + +```bash +agentuity dev --local +``` + +Disable public URL: + +```bash +agentuity dev --no-public +``` diff --git a/doc-agents/.agents/skills/agentuity-cli-profile-create/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-profile-create/SKILL.md new file mode 100644 index 00000000..10fca081 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-profile-create/SKILL.md @@ -0,0 +1,71 @@ +--- +name: agentuity-cli-profile-create +description: Create a new configuration profile +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: "" +metadata: + command: "agentuity profile create" + tags: "mutating creates-resource fast" +--- + +# Profile Create + +Create a new configuration profile + +## Usage + +```bash +agentuity profile create [options] +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | Yes | - | + +## Options + +| Option | Type | Required | Default | Description | +|--------|------|----------|---------|-------------| +| `--switch` | boolean | Yes | - | switch to this profile (if more than one) | + +## Examples + +Create new item: + +```bash +agentuity profile create production +``` + +Use switch option: + +```bash +agentuity profile create staging --switch +``` + +Create new item: + +```bash +agentuity profile create development +``` + +## Output + +Returns JSON object: + +```json +{ + "success": "boolean", + "name": "string", + "path": "string" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `success` | boolean | Whether creation succeeded | +| `name` | string | Profile name | +| `path` | string | Profile file path | diff --git a/doc-agents/.agents/skills/agentuity-cli-profile-current/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-profile-current/SKILL.md new file mode 100644 index 00000000..386c87b1 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-profile-current/SKILL.md @@ -0,0 +1,38 @@ +--- +name: agentuity-cli-profile-current +description: Show the name of the currently active profile +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +metadata: + command: "agentuity profile current" + tags: "read-only fast" +--- + +# Profile Current + +Show the name of the currently active profile + +## Usage + +```bash +agentuity profile current +``` + +## Examples + +Show current profile: + +```bash +agentuity profile current +``` + +Show output in JSON format: + +```bash +agentuity profile current --json +``` + +## Output + +Returns: `string` diff --git a/doc-agents/.agents/skills/agentuity-cli-profile-delete/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-profile-delete/SKILL.md new file mode 100644 index 00000000..cb0017b2 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-profile-delete/SKILL.md @@ -0,0 +1,69 @@ +--- +name: agentuity-cli-profile-delete +description: Delete a configuration profile +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: "[name]" +metadata: + command: "agentuity profile delete" + tags: "destructive deletes-resource fast" +--- + +# Profile Delete + +Delete a configuration profile + +## Usage + +```bash +agentuity profile delete [name] [options] +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | No | - | + +## Options + +| Option | Type | Required | Default | Description | +|--------|------|----------|---------|-------------| +| `--confirm` | boolean | Yes | - | Skip confirmation prompt | + +## Examples + +Delete item: + +```bash +agentuity profile delete staging +``` + +Use confirm option: + +```bash +agentuity profile delete old-dev --confirm +``` + +Delete item: + +```bash +agentuity profile delete +``` + +## Output + +Returns JSON object: + +```json +{ + "success": "boolean", + "name": "string" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `success` | boolean | Whether deletion succeeded | +| `name` | string | Deleted profile name | diff --git a/doc-agents/.agents/skills/agentuity-cli-profile-list/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-profile-list/SKILL.md new file mode 100644 index 00000000..059cc7ae --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-profile-list/SKILL.md @@ -0,0 +1,38 @@ +--- +name: agentuity-cli-profile-list +description: List all available profiles +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +metadata: + command: "agentuity profile list" + tags: "read-only fast" +--- + +# Profile List + +List all available profiles + +## Usage + +```bash +agentuity profile list +``` + +## Examples + +List items: + +```bash +agentuity profile list +``` + +List items: + +```bash +agentuity profile ls +``` + +## Output + +Returns: `array` diff --git a/doc-agents/.agents/skills/agentuity-cli-profile-show/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-profile-show/SKILL.md new file mode 100644 index 00000000..f2678e09 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-profile-show/SKILL.md @@ -0,0 +1,71 @@ +--- +name: agentuity-cli-profile-show +description: Show the configuration of a profile +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: "[name]" +metadata: + command: "agentuity profile show" + tags: "read-only fast" +--- + +# Profile Show + +Show the configuration of a profile + +## Usage + +```bash +agentuity profile show [name] +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | No | - | + +## Examples + +Show details: + +```bash +agentuity profile show +``` + +Show details: + +```bash +agentuity profile show production +``` + +Show output in JSON format: + +```bash +agentuity profile show staging --json +``` + +## Output + +Returns JSON object: + +```json +{ + "name": "string", + "auth": "object", + "devmode": "object", + "overrides": "unknown", + "preferences": "object", + "gravity": "object" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `name` | string | Profile name | +| `auth` | object | Authentication credentials (managed by login/logout commands) | +| `devmode` | object | Development mode configuration | +| `overrides` | unknown | URL and behavior overrides | +| `preferences` | object | User preferences | +| `gravity` | object | the gravity client information | diff --git a/doc-agents/.agents/skills/agentuity-cli-profile-use/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-profile-use/SKILL.md new file mode 100644 index 00000000..851ab01b --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-profile-use/SKILL.md @@ -0,0 +1,47 @@ +--- +name: agentuity-cli-profile-use +description: Switch to a different configuration profile +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: "[name]" +metadata: + command: "agentuity profile use" + tags: "mutating updates-resource fast" +--- + +# Profile Use + +Switch to a different configuration profile + +## Usage + +```bash +agentuity profile use [name] +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | No | - | + +## Examples + +Switch to the "production" profile: + +```bash +agentuity profile use production +``` + +Switch to the "staging" profile: + +```bash +agentuity profile switch staging +``` + +Show interactive profile selection menu: + +```bash +agentuity profile use +``` diff --git a/doc-agents/.agents/skills/agentuity-cli-project-create/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-project-create/SKILL.md new file mode 100644 index 00000000..653505a6 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-project-create/SKILL.md @@ -0,0 +1,95 @@ +--- +name: agentuity-cli-project-create +description: Create a new project. Use for project management operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +metadata: + command: "agentuity project create" + tags: "mutating creates-resource slow" +--- + +# Project Create + +Create a new project + +## Usage + +```bash +agentuity project create [options] +``` + +## Options + +| Option | Type | Required | Default | Description | +|--------|------|----------|---------|-------------| +| `--name` | string | Yes | - | Project name | +| `--dir` | string | Yes | - | Directory to create the project in | +| `--domains` | array | Yes | - | Array of custom domains | +| `--template` | string | Yes | - | Template to use | +| `--templateDir` | string | Yes | - | Local template directory for testing (e.g., ./packages/templates) | +| `--templateBranch` | string | Yes | - | GitHub branch to use for templates (default: main) | +| `--install` | boolean | No | `true` | Run bun install after creating the project (use --no-install to skip) | +| `--build` | boolean | No | `true` | Run bun run build after installing (use --no-build to skip) | +| `--confirm` | boolean | Yes | - | Skip confirmation prompts | +| `--register` | boolean | No | `true` | Register the project, if authenticated (use --no-register to skip) | + +## Examples + +Create new item: + +```bash +agentuity project create +``` + +Create new item: + +```bash +agentuity project create --name my-ai-agent +``` + +Create new item: + +```bash +agentuity project create --name customer-service-bot --dir ~/projects/agent +``` + +Use no install option: + +```bash +agentuity project create --template basic --no-install +``` + +Use no register option: + +```bash +agentuity project new --no-register +``` + +## Output + +Returns JSON object: + +```json +{ + "success": "boolean", + "name": "string", + "path": "string", + "projectId": "string", + "template": "string", + "installed": "boolean", + "built": "boolean", + "domains": "array" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `success` | boolean | Whether the operation succeeded | +| `name` | string | Project name | +| `path` | string | Project directory path | +| `projectId` | string | Project ID if registered | +| `template` | string | Template used | +| `installed` | boolean | Whether dependencies were installed | +| `built` | boolean | Whether the project was built | +| `domains` | array | Array of custom domains | diff --git a/doc-agents/.agents/skills/agentuity-cli-project-delete/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-project-delete/SKILL.md new file mode 100644 index 00000000..6c0836e0 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-project-delete/SKILL.md @@ -0,0 +1,93 @@ +--- +name: agentuity-cli-project-delete +description: Delete a project. Requires authentication. Use for project management operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: "[id]" +metadata: + command: "agentuity project delete" + tags: "destructive deletes-resource slow requires-auth" +--- + +# Project Delete + +Delete a project + +## Prerequisites + +- Authenticated with `agentuity auth login` + +## Usage + +```bash +agentuity project delete [id] [options] +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | No | - | + +## Options + +| Option | Type | Required | Default | Description | +|--------|------|----------|---------|-------------| +| `--confirm` | boolean | Yes | - | Skip confirmation prompts | + +## Examples + +Delete item: + +```bash +agentuity project delete +``` + +Delete item: + +```bash +agentuity project delete proj_abc123def456 +``` + +Use confirm option: + +```bash +agentuity project delete proj_abc123def456 --confirm +``` + +Delete item: + +```bash +agentuity project rm proj_abc123def456 +``` + +Delete item: + +```bash +agentuity --explain project delete proj_abc123def456 +``` + +Delete item: + +```bash +agentuity --dry-run project delete proj_abc123def456 +``` + +## Output + +Returns JSON object: + +```json +{ + "success": "boolean", + "projectIds": "array", + "count": "number" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `success` | boolean | Whether the deletion succeeded | +| `projectIds` | array | Deleted project IDs | +| `count` | number | Number of projects deleted | diff --git a/doc-agents/.agents/skills/agentuity-cli-project-list/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-project-list/SKILL.md new file mode 100644 index 00000000..49444fab --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-project-list/SKILL.md @@ -0,0 +1,48 @@ +--- +name: agentuity-cli-project-list +description: List all projects. Requires authentication. Use for project management operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +metadata: + command: "agentuity project list" + tags: "read-only slow requires-auth" +--- + +# Project List + +List all projects + +## Prerequisites + +- Authenticated with `agentuity auth login` + +## Usage + +```bash +agentuity project list +``` + +## Examples + +List projects (human-readable): + +```bash +agentuity project list +``` + +List projects in JSON format: + +```bash +agentuity --json project list +``` + +Alias for "project list" — list projects (human-readable): + +```bash +agentuity project ls +``` + +## Output + +Returns: `array` diff --git a/doc-agents/.agents/skills/agentuity-cli-project-show/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-project-show/SKILL.md new file mode 100644 index 00000000..a1853382 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-project-show/SKILL.md @@ -0,0 +1,77 @@ +--- +name: agentuity-cli-project-show +description: Show project detail. Requires authentication. Use for project management operations +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +argument-hint: "" +metadata: + command: "agentuity project show" + tags: "read-only fast requires-auth requires-project" +--- + +# Project Show + +Show project detail + +## Prerequisites + +- Authenticated with `agentuity auth login` + +## Usage + +```bash +agentuity project show +``` + +## Arguments + +| Argument | Type | Required | Description | +|----------|------|----------|-------------| +| `` | string | Yes | - | + +## Examples + +Show details: + +```bash +agentuity project show proj_abc123def456 +``` + +Show output in JSON format: + +```bash +agentuity --json project show proj_abc123def456 +``` + +Get item details: + +```bash +agentuity project get proj_abc123def456 +``` + +## Output + +Returns JSON object: + +```json +{ + "id": "string", + "name": "string", + "description": "unknown", + "tags": "unknown", + "orgId": "string", + "secrets": "object", + "env": "object" +} +``` + +| Field | Type | Description | +|-------|------|-------------| +| `id` | string | Project ID | +| `name` | string | Project name | +| `description` | unknown | Project description | +| `tags` | unknown | Project tags | +| `orgId` | string | Organization ID | +| `secrets` | object | Project secrets (masked) | +| `env` | object | Environment variables | diff --git a/doc-agents/.agents/skills/agentuity-cli-repl/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-repl/SKILL.md new file mode 100644 index 00000000..15188169 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-repl/SKILL.md @@ -0,0 +1,28 @@ +--- +name: agentuity-cli-repl +description: interactive REPL for testing +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +metadata: + command: "agentuity repl" + tags: "slow" +--- + +# Repl + +interactive REPL for testing + +## Usage + +```bash +agentuity repl +``` + +## Examples + +Run repl command: + +```bash +agentuity repl +``` diff --git a/doc-agents/.agents/skills/agentuity-cli-upgrade/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-upgrade/SKILL.md new file mode 100644 index 00000000..8e27ee66 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-cli-upgrade/SKILL.md @@ -0,0 +1,34 @@ +--- +name: agentuity-cli-upgrade +description: Upgrade the CLI to the latest version +version: "0.0.105" +license: Apache-2.0 +allowed-tools: "Bash(agentuity:*)" +metadata: + command: "agentuity upgrade" + tags: "update" +--- + +# Upgrade + +Upgrade the CLI to the latest version + +## Usage + +```bash +agentuity upgrade +``` + +## Examples + +Check for updates and prompt to upgrade: + +```bash +agentuity upgrade +``` + +Force upgrade even if already on latest version: + +```bash +agentuity upgrade --force +``` diff --git a/doc-agents/.agents/skills/agentuity-version.txt b/doc-agents/.agents/skills/agentuity-version.txt new file mode 100644 index 00000000..b7119478 --- /dev/null +++ b/doc-agents/.agents/skills/agentuity-version.txt @@ -0,0 +1 @@ +0.0.105 \ No newline at end of file diff --git a/doc-agents/.gitignore b/doc-agents/.gitignore new file mode 100644 index 00000000..6767817a --- /dev/null +++ b/doc-agents/.gitignore @@ -0,0 +1,43 @@ +# dependencies (bun install) + +node_modules + +# output + +out +dist +*.tgz + +# code coverage + +coverage +*.lcov + +# logs + +/logs +_.log +report.[0-9]_.[0-9]_.[0-9]_.[0-9]\*.json + +# dotenv environment variable files + +.env +.env.\* + +# caches + +.eslintcache +.cache +*.tsbuildinfo + +# IntelliJ based IDEs + +.idea + +# Finder (MacOS) folder config + +.DS_Store + +# Agentuity build files + +.agentuity diff --git a/doc-agents/.vscode/settings.json b/doc-agents/.vscode/settings.json new file mode 100644 index 00000000..8b2c0232 --- /dev/null +++ b/doc-agents/.vscode/settings.json @@ -0,0 +1,16 @@ +{ + "search.exclude": { + "**/.git/**": true, + "**/node_modules/**": true, + "**/bun.lock": true, + "**/.agentuity/**": true + }, + "json.schemas": [ + { + "fileMatch": [ + "agentuity.json" + ], + "url": "https://agentuity.dev/schema/cli/v1/agentuity.json" + } + ] +} \ No newline at end of file diff --git a/doc-agents/AGENTS.md b/doc-agents/AGENTS.md new file mode 100644 index 00000000..55f22493 --- /dev/null +++ b/doc-agents/AGENTS.md @@ -0,0 +1,64 @@ +# Agent Guidelines for doc_agents + +## Commands + +- **Build**: `bun run build` (compiles your application) +- **Dev**: `bun run dev` (starts development server) +- **Typecheck**: `bun run typecheck` (runs TypeScript type checking) +- **Deploy**: `bun run deploy` (deploys your app to the Agentuity cloud) + +## Agent-Friendly CLI + +The Agentuity CLI is designed to be agent-friendly with programmatic interfaces, structured output, and comprehensive introspection. + +Read the [AGENTS.md](./node_modules/@agentuity/cli/AGENTS.md) file in the Agentuity CLI for more information on how to work with this project. + +## Instructions + +- This project uses Bun instead of NodeJS and TypeScript for all source code +- This is an Agentuity Agent project + +## Web Frontend (src/web/) + +The `src/web/` folder contains your React frontend, which is automatically bundled by the Agentuity build system. + +**File Structure:** + +- `index.html` - Main HTML file with ` + + +``` + +## React Hooks + +All hooks from `@agentuity/react` must be used within an `AgentuityProvider`. **Always use these hooks instead of raw `fetch()` calls** - they provide type safety, automatic error handling, and integration with the Agentuity platform. + +### useAPI - Type-Safe API Calls + +The primary hook for making HTTP requests. **Use this instead of `fetch()`.** + +```typescript +import { useAPI } from '@agentuity/react'; + +function MyComponent() { + // GET requests auto-execute and return refetch + const { data, isLoading, error, refetch } = useAPI('GET /api/users'); + + // POST/PUT/DELETE return invoke for manual execution + const { invoke, data: result, isLoading: saving } = useAPI('POST /api/users'); + + const handleCreate = async () => { + // Input is fully typed from route schema! + await invoke({ name: 'Alice', email: 'alice@example.com' }); + }; + + return ( +
+ + {result &&

Created: {result.name}

} +
+ ); +} +``` + +**useAPI Return Values:** + +| Property | Type | Description | +| ------------ | ------------------------ | ----------------------------------------- | +| `data` | `T \| undefined` | Response data (typed from route schema) | +| `error` | `Error \| null` | Error if request failed | +| `isLoading` | `boolean` | True during initial load | +| `isFetching` | `boolean` | True during any fetch (including refetch) | +| `isSuccess` | `boolean` | True if last request succeeded | +| `isError` | `boolean` | True if last request failed | +| `invoke` | `(input?) => Promise` | Manual trigger (POST/PUT/DELETE) | +| `refetch` | `() => Promise` | Refetch data (GET) | +| `reset` | `() => void` | Reset state to initial | + +### useAPI Options + +```typescript +// GET with query parameters and caching +const { data } = useAPI({ + route: 'GET /api/search', + query: { q: 'react', limit: '10' }, + staleTime: 5000, // Cache for 5 seconds + refetchInterval: 10000, // Auto-refetch every 10 seconds + enabled: true, // Set to false to disable auto-fetch +}); + +// POST with callbacks +const { invoke } = useAPI({ + route: 'POST /api/users', + onSuccess: (data) => console.log('Created:', data), + onError: (error) => console.error('Failed:', error), +}); + +// Streaming responses with onChunk +const { invoke } = useAPI({ + route: 'POST /api/stream', + onChunk: (chunk) => console.log('Received chunk:', chunk), + delimiter: '\n', // Split stream by newlines (default) +}); + +// Custom headers +const { data } = useAPI({ + route: 'GET /api/protected', + headers: { 'X-Custom-Header': 'value' }, +}); +``` + +### useWebsocket - WebSocket Connection + +For bidirectional real-time communication. Automatically handles reconnection. + +```typescript +import { useWebsocket } from '@agentuity/react'; + +function ChatComponent() { + const { isConnected, data, send, messages, clearMessages, error, reset } = useWebsocket('/api/chat'); + + return ( +
+

Status: {isConnected ? 'Connected' : 'Disconnected'}

+ +
+ {messages.map((msg, i) => ( +

{JSON.stringify(msg)}

+ ))} +
+ +
+ ); +} +``` + +**useWebsocket Return Values:** + +| Property | Type | Description | +| --------------- | ---------------- | ---------------------------------------- | +| `isConnected` | `boolean` | True when WebSocket is connected | +| `data` | `T \| undefined` | Most recent message received | +| `messages` | `T[]` | Array of all received messages | +| `send` | `(data) => void` | Send a message (typed from route schema) | +| `clearMessages` | `() => void` | Clear the messages array | +| `close` | `() => void` | Close the connection | +| `error` | `Error \| null` | Error if connection failed | +| `isError` | `boolean` | True if there's an error | +| `reset` | `() => void` | Reset state and reconnect | +| `readyState` | `number` | WebSocket ready state | + +### useEventStream - Server-Sent Events + +For server-to-client streaming (one-way). Use when server pushes updates to client. + +```typescript +import { useEventStream } from '@agentuity/react'; + +function NotificationsComponent() { + const { isConnected, data, error, close, reset } = useEventStream('/api/notifications'); + + return ( +
+

Connected: {isConnected ? 'Yes' : 'No'}

+ {error &&

Error: {error.message}

} +

Latest: {JSON.stringify(data)}

+ +
+ ); +} +``` + +**useEventStream Return Values:** + +| Property | Type | Description | +| ------------- | ---------------- | ---------------------------------- | +| `isConnected` | `boolean` | True when EventSource is connected | +| `data` | `T \| undefined` | Most recent event data | +| `error` | `Error \| null` | Error if connection failed | +| `isError` | `boolean` | True if there's an error | +| `close` | `() => void` | Close the connection | +| `reset` | `() => void` | Reset state and reconnect | +| `readyState` | `number` | EventSource ready state | + +### useAgentuity - Access Context + +Access the Agentuity context for base URL and configuration. + +```typescript +import { useAgentuity } from '@agentuity/react'; + +function MyComponent() { + const { baseUrl } = useAgentuity(); + + return

API Base: {baseUrl}

; +} +``` + +### useAuth - Authentication State + +Access and manage authentication state. + +```typescript +import { useAuth } from '@agentuity/react'; + +function AuthStatus() { + const { isAuthenticated, authHeader, setAuthHeader, authLoading } = useAuth(); + + const handleLogin = async (token: string) => { + setAuthHeader?.(`Bearer ${token}`); + }; + + const handleLogout = () => { + setAuthHeader?.(null); + }; + + if (authLoading) return

Loading...

; + + return ( +
+ {isAuthenticated ? ( + + ) : ( + + )} +
+ ); +} +``` + +**useAuth Return Values:** + +| Property | Type | Description | +| ----------------- | ------------------- | ------------------------------------------- | +| `isAuthenticated` | `boolean` | True if user has auth token and not loading | +| `authHeader` | `string \| null` | Current auth header (e.g., "Bearer ...") | +| `setAuthHeader` | `(token) => void` | Set auth header (null to clear) | +| `authLoading` | `boolean` | True during auth state changes | +| `setAuthLoading` | `(loading) => void` | Set auth loading state | + +## Complete Example + +```typescript +import { AgentuityProvider, useAPI, useWebsocket } from '@agentuity/react'; +import { useEffect, useState } from 'react'; + +function Dashboard() { + const [count, setCount] = useState(0); + const { invoke, data: agentResult } = useAPI('POST /api/process'); + const { isConnected, send, data: wsMessage } = useWebsocket('/api/live'); + + useEffect(() => { + if (isConnected) { + const interval = setInterval(() => { + send({ ping: Date.now() }); + }, 1000); + return () => clearInterval(interval); + } + }, [isConnected, send]); + + return ( +
+

My Agentuity App

+ +
+

Count: {count}

+ +
+ +
+ +

{JSON.stringify(agentResult)}

+
+ +
+ WebSocket: + {isConnected ? JSON.stringify(wsMessage) : 'Not connected'} +
+
+ ); +} + +export function App() { + return ( + + + + ); +} +``` + +## Static Assets + +Place static files in the **public/** folder: + +``` +src/web/public/ +├── logo.svg +├── styles.css +└── script.js +``` + +Reference them in your HTML or components: + +```html + + + +``` + +```typescript +// In React components +Logo +``` + +## Styling + +### Inline Styles + +```typescript +
+ Styled content +
+``` + +### CSS Files + +Create `public/styles.css`: + +```css +body { + background-color: #09090b; + color: #fff; + font-family: sans-serif; +} +``` + +Import in `index.html`: + +```html + +``` + +### Style Tag in Component + +```typescript +
+ + +
+``` + +## RPC-Style API Client + +For non-React contexts (like utility functions or event handlers), use `createClient`: + +```typescript +import { createClient } from '@agentuity/react'; + +// Create a typed client (uses global baseUrl and auth from AgentuityProvider) +const api = createClient(); + +// Type-safe RPC-style calls - routes become nested objects +// Route 'GET /api/users' becomes api.users.get() +// Route 'POST /api/users' becomes api.users.post() +// Route 'GET /api/users/:id' becomes api.users.id.get({ id: '123' }) + +async function fetchData() { + const users = await api.users.get(); + const newUser = await api.users.post({ name: 'Alice', email: 'alice@example.com' }); + const user = await api.users.id.get({ id: '123' }); + return { users, newUser, user }; +} +``` + +**When to use `createClient` vs `useAPI`:** + +| Use Case | Recommendation | +| ------------------------- | -------------- | +| React component rendering | `useAPI` hook | +| Event handlers | Either works | +| Utility functions | `createClient` | +| Non-React code | `createClient` | +| Need loading/error state | `useAPI` hook | +| Need caching/refetch | `useAPI` hook | + +## Best Practices + +- Wrap your app with **AgentuityProvider** for hooks to work +- **Always use `useAPI` instead of `fetch()`** for type safety and error handling +- Use **useAPI** for type-safe HTTP requests (GET, POST, PUT, DELETE) +- Use **useWebsocket** for bidirectional real-time communication +- Use **useEventStream** for server-to-client streaming +- Use **useAuth** for authentication state management +- Handle loading and error states in UI +- Place reusable components in separate files +- Keep static assets in the **public/** folder + +## Rules + +- **App.tsx** must export a function named `App` +- **frontend.tsx** must render the `App` component to `#root` +- **index.html** must have a `
` +- Routes are typed via module augmentation from `src/generated/routes.ts` +- The web app is served at `/` by default +- Static files in `public/` are served at `/public/*` +- Module script tag: `` +- **Never use raw `fetch()` calls** - always use `useAPI` or `createClient` + + diff --git a/doc-agents/src/web/App.tsx b/doc-agents/src/web/App.tsx new file mode 100644 index 00000000..9909dc28 --- /dev/null +++ b/doc-agents/src/web/App.tsx @@ -0,0 +1,435 @@ +import { useAPI } from '@agentuity/react'; +import { type ChangeEvent, useState } from 'react'; + +const WORKBENCH_PATH = process.env.AGENTUITY_PUBLIC_WORKBENCH_PATH; + +export function App() { + const [prompt, setPrompt] = useState('Tell me a joke'); + const { data: greeting, invoke, isLoading: running } = useAPI('POST /api/hello'); + + return ( +
+
+
+ + +

Welcome to Agentuity

+ +

+ The Full-Stack Platform for AI Agents +

+
+ +
+

+ Try the OpenAI powered AI Agent +

+ +
+ ) => + setPrompt(e.currentTarget.value) + } + placeholder="Enter your prompt" + type="text" + value={prompt} + /> + +
+
+
+ +
+
+ +
+ {greeting ?? 'Waiting for request'} +
+
+ +
+

Next Steps

+ +
+ {[ + { + key: 'customize-agent', + title: 'Customize your agent', + text: ( + <> + Edit src/agent/hello/agent.ts to change how your agent + responds. + + ), + }, + { + key: 'add-routes', + title: 'Add new API routes', + text: ( + <> + Create new files in src/web/ to expose more endpoints. + + ), + }, + { + key: 'update-frontend', + title: 'Update the frontend', + text: ( + <> + Modify src/web/App.tsx to build your custom UI. + + ), + }, + WORKBENCH_PATH + ? { + key: 'try-workbench', + title: ( + <> + Try{' '} + + Workbench + + + ), + text: <>A chat interface to test your agents in isolation., + } + : null, + ] + .filter(Boolean) + .map((step) => ( +
+
+ +
+ +
+

{step!.title}

+

{step!.text}

+
+
+ ))} +
+
+
+ + +
+ ); +} diff --git a/doc-agents/src/web/frontend.tsx b/doc-agents/src/web/frontend.tsx new file mode 100644 index 00000000..96996781 --- /dev/null +++ b/doc-agents/src/web/frontend.tsx @@ -0,0 +1,29 @@ +/** + * This file is the entry point for the React app, it sets up the root + * element and renders the App component to the DOM. + * + * It is included in `src/index.html`. + */ + +import React, { StrictMode } from 'react'; +import { createRoot } from 'react-dom/client'; +import { AgentuityProvider } from '@agentuity/react'; +import { App } from './App'; + +const elem = document.getElementById('root')!; +const app = ( + + + + + +); + +if (import.meta.hot) { + // With hot module reloading, `import.meta.hot.data` is persisted. + const root = (import.meta.hot.data.root ??= createRoot(elem)); + root.render(app); +} else { + // The hot module reloading API is not available in production. + createRoot(elem).render(app); +} diff --git a/doc-agents/src/web/index.html b/doc-agents/src/web/index.html new file mode 100644 index 00000000..053d07b7 --- /dev/null +++ b/doc-agents/src/web/index.html @@ -0,0 +1,13 @@ + + + + + + + Agentuity + Bun + React + + + +
+ + diff --git a/doc-agents/src/web/public/.gitkeep b/doc-agents/src/web/public/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/doc-agents/src/web/public/favicon.ico b/doc-agents/src/web/public/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..21f46e6f552734670df178e96f66592ad1741b37 GIT binary patch literal 174912 zcmeF42Y6IP*T-){fP|I+QlthcqVy^vkN_%*fLH)2LIi|J5d=hPvUDsok=}x+^d?nW zLNg#G2+|=0K|%`&HK8Q;J3p`Uxo=E`-DEdxp68!!_s*R;bLO-;Goxuvnw#d~p~mN_wt(3`{G~6b022Pr0MzdYx=X#YI>nUNrP*i zc}CNno&SF3-*t9%)%0=WG=1wxI*P5O+>;KldQ6o(c2+;Hr zB{V&6UgH@&M}hC2d(J4gapV8Jm%0=!s_8RlYI>(m|F(s?DikQ7=^uWm>0`$H_u16H zTQ^N#xKPsYAi}3zB=)7^JMEt~LLSI`draeWE|)jEFi-#M$5S=kLNq z<|QC!GRtot2zYLyG?U-V>zUO1dva}{ps9eec?}gLbO2@7@MJ`%KeQ19jiK?`nFMEdQ-9V`cDQO}~3r)A#Q;Wb(Fcnw}CM zzxVAk?j15D@o|S7-nG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;`DmU zdMOe*mIBfTH&?8>Q27D8qieKy*;B9n!?%sXfnKwGFr%J{y6>9H zM2FAF!ate&lf7MImadO!72LA7N0Rau&pI48{e=*OVn|B9B+m|rZmF(Jan`_Ej(qYJ zQ%0ciOJAI)I Date: Fri, 2 Jan 2026 09:02:47 -0700 Subject: [PATCH 04/12] test --- .github/workflows/sync-docs-full.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/sync-docs-full.yml b/.github/workflows/sync-docs-full.yml index d8b0cd95..7aa43948 100644 --- a/.github/workflows/sync-docs-full.yml +++ b/.github/workflows/sync-docs-full.yml @@ -2,6 +2,7 @@ name: Full Docs Sync to Vector Store on: workflow_dispatch: + pull_request: jobs: sync: From 01eb67770156df2b842c804613eea16654df1613 Mon Sep 17 00:00:00 2001 From: afterrburn Date: Fri, 2 Jan 2026 09:10:20 -0700 Subject: [PATCH 05/12] fix query failure --- doc-agents/src/agent/doc_processing/docs-orchestrator.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc-agents/src/agent/doc_processing/docs-orchestrator.ts b/doc-agents/src/agent/doc_processing/docs-orchestrator.ts index 85504aeb..0633b56c 100644 --- a/doc-agents/src/agent/doc_processing/docs-orchestrator.ts +++ b/doc-agents/src/agent/doc_processing/docs-orchestrator.ts @@ -16,7 +16,7 @@ async function removeVectorsByPath( while (true) { const vectors = await ctx.vector.search(vectorStoreName, { - query: ' ', + query: 'A', limit: 100, metadata: { path: logicalPath }, }); From f442fe2c4d85a5177f24f4054b008f9a32f4c3b3 Mon Sep 17 00:00:00 2001 From: afterrburn Date: Sat, 3 Jan 2026 11:26:23 -0700 Subject: [PATCH 06/12] Add Documentation Q&A Agent - Implemented a new Documentation Q&A agent that answers questions about Agentuity documentation using Retrieval-Augmented Generation (RAG). - Created supporting files including agent logic, prompt handling, document retrieval, and type definitions. - Added API route for the agent to handle requests and return structured responses. - Updated the frontend to interact with the new agent, allowing users to ask questions about documentation directly. --- doc-agents/src/agent/doc_qa/agent.ts | 22 +++ doc-agents/src/agent/doc_qa/index.ts | 1 + doc-agents/src/agent/doc_qa/prompt.ts | 141 ++++++++++++++ doc-agents/src/agent/doc_qa/rag.ts | 130 +++++++++++++ doc-agents/src/agent/doc_qa/retriever.ts | 225 +++++++++++++++++++++++ doc-agents/src/agent/doc_qa/types.ts | 44 +++++ doc-agents/src/api/doc-qa/route.ts | 13 ++ doc-agents/src/generated/app.ts | 8 +- doc-agents/src/generated/registry.ts | 42 +++++ doc-agents/src/generated/routes.ts | 37 ++++ doc-agents/src/web/App.tsx | 48 +++-- 11 files changed, 692 insertions(+), 19 deletions(-) create mode 100644 doc-agents/src/agent/doc_qa/agent.ts create mode 100644 doc-agents/src/agent/doc_qa/index.ts create mode 100644 doc-agents/src/agent/doc_qa/prompt.ts create mode 100644 doc-agents/src/agent/doc_qa/rag.ts create mode 100644 doc-agents/src/agent/doc_qa/retriever.ts create mode 100644 doc-agents/src/agent/doc_qa/types.ts create mode 100644 doc-agents/src/api/doc-qa/route.ts diff --git a/doc-agents/src/agent/doc_qa/agent.ts b/doc-agents/src/agent/doc_qa/agent.ts new file mode 100644 index 00000000..72196a27 --- /dev/null +++ b/doc-agents/src/agent/doc_qa/agent.ts @@ -0,0 +1,22 @@ +import { createAgent } from '@agentuity/runtime'; +import { s } from '@agentuity/schema'; +import answerQuestion from './rag'; + +const agent = createAgent('DocQA', { + description: 'Documentation Q&A Agent - Answers questions about Agentuity documentation using RAG', + schema: { + input: s.object({ + message: s.string(), + }), + output: s.object({ + answer: s.string(), + documents: s.array(s.string()), + }), + }, + handler: async (ctx, input) => { + const answer = await answerQuestion(ctx, input.message); + return answer; + }, +}); + +export default agent; diff --git a/doc-agents/src/agent/doc_qa/index.ts b/doc-agents/src/agent/doc_qa/index.ts new file mode 100644 index 00000000..30547f0d --- /dev/null +++ b/doc-agents/src/agent/doc_qa/index.ts @@ -0,0 +1 @@ +export { default } from './agent'; diff --git a/doc-agents/src/agent/doc_qa/prompt.ts b/doc-agents/src/agent/doc_qa/prompt.ts new file mode 100644 index 00000000..d23bcbd0 --- /dev/null +++ b/doc-agents/src/agent/doc_qa/prompt.ts @@ -0,0 +1,141 @@ +import { z } from 'zod'; +import { openai } from '@ai-sdk/openai'; +import { generateObject, generateText } from 'ai'; + +import type { PromptType } from './types'; + +// Zod schema for AI SDK compatibility (separate from @agentuity/schema) +const PromptClassificationSchemaZod = z.object({ + type: z.enum(['Normal', 'Thinking']), + confidence: z.number(), + reasoning: z.string(), +}); + +export async function rephraseVaguePrompt( + ctx: any, + input: string +): Promise { + const systemPrompt = `You are a technical documentation search assistant for developer tools and AI agents. Your job is to CAREFULLY improve unclear queries ONLY when absolutely necessary. + +BE EXTREMELY CONSERVATIVE. Most queries should be returned UNCHANGED. + +ONLY rephrase if the query contains: +1. OBVIOUS acronyms that need expansion (SDK, API, CLI, UI, KV, HTTP, REST, JSON, XML) +2. Very vague single words like "error", "setup", "install" without context + +NEVER change or "correct" these technical terms (return them exactly as written): +- bun, node, deno (JavaScript runtimes) +- react, vue, angular, svelte (frameworks) +- typescript, javascript, python, rust (languages) +- docker, kubernetes, aws, gcp (platforms) +- Any proper nouns or brand names + +When rephrasing: +- Keep the original technical terms EXACTLY as written +- Only add minimal context for clarity +- Don't assume what the user meant +- Don't add implementation details + +Examples of GOOD rephrasing: +- "SDK setup" → "SDK setup installation configuration" +- "API error" → "API error handling troubleshooting" +- "CLI install" → "CLI installation setup" + +Examples of what to LEAVE UNCHANGED: +- "bun example agent" → "bun example agent" (bun is a known runtime) +- "react component" → "react component" (already clear) +- "node server setup" → "node server setup" (already specific enough) +- "typescript agent" → "typescript agent" (clear technical terms) + +If in doubt, return the query UNCHANGED. Better to leave it as-is than to misinterpret the user's intent. + +Return ONLY the query text, nothing else.`; + + try { + const result = await generateText({ + model: openai('gpt-4o-mini'), + system: systemPrompt, + prompt: `User query: "${input}"`, + temperature: 0.1, + }); + + const rephrasedQuery = result.text?.trim() || input; + // Log if we actually rephrased it + if (rephrasedQuery !== input) { + ctx.logger.info( + 'Rephrased query from "%s" to "%s"', + input, + rephrasedQuery + ); + } + + return rephrasedQuery; + } catch (error) { + ctx.logger.error('Error rephrasing prompt, returning original: %o', error); + return input; + } +} + +/** + * Determines the prompt type based on the input string using LLM classification. + * Uses specific, measurable criteria to decide between Normal and Agentic RAG. + * @param ctx - Agent Context for logging and LLM access + * @param input - The input string to analyze + * @returns {Promise} - The determined PromptType + */ +export async function getPromptType( + ctx: any, + input: string +): Promise { + const systemPrompt = ` +You are a query classifier that determines whether a user question requires simple retrieval (Normal) or complex reasoning (Thinking). + +Use these SPECIFIC criteria for classification: + +**THINKING (Agentic RAG) indicators:** +- Multi-step reasoning required (e.g., "compare and contrast", "analyze pros/cons") +- Synthesis across multiple concepts (e.g., "how does X relate to Y") +- Scenario analysis (e.g., "what would happen if...", "when should I use...") +- Troubleshooting/debugging questions requiring logical deduction +- Questions with explicit reasoning requests ("explain why", "walk me through") +- Comparative analysis ("which is better for...", "what are the trade-offs") + +**NORMAL (Simple RAG) indicators:** +- Direct factual lookups (e.g., "what is...", "how do I install...") +- Simple how-to questions with clear answers +- API reference queries +- Configuration/syntax questions +- Single-concept definitions + +Respond with a JSON object containing: +- type: "Normal" or "Thinking" +- confidence: 0.0-1.0 (how certain you are) +- reasoning: brief explanation of your classification + +Be conservative - when in doubt, default to "Normal" for better performance.`; + + try { + const result = await generateObject({ + model: openai('gpt-4o-mini'), // Use faster model for classification + system: systemPrompt, + prompt: `Classify this user query: "${input}"`, + schema: PromptClassificationSchemaZod, + }); + + const classification = result.object as z.infer; + ctx.logger.info( + 'Prompt classified as %s (confidence: %f): %s', + classification.type, + classification.confidence, + classification.reasoning + ); + + return classification.type as PromptType; + } catch (error) { + ctx.logger.error( + 'Error classifying prompt, defaulting to Normal: %o', + error + ); + return 'Normal' as PromptType; + } +} diff --git a/doc-agents/src/agent/doc_qa/rag.ts b/doc-agents/src/agent/doc_qa/rag.ts new file mode 100644 index 00000000..feaebdb3 --- /dev/null +++ b/doc-agents/src/agent/doc_qa/rag.ts @@ -0,0 +1,130 @@ +import { z } from 'zod'; +import { openai } from '@ai-sdk/openai'; +import { generateObject } from 'ai'; +import { rephraseVaguePrompt } from './prompt'; +import { retrieveRelevantDocs } from './retriever'; +import type { Answer } from './types'; + +// Zod schema for AI SDK compatibility +const AnswerSchemaZod = z.object({ + answer: z.string(), + documents: z.array(z.string()), +}); + +export default async function answerQuestion( + ctx: any, + prompt: string +): Promise { + // First, rephrase the prompt for better vector search + const rephrasedPrompt = await rephraseVaguePrompt(ctx, prompt); + + // Use the rephrased prompt for document retrieval + const relevantDocs = await retrieveRelevantDocs(ctx, rephrasedPrompt); + + const systemPrompt = ` +You are Agentuity's developer-documentation assistant. + +=== CONTEXT === +Your role is to be as helpful as possible and try to assist user by answering their questions. + +=== RULES === +1. Use ONLY the content inside tags to craft your reply. If the required information is missing, state that the docs do not cover it. +2. Never fabricate or guess undocumented details. +3. Focus on answering the QUESTION with the available provided to you. Keep in mind some might not be relevant, so pick the ones that is relevant to the user's question. +4. Ambiguity handling: + • When contains more than one distinct workflow or context that could satisfy the question, do **not** choose for the user. + • Briefly (≤ 2 sentences each) summarise each plausible interpretation and ask **one** clarifying question so the user can pick a path. + • Provide a definitive answer only after the ambiguity is resolved. +5. Answer style: + • If the question can be answered unambiguously from a single workflow, give a short, direct answer. + • Add an explanation only when the user explicitly asks for one. + • Format your response in **MDX (Markdown Extended)** format with proper syntax highlighting for code blocks. + • Use appropriate headings (##, ###) to structure longer responses. + • Wrap CLI commands in \`\`\`bash code blocks for proper syntax highlighting. + • Wrap code snippets in appropriate language blocks (e.g., \`\`\`typescript, \`\`\`json, \`\`\`javascript). + • Use **bold** for important terms and *italic* for emphasis when appropriate. + • Use > blockquotes for important notes or warnings. +6. You may suggest concise follow-up questions or related topics that are present in . +7. If do not answer the question, state that explicitly and offer the closest documented topic; answer strictly from or ask one clarifying question if nothing related exists. +8. Keep a neutral, factual tone. +=== OUTPUT FORMAT === +Return **valid JSON only** matching this TypeScript type: + +type LlmAnswer = { + answer: string; // The reply in MDX format or the clarifying question + documents: string[]; // Paths of documents actually cited +} + +The "answer" field should contain properly formatted MDX content that will render beautifully in a documentation site. +The "documents" field must contain the path to the documents you used to answer the question. On top of the path, you may include a specific heading of the document so that the navigation will take the user to the exact point of the document you reference. To format the heading, use the following convention: append the heading to the path using a hash symbol (#) followed by the heading text, replacing spaces with hyphens (-) and converting all characters to lowercase. If there are multiple identical headings, append an index to the heading in the format -index (e.g., #example-3 for the third occurrence of "Example"). For example, if the document path is "/docs/guide" and the heading is "Getting Started", the formatted path would be "/docs/guide#getting-started". +If you cited no documents, return an empty array. Do NOT wrap the JSON in Markdown or add any extra keys. + +=== MDX FORMATTING EXAMPLES === +For CLI commands: +\`\`\`bash +agentuity agent create my-agent "My agent description" bearer +\`\`\` + +For code examples: +\`\`\`typescript +import type { AgentRequest, AgentResponse, AgentContext } from "@agentuity/sdk"; + +export default async function Agent(req: AgentRequest, resp: AgentResponse, ctx: AgentContext) { + return resp.json({hello: 'world'}); +} +\`\`\` + +For structured responses: +## Creating a New Agent + +To create a new agent, use the CLI command: + +\`\`\`bash +agentuity agent create [name] [description] [auth_type] +\`\`\` + +**Parameters:** +- \`name\`: The agent name +- \`description\`: Agent description +- \`auth_type\`: Either \`bearer\` or \`none\` + +> **Note**: This command will create the agent in the Agentuity Cloud and set up local files. + + +${rephrasedPrompt} + + + +${JSON.stringify(relevantDocs, null, 2)} + +`; + + try { + const result = await generateObject({ + model: openai('gpt-4o'), + system: systemPrompt, + prompt: 'The user is mostly a software engineer. Your answer should be concise, straightforward and in most cases, supplying the answer with examples code snipped is ideal.', + schema: AnswerSchemaZod, + }); + return result.object as Answer; + } catch (error) { + ctx.logger.error('Error generating answer: %o', error); + + // Fallback response with MDX formatting + const fallbackAnswer: Answer = { + answer: `## Error + +I apologize, but I encountered an error while processing your question. + +**Please try:** +- Rephrasing your question +- Being more specific about what you're looking for +- Checking if your question relates to Agentuity's documented features + +> If the problem persists, please contact support.`, + documents: [], + }; + + return fallbackAnswer; + } +} diff --git a/doc-agents/src/agent/doc_qa/retriever.ts b/doc-agents/src/agent/doc_qa/retriever.ts new file mode 100644 index 00000000..b6e24cac --- /dev/null +++ b/doc-agents/src/agent/doc_qa/retriever.ts @@ -0,0 +1,225 @@ + +import { VECTOR_STORE_NAME, vectorSearchNumber } from '../../../config'; +import type { RelevantDoc } from './types'; + +/** + * Expands a group of chunks from the same path by creating a set of all needed chunk indices + * and querying for them once + */ +async function expandPathGroup( + ctx: any, + path: string, + pathChunks: Array<{ + path: string; + content: string; + relevanceScore?: number; + chunkIndex?: number; + }> +): Promise { + const contextWindow = 1; // Get 1 chunk before and after each chunk + const expandedChunkIndices = new Set(); + + // Add neighbors for each chunk to the set + for (const chunk of pathChunks) { + if (chunk.chunkIndex !== undefined) { + const targetIndex = chunk.chunkIndex; + + // Add the chunk itself and its neighbors + expandedChunkIndices.add(targetIndex - contextWindow); + expandedChunkIndices.add(targetIndex); + expandedChunkIndices.add(targetIndex + contextWindow); + } + } + + // Remove negative indices + const validIndices = Array.from(expandedChunkIndices).filter( + (index) => index >= 0 + ); + + if (validIndices.length === 0) { + ctx.logger.warn('No valid chunk indices found for path: %s', path); + return null; + } + + // Sort indices + validIndices.sort((a, b) => a - b); + + try { + // Query for all chunks at once + const chunkQueries = validIndices.map((index) => + ctx.vector.search(VECTOR_STORE_NAME, { + query: path, + limit: 1, + metadata: { path: path, chunkIndex: index }, + }) + ); + + const results = await Promise.all(chunkQueries); + + // Collect found chunks + const foundChunks: Array<{ index: number; text: string }> = []; + + for (const result of results) { + if (result.length > 0 && result[0] && result[0].metadata) { + const metadata = result[0].metadata; + if ( + typeof metadata.chunkIndex === 'number' && + typeof metadata.text === 'string' + ) { + foundChunks.push({ + index: metadata.chunkIndex, + text: metadata.text, + }); + } + } + } + + if (foundChunks.length === 0) { + ctx.logger.warn('No chunks found for path: %s', path); + return null; + } + + // Sort by index and combine content + const sortedChunks = foundChunks.sort((a, b) => a.index - b.index); + const expandedContent = sortedChunks + .map((chunk) => chunk.text) + .join('\n\n'); + + // Find the best relevance score from the original chunks + const bestScore = Math.max( + ...pathChunks.map((chunk) => chunk.relevanceScore || 0) + ); + + // Create chunk range + const minIndex = Math.min(...sortedChunks.map((c) => c.index)); + const maxIndex = Math.max(...sortedChunks.map((c) => c.index)); + const chunkRange = + minIndex === maxIndex ? `${minIndex}` : `${minIndex}-${maxIndex}`; + + ctx.logger.debug( + 'Expanded path %s with %d chunks (range: %s) score %d', + path, + foundChunks.length, + chunkRange, + bestScore + ); + + return { + path, + content: expandedContent, + relevanceScore: bestScore, + chunkRange, + chunkIndex: undefined, // Not applicable for grouped chunks + }; + } catch (err) { + ctx.logger.error('Error expanding path group %s: %o', path, err); + return null; + } +} + +export async function retrieveRelevantDocs( + ctx: any, + prompt: string +): Promise { + const dbQuery = { + query: prompt, + limit: vectorSearchNumber, + }; + try { + const vectors = await ctx.vector.search(VECTOR_STORE_NAME, dbQuery); + + ctx.logger.debug( + 'Vector search returned %d results. First vector structure: %o', + vectors.length, + vectors[0] + ); + + // Process each relevant chunk and expand with context + const relevantChunks: Array<{ + path: string; + content: string; + relevanceScore?: number; + chunkIndex?: number; + }> = []; + + for (const vector of vectors) { + if (!vector.metadata) { + ctx.logger.warn('Vector missing metadata, skipping'); + continue; + } + + const path = + typeof vector.metadata.path === 'string' + ? vector.metadata.path + : undefined; + const text = + typeof vector.metadata.text === 'string' ? vector.metadata.text : ''; + const chunkIndex = + typeof vector.metadata.chunkIndex === 'number' + ? vector.metadata.chunkIndex + : undefined; + + if (!path) { + ctx.logger.warn('Vector metadata path is not a string, skipping'); + continue; + } + + const relevanceScore = (vector as any).similarity; + + ctx.logger.debug( + 'Vector for path %s, chunk %d: similarity=%s, relevanceScore=%s', + path, + chunkIndex, + (vector as any).similarity, + relevanceScore + ); + + relevantChunks.push({ + path, + content: text, + relevanceScore, + chunkIndex: chunkIndex, + }); + } + + // Group chunks by path + const chunksByPath = new Map< + string, + Array<{ + path: string; + content: string; + relevanceScore?: number; + chunkIndex?: number; + }> + >(); + + for (const chunk of relevantChunks) { + if (!chunksByPath.has(chunk.path)) { + chunksByPath.set(chunk.path, []); + } + const pathChunks = chunksByPath.get(chunk.path); + if (pathChunks) { + pathChunks.push(chunk); + } + } + + // Expand each path group together + const relevantDocs: RelevantDoc[] = []; + + for (const [path, pathChunks] of chunksByPath) { + const expandedDoc = await expandPathGroup(ctx, path, pathChunks); + if (expandedDoc) { + relevantDocs.push(expandedDoc); + } + } + + ctx.logger.info( + 'Retrieved and expanded %d relevant chunks from vector search', + relevantDocs.length + ); + return relevantDocs; + } catch (err) { + ctx.logger.error('Error retrieving relevant docs: %o', err); + return []; + } +} diff --git a/doc-agents/src/agent/doc_qa/types.ts b/doc-agents/src/agent/doc_qa/types.ts new file mode 100644 index 00000000..e47913a0 --- /dev/null +++ b/doc-agents/src/agent/doc_qa/types.ts @@ -0,0 +1,44 @@ +import { s } from '@agentuity/schema'; + +export const RelevantDocSchema = s.object({ + path: s.string(), + content: s.string(), + relevanceScore: s.optional(s.number()), + chunkRange: s.optional(s.string()), + chunkIndex: s.optional(s.number()), +}); + +export const AnswerSchema = s.object({ + answer: s.string(), + documents: s.array(s.string()), +}); + +export const PromptTypeSchema = s.enum(['Normal', 'Thinking']); + +export const PromptClassificationSchema = s.object({ + type: PromptTypeSchema, + confidence: s.number(), + reasoning: s.string(), +}); + +// Generated TypeScript types +export type RelevantDoc = { + path: string; + content: string; + relevanceScore?: number; + chunkRange?: string; + chunkIndex?: number; +}; + +export type Answer = { + answer: string; + documents: string[]; +}; + +export type PromptType = 'Normal' | 'Thinking'; + +export type PromptClassification = { + type: PromptType; + confidence: number; + reasoning: string; +}; diff --git a/doc-agents/src/api/doc-qa/route.ts b/doc-agents/src/api/doc-qa/route.ts new file mode 100644 index 00000000..7f9b245b --- /dev/null +++ b/doc-agents/src/api/doc-qa/route.ts @@ -0,0 +1,13 @@ +import { createRouter } from '@agentuity/runtime'; +import docQAAgent from '@agent/doc_qa'; + +const router = createRouter(); + +// POST /api/doc-qa - Answer questions about documentation +router.post('/', docQAAgent.validator(), async (c) => { + const data = c.req.valid('json'); + const result = await docQAAgent.run(data); + return c.json(result); +}); + +export default router; diff --git a/doc-agents/src/generated/app.ts b/doc-agents/src/generated/app.ts index eae200c9..3cc400be 100644 --- a/doc-agents/src/generated/app.ts +++ b/doc-agents/src/generated/app.ts @@ -208,10 +208,12 @@ if (isDevelopment() && process.env.VITE_PORT) { // Mount API routes const { default: router_0 } = await import('../api/index.js'); app.route('/api', router_0); -const { default: router_1 } = await import('../api/process-docs/index.js'); -app.route('/api/process-docs', router_1); -const { default: router_2 } = await import('../api/process-docs/route.js'); +const { default: router_1 } = await import('../api/doc-qa/route.js'); +app.route('/api/doc-qa', router_1); +const { default: router_2 } = await import('../api/process-docs/index.js'); app.route('/api/process-docs', router_2); +const { default: router_3 } = await import('../api/process-docs/route.js'); +app.route('/api/process-docs', router_3); // Mount workbench API routes (/_agentuity/workbench/*) const workbenchRouter = createWorkbenchRouter(); diff --git a/doc-agents/src/generated/registry.ts b/doc-agents/src/generated/registry.ts index 1b62ee26..b33b52c9 100644 --- a/doc-agents/src/generated/registry.ts +++ b/doc-agents/src/generated/registry.ts @@ -2,6 +2,7 @@ // Auto-generated by Agentuity - DO NOT EDIT import hello from '../agent/hello/agent.js'; import docProcessing from '../agent/doc_processing/agent.js'; +import docQA from '../agent/doc_qa/agent.js'; import type { AgentRunner } from '@agentuity/runtime'; import type { InferInput, InferOutput } from '@agentuity/core'; @@ -77,6 +78,40 @@ export type DocProcessingAgent = AgentRunner< typeof docProcessing['stream'] extends true ? true : false >; +/** + * Input type for DocQA agent + * Documentation Q&A Agent - Answers questions about Agentuity documentation using RAG + */ +export type DocQAInput = InferInput; + +/** + * Output type for DocQA agent + * Documentation Q&A Agent - Answers questions about Agentuity documentation using RAG + */ +export type DocQAOutput = InferOutput; + +/** + * Input schema type for DocQA agent + * Documentation Q&A Agent - Answers questions about Agentuity documentation using RAG + */ +export type DocQAInputSchema = typeof docQA['inputSchema']; + +/** + * Output schema type for DocQA agent + * Documentation Q&A Agent - Answers questions about Agentuity documentation using RAG + */ +export type DocQAOutputSchema = typeof docQA['outputSchema']; + +/** + * Agent type for DocQA + * Documentation Q&A Agent - Answers questions about Agentuity documentation using RAG + */ +export type DocQAAgent = AgentRunner< + DocQAInputSchema, + DocQAOutputSchema, + typeof docQA['stream'] extends true ? true : false +>; + // ============================================================================ // Agent Definitions // ============================================================================ @@ -116,6 +151,12 @@ export const AgentDefinitions = { * @type {DocProcessingAgent} */ docProcessing, + /** + * DocQA + * Documentation Q&A Agent - Answers questions about Agentuity documentation using RAG + * @type {DocQAAgent} + */ + docQA, } as const; // ============================================================================ @@ -128,6 +169,7 @@ declare module "@agentuity/runtime" { export interface AgentRegistry { hello: HelloAgent; docProcessing: DocProcessingAgent; + docQA: DocQAAgent; } } diff --git a/doc-agents/src/generated/routes.ts b/doc-agents/src/generated/routes.ts index 8516006e..9133e9c9 100644 --- a/doc-agents/src/generated/routes.ts +++ b/doc-agents/src/generated/routes.ts @@ -1,6 +1,7 @@ // @generated // Auto-generated by Agentuity - DO NOT EDIT import type hello from '../agent/hello/index.js'; +import type docQAAgent from '../agent/doc_qa/index.js'; import type docProcessingAgent from '../agent/doc_processing/index.js'; import type { InferInput, InferOutput } from '@agentuity/core'; @@ -28,6 +29,26 @@ export type POSTApiHelloInputSchema = typeof hello extends { inputSchema?: infer */ export type POSTApiHelloOutputSchema = typeof hello extends { outputSchema?: infer O } ? O : never; +/** + * Input type for route: POST /api/doc-qa + */ +export type POSTApiDocQaInput = InferInput; + +/** + * Output type for route: POST /api/doc-qa + */ +export type POSTApiDocQaOutput = InferOutput; + +/** + * Input schema type for route: POST /api/doc-qa + */ +export type POSTApiDocQaInputSchema = typeof docQAAgent extends { inputSchema?: infer I } ? I : never; + +/** + * Output schema type for route: POST /api/doc-qa + */ +export type POSTApiDocQaOutputSchema = typeof docQAAgent extends { outputSchema?: infer O } ? O : never; + /** * Input type for route: POST /api/process-docs */ @@ -75,6 +96,11 @@ declare module '@agentuity/react' { outputSchema: POSTApiHelloOutputSchema; stream: typeof hello extends { stream?: infer S } ? S : false; }; + 'POST /api/doc-qa': { + inputSchema: POSTApiDocQaInputSchema; + outputSchema: POSTApiDocQaOutputSchema; + stream: typeof docQAAgent extends { stream?: infer S } ? S : false; + }; 'GET /api/process-docs': { inputSchema: never; outputSchema: never; @@ -118,6 +144,12 @@ declare module '@agentuity/react' { */ post: { input: POSTApiHelloInput; output: POSTApiHelloOutput; type: 'api' }; }; + docQa: { + /** + * Route: POST /api/doc-qa + */ + post: { input: POSTApiDocQaInput; output: POSTApiDocQaOutput; type: 'api' }; + }; processDocs: { /** * Route: GET /api/process-docs @@ -142,6 +174,11 @@ const _rpcRouteMetadata = { "type": "api" } }, + "docQa": { + "post": { + "type": "api" + } + }, "processDocs": { "get": { "type": "api" diff --git a/doc-agents/src/web/App.tsx b/doc-agents/src/web/App.tsx index 9909dc28..18684156 100644 --- a/doc-agents/src/web/App.tsx +++ b/doc-agents/src/web/App.tsx @@ -4,8 +4,8 @@ import { type ChangeEvent, useState } from 'react'; const WORKBENCH_PATH = process.env.AGENTUITY_PUBLIC_WORKBENCH_PATH; export function App() { - const [prompt, setPrompt] = useState('Tell me a joke'); - const { data: greeting, invoke, isLoading: running } = useAPI('POST /api/hello'); + const [prompt, setPrompt] = useState('What is Agentuity?'); + const { data: result, invoke, isLoading: running } = useAPI('POST /api/doc-qa'); return (
@@ -44,7 +44,7 @@ export function App() {

- Try the OpenAI powered AI Agent + Ask about Agentuity Documentation

@@ -54,7 +54,7 @@ export function App() { onChange={(e: ChangeEvent) => setPrompt(e.currentTarget.value) } - placeholder="Enter your prompt" + placeholder="Ask a question about Agentuity..." type="text" value={prompt} /> @@ -65,16 +65,32 @@ export function App() {
-
- {greeting ?? 'Waiting for request'} +
+ {result ? ( +
+
{result.answer}
+ {result.documents && result.documents.length > 0 && ( +
+ Sources: +
    + {result.documents.map((doc, idx) => ( +
  • {doc}
  • + ))} +
+
+ )} +
+ ) : ( + 'Waiting for question' + )}
@@ -85,29 +101,29 @@ export function App() { {[ { key: 'customize-agent', - title: 'Customize your agent', + title: 'Customize the Q&A Agent', text: ( <> - Edit src/agent/hello/agent.ts to change how your agent - responds. + Edit src/agent/doc_qa/agent.ts or src/agent/doc_qa/rag.ts to modify the + documentation Q&A behavior. ), }, { - key: 'add-routes', - title: 'Add new API routes', + key: 'add-vector-store', + title: 'Configure Vector Storage', text: ( <> - Create new files in src/web/ to expose more endpoints. + Update the vector store configuration in src/config.ts to point to your documentation embeddings. ), }, { key: 'update-frontend', - title: 'Update the frontend', + title: 'Enhance the UI', text: ( <> - Modify src/web/App.tsx to build your custom UI. + Modify src/web/App.tsx to add more features like chat history or document filters. ), }, From 72abe1b21eb8f5528a127b7b29c77fa17f03dc6c Mon Sep 17 00:00:00 2001 From: afterrburn Date: Sat, 3 Jan 2026 12:43:29 -0700 Subject: [PATCH 07/12] Refactor agent structure and add authentication middleware - Removed the 'hello' agent and its associated files from the project. - Updated API routes to remove references to the 'hello' agent. - Introduced a new middleware for bearer token authentication to enhance security for API routes. - Updated TypeScript configuration to include paths for middleware. --- doc-agents/src/agent/hello/agent.ts | 22 --------------- doc-agents/src/agent/hello/index.ts | 1 - doc-agents/src/api/doc-qa/route.ts | 3 +- doc-agents/src/api/index.ts | 7 ----- doc-agents/src/generated/app.ts | 12 ++++---- doc-agents/src/generated/registry.ts | 42 ---------------------------- doc-agents/src/generated/routes.ts | 37 ------------------------ doc-agents/src/middleware/auth.ts | 33 ++++++++++++++++++++++ doc-agents/tsconfig.json | 3 +- 9 files changed, 42 insertions(+), 118 deletions(-) delete mode 100644 doc-agents/src/agent/hello/agent.ts delete mode 100644 doc-agents/src/agent/hello/index.ts create mode 100644 doc-agents/src/middleware/auth.ts diff --git a/doc-agents/src/agent/hello/agent.ts b/doc-agents/src/agent/hello/agent.ts deleted file mode 100644 index 36a1e7b0..00000000 --- a/doc-agents/src/agent/hello/agent.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { createAgent } from '@agentuity/runtime'; -import { s } from '@agentuity/schema'; -import { generateText } from 'ai'; -import { openai } from '@ai-sdk/openai'; - -const agent = createAgent('hello', { - description: 'An agent using Vercel AI SDK with OpenAI', - schema: { - input: s.object({ prompt: s.string() }), - output: s.string(), - }, - handler: async (_ctx, { prompt }) => { - const { text } = await generateText({ - model: openai('gpt-5-mini'), - prompt, - }); - - return text; - }, -}); - -export default agent; diff --git a/doc-agents/src/agent/hello/index.ts b/doc-agents/src/agent/hello/index.ts deleted file mode 100644 index 30547f0d..00000000 --- a/doc-agents/src/agent/hello/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { default } from './agent'; diff --git a/doc-agents/src/api/doc-qa/route.ts b/doc-agents/src/api/doc-qa/route.ts index 7f9b245b..a3201442 100644 --- a/doc-agents/src/api/doc-qa/route.ts +++ b/doc-agents/src/api/doc-qa/route.ts @@ -1,10 +1,11 @@ import { createRouter } from '@agentuity/runtime'; import docQAAgent from '@agent/doc_qa'; +import { bearerTokenAuth } from '@middleware/auth'; const router = createRouter(); // POST /api/doc-qa - Answer questions about documentation -router.post('/', docQAAgent.validator(), async (c) => { +router.post('/', bearerTokenAuth, docQAAgent.validator(), async (c) => { const data = c.req.valid('json'); const result = await docQAAgent.run(data); return c.json(result); diff --git a/doc-agents/src/api/index.ts b/doc-agents/src/api/index.ts index 202551d5..1064dac9 100644 --- a/doc-agents/src/api/index.ts +++ b/doc-agents/src/api/index.ts @@ -1,12 +1,5 @@ import { createRouter } from '@agentuity/runtime'; -import hello from '@agent/hello'; const api = createRouter(); -api.post('/hello', hello.validator(), async (c) => { - const data = c.req.valid('json'); - const result = await hello.run(data); - return c.json(result); -}); - export default api; diff --git a/doc-agents/src/generated/app.ts b/doc-agents/src/generated/app.ts index 3cc400be..7bcb7b0d 100644 --- a/doc-agents/src/generated/app.ts +++ b/doc-agents/src/generated/app.ts @@ -206,14 +206,12 @@ if (isDevelopment() && process.env.VITE_PORT) { } // Mount API routes -const { default: router_0 } = await import('../api/index.js'); -app.route('/api', router_0); -const { default: router_1 } = await import('../api/doc-qa/route.js'); -app.route('/api/doc-qa', router_1); -const { default: router_2 } = await import('../api/process-docs/index.js'); +const { default: router_0 } = await import('../api/doc-qa/route.js'); +app.route('/api/doc-qa', router_0); +const { default: router_1 } = await import('../api/process-docs/index.js'); +app.route('/api/process-docs', router_1); +const { default: router_2 } = await import('../api/process-docs/route.js'); app.route('/api/process-docs', router_2); -const { default: router_3 } = await import('../api/process-docs/route.js'); -app.route('/api/process-docs', router_3); // Mount workbench API routes (/_agentuity/workbench/*) const workbenchRouter = createWorkbenchRouter(); diff --git a/doc-agents/src/generated/registry.ts b/doc-agents/src/generated/registry.ts index b33b52c9..3c37abba 100644 --- a/doc-agents/src/generated/registry.ts +++ b/doc-agents/src/generated/registry.ts @@ -1,6 +1,5 @@ // @generated // Auto-generated by Agentuity - DO NOT EDIT -import hello from '../agent/hello/agent.js'; import docProcessing from '../agent/doc_processing/agent.js'; import docQA from '../agent/doc_qa/agent.js'; import type { AgentRunner } from '@agentuity/runtime'; @@ -10,40 +9,6 @@ import type { InferInput, InferOutput } from '@agentuity/core'; // Schema Type Exports // ============================================================================ -/** - * Input type for hello agent - * An agent using Vercel AI SDK with OpenAI - */ -export type HelloInput = InferInput; - -/** - * Output type for hello agent - * An agent using Vercel AI SDK with OpenAI - */ -export type HelloOutput = InferOutput; - -/** - * Input schema type for hello agent - * An agent using Vercel AI SDK with OpenAI - */ -export type HelloInputSchema = typeof hello['inputSchema']; - -/** - * Output schema type for hello agent - * An agent using Vercel AI SDK with OpenAI - */ -export type HelloOutputSchema = typeof hello['outputSchema']; - -/** - * Agent type for hello - * An agent using Vercel AI SDK with OpenAI - */ -export type HelloAgent = AgentRunner< - HelloInputSchema, - HelloOutputSchema, - typeof hello['stream'] extends true ? true : false ->; - /** * Input type for DocProcessing agent * Documentation Sync Agent - Processes embedded MDX content from GitHub workflows @@ -139,12 +104,6 @@ export type DocQAAgent = AgentRunner< * ``` */ export const AgentDefinitions = { - /** - * hello - * An agent using Vercel AI SDK with OpenAI - * @type {HelloAgent} - */ - hello, /** * DocProcessing * Documentation Sync Agent - Processes embedded MDX content from GitHub workflows @@ -167,7 +126,6 @@ export const AgentDefinitions = { declare module "@agentuity/runtime" { // Augment the AgentRegistry interface with project-specific strongly-typed agents export interface AgentRegistry { - hello: HelloAgent; docProcessing: DocProcessingAgent; docQA: DocQAAgent; } diff --git a/doc-agents/src/generated/routes.ts b/doc-agents/src/generated/routes.ts index 9133e9c9..5e5a2228 100644 --- a/doc-agents/src/generated/routes.ts +++ b/doc-agents/src/generated/routes.ts @@ -1,6 +1,5 @@ // @generated // Auto-generated by Agentuity - DO NOT EDIT -import type hello from '../agent/hello/index.js'; import type docQAAgent from '../agent/doc_qa/index.js'; import type docProcessingAgent from '../agent/doc_processing/index.js'; import type { InferInput, InferOutput } from '@agentuity/core'; @@ -9,26 +8,6 @@ import type { InferInput, InferOutput } from '@agentuity/core'; // Route Schema Type Exports // ============================================================================ -/** - * Input type for route: POST /api/hello - */ -export type POSTApiHelloInput = InferInput; - -/** - * Output type for route: POST /api/hello - */ -export type POSTApiHelloOutput = InferOutput; - -/** - * Input schema type for route: POST /api/hello - */ -export type POSTApiHelloInputSchema = typeof hello extends { inputSchema?: infer I } ? I : never; - -/** - * Output schema type for route: POST /api/hello - */ -export type POSTApiHelloOutputSchema = typeof hello extends { outputSchema?: infer O } ? O : never; - /** * Input type for route: POST /api/doc-qa */ @@ -91,11 +70,6 @@ declare module '@agentuity/react' { * Maps route keys (METHOD /path) to their input/output schemas */ export interface RouteRegistry { - 'POST /api/hello': { - inputSchema: POSTApiHelloInputSchema; - outputSchema: POSTApiHelloOutputSchema; - stream: typeof hello extends { stream?: infer S } ? S : false; - }; 'POST /api/doc-qa': { inputSchema: POSTApiDocQaInputSchema; outputSchema: POSTApiDocQaOutputSchema; @@ -138,12 +112,6 @@ declare module '@agentuity/react' { * Used by createClient() from @agentuity/core for type-safe RPC calls. */ export interface RPCRouteRegistry { - hello: { - /** - * Route: POST /api/hello - */ - post: { input: POSTApiHelloInput; output: POSTApiHelloOutput; type: 'api' }; - }; docQa: { /** * Route: POST /api/doc-qa @@ -169,11 +137,6 @@ declare module '@agentuity/react' { * @internal */ const _rpcRouteMetadata = { - "hello": { - "post": { - "type": "api" - } - }, "docQa": { "post": { "type": "api" diff --git a/doc-agents/src/middleware/auth.ts b/doc-agents/src/middleware/auth.ts new file mode 100644 index 00000000..7761c5bc --- /dev/null +++ b/doc-agents/src/middleware/auth.ts @@ -0,0 +1,33 @@ +import { createMiddleware } from 'hono/factory'; + +/** + * Bearer token authentication middleware + * Validates the Authorization header contains the correct bearer token + */ +export const bearerTokenAuth = createMiddleware(async (c, next) => { + const authHeader = c.req.header('Authorization'); + const expectedToken = process.env.AGENT_BEARER_TOKEN; + + // Check if Authorization header exists + if (!authHeader) { + c.var.logger.warn('Missing Authorization header'); + return c.json({ error: 'Missing Authorization header' }, 401); + } + + // Check if it starts with Bearer + if (!authHeader.startsWith('Bearer ')) { + c.var.logger.warn('Invalid Authorization header format'); + return c.json({ error: 'Invalid Authorization header format' }, 401); + } + + const token = authHeader.slice(7); + + // Validate token matches expected value + if (!expectedToken || token !== expectedToken) { + c.var.logger.warn('Invalid bearer token'); + return c.json({ error: 'Invalid bearer token' }, 401); + } + + // Token is valid, proceed to next handler + await next(); +}); diff --git a/doc-agents/tsconfig.json b/doc-agents/tsconfig.json index 9b379e0f..7f774deb 100644 --- a/doc-agents/tsconfig.json +++ b/doc-agents/tsconfig.json @@ -20,7 +20,8 @@ "noPropertyAccessFromIndexSignature": false, "paths": { "@agent/*": ["./src/agent/*"], - "@api/*": ["./src/api/*"] + "@api/*": ["./src/api/*"], + "@middleware/*": ["./src/middleware/*"] } }, "include": ["src/**/*", "app.ts"] From 7c11fbee1e40e2dbfafaaed39ea01df9960c9caf Mon Sep 17 00:00:00 2001 From: afterrburn Date: Sat, 3 Jan 2026 12:43:40 -0700 Subject: [PATCH 08/12] Update agent configuration and refactor build logic - Changed agentBaseUrl to use a local development URL for easier testing. - Refactored buildAgentConfig to accept an endpoint instead of an agent ID. - Updated getAgentQaConfig and getAgentPulseConfig to use specific API endpoints. - Improved error messages for agent configuration validation. --- lib/config.ts | 5 ++--- lib/env.ts | 33 +++++++++++---------------------- 2 files changed, 13 insertions(+), 25 deletions(-) diff --git a/lib/config.ts b/lib/config.ts index b329b851..265a67d7 100644 --- a/lib/config.ts +++ b/lib/config.ts @@ -6,7 +6,6 @@ export const config = { baseUrl: 'https://api.agentuity.com', defaultStoreName: 'chat-sessions', - agentBaseUrl: process.env.AGENT_BASE_URL || 'https://agentuity.ai/api', - agentQaId: '9ccc5545e93644bd9d7954e632a55a61', - agentPulseId: 'ddcb59aa4473f1323be5d9f5fb62b74e' + // V1 Agent endpoints - use base URL + specific endpoint paths + agentBaseUrl: process.env.AGENT_BASE_URL || 'http://127.0.0.1:3500', } as const; diff --git a/lib/env.ts b/lib/env.ts index bd3b8069..10e94023 100644 --- a/lib/env.ts +++ b/lib/env.ts @@ -5,12 +5,10 @@ export interface AgentConfig { url: string; bearerToken?: string; } -/** - * Builds agent configuration using non-secret IDs from config - */ + import { config } from '@/lib/config'; -const buildAgentConfig = (agentId: string): AgentConfig => { +const buildAgentConfig = (endpoint: string): AgentConfig => { const baseUrl = config.agentBaseUrl; const bearerToken = process.env.AGENT_BEARER_TOKEN; @@ -19,30 +17,22 @@ const buildAgentConfig = (agentId: string): AgentConfig => { 'Missing required configuration. Set AGENT_BASE_URL or ensure config.agentBaseUrl is defined.' ); } - if (!agentId) { - throw new Error('Missing required agent ID in config'); - } - - // For localhost/127.0.0.1, ensure agent ID has 'agent_' prefix - let finalAgentId = agentId; - if (baseUrl.includes('127.0.0.1') || baseUrl.includes('localhost')) { - if (!agentId.startsWith('agent_')) { - finalAgentId = `agent_${agentId}`; - } + if (!endpoint) { + throw new Error('Missing required agent endpoint'); } return { - url: `${baseUrl}/${finalAgentId}`, + url: `${baseUrl}${endpoint}`, bearerToken: bearerToken || undefined, }; }; export const getAgentQaConfig = (): AgentConfig => { - return buildAgentConfig(config.agentQaId); + return buildAgentConfig('/api/doc-qa'); }; export const getAgentPulseConfig = (): AgentConfig => { - return buildAgentConfig(config.agentPulseId); + return buildAgentConfig('/api/agent-pulse'); }; /** @@ -51,13 +41,12 @@ export const getAgentPulseConfig = (): AgentConfig => { export const validateEnv = (): boolean => { try { getAgentQaConfig(); - console.log('✓ Environment variables validated'); + console.log('✓ Agent configuration validated'); return true; } catch (error) { - console.error('❌ Environment validation failed:', error); - console.error('💡 Make sure to set base URL via:'); - console.error(' - AGENT_BASE_URL env var, or'); - console.error(' - Use default from config.baseUrl'); + console.error('❌ Agent configuration validation failed:', error); + console.error('💡 Set AGENT_BASE_URL env var for agent communication'); + console.error(' Default: http://127.0.0.1:3500 (for local development)'); console.error('💡 Optionally set AGENT_BEARER_TOKEN for authentication'); return false; } From 563a597804130086cc43c778a03143ef309d6177 Mon Sep 17 00:00:00 2001 From: afterrburn Date: Sun, 4 Jan 2026 10:52:01 -0700 Subject: [PATCH 09/12] Update CLI commands to use bunx for execution - Replaced instances of `agentuity` with `bunx @agentuity/cli` in various skill documentation files to standardize command execution. - Updated the README to reflect the new total skills count and generation date. - Removed the `agentuity-cli-upgrade` skill from the documentation as it is no longer applicable. --- doc-agents/.agents/skills/README.md | 10 ++-------- .../skills/agentuity-cli-auth-login/SKILL.md | 4 ++-- .../skills/agentuity-cli-auth-logout/SKILL.md | 4 ++-- .../skills/agentuity-cli-auth-ssh-add/SKILL.md | 8 ++++---- .../agentuity-cli-auth-ssh-delete/SKILL.md | 8 ++++---- .../agentuity-cli-auth-ssh-list/SKILL.md | 6 +++--- .../skills/agentuity-cli-auth-whoami/SKILL.md | 4 ++-- .../skills/agentuity-cli-build/SKILL.md | 6 +++--- .../agentuity-cli-cloud-agent-get/SKILL.md | 4 ++-- .../agentuity-cli-cloud-agent-list/SKILL.md | 6 +++--- .../agentuity-cli-cloud-apikey-create/SKILL.md | 6 +++--- .../agentuity-cli-cloud-apikey-delete/SKILL.md | 6 +++--- .../agentuity-cli-cloud-apikey-get/SKILL.md | 2 +- .../agentuity-cli-cloud-apikey-list/SKILL.md | 4 ++-- .../agentuity-cli-cloud-db-create/SKILL.md | 8 ++++---- .../agentuity-cli-cloud-db-delete/SKILL.md | 8 ++++---- .../skills/agentuity-cli-cloud-db-get/SKILL.md | 12 ++++++------ .../agentuity-cli-cloud-db-list/SKILL.md | 8 ++++---- .../agentuity-cli-cloud-db-logs/SKILL.md | 18 +++++++++--------- .../skills/agentuity-cli-cloud-db-sql/SKILL.md | 6 +++--- .../skills/agentuity-cli-cloud-deploy/SKILL.md | 6 +++--- .../SKILL.md | 6 +++--- .../SKILL.md | 8 ++++---- .../SKILL.md | 6 +++--- .../SKILL.md | 4 ++-- .../SKILL.md | 4 ++-- .../SKILL.md | 6 +++--- .../agentuity-cli-cloud-env-delete/SKILL.md | 4 ++-- .../agentuity-cli-cloud-env-get/SKILL.md | 4 ++-- .../agentuity-cli-cloud-env-import/SKILL.md | 4 ++-- .../agentuity-cli-cloud-env-list/SKILL.md | 4 ++-- .../agentuity-cli-cloud-env-pull/SKILL.md | 4 ++-- .../agentuity-cli-cloud-env-push/SKILL.md | 2 +- .../agentuity-cli-cloud-env-set/SKILL.md | 6 +++--- .../SKILL.md | 6 +++--- .../SKILL.md | 6 +++--- .../SKILL.md | 6 +++--- .../agentuity-cli-cloud-keyvalue-get/SKILL.md | 6 +++--- .../agentuity-cli-cloud-keyvalue-keys/SKILL.md | 6 +++--- .../SKILL.md | 6 +++--- .../agentuity-cli-cloud-keyvalue-repl/SKILL.md | 2 +- .../SKILL.md | 6 +++--- .../agentuity-cli-cloud-keyvalue-set/SKILL.md | 6 +++--- .../SKILL.md | 6 +++--- .../agentuity-cli-cloud-redis-show/SKILL.md | 6 +++--- .../agentuity-cli-cloud-scp-download/SKILL.md | 8 ++++---- .../agentuity-cli-cloud-scp-upload/SKILL.md | 8 ++++---- .../agentuity-cli-cloud-secret-delete/SKILL.md | 4 ++-- .../agentuity-cli-cloud-secret-get/SKILL.md | 4 ++-- .../agentuity-cli-cloud-secret-import/SKILL.md | 4 ++-- .../agentuity-cli-cloud-secret-list/SKILL.md | 4 ++-- .../agentuity-cli-cloud-secret-pull/SKILL.md | 4 ++-- .../agentuity-cli-cloud-secret-push/SKILL.md | 2 +- .../agentuity-cli-cloud-secret-set/SKILL.md | 4 ++-- .../agentuity-cli-cloud-session-get/SKILL.md | 2 +- .../agentuity-cli-cloud-session-list/SKILL.md | 16 ++++++++-------- .../agentuity-cli-cloud-session-logs/SKILL.md | 4 ++-- .../skills/agentuity-cli-cloud-ssh/SKILL.md | 12 ++++++------ .../SKILL.md | 6 +++--- .../SKILL.md | 8 ++++---- .../SKILL.md | 8 ++++---- .../agentuity-cli-cloud-storage-get/SKILL.md | 6 +++--- .../agentuity-cli-cloud-storage-list/SKILL.md | 12 ++++++------ .../SKILL.md | 10 +++++----- .../agentuity-cli-cloud-stream-delete/SKILL.md | 6 +++--- .../agentuity-cli-cloud-stream-get/SKILL.md | 8 ++++---- .../agentuity-cli-cloud-stream-list/SKILL.md | 10 +++++----- .../agentuity-cli-cloud-thread-delete/SKILL.md | 2 +- .../agentuity-cli-cloud-thread-get/SKILL.md | 2 +- .../agentuity-cli-cloud-thread-list/SKILL.md | 8 ++++---- .../SKILL.md | 6 +++--- .../agentuity-cli-cloud-vector-delete/SKILL.md | 6 +++--- .../agentuity-cli-cloud-vector-get/SKILL.md | 6 +++--- .../SKILL.md | 6 +++--- .../agentuity-cli-cloud-vector-search/SKILL.md | 10 +++++----- .../agentuity-cli-cloud-vector-stats/SKILL.md | 6 +++--- .../agentuity-cli-cloud-vector-upsert/SKILL.md | 10 +++++----- .../.agents/skills/agentuity-cli-dev/SKILL.md | 8 ++++---- .../agentuity-cli-profile-create/SKILL.md | 6 +++--- .../agentuity-cli-profile-current/SKILL.md | 4 ++-- .../agentuity-cli-profile-delete/SKILL.md | 6 +++--- .../skills/agentuity-cli-profile-list/SKILL.md | 4 ++-- .../skills/agentuity-cli-profile-show/SKILL.md | 6 +++--- .../skills/agentuity-cli-profile-use/SKILL.md | 6 +++--- .../agentuity-cli-project-create/SKILL.md | 10 +++++----- .../agentuity-cli-project-delete/SKILL.md | 12 ++++++------ .../skills/agentuity-cli-project-list/SKILL.md | 6 +++--- .../skills/agentuity-cli-project-show/SKILL.md | 6 +++--- .../.agents/skills/agentuity-cli-repl/SKILL.md | 2 +- 89 files changed, 275 insertions(+), 281 deletions(-) diff --git a/doc-agents/.agents/skills/README.md b/doc-agents/.agents/skills/README.md index 0bb87750..04e6342d 100644 --- a/doc-agents/.agents/skills/README.md +++ b/doc-agents/.agents/skills/README.md @@ -12,8 +12,8 @@ Learn more at the [Agent Skills Specification](https://agentskills.io/specificat ## Generated From - **CLI Version**: 0.0.105 -- **Generated**: 2026-01-02 -- **Total Skills**: 89 +- **Generated**: 2026-01-04 +- **Total Skills**: 88 ## Available Skills @@ -140,12 +140,6 @@ Learn more at the [Agent Skills Specification](https://agentskills.io/specificat |-------|---------|-------------| | [agentuity-cli-repl](./agentuity-cli-repl) | `agentuity repl` | interactive REPL for testing | -### upgrade - -| Skill | Command | Description | -|-------|---------|-------------| -| [agentuity-cli-upgrade](./agentuity-cli-upgrade) | `agentuity upgrade` | Upgrade the CLI to the latest version | - ## Usage These skills are designed for AI coding agents that support the Agent Skills format. diff --git a/doc-agents/.agents/skills/agentuity-cli-auth-login/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-auth-login/SKILL.md index 9a04ea4d..9a6dffc8 100644 --- a/doc-agents/.agents/skills/agentuity-cli-auth-login/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-auth-login/SKILL.md @@ -24,11 +24,11 @@ agentuity auth login Login to account: ```bash -agentuity auth login +bunx @agentuity/cli auth login ``` Login to account: ```bash -agentuity login +bunx @agentuity/cli login ``` diff --git a/doc-agents/.agents/skills/agentuity-cli-auth-logout/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-auth-logout/SKILL.md index 94c38d6b..1c4611de 100644 --- a/doc-agents/.agents/skills/agentuity-cli-auth-logout/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-auth-logout/SKILL.md @@ -24,11 +24,11 @@ agentuity auth logout Logout from account: ```bash -agentuity auth logout +bunx @agentuity/cli auth logout ``` Logout from account: ```bash -agentuity logout +bunx @agentuity/cli logout ``` diff --git a/doc-agents/.agents/skills/agentuity-cli-auth-ssh-add/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-auth-ssh-add/SKILL.md index 424b0343..f5deb901 100644 --- a/doc-agents/.agents/skills/agentuity-cli-auth-ssh-add/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-auth-ssh-add/SKILL.md @@ -34,25 +34,25 @@ agentuity auth ssh add [options] Add SSH key interactively: ```bash -agentuity auth ssh add +bunx @agentuity/cli auth ssh add ``` Add SSH key from file: ```bash -agentuity auth ssh add --file ~/.ssh/id_ed25519.pub +bunx @agentuity/cli auth ssh add --file ~/.ssh/id_ed25519.pub ``` Add deploy key from file: ```bash -agentuity auth ssh add --file ./deploy_key.pub +bunx @agentuity/cli auth ssh add --file ./deploy_key.pub ``` Add SSH key from stdin: ```bash -cat ~/.ssh/id_rsa.pub | agentuity auth ssh add +cat ~/.ssh/id_rsa.pub | bunx @agentuity/cli auth ssh add ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-auth-ssh-delete/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-auth-ssh-delete/SKILL.md index 1de8f305..9ca7c364 100644 --- a/doc-agents/.agents/skills/agentuity-cli-auth-ssh-delete/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-auth-ssh-delete/SKILL.md @@ -41,25 +41,25 @@ agentuity auth ssh delete [fingerprints...] [options] Delete item: ```bash -agentuity auth ssh delete +bunx @agentuity/cli auth ssh delete ``` Delete item: ```bash -agentuity auth ssh delete +bunx @agentuity/cli auth ssh delete ``` Delete item: ```bash -agentuity --explain auth ssh delete abc123 +bunx @agentuity/cli --explain auth ssh delete abc123 ``` Delete item: ```bash -agentuity --dry-run auth ssh delete abc123 +bunx @agentuity/cli --dry-run auth ssh delete abc123 ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-auth-ssh-list/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-auth-ssh-list/SKILL.md index 699b75b0..fd23385e 100644 --- a/doc-agents/.agents/skills/agentuity-cli-auth-ssh-list/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-auth-ssh-list/SKILL.md @@ -28,19 +28,19 @@ agentuity auth ssh list List items: ```bash -agentuity auth ssh list +bunx @agentuity/cli auth ssh list ``` List items: ```bash -agentuity auth ssh ls +bunx @agentuity/cli auth ssh ls ``` Show output in JSON format: ```bash -agentuity --json auth ssh list +bunx @agentuity/cli --json auth ssh list ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-auth-whoami/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-auth-whoami/SKILL.md index d9408da4..7cea490d 100644 --- a/doc-agents/.agents/skills/agentuity-cli-auth-whoami/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-auth-whoami/SKILL.md @@ -28,13 +28,13 @@ agentuity auth whoami Show current user: ```bash -agentuity auth whoami +bunx @agentuity/cli auth whoami ``` Show output in JSON format: ```bash -agentuity --json auth whoami +bunx @agentuity/cli --json auth whoami ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-build/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-build/SKILL.md index f7ed446d..20620237 100644 --- a/doc-agents/.agents/skills/agentuity-cli-build/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-build/SKILL.md @@ -24,17 +24,17 @@ agentuity build Build the project: ```bash -agentuity build +bunx @agentuity/cli build ``` Run in development mode: ```bash -agentuity build --dev +bunx @agentuity/cli build --dev ``` Bundle the project: ```bash -agentuity bundle +bunx @agentuity/cli bundle ``` diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-agent-get/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-agent-get/SKILL.md index 2ae2fe9b..985c9a58 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-agent-get/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-agent-get/SKILL.md @@ -35,13 +35,13 @@ agentuity cloud agent get Get item details: ```bash -agentuity cloud agent get agent_abc123 +bunx @agentuity/cli cloud agent get agent_abc123 ``` Show output in JSON format: ```bash -agentuity --json cloud agent get agent_abc123 +bunx @agentuity/cli --json cloud agent get agent_abc123 ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-agent-list/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-agent-list/SKILL.md index 649c45fe..963f5e06 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-agent-list/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-agent-list/SKILL.md @@ -35,19 +35,19 @@ agentuity cloud agent list [options] List items: ```bash -agentuity cloud agent list +bunx @agentuity/cli cloud agent list ``` Use verbose option: ```bash -agentuity cloud agent list --verbose +bunx @agentuity/cli cloud agent list --verbose ``` Show output in JSON format: ```bash -agentuity --json cloud agent list +bunx @agentuity/cli --json cloud agent list ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-apikey-create/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-apikey-create/SKILL.md index 1cd48492..81c9d029 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-apikey-create/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-apikey-create/SKILL.md @@ -37,19 +37,19 @@ agentuity cloud apikey create [options] Create API key with 1 year expiration: ```bash -agentuity cloud apikey create --name "My API Key" --expires-at 1y +bunx @agentuity/cli cloud apikey create --name "My API Key" --expires-at 1y ``` Create API key with 30 day expiration: ```bash -agentuity cloud apikey create --name "Short-lived Key" --expires-at 30d +bunx @agentuity/cli cloud apikey create --name "Short-lived Key" --expires-at 30d ``` Create API key with specific date and skip confirmation: ```bash -agentuity cloud apikey create --name "Production Key" --expires-at 2026-01-01T00:00:00Z --confirm +bunx @agentuity/cli cloud apikey create --name "Production Key" --expires-at 2026-01-01T00:00:00Z --confirm ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-apikey-delete/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-apikey-delete/SKILL.md index a2c80c91..a15c4afd 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-apikey-delete/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-apikey-delete/SKILL.md @@ -35,19 +35,19 @@ agentuity cloud apikey delete Delete item: ```bash -agentuity cloud apikey delete +bunx @agentuity/cli cloud apikey delete ``` Run command: ```bash -agentuity cloud apikey del +bunx @agentuity/cli cloud apikey del ``` Delete item: ```bash -agentuity cloud apikey rm +bunx @agentuity/cli cloud apikey rm ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-apikey-get/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-apikey-get/SKILL.md index fa00397a..61fc210b 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-apikey-get/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-apikey-get/SKILL.md @@ -35,5 +35,5 @@ agentuity cloud apikey get Get item details: ```bash -agentuity cloud apikey get +bunx @agentuity/cli cloud apikey get ``` diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-apikey-list/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-apikey-list/SKILL.md index e4d64827..55614890 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-apikey-list/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-apikey-list/SKILL.md @@ -35,11 +35,11 @@ agentuity cloud apikey list [options] List items: ```bash -agentuity cloud apikey list +bunx @agentuity/cli cloud apikey list ``` List items: ```bash -agentuity cloud apikey ls +bunx @agentuity/cli cloud apikey ls ``` diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-db-create/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-db-create/SKILL.md index ac3a71e7..dca92730 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-db-create/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-db-create/SKILL.md @@ -35,25 +35,25 @@ agentuity cloud db create [options] Create new item: ```bash -agentuity cloud db create +bunx @agentuity/cli cloud db create ``` Run new command: ```bash -agentuity cloud db new +bunx @agentuity/cli cloud db new ``` Create new item: ```bash -agentuity cloud db create --name my-db +bunx @agentuity/cli cloud db create --name my-db ``` Create new item: ```bash -agentuity --dry-run cloud db create +bunx @agentuity/cli --dry-run cloud db create ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-db-delete/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-db-delete/SKILL.md index dc37d70d..1292f189 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-db-delete/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-db-delete/SKILL.md @@ -42,25 +42,25 @@ agentuity cloud db delete [name] [options] Delete item: ```bash -agentuity cloud db delete my-database +bunx @agentuity/cli cloud db delete my-database ``` Delete item: ```bash -agentuity cloud db rm my-database +bunx @agentuity/cli cloud db rm my-database ``` Delete item: ```bash -agentuity cloud db delete +bunx @agentuity/cli cloud db delete ``` Delete item: ```bash -agentuity --dry-run cloud db delete my-database +bunx @agentuity/cli --dry-run cloud db delete my-database ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-db-get/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-db-get/SKILL.md index 8ed3b9fa..52074f9f 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-db-get/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-db-get/SKILL.md @@ -44,35 +44,35 @@ agentuity cloud db get [options] Get database details: ```bash -agentuity cloud db get my-database +bunx @agentuity/cli cloud db get my-database ``` Show database information: ```bash -agentuity cloud db show my-database +bunx @agentuity/cli cloud db show my-database ``` Get database with credentials: ```bash -agentuity cloud db get my-database --show-credentials +bunx @agentuity/cli cloud db get my-database --show-credentials ``` Get table schemas from the database: ```bash -agentuity cloud db get my-database --show-tables +bunx @agentuity/cli cloud db get my-database --show-tables ``` Get table schemas as SQL CREATE statements: ```bash -agentuity cloud db get my-database --show-tables --sql +bunx @agentuity/cli cloud db get my-database --show-tables --sql ``` Get table schemas as JSON: ```bash -agentuity cloud db get my-database --show-tables --json +bunx @agentuity/cli cloud db get my-database --show-tables --json ``` diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-db-list/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-db-list/SKILL.md index 27383ea8..cbbc36c0 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-db-list/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-db-list/SKILL.md @@ -36,25 +36,25 @@ agentuity cloud db list [options] List items: ```bash -agentuity cloud db list +bunx @agentuity/cli cloud db list ``` Show output in JSON format: ```bash -agentuity --json cloud db list +bunx @agentuity/cli --json cloud db list ``` List items: ```bash -agentuity cloud db ls +bunx @agentuity/cli cloud db ls ``` Use show credentials option: ```bash -agentuity cloud db list --show-credentials +bunx @agentuity/cli cloud db list --show-credentials ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-db-logs/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-db-logs/SKILL.md index bd21adae..cee871c9 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-db-logs/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-db-logs/SKILL.md @@ -52,55 +52,55 @@ agentuity cloud db logs [options] View query logs for database: ```bash -agentuity cloud db logs my-database +bunx @agentuity/cli cloud db logs my-database ``` Limit to 50 log entries: ```bash -agentuity cloud db logs my-database --limit=50 +bunx @agentuity/cli cloud db logs my-database --limit=50 ``` Show only queries with errors: ```bash -agentuity cloud db logs my-database --has-error +bunx @agentuity/cli cloud db logs my-database --has-error ``` Filter by username: ```bash -agentuity cloud db logs my-database --username=user123 +bunx @agentuity/cli cloud db logs my-database --username=user123 ``` Filter by SQL command type: ```bash -agentuity cloud db logs my-database --command=SELECT +bunx @agentuity/cli cloud db logs my-database --command=SELECT ``` Filter by session ID: ```bash -agentuity cloud db logs my-database --session-id=sess_abc123 +bunx @agentuity/cli cloud db logs my-database --session-id=sess_abc123 ``` Show session ID column: ```bash -agentuity cloud db logs my-database --show-session-id +bunx @agentuity/cli cloud db logs my-database --show-session-id ``` Show username column: ```bash -agentuity cloud db logs my-database --show-username +bunx @agentuity/cli cloud db logs my-database --show-username ``` Show full formatted SQL on separate lines: ```bash -agentuity cloud db logs my-database --pretty +bunx @agentuity/cli cloud db logs my-database --pretty ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-db-sql/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-db-sql/SKILL.md index 54790abe..0b090e41 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-db-sql/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-db-sql/SKILL.md @@ -37,19 +37,19 @@ agentuity cloud db sql Execute SQL query: ```bash -agentuity cloud db sql my-database "SELECT * FROM users LIMIT 10" +bunx @agentuity/cli cloud db sql my-database "SELECT * FROM users LIMIT 10" ``` Execute query with JSON output: ```bash -agentuity cloud db exec my-database "SELECT COUNT(*) FROM orders" --json +bunx @agentuity/cli cloud db exec my-database "SELECT COUNT(*) FROM orders" --json ``` Query with filter: ```bash -agentuity cloud db query my-database "SELECT * FROM products WHERE price > 100" +bunx @agentuity/cli cloud db query my-database "SELECT * FROM products WHERE price > 100" ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-deploy/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-deploy/SKILL.md index 8d136199..c02189c1 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-deploy/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-deploy/SKILL.md @@ -45,19 +45,19 @@ agentuity cloud deploy [options] Deploy current project: ```bash -agentuity cloud deploy +bunx @agentuity/cli cloud deploy ``` Deploy with verbose output: ```bash -agentuity cloud deploy --log-level=debug +bunx @agentuity/cli cloud deploy --log-level=debug ``` Deploy with specific tags: ```bash -agentuity cloud deploy --tag a --tag b +bunx @agentuity/cli cloud deploy --tag a --tag b ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-deployment-list/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-deployment-list/SKILL.md index 68ad926d..2b4862eb 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-deployment-list/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-deployment-list/SKILL.md @@ -35,19 +35,19 @@ agentuity cloud deployment list [options] List 10 most recent deployments: ```bash -agentuity cloud deployment list +bunx @agentuity/cli cloud deployment list ``` List 25 most recent deployments: ```bash -agentuity cloud deployment list --count=25 +bunx @agentuity/cli cloud deployment list --count=25 ``` List deployments for specific project: ```bash -agentuity cloud deployment list --project-id=proj_abc123xyz +bunx @agentuity/cli cloud deployment list --project-id=proj_abc123xyz ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-deployment-logs/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-deployment-logs/SKILL.md index ba166059..731963d7 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-deployment-logs/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-deployment-logs/SKILL.md @@ -44,25 +44,25 @@ agentuity cloud deployment logs [options] View logs for deployment: ```bash -agentuity cloud deployment logs deploy_abc123xyz +bunx @agentuity/cli cloud deployment logs deploy_abc123xyz ``` Limit to 50 log entries: ```bash -agentuity cloud deployment logs deploy_abc123xyz --limit=50 +bunx @agentuity/cli cloud deployment logs deploy_abc123xyz --limit=50 ``` Hide timestamps: ```bash -agentuity cloud deployment logs deploy_abc123xyz --no-timestamps +bunx @agentuity/cli cloud deployment logs deploy_abc123xyz --no-timestamps ``` View logs with specific project: ```bash -agentuity cloud deployment logs deploy_abc123xyz --project-id=proj_abc123xyz +bunx @agentuity/cli cloud deployment logs deploy_abc123xyz --project-id=proj_abc123xyz ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-deployment-remove/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-deployment-remove/SKILL.md index 805fbccb..f38d737b 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-deployment-remove/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-deployment-remove/SKILL.md @@ -43,19 +43,19 @@ agentuity cloud deployment remove [options] Remove with confirmation: ```bash -agentuity cloud deployment remove dep_abc123xyz +bunx @agentuity/cli cloud deployment remove dep_abc123xyz ``` Remove without confirmation: ```bash -agentuity cloud deployment remove dep_abc123xyz --force +bunx @agentuity/cli cloud deployment remove dep_abc123xyz --force ``` Remove deployment from specific project: ```bash -agentuity cloud deployment remove deployment-2024-11-20 --project-id=proj_abc123xyz +bunx @agentuity/cli cloud deployment remove deployment-2024-11-20 --project-id=proj_abc123xyz ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-deployment-rollback/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-deployment-rollback/SKILL.md index 24ce3ee3..d7bea8d2 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-deployment-rollback/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-deployment-rollback/SKILL.md @@ -35,13 +35,13 @@ agentuity cloud deployment rollback [options] Rollback to previous deployment: ```bash -agentuity cloud deployment rollback +bunx @agentuity/cli cloud deployment rollback ``` Rollback specific project: ```bash -agentuity cloud deployment rollback --project-id=proj_abc123xyz +bunx @agentuity/cli cloud deployment rollback --project-id=proj_abc123xyz ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-deployment-show/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-deployment-show/SKILL.md index 0d78c8e6..ef52de21 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-deployment-show/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-deployment-show/SKILL.md @@ -42,13 +42,13 @@ agentuity cloud deployment show [options] Show deployment details by ID: ```bash -agentuity cloud deployment show dep_abc123xyz +bunx @agentuity/cli cloud deployment show dep_abc123xyz ``` Show deployment for specific project: ```bash -agentuity cloud deployment show deployment-2024-11-20 --project-id=proj_abc123xyz +bunx @agentuity/cli cloud deployment show deployment-2024-11-20 --project-id=proj_abc123xyz ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-deployment-undeploy/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-deployment-undeploy/SKILL.md index d20a4819..76913643 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-deployment-undeploy/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-deployment-undeploy/SKILL.md @@ -36,17 +36,17 @@ agentuity cloud deployment undeploy [options] Undeploy with confirmation: ```bash -agentuity cloud deployment undeploy +bunx @agentuity/cli cloud deployment undeploy ``` Undeploy without confirmation: ```bash -agentuity cloud deployment undeploy --force +bunx @agentuity/cli cloud deployment undeploy --force ``` Undeploy specific project: ```bash -agentuity cloud deployment undeploy --project-id=proj_abc123xyz +bunx @agentuity/cli cloud deployment undeploy --project-id=proj_abc123xyz ``` diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-env-delete/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-env-delete/SKILL.md index b82d6010..1a05687a 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-env-delete/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-env-delete/SKILL.md @@ -36,13 +36,13 @@ agentuity cloud env delete Delete item: ```bash -agentuity env delete OLD_FEATURE_FLAG +bunx @agentuity/cli env delete OLD_FEATURE_FLAG ``` Delete item: ```bash -agentuity env rm PORT +bunx @agentuity/cli env rm PORT ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-env-get/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-env-get/SKILL.md index a2bd7bb1..1af6e931 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-env-get/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-env-get/SKILL.md @@ -42,13 +42,13 @@ agentuity cloud env get [options] Get item details: ```bash -agentuity env get NODE_ENV +bunx @agentuity/cli env get NODE_ENV ``` Get item details: ```bash -agentuity env get LOG_LEVEL +bunx @agentuity/cli env get LOG_LEVEL ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-env-import/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-env-import/SKILL.md index ee5394fa..4dcf7baf 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-env-import/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-env-import/SKILL.md @@ -36,13 +36,13 @@ agentuity cloud env import Import environment variables from .env file: ```bash -agentuity cloud env import .env +bunx @agentuity/cli cloud env import .env ``` Import from .env.local file: ```bash -agentuity cloud env import .env.local +bunx @agentuity/cli cloud env import .env.local ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-env-list/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-env-list/SKILL.md index 8b2d418d..a6f12ecb 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-env-list/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-env-list/SKILL.md @@ -35,13 +35,13 @@ agentuity cloud env list [options] List items: ```bash -agentuity env list +bunx @agentuity/cli env list ``` Use mask option: ```bash -agentuity env list --mask +bunx @agentuity/cli env list --mask ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-env-pull/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-env-pull/SKILL.md index ab6c2727..9e9ed8b1 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-env-pull/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-env-pull/SKILL.md @@ -36,13 +36,13 @@ agentuity cloud env pull [options] Run pull command: ```bash -agentuity env pull +bunx @agentuity/cli env pull ``` Use force option: ```bash -agentuity env pull --force +bunx @agentuity/cli env pull --force ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-env-push/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-env-push/SKILL.md index 81e4d4e2..a6101d8a 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-env-push/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-env-push/SKILL.md @@ -30,7 +30,7 @@ agentuity cloud env push Run push command: ```bash -agentuity env push +bunx @agentuity/cli env push ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-env-set/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-env-set/SKILL.md index d8839769..50536f42 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-env-set/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-env-set/SKILL.md @@ -37,19 +37,19 @@ agentuity cloud env set Run production command: ```bash -agentuity env set NODE_ENV production +bunx @agentuity/cli env set NODE_ENV production ``` Run 3000 command: ```bash -agentuity env set PORT 3000 +bunx @agentuity/cli env set PORT 3000 ``` Run debug command: ```bash -agentuity env set LOG_LEVEL debug +bunx @agentuity/cli env set LOG_LEVEL debug ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-create-namespace/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-create-namespace/SKILL.md index 6315b84d..26cdfca3 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-create-namespace/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-create-namespace/SKILL.md @@ -36,19 +36,19 @@ agentuity cloud keyvalue create-namespace Create production namespace: ```bash -agentuity kv create-namespace production +bunx @agentuity/cli kv create-namespace production ``` Create staging namespace (using alias): ```bash -agentuity kv create staging +bunx @agentuity/cli kv create staging ``` Create cache namespace: ```bash -agentuity kv create cache +bunx @agentuity/cli kv create cache ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-delete-namespace/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-delete-namespace/SKILL.md index 789e47bf..692fa145 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-delete-namespace/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-delete-namespace/SKILL.md @@ -37,19 +37,19 @@ agentuity cloud keyvalue delete-namespace Delete staging namespace (interactive): ```bash -agentuity kv delete-namespace staging +bunx @agentuity/cli kv delete-namespace staging ``` Delete cache without confirmation: ```bash -agentuity kv rm-namespace cache --confirm +bunx @agentuity/cli kv rm-namespace cache --confirm ``` Force delete production: ```bash -agentuity kv delete-namespace production --confirm +bunx @agentuity/cli kv delete-namespace production --confirm ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-delete/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-delete/SKILL.md index 77bab477..1b83a443 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-delete/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-delete/SKILL.md @@ -37,19 +37,19 @@ agentuity cloud keyvalue delete Delete user data: ```bash -agentuity kv delete production user:123 +bunx @agentuity/cli kv delete production user:123 ``` Delete cached session: ```bash -agentuity kv delete cache session:abc +bunx @agentuity/cli kv delete cache session:abc ``` Delete homepage cache (using alias): ```bash -agentuity kv rm staging cache:homepage +bunx @agentuity/cli kv rm staging cache:homepage ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-get/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-get/SKILL.md index ad3e6391..f1762645 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-get/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-get/SKILL.md @@ -37,19 +37,19 @@ agentuity cloud keyvalue get Get user data: ```bash -agentuity kv get production user:123 +bunx @agentuity/cli kv get production user:123 ``` Get cached session: ```bash -agentuity kv get cache session:abc +bunx @agentuity/cli kv get cache session:abc ``` Get homepage cache: ```bash -agentuity kv get staging cache:homepage +bunx @agentuity/cli kv get staging cache:homepage ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-keys/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-keys/SKILL.md index d91179b4..e63fda63 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-keys/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-keys/SKILL.md @@ -36,19 +36,19 @@ agentuity cloud keyvalue keys List all keys in production: ```bash -agentuity kv keys production +bunx @agentuity/cli kv keys production ``` List all cached keys (using alias): ```bash -agentuity kv ls cache +bunx @agentuity/cli kv ls cache ``` List all staging keys: ```bash -agentuity kv list staging +bunx @agentuity/cli kv list staging ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-list-namespaces/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-list-namespaces/SKILL.md index b7aadcd8..319dee10 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-list-namespaces/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-list-namespaces/SKILL.md @@ -29,19 +29,19 @@ agentuity cloud keyvalue list-namespaces List all namespaces: ```bash -agentuity kv list-namespaces +bunx @agentuity/cli kv list-namespaces ``` List namespaces (using alias): ```bash -agentuity kv namespaces +bunx @agentuity/cli kv namespaces ``` List namespaces (short alias): ```bash -agentuity kv ns +bunx @agentuity/cli kv ns ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-repl/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-repl/SKILL.md index f202f615..4d4aa816 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-repl/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-repl/SKILL.md @@ -29,5 +29,5 @@ agentuity cloud keyvalue repl Start interactive KV session: ```bash -agentuity kv repl +bunx @agentuity/cli kv repl ``` diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-search/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-search/SKILL.md index fbdcf8bb..e522c9bd 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-search/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-search/SKILL.md @@ -37,19 +37,19 @@ agentuity cloud keyvalue search Find all user-related keys: ```bash -agentuity kv search production user +bunx @agentuity/cli kv search production user ``` Find all session keys in cache: ```bash -agentuity kv search cache session +bunx @agentuity/cli kv search cache session ``` Find all config keys: ```bash -agentuity kv search staging config +bunx @agentuity/cli kv search staging config ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-set/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-set/SKILL.md index 03522057..4e2a6d20 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-set/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-set/SKILL.md @@ -39,19 +39,19 @@ agentuity cloud keyvalue set [ttl] Store user data: ```bash -agentuity kv set production user:123 '{"name":"Alice","email":"alice@example.com"}' +bunx @agentuity/cli kv set production user:123 '{"name":"Alice","email":"alice@example.com"}' ``` Store session with 1h TTL: ```bash -agentuity kv set cache session:abc "session-data-here" --ttl 3600 +bunx @agentuity/cli kv set cache session:abc "session-data-here" --ttl 3600 ``` Cache homepage for 10m: ```bash -agentuity kv set staging cache:homepage "..." --ttl 600 +bunx @agentuity/cli kv set staging cache:homepage "..." --ttl 600 ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-stats/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-stats/SKILL.md index 4414fdf6..e2abfc7d 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-stats/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-keyvalue-stats/SKILL.md @@ -36,17 +36,17 @@ agentuity cloud keyvalue stats [name] Show stats for all namespaces: ```bash -agentuity kv stats +bunx @agentuity/cli kv stats ``` Show stats for production namespace: ```bash -agentuity kv stats production +bunx @agentuity/cli kv stats production ``` Show stats for cache namespace: ```bash -agentuity kv stats cache +bunx @agentuity/cli kv stats cache ``` diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-redis-show/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-redis-show/SKILL.md index 37199001..97219275 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-redis-show/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-redis-show/SKILL.md @@ -35,19 +35,19 @@ agentuity cloud redis show [options] Show Redis connection URL: ```bash -agentuity cloud redis show +bunx @agentuity/cli cloud redis show ``` Show Redis URL with credentials visible: ```bash -agentuity cloud redis show --show-credentials +bunx @agentuity/cli cloud redis show --show-credentials ``` Show Redis URL as JSON: ```bash -agentuity --json cloud redis show +bunx @agentuity/cli --json cloud redis show ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-scp-download/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-scp-download/SKILL.md index f6c340c4..645aebea 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-scp-download/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-scp-download/SKILL.md @@ -43,25 +43,25 @@ agentuity cloud scp download [destination] [options] Download to current directory: ```bash -agentuity cloud scp download /var/log/app.log +bunx @agentuity/cli cloud scp download /var/log/app.log ``` Download to specific path: ```bash -agentuity cloud scp download /var/log/app.log ./logs/ +bunx @agentuity/cli cloud scp download /var/log/app.log ./logs/ ``` Download from specific project: ```bash -agentuity cloud scp download /app/config.json --identifier=proj_abc123xyz +bunx @agentuity/cli cloud scp download /app/config.json --identifier=proj_abc123xyz ``` Download multiple files: ```bash -agentuity cloud scp download ~/logs/*.log ./logs/ +bunx @agentuity/cli cloud scp download ~/logs/*.log ./logs/ ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-scp-upload/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-scp-upload/SKILL.md index 7c94d549..1efd04aa 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-scp-upload/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-scp-upload/SKILL.md @@ -43,25 +43,25 @@ agentuity cloud scp upload [destination] [options] Upload to remote home directory: ```bash -agentuity cloud scp upload ./config.json +bunx @agentuity/cli cloud scp upload ./config.json ``` Upload to specific path: ```bash -agentuity cloud scp upload ./config.json /app/config.json +bunx @agentuity/cli cloud scp upload ./config.json /app/config.json ``` Upload to specific project: ```bash -agentuity cloud scp upload ./config.json --identifier=proj_abc123xyz +bunx @agentuity/cli cloud scp upload ./config.json --identifier=proj_abc123xyz ``` Upload multiple files: ```bash -agentuity cloud scp upload ./logs/*.log ~/logs/ +bunx @agentuity/cli cloud scp upload ./logs/*.log ~/logs/ ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-secret-delete/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-secret-delete/SKILL.md index 6d00df9c..68ce9284 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-secret-delete/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-secret-delete/SKILL.md @@ -36,13 +36,13 @@ agentuity cloud secret delete Delete item: ```bash -agentuity secret delete OLD_API_KEY +bunx @agentuity/cli secret delete OLD_API_KEY ``` Delete item: ```bash -agentuity secret rm DATABASE_URL +bunx @agentuity/cli secret rm DATABASE_URL ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-secret-get/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-secret-get/SKILL.md index 0f51921c..1ba03cae 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-secret-get/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-secret-get/SKILL.md @@ -42,13 +42,13 @@ agentuity cloud secret get [options] Get item details: ```bash -agentuity secret get DATABASE_URL +bunx @agentuity/cli secret get DATABASE_URL ``` Use no mask option: ```bash -agentuity secret get STRIPE_SECRET_KEY --no-mask +bunx @agentuity/cli secret get STRIPE_SECRET_KEY --no-mask ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-secret-import/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-secret-import/SKILL.md index 8c56619c..168a7027 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-secret-import/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-secret-import/SKILL.md @@ -36,13 +36,13 @@ agentuity cloud secret import Run .env.local command: ```bash -agentuity secret import .env.local +bunx @agentuity/cli secret import .env.local ``` Run .env.production.backup command: ```bash -agentuity secret import .env.production.backup +bunx @agentuity/cli secret import .env.production.backup ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-secret-list/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-secret-list/SKILL.md index c63cd09b..49d9bf55 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-secret-list/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-secret-list/SKILL.md @@ -35,13 +35,13 @@ agentuity cloud secret list [options] List items: ```bash -agentuity secret list +bunx @agentuity/cli secret list ``` Use no mask option: ```bash -agentuity secret list --no-mask +bunx @agentuity/cli secret list --no-mask ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-secret-pull/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-secret-pull/SKILL.md index 5de8d3b8..9beba945 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-secret-pull/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-secret-pull/SKILL.md @@ -36,13 +36,13 @@ agentuity cloud secret pull [options] Run pull command: ```bash -agentuity secret pull +bunx @agentuity/cli secret pull ``` Use force option: ```bash -agentuity secret pull --force +bunx @agentuity/cli secret pull --force ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-secret-push/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-secret-push/SKILL.md index adebf1a7..0400222d 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-secret-push/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-secret-push/SKILL.md @@ -30,7 +30,7 @@ agentuity cloud secret push Run push command: ```bash -agentuity secret push +bunx @agentuity/cli secret push ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-secret-set/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-secret-set/SKILL.md index 0ebe49df..0f1cbbc4 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-secret-set/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-secret-set/SKILL.md @@ -37,13 +37,13 @@ agentuity cloud secret set Set the DATABASE_URL environment secret: ```bash -agentuity secret set DATABASE_URL "postgres://user:pass@host:5432/db" +bunx @agentuity/cli secret set DATABASE_URL "postgres://user:pass@host:5432/db" ``` Set the STRIPE_SECRET_KEY environment secret: ```bash -agentuity secret set STRIPE_SECRET_KEY "sk_live_..." +bunx @agentuity/cli secret set STRIPE_SECRET_KEY "sk_live_..." ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-session-get/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-session-get/SKILL.md index d68bb714..7bb70a7f 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-session-get/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-session-get/SKILL.md @@ -35,7 +35,7 @@ agentuity cloud session get Get a session by ID: ```bash -agentuity cloud session get sess_abc123xyz +bunx @agentuity/cli cloud session get sess_abc123xyz ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-session-list/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-session-list/SKILL.md index 58e8fd22..bd40056a 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-session-list/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-session-list/SKILL.md @@ -44,49 +44,49 @@ agentuity cloud session list [options] List 10 most recent sessions: ```bash -agentuity cloud session list +bunx @agentuity/cli cloud session list ``` List 25 most recent sessions: ```bash -agentuity cloud session list --count=25 +bunx @agentuity/cli cloud session list --count=25 ``` Filter by project: ```bash -agentuity cloud session list --project-id=proj_* +bunx @agentuity/cli cloud session list --project-id=proj_* ``` Filter by deployment: ```bash -agentuity cloud session list --deployment-id=* +bunx @agentuity/cli cloud session list --deployment-id=* ``` Only successful sessions: ```bash -agentuity cloud session list --success=true +bunx @agentuity/cli cloud session list --success=true ``` Only production sessions: ```bash -agentuity cloud session list --devmode=false +bunx @agentuity/cli cloud session list --devmode=false ``` Only API triggered sessions: ```bash -agentuity cloud session list --trigger=api +bunx @agentuity/cli cloud session list --trigger=api ``` Only production environment: ```bash -agentuity cloud session list --env=production +bunx @agentuity/cli cloud session list --env=production ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-session-logs/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-session-logs/SKILL.md index 1d5793f2..38f569c2 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-session-logs/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-session-logs/SKILL.md @@ -43,13 +43,13 @@ agentuity cloud session logs [options] View logs for session: ```bash -agentuity cloud session logs sess_abc123xyz +bunx @agentuity/cli cloud session logs sess_abc123xyz ``` Hide timestamps: ```bash -agentuity cloud session logs sess_abc123xyz --no-timestamps +bunx @agentuity/cli cloud session logs sess_abc123xyz --no-timestamps ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-ssh/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-ssh/SKILL.md index 58747d93..eaccd8bd 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-ssh/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-ssh/SKILL.md @@ -43,35 +43,35 @@ agentuity cloud ssh [identifier] [command] [options] SSH into current project: ```bash -agentuity cloud ssh +bunx @agentuity/cli cloud ssh ``` SSH into specific project: ```bash -agentuity cloud ssh proj_abc123xyz +bunx @agentuity/cli cloud ssh proj_abc123xyz ``` SSH into specific deployment: ```bash -agentuity cloud ssh deploy_abc123xyz +bunx @agentuity/cli cloud ssh deploy_abc123xyz ``` Run command and exit: ```bash -agentuity cloud ssh 'ps aux' +bunx @agentuity/cli cloud ssh 'ps aux' ``` Run command on specific project: ```bash -agentuity cloud ssh proj_abc123xyz 'tail -f /var/log/app.log' +bunx @agentuity/cli cloud ssh proj_abc123xyz 'tail -f /var/log/app.log' ``` Show SSH command without executing: ```bash -agentuity cloud ssh --show +bunx @agentuity/cli cloud ssh --show ``` diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-storage-create/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-storage-create/SKILL.md index 0de25d51..caf06e00 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-storage-create/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-storage-create/SKILL.md @@ -29,19 +29,19 @@ agentuity cloud storage create Create a new cloud storage bucket: ```bash -agentuity cloud storage create +bunx @agentuity/cli cloud storage create ``` Alias for "cloud storage create" (shorthand "new"): ```bash -agentuity cloud storage new +bunx @agentuity/cli cloud storage new ``` Dry-run: display what would be created without making changes: ```bash -agentuity --dry-run cloud storage create +bunx @agentuity/cli --dry-run cloud storage create ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-storage-delete/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-storage-delete/SKILL.md index b15f0ecf..22897b11 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-storage-delete/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-storage-delete/SKILL.md @@ -43,25 +43,25 @@ agentuity cloud storage delete [name] [filename] [options] Delete a storage bucket: ```bash -agentuity cloud storage delete my-bucket +bunx @agentuity/cli cloud storage delete my-bucket ``` Delete a file from a bucket: ```bash -agentuity cloud storage rm my-bucket file.txt +bunx @agentuity/cli cloud storage rm my-bucket file.txt ``` Interactive selection to delete a bucket: ```bash -agentuity cloud storage delete +bunx @agentuity/cli cloud storage delete ``` Dry-run: show what would be deleted without making changes: ```bash -agentuity --dry-run cloud storage delete my-bucket +bunx @agentuity/cli --dry-run cloud storage delete my-bucket ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-storage-download/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-storage-download/SKILL.md index 0f612c76..880b930a 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-storage-download/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-storage-download/SKILL.md @@ -44,25 +44,25 @@ agentuity cloud storage download [output] [options] Download file from bucket: ```bash -agentuity cloud storage download my-bucket file.txt +bunx @agentuity/cli cloud storage download my-bucket file.txt ``` Download file to specific path: ```bash -agentuity cloud storage download my-bucket file.txt output.txt +bunx @agentuity/cli cloud storage download my-bucket file.txt output.txt ``` Download file to stdout: ```bash -agentuity cloud storage download my-bucket file.txt - > output.txt +bunx @agentuity/cli cloud storage download my-bucket file.txt - > output.txt ``` Download metadata only: ```bash -agentuity cloud storage download my-bucket file.txt --metadata +bunx @agentuity/cli cloud storage download my-bucket file.txt --metadata ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-storage-get/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-storage-get/SKILL.md index c6f1ef39..6603f317 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-storage-get/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-storage-get/SKILL.md @@ -42,19 +42,19 @@ agentuity cloud storage get [options] Get bucket details: ```bash -agentuity cloud storage get my-bucket +bunx @agentuity/cli cloud storage get my-bucket ``` Show bucket information: ```bash -agentuity cloud storage show my-bucket +bunx @agentuity/cli cloud storage show my-bucket ``` Get bucket with credentials: ```bash -agentuity cloud storage get my-bucket --show-credentials +bunx @agentuity/cli cloud storage get my-bucket --show-credentials ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-storage-list/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-storage-list/SKILL.md index 6e4cc362..2330622d 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-storage-list/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-storage-list/SKILL.md @@ -44,37 +44,37 @@ agentuity cloud storage list [name] [prefix] [options] List items: ```bash -agentuity cloud storage list +bunx @agentuity/cli cloud storage list ``` List items: ```bash -agentuity cloud storage list my-bucket +bunx @agentuity/cli cloud storage list my-bucket ``` List items: ```bash -agentuity cloud storage list my-bucket path/prefix +bunx @agentuity/cli cloud storage list my-bucket path/prefix ``` Show output in JSON format: ```bash -agentuity --json cloud storage list +bunx @agentuity/cli --json cloud storage list ``` List items: ```bash -agentuity cloud storage ls +bunx @agentuity/cli cloud storage ls ``` Use show credentials option: ```bash -agentuity cloud storage list --show-credentials +bunx @agentuity/cli cloud storage list --show-credentials ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-storage-upload/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-storage-upload/SKILL.md index 8f0ff8e9..cbe6df9b 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-storage-upload/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-storage-upload/SKILL.md @@ -44,31 +44,31 @@ agentuity cloud storage upload [options] Upload file to bucket: ```bash -agentuity cloud storage upload my-bucket file.txt +bunx @agentuity/cli cloud storage upload my-bucket file.txt ``` Upload file with content type: ```bash -agentuity cloud storage put my-bucket file.txt --content-type text/plain +bunx @agentuity/cli cloud storage put my-bucket file.txt --content-type text/plain ``` Upload file with custom object key: ```bash -agentuity cloud storage upload my-bucket file.txt --key custom-name.txt +bunx @agentuity/cli cloud storage upload my-bucket file.txt --key custom-name.txt ``` Upload from stdin: ```bash -cat file.txt | agentuity cloud storage upload my-bucket - +cat file.txt | bunx @agentuity/cli cloud storage upload my-bucket - ``` Upload from stdin with custom key: ```bash -cat data.json | agentuity cloud storage upload my-bucket - --key data.json +cat data.json | bunx @agentuity/cli cloud storage upload my-bucket - --key data.json ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-stream-delete/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-stream-delete/SKILL.md index 564a02d8..3ca28b6f 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-stream-delete/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-stream-delete/SKILL.md @@ -36,19 +36,19 @@ agentuity cloud stream delete Delete a stream: ```bash -agentuity stream delete stream-id-123 +bunx @agentuity/cli stream delete stream-id-123 ``` Delete stream (using alias): ```bash -agentuity stream rm stream-id-456 +bunx @agentuity/cli stream rm stream-id-456 ``` Delete stream (using alias): ```bash -agentuity stream del stream-id-789 +bunx @agentuity/cli stream del stream-id-789 ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-stream-get/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-stream-get/SKILL.md index c7bc200f..b311282f 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-stream-get/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-stream-get/SKILL.md @@ -42,25 +42,25 @@ agentuity cloud stream get [options] Get stream details: ```bash -agentuity stream get stream-id-123 +bunx @agentuity/cli stream get stream-id-123 ``` Get stream as JSON: ```bash -agentuity stream get stream-id-123 --json +bunx @agentuity/cli stream get stream-id-123 --json ``` Download stream to file: ```bash -agentuity stream get stream-id-123 --output stream.dat +bunx @agentuity/cli stream get stream-id-123 --output stream.dat ``` Download stream (short flag): ```bash -agentuity stream get stream-id-123 -o stream.dat +bunx @agentuity/cli stream get stream-id-123 -o stream.dat ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-stream-list/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-stream-list/SKILL.md index a7929ada..630eddfc 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-stream-list/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-stream-list/SKILL.md @@ -38,31 +38,31 @@ agentuity cloud stream list [options] List all streams: ```bash -agentuity cloud stream list +bunx @agentuity/cli cloud stream list ``` List 50 most recent streams: ```bash -agentuity cloud stream ls --size 50 +bunx @agentuity/cli cloud stream ls --size 50 ``` Filter by name: ```bash -agentuity cloud stream list --name agent-logs +bunx @agentuity/cli cloud stream list --name agent-logs ``` Filter by metadata: ```bash -agentuity cloud stream list --metadata type=export +bunx @agentuity/cli cloud stream list --metadata type=export ``` Output as JSON: ```bash -agentuity cloud stream ls --json +bunx @agentuity/cli cloud stream ls --json ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-thread-delete/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-thread-delete/SKILL.md index 748d9257..fd7160c8 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-thread-delete/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-thread-delete/SKILL.md @@ -35,5 +35,5 @@ agentuity cloud thread delete Delete a thread by ID: ```bash -agentuity cloud thread delete thrd_abc123xyz +bunx @agentuity/cli cloud thread delete thrd_abc123xyz ``` diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-thread-get/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-thread-get/SKILL.md index 0b1b03ff..9ee36145 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-thread-get/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-thread-get/SKILL.md @@ -35,7 +35,7 @@ agentuity cloud thread get Get a thread by ID: ```bash -agentuity cloud thread get thrd_abc123xyz +bunx @agentuity/cli cloud thread get thrd_abc123xyz ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-thread-list/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-thread-list/SKILL.md index 66018806..d325596a 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-thread-list/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-thread-list/SKILL.md @@ -36,25 +36,25 @@ agentuity cloud thread list [options] List 10 most recent threads: ```bash -agentuity cloud thread list +bunx @agentuity/cli cloud thread list ``` List 25 most recent threads: ```bash -agentuity cloud thread list --count=25 +bunx @agentuity/cli cloud thread list --count=25 ``` Filter by project: ```bash -agentuity cloud thread list --project-id=proj_* +bunx @agentuity/cli cloud thread list --project-id=proj_* ``` Filter by organization: ```bash -agentuity cloud thread list --org-id=org_* +bunx @agentuity/cli cloud thread list --org-id=org_* ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-vector-delete-namespace/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-vector-delete-namespace/SKILL.md index fe99c2d2..3b35e555 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-vector-delete-namespace/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-vector-delete-namespace/SKILL.md @@ -42,19 +42,19 @@ agentuity cloud vector delete-namespace [options] Delete staging namespace (interactive): ```bash -agentuity vector delete-namespace staging +bunx @agentuity/cli vector delete-namespace staging ``` Delete cache without confirmation: ```bash -agentuity vector rm-namespace cache --confirm +bunx @agentuity/cli vector rm-namespace cache --confirm ``` Force delete old-data namespace: ```bash -agentuity vector delete-namespace old-data --confirm +bunx @agentuity/cli vector delete-namespace old-data --confirm ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-vector-delete/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-vector-delete/SKILL.md index b2c58043..5ac49b0b 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-vector-delete/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-vector-delete/SKILL.md @@ -43,19 +43,19 @@ agentuity cloud vector delete [options] Delete a single vector (interactive): ```bash -agentuity vector delete products chair-001 +bunx @agentuity/cli vector delete products chair-001 ``` Delete multiple vectors without confirmation: ```bash -agentuity vector rm knowledge-base doc-123 doc-456 --confirm +bunx @agentuity/cli vector rm knowledge-base doc-123 doc-456 --confirm ``` Bulk delete without confirmation: ```bash -agentuity vector del embeddings old-profile-1 old-profile-2 --confirm +bunx @agentuity/cli vector del embeddings old-profile-1 old-profile-2 --confirm ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-vector-get/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-vector-get/SKILL.md index 6e1a56e2..d387ca3a 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-vector-get/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-vector-get/SKILL.md @@ -37,19 +37,19 @@ agentuity cloud vector get Get a specific product vector: ```bash -agentuity vector get products chair-001 +bunx @agentuity/cli vector get products chair-001 ``` Get a document from knowledge base: ```bash -agentuity vector get knowledge-base doc-123 +bunx @agentuity/cli vector get knowledge-base doc-123 ``` Get user profile embedding: ```bash -agentuity vector get embeddings user-profile-456 +bunx @agentuity/cli vector get embeddings user-profile-456 ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-vector-list-namespaces/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-vector-list-namespaces/SKILL.md index 8bf0911a..e36ade11 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-vector-list-namespaces/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-vector-list-namespaces/SKILL.md @@ -29,19 +29,19 @@ agentuity cloud vector list-namespaces List all namespaces: ```bash -agentuity vector list-namespaces +bunx @agentuity/cli vector list-namespaces ``` List namespaces (using alias): ```bash -agentuity vector namespaces +bunx @agentuity/cli vector namespaces ``` List namespaces (short alias): ```bash -agentuity vector ns +bunx @agentuity/cli vector ns ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-vector-search/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-vector-search/SKILL.md index b9a2d4d1..a7121d8d 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-vector-search/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-vector-search/SKILL.md @@ -45,31 +45,31 @@ agentuity cloud vector search [options] Search for similar products: ```bash -agentuity vector search products "comfortable office chair" +bunx @agentuity/cli vector search products "comfortable office chair" ``` Search knowledge base: ```bash -agentuity vector list knowledge-base "machine learning" +bunx @agentuity/cli vector list knowledge-base "machine learning" ``` Limit results: ```bash -agentuity vector search docs "API documentation" --limit 5 +bunx @agentuity/cli vector search docs "API documentation" --limit 5 ``` Set minimum similarity: ```bash -agentuity vector search products "ergonomic" --similarity 0.8 +bunx @agentuity/cli vector search products "ergonomic" --similarity 0.8 ``` Filter by metadata: ```bash -agentuity vector ls embeddings "neural networks" --metadata category=ai +bunx @agentuity/cli vector ls embeddings "neural networks" --metadata category=ai ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-vector-stats/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-vector-stats/SKILL.md index 883e332b..db6b460d 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-vector-stats/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-vector-stats/SKILL.md @@ -36,17 +36,17 @@ agentuity cloud vector stats [name] Show stats for all namespaces: ```bash -agentuity vector stats +bunx @agentuity/cli vector stats ``` Show detailed stats for products namespace: ```bash -agentuity vector stats products +bunx @agentuity/cli vector stats products ``` Show stats for embeddings: ```bash -agentuity vector stats embeddings +bunx @agentuity/cli vector stats embeddings ``` diff --git a/doc-agents/.agents/skills/agentuity-cli-cloud-vector-upsert/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-cloud-vector-upsert/SKILL.md index 2db4bb2f..e9f84d4b 100644 --- a/doc-agents/.agents/skills/agentuity-cli-cloud-vector-upsert/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-cloud-vector-upsert/SKILL.md @@ -46,31 +46,31 @@ agentuity cloud vector upsert [key] [options] Upsert a single vector with document text: ```bash -agentuity vector upsert products doc1 --document "Comfortable office chair" +bunx @agentuity/cli vector upsert products doc1 --document "Comfortable office chair" ``` Upsert with metadata: ```bash -agentuity vector upsert products doc1 --document "Chair" --metadata '{"category":"furniture"}' +bunx @agentuity/cli vector upsert products doc1 --document "Chair" --metadata '{"category":"furniture"}' ``` Upsert with pre-computed embeddings: ```bash -agentuity vector upsert embeddings vec1 --embeddings "[0.1, 0.2, 0.3]" +bunx @agentuity/cli vector upsert embeddings vec1 --embeddings "[0.1, 0.2, 0.3]" ``` Bulk upsert from JSON file: ```bash -agentuity vector upsert products --file vectors.json +bunx @agentuity/cli vector upsert products --file vectors.json ``` Bulk upsert from stdin: ```bash -cat vectors.json | agentuity vector upsert products - +cat vectors.json | bunx @agentuity/cli vector upsert products - ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-dev/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-dev/SKILL.md index e28fef74..a7008fd0 100644 --- a/doc-agents/.agents/skills/agentuity-cli-dev/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-dev/SKILL.md @@ -24,23 +24,23 @@ agentuity dev Start development server: ```bash -agentuity dev +bunx @agentuity/cli dev ``` Specify custom port: ```bash -agentuity dev --port 8080 +bunx @agentuity/cli dev --port 8080 ``` Run in local mode: ```bash -agentuity dev --local +bunx @agentuity/cli dev --local ``` Disable public URL: ```bash -agentuity dev --no-public +bunx @agentuity/cli dev --no-public ``` diff --git a/doc-agents/.agents/skills/agentuity-cli-profile-create/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-profile-create/SKILL.md index 10fca081..55acefb2 100644 --- a/doc-agents/.agents/skills/agentuity-cli-profile-create/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-profile-create/SKILL.md @@ -37,19 +37,19 @@ agentuity profile create [options] Create new item: ```bash -agentuity profile create production +bunx @agentuity/cli profile create production ``` Use switch option: ```bash -agentuity profile create staging --switch +bunx @agentuity/cli profile create staging --switch ``` Create new item: ```bash -agentuity profile create development +bunx @agentuity/cli profile create development ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-profile-current/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-profile-current/SKILL.md index 386c87b1..f1769211 100644 --- a/doc-agents/.agents/skills/agentuity-cli-profile-current/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-profile-current/SKILL.md @@ -24,13 +24,13 @@ agentuity profile current Show current profile: ```bash -agentuity profile current +bunx @agentuity/cli profile current ``` Show output in JSON format: ```bash -agentuity profile current --json +bunx @agentuity/cli profile current --json ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-profile-delete/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-profile-delete/SKILL.md index cb0017b2..4f05ee43 100644 --- a/doc-agents/.agents/skills/agentuity-cli-profile-delete/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-profile-delete/SKILL.md @@ -37,19 +37,19 @@ agentuity profile delete [name] [options] Delete item: ```bash -agentuity profile delete staging +bunx @agentuity/cli profile delete staging ``` Use confirm option: ```bash -agentuity profile delete old-dev --confirm +bunx @agentuity/cli profile delete old-dev --confirm ``` Delete item: ```bash -agentuity profile delete +bunx @agentuity/cli profile delete ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-profile-list/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-profile-list/SKILL.md index 059cc7ae..f710ada5 100644 --- a/doc-agents/.agents/skills/agentuity-cli-profile-list/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-profile-list/SKILL.md @@ -24,13 +24,13 @@ agentuity profile list List items: ```bash -agentuity profile list +bunx @agentuity/cli profile list ``` List items: ```bash -agentuity profile ls +bunx @agentuity/cli profile ls ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-profile-show/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-profile-show/SKILL.md index f2678e09..316ba38e 100644 --- a/doc-agents/.agents/skills/agentuity-cli-profile-show/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-profile-show/SKILL.md @@ -31,19 +31,19 @@ agentuity profile show [name] Show details: ```bash -agentuity profile show +bunx @agentuity/cli profile show ``` Show details: ```bash -agentuity profile show production +bunx @agentuity/cli profile show production ``` Show output in JSON format: ```bash -agentuity profile show staging --json +bunx @agentuity/cli profile show staging --json ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-profile-use/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-profile-use/SKILL.md index 851ab01b..e03fc304 100644 --- a/doc-agents/.agents/skills/agentuity-cli-profile-use/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-profile-use/SKILL.md @@ -31,17 +31,17 @@ agentuity profile use [name] Switch to the "production" profile: ```bash -agentuity profile use production +bunx @agentuity/cli profile use production ``` Switch to the "staging" profile: ```bash -agentuity profile switch staging +bunx @agentuity/cli profile switch staging ``` Show interactive profile selection menu: ```bash -agentuity profile use +bunx @agentuity/cli profile use ``` diff --git a/doc-agents/.agents/skills/agentuity-cli-project-create/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-project-create/SKILL.md index 653505a6..dd048e37 100644 --- a/doc-agents/.agents/skills/agentuity-cli-project-create/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-project-create/SKILL.md @@ -39,31 +39,31 @@ agentuity project create [options] Create new item: ```bash -agentuity project create +bunx @agentuity/cli project create ``` Create new item: ```bash -agentuity project create --name my-ai-agent +bunx @agentuity/cli project create --name my-ai-agent ``` Create new item: ```bash -agentuity project create --name customer-service-bot --dir ~/projects/agent +bunx @agentuity/cli project create --name customer-service-bot --dir ~/projects/agent ``` Use no install option: ```bash -agentuity project create --template basic --no-install +bunx @agentuity/cli project create --template basic --no-install ``` Use no register option: ```bash -agentuity project new --no-register +bunx @agentuity/cli project new --no-register ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-project-delete/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-project-delete/SKILL.md index 6c0836e0..cbac05df 100644 --- a/doc-agents/.agents/skills/agentuity-cli-project-delete/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-project-delete/SKILL.md @@ -41,37 +41,37 @@ agentuity project delete [id] [options] Delete item: ```bash -agentuity project delete +bunx @agentuity/cli project delete ``` Delete item: ```bash -agentuity project delete proj_abc123def456 +bunx @agentuity/cli project delete proj_abc123def456 ``` Use confirm option: ```bash -agentuity project delete proj_abc123def456 --confirm +bunx @agentuity/cli project delete proj_abc123def456 --confirm ``` Delete item: ```bash -agentuity project rm proj_abc123def456 +bunx @agentuity/cli project rm proj_abc123def456 ``` Delete item: ```bash -agentuity --explain project delete proj_abc123def456 +bunx @agentuity/cli --explain project delete proj_abc123def456 ``` Delete item: ```bash -agentuity --dry-run project delete proj_abc123def456 +bunx @agentuity/cli --dry-run project delete proj_abc123def456 ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-project-list/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-project-list/SKILL.md index 49444fab..f823c74d 100644 --- a/doc-agents/.agents/skills/agentuity-cli-project-list/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-project-list/SKILL.md @@ -28,19 +28,19 @@ agentuity project list List projects (human-readable): ```bash -agentuity project list +bunx @agentuity/cli project list ``` List projects in JSON format: ```bash -agentuity --json project list +bunx @agentuity/cli --json project list ``` Alias for "project list" — list projects (human-readable): ```bash -agentuity project ls +bunx @agentuity/cli project ls ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-project-show/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-project-show/SKILL.md index a1853382..f86ddd98 100644 --- a/doc-agents/.agents/skills/agentuity-cli-project-show/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-project-show/SKILL.md @@ -35,19 +35,19 @@ agentuity project show Show details: ```bash -agentuity project show proj_abc123def456 +bunx @agentuity/cli project show proj_abc123def456 ``` Show output in JSON format: ```bash -agentuity --json project show proj_abc123def456 +bunx @agentuity/cli --json project show proj_abc123def456 ``` Get item details: ```bash -agentuity project get proj_abc123def456 +bunx @agentuity/cli project get proj_abc123def456 ``` ## Output diff --git a/doc-agents/.agents/skills/agentuity-cli-repl/SKILL.md b/doc-agents/.agents/skills/agentuity-cli-repl/SKILL.md index 15188169..d80eed72 100644 --- a/doc-agents/.agents/skills/agentuity-cli-repl/SKILL.md +++ b/doc-agents/.agents/skills/agentuity-cli-repl/SKILL.md @@ -24,5 +24,5 @@ agentuity repl Run repl command: ```bash -agentuity repl +bunx @agentuity/cli repl ``` From fedd6a2b977dafc1d7343762c6261f3fba1dd046 Mon Sep 17 00:00:00 2001 From: afterrburn Date: Tue, 6 Jan 2026 08:42:34 -0700 Subject: [PATCH 10/12] Refactor API services and remove environment validation - Replaced environment variable validation with direct API service calls for agent configuration. - Updated API routes to utilize new service methods for querying agents and managing tutorial states. - Refactored session management to improve error handling and streamline KV store interactions. - Introduced a new title generation service for session titles based on conversation history. - Removed deprecated environment validation logic and associated files to simplify the codebase. --- app/api/rag-search/route.ts | 28 +- .../sessions/[sessionId]/messages/route.ts | 332 ++++++------------ app/api/sessions/[sessionId]/route.ts | 80 ++--- app/api/sessions/route.ts | 42 +-- app/api/users/tutorial-state/route.ts | 10 +- app/layout.tsx | 11 - doc-agents/.agents/skills/README.md | 2 +- doc-agents/package.json | 3 +- doc-agents/src/agent/agent_pulse/agent.ts | 47 +++ .../src/agent/agent_pulse/context-builder.ts | 117 ++++++ doc-agents/src/agent/agent_pulse/index.ts | 1 + doc-agents/src/agent/agent_pulse/tools.ts | 78 ++++ doc-agents/src/agent/agent_pulse/tutorial.ts | 113 ++++++ doc-agents/src/agent/agent_pulse/types.ts | 47 +++ doc-agents/src/api/agent_pulse/route.ts | 150 ++++++++ doc-agents/src/api/title-generator/route.ts | 104 ++++++ doc-agents/src/generated/app.ts | 16 +- doc-agents/src/generated/registry.ts | 42 +++ doc-agents/src/generated/routes.ts | 33 +- lib/api/client.ts | 121 +++++++ lib/api/services/agentPulse.ts | 145 ++++++++ lib/api/services/agentQa.ts | 45 +++ lib/api/services/index.ts | 12 + lib/api/services/titleGenerator.ts | 44 +++ lib/api/types.ts | 22 ++ lib/config.ts | 3 +- lib/env.ts | 64 ---- lib/kv-store.ts | 305 ++++------------ lib/tutorial/state-manager.ts | 221 ++++++------ package.json | 6 + 30 files changed, 1514 insertions(+), 730 deletions(-) create mode 100644 doc-agents/src/agent/agent_pulse/agent.ts create mode 100644 doc-agents/src/agent/agent_pulse/context-builder.ts create mode 100644 doc-agents/src/agent/agent_pulse/index.ts create mode 100644 doc-agents/src/agent/agent_pulse/tools.ts create mode 100644 doc-agents/src/agent/agent_pulse/tutorial.ts create mode 100644 doc-agents/src/agent/agent_pulse/types.ts create mode 100644 doc-agents/src/api/agent_pulse/route.ts create mode 100644 doc-agents/src/api/title-generator/route.ts create mode 100644 lib/api/client.ts create mode 100644 lib/api/services/agentPulse.ts create mode 100644 lib/api/services/agentQa.ts create mode 100644 lib/api/services/index.ts create mode 100644 lib/api/services/titleGenerator.ts create mode 100644 lib/api/types.ts delete mode 100644 lib/env.ts diff --git a/app/api/rag-search/route.ts b/app/api/rag-search/route.ts index 1e8c40ed..32cb7eed 100644 --- a/app/api/rag-search/route.ts +++ b/app/api/rag-search/route.ts @@ -1,5 +1,5 @@ import type { NextRequest } from 'next/server'; -import { getAgentQaConfig } from '@/lib/env'; +import { queryAgentQa } from '@/lib/api/services'; import { source } from '@/lib/source'; function documentPathToUrl(docPath: string): string { @@ -93,31 +93,7 @@ export async function GET(request: NextRequest) { } try { - const agentConfig = getAgentQaConfig(); - - // Prepare headers - const headers: Record = { - 'Content-Type': 'application/json', - }; - - // Add bearer token if provided - if (agentConfig.bearerToken) { - headers['Authorization'] = `Bearer ${agentConfig.bearerToken}`; - } - - const response = await fetch(agentConfig.url, { - method: 'POST', - headers, - body: JSON.stringify({ message: query }), - }); - - if (!response.ok) { - throw new Error( - `Agent API error: ${response.status} ${response.statusText}` - ); - } - - const data = await response.json(); + const data = await queryAgentQa(query); const results = []; if (data?.answer?.trim()) { diff --git a/app/api/sessions/[sessionId]/messages/route.ts b/app/api/sessions/[sessionId]/messages/route.ts index 523b43d1..b93bb75b 100644 --- a/app/api/sessions/[sessionId]/messages/route.ts +++ b/app/api/sessions/[sessionId]/messages/route.ts @@ -7,43 +7,14 @@ import { TutorialData, } from "@/app/chat/types"; import { toISOString, getCurrentTimestamp } from "@/app/chat/utils/dateUtils"; -import { getAgentPulseConfig } from "@/lib/env"; import { config } from "@/lib/config"; import { parseAndValidateJSON, SessionMessageRequestSchema } from "@/lib/validation/middleware"; +import { titleGeneratorService, callAgentPulseStreaming } from "@/lib/api/services"; // Constants const DEFAULT_CONVERSATION_HISTORY_LIMIT = 10; const AGENT_REQUEST_TIMEOUT = 30000; // 30 seconds - -function sanitizeTitle(input: string): string { - if (!input) return ''; - let s = input.trim(); - // Strip wrapping quotes/backticks - if ((s.startsWith('"') && s.endsWith('"')) || (s.startsWith('\'') && s.endsWith('\'')) || (s.startsWith('`') && s.endsWith('`'))) { - s = s.slice(1, -1).trim(); - } - // Remove markdown emphasis - s = s.replace(/\*\*([^*]+)\*\*|\*([^*]+)\*|__([^_]+)__|_([^_]+)_/g, (_m, a, b, c, d) => a || b || c || d || ''); - // Remove emojis (basic unicode emoji ranges) - s = s.replace(/[\u{1F300}-\u{1FAFF}\u{1F900}-\u{1F9FF}\u{2600}-\u{26FF}\u{2700}-\u{27BF}]/gu, ''); - // Collapse whitespace - s = s.replace(/\s+/g, ' ').trim(); - // Sentence case - s = sentenceCase(s); - // Trim trailing punctuation noise - s = s.replace(/[\s\-–—:;,\.]+$/g, '').trim(); - // Enforce 60 chars - if (s.length > 60) s = s.slice(0, 60).trim(); - return s; -} - -function sentenceCase(str: string): string { - if (!str) return ''; - const lower = str.toLowerCase(); - return lower.charAt(0).toUpperCase() + lower.slice(1); -} - /** * POST /api/sessions/[sessionId]/messages - Add a message to a session and process with streaming * @@ -80,15 +51,16 @@ export async function POST( } const sessionKey = `${userId}_${sessionId}`; const sessionResponse = await getKVValue(sessionKey, { - storeName: config.defaultStoreName, + storeName: config.kvStoreName, }); // Helper: background title generation and persistence - async function generateAndPersistTitle(sessionId: string, sessionKey: string, finalSession: Session) { + async function generateAndPersistTitle(sessionKey: string, finalSession: Session) { try { if ((finalSession as any).title) { return; // Title already set } + // Build compact conversation history (last 10 messages, truncate content) const HISTORY_LIMIT = 10; const MAX_CONTENT_LEN = 400; @@ -99,84 +71,22 @@ export async function POST( content: (m.content || '').slice(0, MAX_CONTENT_LEN), })); - const prompt = `Generate a very short session title summarizing the conversation topic.\n\nRequirements:\n- sentence case\n- no emojis\n- <= 60 characters\n- no quotes or markdown\n- output the title only, no extra text`; - - const agentConfig = getAgentPulseConfig(); - const headers: Record = { 'Content-Type': 'application/json' }; - if (agentConfig.bearerToken) headers['Authorization'] = `Bearer ${agentConfig.bearerToken}`; - - const controller = new AbortController(); - const timeoutId = setTimeout(() => controller.abort(), 3000); - let agentResponse: Response | null = null; - try { - agentResponse = await fetch(agentConfig.url, { - method: 'POST', - headers, - body: JSON.stringify({ - message: prompt, - conversationHistory: history, - use_direct_llm: true, - }), - signal: controller.signal, - }); - } finally { - clearTimeout(timeoutId); - } - - if (!agentResponse || !agentResponse.ok) { - console.error(`[title-gen] failed: bad response ${agentResponse ? agentResponse.status : 'no-response'}`); - return; - } - - const reader = agentResponse.body?.getReader(); - if (!reader) { - console.error('[title-gen] failed: no response body'); - return; - } - - let accumulated = ''; - const textDecoder = new TextDecoder(); - while (true) { - const { done, value } = await reader.read(); - if (done) break; - if (value) { - const text = textDecoder.decode(value); - for (const line of text.split('\n')) { - if (line.startsWith('data: ')) { - try { - const ev = JSON.parse(line.slice(6)); - if (ev.type === 'text-delta' && ev.textDelta) accumulated += ev.textDelta; - if (ev.type === 'finish') { - try { await reader.cancel(); } catch { } - break; - } - } catch { } - } - } - } - } - - const candidate = sanitizeTitle(accumulated); - const title = candidate || 'New chat'; + // Use the title generator service + const title = await titleGeneratorService.generate(history); // Re-fetch and set title only if still empty - const latest = await getKVValue(sessionKey, { storeName: config.defaultStoreName }); - if (!latest.success || !latest.data) return; + const latest = await getKVValue(sessionKey, { storeName: config.kvStoreName }); + if (!latest.exists || !latest.data) return; const current = latest.data as any; if (current.title) return; current.title = title; - await setKVValue(sessionKey, current, { storeName: config.defaultStoreName }); - + await setKVValue(sessionKey, current, { storeName: config.kvStoreName }); } catch (err) { const msg = err instanceof Error ? err.message : String(err); - if (msg.includes('The operation was aborted') || msg.includes('aborted')) { - console.error('[title-gen] timeout after 3000ms'); - } else { - console.error(`[title-gen] failed: ${msg}`); - } + console.error(`[title-gen] failed: ${msg}`); } } - if (!sessionResponse.success || !sessionResponse.data) { + if (!sessionResponse.exists || !sessionResponse.data) { return NextResponse.json({ error: "Session not found" }, { status: 404 }); } @@ -189,7 +99,7 @@ export async function POST( try { await setKVValue(sessionKey, updatedSession, { - storeName: config.defaultStoreName, + storeName: config.kvStoreName, }); } catch (error) { console.error( @@ -216,10 +126,6 @@ export async function POST( // Create assistant message placeholder for tracking const assistantMessageId = crypto.randomUUID(); - // Process with agent and stream response - const agentConfig = getAgentPulseConfig(); - const agentUrl = agentConfig.url; - // Get current tutorial state for the user const { TutorialStateManager } = await import('@/lib/tutorial/state-manager'); const currentTutorialState = await TutorialStateManager.getCurrentTutorialState(userId); @@ -232,125 +138,111 @@ export async function POST( tutorialData: currentTutorialState, }; - // Prepare headers with optional bearer token - const headers: Record = { - "Content-Type": "application/json", - }; - if (agentConfig.bearerToken) { - headers["Authorization"] = `Bearer ${agentConfig.bearerToken}`; - } - - // Real agent call (SSE response expected) - const agentResponse = await fetch(agentUrl, { - method: 'POST', - headers, - body: JSON.stringify(agentPayload), - signal: AbortSignal.timeout(AGENT_REQUEST_TIMEOUT), - }); + // Create a readable stream to send SSE events to the client + const stream = new ReadableStream({ + async start(controller) { + const encoder = new TextEncoder(); + let accumulatedContent = ""; + let finalTutorialData: TutorialData | undefined = undefined; - if (!agentResponse.ok) { - throw new Error(`Agent responded with status: ${agentResponse.status}`); - } - - // Process streaming response - let accumulatedContent = ""; - let finalTutorialData: TutorialData | undefined = undefined; - - const transformStream = new TransformStream({ - async transform(chunk, controller) { - // Forward the chunk to the client - controller.enqueue(chunk); - - // Process the chunk to accumulate the full response - const text = new TextDecoder().decode(chunk); - const lines = text.split("\n"); - - for (const line of lines) { - if (line.startsWith("data: ")) { - try { - const data = JSON.parse(line.slice(6)) as StreamingChunk; - - if (data.type === "text-delta" && data.textDelta) { - accumulatedContent += data.textDelta; - } else if (data.type === "tutorial-data" && data.tutorialData) { - finalTutorialData = data.tutorialData; - - // Update user's tutorial progress - await TutorialStateManager.updateTutorialProgress( - userId, - finalTutorialData.tutorialId, - finalTutorialData.currentStep, - finalTutorialData.totalSteps - ); - } else if (data.type === "finish") { - // When the stream is finished, save the assistant message - const assistantMessage: Message = { - id: assistantMessageId, - author: "ASSISTANT", - content: accumulatedContent, - timestamp: getCurrentTimestamp(), - tutorialData: finalTutorialData, - }; - - const finalSession = { - ...updatedSession, - messages: [...updatedSession.messages, assistantMessage], - }; - - await setKVValue(sessionKey, finalSession, { - storeName: config.defaultStoreName, - }); - - // Trigger background title generation if missing - // Do not await to avoid delaying the client stream completion - void generateAndPersistTitle(sessionId, sessionKey, finalSession); - - // Send the final session in the finish event - controller.enqueue( - new TextEncoder().encode( - `data: ${JSON.stringify({ - type: "finish", - session: finalSession, - })}\n\n` - ) - ); - } - } catch (error) { - console.error("Error processing stream chunk:", error); - } - } + try { + // Call agent-pulse via service with streaming callbacks + await callAgentPulseStreaming(agentPayload, { + onTextDelta: (text) => { + accumulatedContent += text; + controller.enqueue( + encoder.encode(`data: ${JSON.stringify({ type: 'text-delta', textDelta: text })}\n\n`) + ); + }, + + onStatus: (message, category) => { + controller.enqueue( + encoder.encode( + `data: ${JSON.stringify({ type: 'status', message, category })}\n\n` + ) + ); + }, + + onTutorialData: async (data) => { + finalTutorialData = data; + + // Update user's tutorial progress + await TutorialStateManager.updateTutorialProgress( + userId, + data.tutorialId, + data.currentStep, + data.totalSteps + ); + + controller.enqueue( + encoder.encode( + `data: ${JSON.stringify({ type: 'tutorial-data', tutorialData: data })}\n\n` + ) + ); + }, + + onFinish: async () => { + // Save the assistant message + const assistantMessage: Message = { + id: assistantMessageId, + author: "ASSISTANT", + content: accumulatedContent, + timestamp: getCurrentTimestamp(), + tutorialData: finalTutorialData, + }; + + const finalSession = { + ...updatedSession, + messages: [...updatedSession.messages, assistantMessage], + }; + + await setKVValue(sessionKey, finalSession, { + storeName: config.kvStoreName, + }); + + // Trigger background title generation if missing + // Do not await to avoid delaying the client stream completion + void generateAndPersistTitle(sessionKey, finalSession); + + // Send the final session in the finish event + controller.enqueue( + encoder.encode( + `data: ${JSON.stringify({ + type: "finish", + session: finalSession, + })}\n\n` + ) + ); + + controller.close(); + }, + + onError: (error) => { + console.error('Agent error:', error); + controller.enqueue( + encoder.encode( + `data: ${JSON.stringify({ type: 'error', error })}\n\n` + ) + ); + controller.close(); + }, + }); + } catch (error) { + console.error('Error in agent stream:', error); + controller.enqueue( + encoder.encode( + `data: ${JSON.stringify({ + type: 'error', + error: error instanceof Error ? error.message : 'Unknown error', + })}\n\n` + ) + ); + controller.close(); } }, }); - // Pipe the agent response through our transform stream - const reader = agentResponse.body?.getReader(); - if (!reader) { - throw new Error("No response body from agent"); - } - const writer = transformStream.writable.getWriter(); - (async () => { - try { - while (true) { - const { done, value } = await reader.read(); - if (done) { - break; - } - try { - await writer.write(value); - } catch (writeError) { - console.error('Error writing to transform stream:', writeError); - throw writeError; - } - } - await writer.close(); - } catch (error) { - console.error('Error in stream processing:', error); - writer.abort(error); - } - })(); - - return new NextResponse(transformStream.readable, { + return new NextResponse(stream, { headers: { "Content-Type": "text/event-stream", "Cache-Control": "no-cache", diff --git a/app/api/sessions/[sessionId]/route.ts b/app/api/sessions/[sessionId]/route.ts index a3900650..b69e4cae 100644 --- a/app/api/sessions/[sessionId]/route.ts +++ b/app/api/sessions/[sessionId]/route.ts @@ -21,12 +21,12 @@ export async function GET( const paramsData = await params; const sessionId = paramsData.sessionId; const sessionKey = `${userId}_${sessionId}`; - const response = await getKVValue(sessionKey, { storeName: config.defaultStoreName }); + const response = await getKVValue(sessionKey, { storeName: config.kvStoreName }); - if (!response.success) { + if (!response.exists) { return NextResponse.json( - { error: response.error || 'Session not found' }, - { status: response.statusCode || 404 } + { error: 'Session not found' }, + { status: 404 } ); } @@ -84,36 +84,36 @@ export async function PUT( } // Update the individual session - const response = await setKVValue( + const success = await setKVValue( sessionKey, session, - { storeName: config.defaultStoreName } + { storeName: config.kvStoreName } ); - if (!response.success) { + if (!success) { return NextResponse.json( - { error: response.error || 'Failed to update session' }, - { status: response.statusCode || 500 } + { error: 'Failed to update session' }, + { status: 500 } ); } // Update the master list if needed (ensure the session ID is in the list) - const allSessionsResponse = await getKVValue(userId, { storeName: config.defaultStoreName }); - const sessionIds = allSessionsResponse.success ? allSessionsResponse.data || [] : []; + const allSessionsResponse = await getKVValue(userId, { storeName: config.kvStoreName }); + const sessionIds = allSessionsResponse.exists ? allSessionsResponse.data || [] : []; // If the session ID isn't in the list, add it to the beginning if (!sessionIds.includes(sessionKey)) { const updatedSessionIds = [sessionKey, ...sessionIds]; - const sessionsListResponse = await setKVValue( + const sessionsListSuccess = await setKVValue( userId, updatedSessionIds, - { storeName: config.defaultStoreName } + { storeName: config.kvStoreName } ); - if (!sessionsListResponse.success) { + if (!sessionsListSuccess) { // Log the error but don't fail the request - console.error('Failed to update sessions list:', sessionsListResponse.error); + console.error('Failed to update sessions list'); } } @@ -143,34 +143,34 @@ export async function DELETE( const sessionId = paramsData.sessionId; const sessionKey = `${userId}_${sessionId}`; // Delete the session data - const sessionResponse = await deleteKVValue( + const sessionDeleteSuccess = await deleteKVValue( sessionKey, - { storeName: config.defaultStoreName } + { storeName: config.kvStoreName } ); - if (!sessionResponse.success) { + if (!sessionDeleteSuccess) { return NextResponse.json( - { error: sessionResponse.error || 'Failed to delete session' }, - { status: sessionResponse.statusCode || 500 } + { error: 'Failed to delete session' }, + { status: 500 } ); } // Remove from sessions list - const allSessionsResponse = await getKVValue(userId, { storeName: config.defaultStoreName }); - const sessionIds = allSessionsResponse.success ? allSessionsResponse.data || [] : []; + const allSessionsResponse = await getKVValue(userId, { storeName: config.kvStoreName }); + const sessionIds = allSessionsResponse.exists ? allSessionsResponse.data || [] : []; const updatedSessionIds = sessionIds.filter(id => id !== sessionKey); - const sessionsListResponse = await setKVValue( + const sessionsListSuccess = await setKVValue( userId, updatedSessionIds, - { storeName: config.defaultStoreName } + { storeName: config.kvStoreName } ); - if (!sessionsListResponse.success) { + if (!sessionsListSuccess) { return NextResponse.json( - { error: sessionsListResponse.error || 'Failed to update sessions list' }, - { status: sessionsListResponse.statusCode || 500 } + { error: 'Failed to update sessions list' }, + { status: 500 } ); } @@ -209,8 +209,8 @@ export async function POST( const { message } = validation.data; // Get current session - const sessionResponse = await getKVValue(sessionKey, { storeName: config.defaultStoreName }); - if (!sessionResponse.success || !sessionResponse.data) { + const sessionResponse = await getKVValue(sessionKey, { storeName: config.kvStoreName }); + if (!sessionResponse.exists || !sessionResponse.data) { return NextResponse.json( { error: 'Session not found' }, { status: 404 } @@ -224,36 +224,36 @@ export async function POST( }; // Update the individual session - const updateResponse = await setKVValue( + const updateSuccess = await setKVValue( sessionKey, updatedSession, - { storeName: config.defaultStoreName } + { storeName: config.kvStoreName } ); - if (!updateResponse.success) { + if (!updateSuccess) { return NextResponse.json( - { error: updateResponse.error || 'Failed to update session' }, - { status: updateResponse.statusCode || 500 } + { error: 'Failed to update session' }, + { status: 500 } ); } // Move this session ID to the top of the master list (most recently used) - const allSessionsResponse = await getKVValue(userId, { storeName: config.defaultStoreName }); - const sessionIds = allSessionsResponse.success ? allSessionsResponse.data || [] : []; + const allSessionsResponse = await getKVValue(userId, { storeName: config.kvStoreName }); + const sessionIds = allSessionsResponse.exists ? allSessionsResponse.data || [] : []; // Remove the current session ID if it exists and add it to the beginning const filteredSessionIds = sessionIds.filter(id => id !== sessionKey); const updatedSessionIds = [sessionKey, ...filteredSessionIds]; - const sessionsListResponse = await setKVValue( + const sessionsListSuccess = await setKVValue( userId, updatedSessionIds, - { storeName: config.defaultStoreName } + { storeName: config.kvStoreName } ); - if (!sessionsListResponse.success) { + if (!sessionsListSuccess) { // Log the error but don't fail the request since we already updated the individual session - console.error('Failed to update sessions list:', sessionsListResponse.error); + console.error('Failed to update sessions list'); } return NextResponse.json({ success: true, session: updatedSession }); diff --git a/app/api/sessions/route.ts b/app/api/sessions/route.ts index bd6a97f2..99c0dcb8 100644 --- a/app/api/sessions/route.ts +++ b/app/api/sessions/route.ts @@ -26,17 +26,11 @@ export async function GET(request: NextRequest) { const limit = Number.isFinite(parsedLimit) ? Math.min(Math.max(parsedLimit, 1), MAX_SESSIONS_LIMIT) : DEFAULT_SESSIONS_LIMIT; const cursor = Number.isFinite(parsedCursor) ? Math.max(parsedCursor, 0) : 0; - const response = await getKVValue(userId, { storeName: config.defaultStoreName }); - if (!response.success) { - if (response.statusCode === 404) { - return NextResponse.json({ sessions: [], pagination: { cursor, nextCursor: null, hasMore: false, total: 0, limit } }); - } - return NextResponse.json( - { error: response.error || 'Failed to retrieve sessions' }, - { status: response.statusCode || 500 } - ); + const response = await getKVValue(userId, { storeName: config.kvStoreName }); + if (!response.exists) { + return NextResponse.json({ sessions: [], pagination: { cursor, nextCursor: null, hasMore: false, total: 0, limit } }); } - + if (!response.data?.length) { return NextResponse.json({ sessions: [], pagination: { cursor, nextCursor: null, hasMore: false, total: 0, limit } }); } @@ -48,10 +42,10 @@ export async function GET(request: NextRequest) { const end = Math.min(start + limit, total); const pageIds = sessionIds.slice(start, end); - const sessionPromises = pageIds.map(sessionId => getKVValue(sessionId, { storeName: config.defaultStoreName })); + const sessionPromises = pageIds.map(sessionId => getKVValue(sessionId, { storeName: config.kvStoreName })); const sessionResults = await Promise.all(sessionPromises); const sessions = sessionResults - .filter(result => result.success && result.data) + .filter(result => result.exists && result.data) .map(result => result.data as Session); const hasMore = end < total; @@ -102,36 +96,36 @@ export async function POST(request: NextRequest) { const sessionKey = `${userId}_${session.sessionId}`; // Save the session data - const sessionResponse = await setKVValue( + const sessionSuccess = await setKVValue( sessionKey, session, - { storeName: config.defaultStoreName } + { storeName: config.kvStoreName } ); - if (!sessionResponse.success) { + if (!sessionSuccess) { return NextResponse.json( - { error: sessionResponse.error || 'Failed to create session' }, - { status: sessionResponse.statusCode || 500 } + { error: 'Failed to create session' }, + { status: 500 } ); } // Update the sessions list with just the session ID - const allSessionsResponse = await getKVValue(userId, { storeName: config.defaultStoreName }); - const sessionIds = allSessionsResponse.success ? allSessionsResponse.data || [] : []; + const allSessionsResponse = await getKVValue(userId, { storeName: config.kvStoreName }); + const sessionIds = allSessionsResponse.exists ? allSessionsResponse.data || [] : []; // Add the new session ID to the beginning of the array const updatedSessionIds = [sessionKey, ...sessionIds.filter(id => id !== sessionKey)]; - const sessionsListResponse = await setKVValue( + const sessionsListSuccess = await setKVValue( userId, updatedSessionIds, - { storeName: config.defaultStoreName } + { storeName: config.kvStoreName } ); - if (!sessionsListResponse.success) { + if (!sessionsListSuccess) { return NextResponse.json( - { error: sessionsListResponse.error || 'Failed to update sessions list' }, - { status: sessionsListResponse.statusCode || 500 } + { error: 'Failed to update sessions list' }, + { status: 500 } ); } diff --git a/app/api/users/tutorial-state/route.ts b/app/api/users/tutorial-state/route.ts index 70557fa7..a30e8958 100644 --- a/app/api/users/tutorial-state/route.ts +++ b/app/api/users/tutorial-state/route.ts @@ -94,14 +94,14 @@ export async function DELETE(request: NextRequest) { delete state.tutorials[tutorialId]; // Save the updated state - const kvResponse = await setKVValue(`tutorial_state_${userId}`, state, { - storeName: config.defaultStoreName + const success = await setKVValue(`tutorial_state_${userId}`, state, { + storeName: config.kvStoreName }); - if (!kvResponse.success) { + if (!success) { return NextResponse.json( - { error: kvResponse.error || 'Failed to reset tutorial state' }, - { status: kvResponse.statusCode || 500 } + { error: 'Failed to reset tutorial state' }, + { status: 500 } ); } diff --git a/app/layout.tsx b/app/layout.tsx index 6c55a977..ac6b118c 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -2,19 +2,8 @@ import { RootProvider } from 'fumadocs-ui/provider'; import { GeistSans } from 'geist/font/sans'; import type { Metadata } from 'next'; import type { ReactNode } from 'react'; -import { validateEnv } from '@/lib/env'; import './global.css'; -// Validate environment variables at startup (server-side only) -if (typeof window === 'undefined') { - const isValid = validateEnv(); - if (!isValid) { - console.warn( - 'Environment validation failed during build – this is expected at build time' - ); - } -} - export const metadata: Metadata = { metadataBase: new URL('https://www.agentuity.dev'), title: 'Agentuity Docs', diff --git a/doc-agents/.agents/skills/README.md b/doc-agents/.agents/skills/README.md index 04e6342d..289c5cd8 100644 --- a/doc-agents/.agents/skills/README.md +++ b/doc-agents/.agents/skills/README.md @@ -12,7 +12,7 @@ Learn more at the [Agent Skills Specification](https://agentskills.io/specificat ## Generated From - **CLI Version**: 0.0.105 -- **Generated**: 2026-01-04 +- **Generated**: 2026-01-06 - **Total Skills**: 88 ## Available Skills diff --git a/doc-agents/package.json b/doc-agents/package.json index 00808914..f8b7cdf4 100644 --- a/doc-agents/package.json +++ b/doc-agents/package.json @@ -22,7 +22,8 @@ "gray-matter": "^4.0.3", "langchain": "^0.3.28", "react": "^19.2.0", - "react-dom": "^19.2.0" + "react-dom": "^19.2.0", + "zod": "^4.1.11" }, "devDependencies": { "@agentuity/cli": "latest", diff --git a/doc-agents/src/agent/agent_pulse/agent.ts b/doc-agents/src/agent/agent_pulse/agent.ts new file mode 100644 index 00000000..e6152026 --- /dev/null +++ b/doc-agents/src/agent/agent_pulse/agent.ts @@ -0,0 +1,47 @@ +import { createAgent } from '@agentuity/runtime'; +import { s } from '@agentuity/schema'; + +const agent = createAgent('AgentPulse', { + description: 'Multi-turn tutorial and documentation assistant using LLM with tools for tutorial navigation and documentation search', + schema: { + input: s.object({ + message: s.string().describe('The user message or query'), + conversationHistory: s.optional( + s.array( + s.object({ + author: s.union(s.literal('USER'), s.literal('ASSISTANT')), + content: s.string(), + }) + ) + ).describe('Previous conversation messages for context'), + tutorialData: s.optional( + s.object({ + tutorialId: s.string(), + currentStep: s.number(), + }) + ).describe('Current tutorial state if user is in a tutorial'), + }), + output: s.object({ + message: s.string().describe('The assistant response'), + tutorialAction: s.optional( + s.object({ + type: s.literal('START_TUTORIAL_STEP'), + tutorialId: s.string(), + currentStep: s.number(), + totalSteps: s.number(), + }) + ).describe('Tutorial action if agent initiated a tutorial'), + }), + }, + handler: async (ctx, input) => { + ctx.logger.info('AgentPulse received message: %s', input.message); + + // For now, return a placeholder response + // The streaming and LLM logic will be handled in the API route + return { + message: 'AgentPulse is processing your request...', + }; + }, +}); + +export default agent; diff --git a/doc-agents/src/agent/agent_pulse/context-builder.ts b/doc-agents/src/agent/agent_pulse/context-builder.ts new file mode 100644 index 00000000..c93a9bb1 --- /dev/null +++ b/doc-agents/src/agent/agent_pulse/context-builder.ts @@ -0,0 +1,117 @@ +import { getTutorialList, getTutorialMeta, type Tutorial } from './tutorial'; +import type { TutorialState } from './types'; + +/** + * Builds a context string containing available tutorials for the system prompt + */ +export async function buildContext(ctx: any, tutorialState?: TutorialState): Promise { + try { + const tutorials = await getTutorialList(ctx); + + // Handle API failure early + if (!tutorials.success || !tutorials.data) { + ctx.logger.warn('Failed to load tutorial list'); + return defaultFallbackContext(); + } + + const tutorialContent = JSON.stringify(tutorials.data, null, 2); + const currentTutorialInfo = buildCurrentTutorialInfo(tutorials.data, tutorialState); + + return `===AVAILABLE TUTORIALS==== + +${tutorialContent} + +${currentTutorialInfo} + +Note: You should not expose the details of the tutorial IDs to the user. +`; + } catch (error) { + ctx.logger.error('Error building tutorial context: %s', error); + return defaultFallbackContext(); + } +} + +/** + * Builds current tutorial information string if user is in a tutorial + */ +function buildCurrentTutorialInfo(tutorials: Tutorial[], tutorialState?: TutorialState): string { + if (!tutorialState?.tutorialId) { + return ''; + } + + const currentTutorial = tutorials.find((t) => t.id === tutorialState.tutorialId); + if (!currentTutorial) { + return '\nWarning: User appears to be in an unknown tutorial.'; + } + if (tutorialState.currentStep > currentTutorial.totalSteps) { + return `\nUser has completed the tutorial: ${currentTutorial.title} (${currentTutorial.totalSteps} steps)`; + } + return `\nUser is currently on this tutorial: ${currentTutorial.title} (Step ${tutorialState.currentStep} of ${currentTutorial.totalSteps})`; +} + +/** + * Returns fallback context when tutorial list can't be loaded + */ +function defaultFallbackContext(): string { + return `===AVAILABLE TUTORIALS==== +Unable to load tutorial list currently`; +} + +/** + * Builds the system prompt for the agent + */ +export async function buildSystemPrompt(tutorialContext: string, ctx: any): Promise { + try { + const systemPrompt = `=== ROLE === +You are Pulse, an AI assistant designed to help developers learn and navigate the Agentuity platform through interactive tutorials and clear guidance. Your primary goal is to assist users with understanding and using the Agentuity SDK effectively. When a user's query is vague, unclear, or lacks specific intent, subtly suggest relevant interactive tutorial to guide them toward learning the platform. For clear, specific questions related to the Agentuity SDK or other topics, provide direct, accurate, and concise answers without mentioning tutorials unless relevant. Always maintain a friendly and approachable tone to encourage engagement. + +Your role is to ensure user have a smooth tutorial experience! + +When user is asking to move to the next tutorial, simply increment the step for them. + +=== PERSONALITY === +- Friendly and encouraging with light humour +- Patient with learners at all levels +- Clear and concise in explanations +- Enthusiastic about teaching and problem-solving + +=== Available Tools or Functions === +You have access to various tools you can use -- use when appropriate! +1. Tutorial management + - startTutorialAtStep: Starting the user off at a specific step of a tutorial. +2. General assistance + - askDocsAgentTool: retrieve Agentuity documentation snippets + +=== TOOL-USAGE RULES (must follow) === +- startTutorialById must only be used when user select a tutorial. If the user starts a new tutorial, the step number should be set to one. Valid step is between 1 and totalSteps of the specific tutorial. +- Treat askDocsAgentTool as a search helper; ignore results you judge irrelevant. + +=== RESPONSE STYLE (format guidelines) === +- Begin with a short answer, then elaborate if necessary. +- Add brief comments to complex code; skip obvious lines. +- End with a question when further clarification could help the user. + +=== SAFETY & BOUNDARIES === +- If asked for private data or secrets, refuse. +- If the user requests actions outside your capabilities, apologise and explain. +- Keep every response < 400 words + +Generate a response to the user query accordingly and try to be helpful + +=== CONTEXT === +${tutorialContext} + +=== END OF PROMPT === + +Stream your reasoning steps clearly.`; + + ctx.logger.debug('Built system prompt with tutorial context'); + return systemPrompt; + } catch (error) { + ctx.logger.error( + 'Failed to build system prompt: %s', + error instanceof Error ? error.message : String(error) + ); + throw error; + } +} diff --git a/doc-agents/src/agent/agent_pulse/index.ts b/doc-agents/src/agent/agent_pulse/index.ts new file mode 100644 index 00000000..30547f0d --- /dev/null +++ b/doc-agents/src/agent/agent_pulse/index.ts @@ -0,0 +1 @@ +export { default } from './agent'; diff --git a/doc-agents/src/agent/agent_pulse/tools.ts b/doc-agents/src/agent/agent_pulse/tools.ts new file mode 100644 index 00000000..8a0b9bb4 --- /dev/null +++ b/doc-agents/src/agent/agent_pulse/tools.ts @@ -0,0 +1,78 @@ +import { tool } from 'ai'; +import { z } from 'zod'; +import { getTutorialMeta } from './tutorial'; +import docQAAgent from '@agent/doc_qa'; +import type { Action } from './types'; +import { ActionType } from './types'; + +interface ToolState { + action: Action | null; +} + +/** + * Factory function that creates tools with state management context + */ +export async function createTools(state: ToolState, agentContext: any) { + /** + * Tool for starting a tutorial - adds action to state queue + */ + const startTutorialAtStep = tool({ + description: + 'Start a specific tutorial for the user. You must call this function in order for the user to see the tutorial step content. The tutorial content will be injected to the final response automatically -- you do not have to narrate the tutorial content. The step number should be between 1 and the total number of steps in the tutorial.', + inputSchema: z.object({ + tutorialId: z.string().describe('The exact ID of the tutorial to start'), + stepNumber: z.number().describe('The step number of the tutorial to start (1 to total available steps in the tutorial)'), + }), + execute: async ({ tutorialId, stepNumber }) => { + // Validate tutorial exists before starting + const tutorialResponse = await getTutorialMeta(tutorialId, agentContext); + if (!tutorialResponse.success || !tutorialResponse.data) { + return `Error fetching tutorial information`; + } + + const data = tutorialResponse.data; + const totalSteps = tutorialResponse.data.totalSteps; + if (stepNumber > totalSteps) { + return `This tutorial only has ${totalSteps} steps. You either reached the end of the tutorial or selected an incorrect step number.`; + } + state.action = { + type: ActionType.START_TUTORIAL_STEP, + tutorialId: tutorialId, + currentStep: stepNumber, + totalSteps: tutorialResponse.data.totalSteps, + }; + agentContext.logger.info('Added start_tutorial action to state for: %s at step %d', tutorialId, stepNumber); + return `Starting "${data.title}". Total steps: ${data.totalSteps} \n\n Description: ${data.description}`; + }, + }); + + /** + * Tool that talks to docs agent. + * This tool doesn't use state - it returns data directly + */ + const askDocsAgentTool = tool({ + description: + 'Query the Agentuity Development Documentation agent using RAG (Retrieval Augmented Generation) to get relevant documentation and answers about the Agentuity platform, APIs, and development concepts', + inputSchema: z.object({ + query: z.string().describe('The question or query to send to the query function'), + }), + execute: async ({ query }) => { + agentContext.logger.info('Querying doc-qa agent with: %s', query); + try { + const response = await docQAAgent.run({ + message: query, + }); + return response; + } catch (error) { + agentContext.logger.error('Error calling doc-qa agent: %s', error); + return { answer: 'Failed to retrieve documentation', documents: [] }; + } + }, + }); + + // Return tools object + return { + startTutorialAtStep, + askDocsAgentTool, + }; +} diff --git a/doc-agents/src/agent/agent_pulse/tutorial.ts b/doc-agents/src/agent/agent_pulse/tutorial.ts new file mode 100644 index 00000000..648dc7d9 --- /dev/null +++ b/doc-agents/src/agent/agent_pulse/tutorial.ts @@ -0,0 +1,113 @@ +import type { Tutorial, ApiResponse } from './types'; + +export type { Tutorial, ApiResponse }; + +const TUTORIAL_API_BASE_URL = process.env.TUTORIAL_API_URL; + +export async function getTutorialList(ctx: any): Promise> { + try { + if (!TUTORIAL_API_BASE_URL) { + ctx.logger.warn('TUTORIAL_API_URL not configured'); + return { + success: false, + error: 'Tutorial API URL not configured', + }; + } + + const response = await fetch(`${TUTORIAL_API_BASE_URL}/api/tutorials`); + + if (!response.ok) { + const errorData = (await response.json().catch(() => ({ error: response.statusText }))) as { + error?: string; + details?: any; + }; + ctx.logger.error('Tutorial API error: %s', JSON.stringify(errorData)); + return { + success: false, + status: response.status, + error: errorData.error || response.statusText, + details: errorData.details, + }; + } + + const tutorials = (await response.json()) as Tutorial[]; + ctx.logger.info('Fetched %d tutorials', tutorials.length); + + return { + success: true, + data: tutorials, + }; + } catch (error) { + ctx.logger.error('Error fetching tutorial list: %s', error); + return { + success: false, + error: `Network error: ${error instanceof Error ? error.message : String(error)}`, + }; + } +} + +export async function getTutorialMeta(tutorialId: string, ctx: any): Promise> { + try { + if (!TUTORIAL_API_BASE_URL) { + ctx.logger.warn('TUTORIAL_API_URL not configured'); + return { + success: false, + error: 'Tutorial API URL not configured', + }; + } + + const response = await fetch(`${TUTORIAL_API_BASE_URL}/api/tutorials/${tutorialId}`); + + if (!response.ok) { + const errorData = (await response.json().catch(() => ({ error: response.statusText }))) as { + error?: string; + details?: any; + }; + ctx.logger.error('Failed to fetch tutorial %s: %s', tutorialId, JSON.stringify(errorData)); + return { + success: false, + status: response.status, + error: errorData.error || response.statusText, + details: errorData.details, + }; + } + + const responseData = (await response.json()) as ApiResponse<{ + id: string; + metadata: { + title: string; + description: string; + totalSteps: number; + difficulty?: string; + estimatedTime?: string; + }; + fullContent: string; + steps: Array<{ stepNumber: number; title: string; estimatedTime?: string }>; + }>; + + if (!responseData.success || !responseData.data) { + return { + success: false, + error: responseData.error || 'Invalid response format', + }; + } + + const tutorial: Tutorial = { + id: responseData.data.id, + title: responseData.data.metadata.title, + description: responseData.data.metadata.description, + totalSteps: responseData.data.metadata.totalSteps, + difficulty: responseData.data.metadata.difficulty, + estimatedTime: responseData.data.metadata.estimatedTime, + }; + + ctx.logger.info('Fetched tutorial metadata for %s', tutorialId); + return { success: true, data: tutorial }; + } catch (error) { + ctx.logger.error('Error fetching tutorial metadata for %s: %s', tutorialId, error); + return { + success: false, + error: `Network error: ${error instanceof Error ? error.message : String(error)}`, + }; + } +} diff --git a/doc-agents/src/agent/agent_pulse/types.ts b/doc-agents/src/agent/agent_pulse/types.ts new file mode 100644 index 00000000..b9a5a112 --- /dev/null +++ b/doc-agents/src/agent/agent_pulse/types.ts @@ -0,0 +1,47 @@ +export interface ConversationMessage { + author: 'USER' | 'ASSISTANT'; + content: string; +} + +export interface TutorialState { + tutorialId: string; + currentStep: number; +} + +export interface Tutorial { + id: string; + title: string; + description: string; + totalSteps: number; + difficulty?: string; + estimatedTime?: string; +} + +export interface ApiResponse { + success: boolean; + data?: T; + error?: string; + details?: any; + status?: number; +} + +export enum ActionType { + START_TUTORIAL_STEP = 'start_tutorial_step', +} + +export interface Action { + type: ActionType; + tutorialId: string; + currentStep: number; + totalSteps: number; +} + +export interface StreamingChunk { + type: 'text-delta' | 'status' | 'tutorial-data' | 'finish' | 'error'; + textDelta?: string; + message?: string; + category?: string; + tutorialData?: Action; + error?: string; + details?: string; +} diff --git a/doc-agents/src/api/agent_pulse/route.ts b/doc-agents/src/api/agent_pulse/route.ts new file mode 100644 index 00000000..bdacdb3a --- /dev/null +++ b/doc-agents/src/api/agent_pulse/route.ts @@ -0,0 +1,150 @@ +import { createRouter, sse } from '@agentuity/runtime'; +import { streamText } from 'ai'; +import { openai } from '@ai-sdk/openai'; +import { buildContext, buildSystemPrompt } from '@agent/agent_pulse/context-builder'; +import { createTools } from '@agent/agent_pulse/tools'; +import type { ConversationMessage, StreamingChunk } from '@agent/agent_pulse/types'; + +interface ParsedRequest { + message: string; + conversationHistory: ConversationMessage[]; + tutorialData?: { tutorialId: string; currentStep: number }; +} + +function parseAgentRequest(jsonData: any): ParsedRequest { + let message = ''; + let conversationHistory: ConversationMessage[] = []; + let tutorialData: any = undefined; + + if (jsonData && typeof jsonData === 'object' && !Array.isArray(jsonData)) { + const body = jsonData as any; + message = body.message || ''; + if (Array.isArray(body.conversationHistory)) { + conversationHistory = body.conversationHistory.map((msg: any) => ({ + author: (msg.author || msg.role || 'USER').toUpperCase(), + content: msg.content || '', + })); + } + tutorialData = body.tutorialData || undefined; + } else { + message = String(jsonData || ''); + } + + return { + message, + conversationHistory, + tutorialData, + }; +} + +const router = createRouter(); + +// POST /api/agent-pulse +router.post( + '/', + sse(async (c, stream) => { + const logger = c.var.logger; + + try { + const jsonData = await c.req.json(); + const parsedRequest = parseAgentRequest(jsonData); + + logger.info('AgentPulse received message: %s', parsedRequest.message); + + // Create state for managing actions + const state = { action: null as any }; + + // Build messages for the conversation + const messages: ConversationMessage[] = [...parsedRequest.conversationHistory, { author: 'USER', content: parsedRequest.message }]; + + // Create tools with state context + const tools = await createTools(state, { + logger, + // Provide minimal context for tutorial fetching + } as any); + + // Build tutorial context and system prompt + const tutorialContext = await buildContext( + { + logger, + } as any, + parsedRequest.tutorialData + ); + const systemPrompt = await buildSystemPrompt(tutorialContext, { + logger, + } as any); + + // Generate streaming response + const result = await streamText({ + model: openai('gpt-4.1'), + messages: messages.map((msg) => ({ + role: msg.author === 'USER' ? 'user' : 'assistant', + content: msg.content, + })), + tools, + system: systemPrompt, + }); + + // Stream the response + for await (const chunk of result.fullStream) { + if (chunk.type === 'text-delta') { + const sseChunk: StreamingChunk = { + type: 'text-delta', + textDelta: chunk.text, + }; + stream.writeSSE({ data: JSON.stringify(sseChunk) }); + } else if (chunk.type === 'tool-call') { + const toolName = chunk.toolName || 'tool'; + const userFriendlyMessage = getToolStatusMessage(toolName); + const sseChunk: StreamingChunk = { + type: 'status', + message: userFriendlyMessage, + category: 'tool', + }; + stream.writeSSE({ data: JSON.stringify(sseChunk) }); + logger.debug('Tool called: %s', toolName); + } else if (chunk.type === 'reasoning-delta') { + logger.debug('REASONING: %s', chunk); + } else { + logger.debug('Skipping chunk type: %s', chunk.type); + } + } + + // Send tutorial data if available + if (state.action) { + const tutorialChunk: StreamingChunk = { + type: 'tutorial-data', + tutorialData: state.action, + }; + stream.writeSSE({ data: JSON.stringify(tutorialChunk) }); + } + + // Send finish signal + const finishChunk: StreamingChunk = { + type: 'finish', + }; + stream.writeSSE({ data: JSON.stringify(finishChunk) }); + } catch (error) { + logger.error('Agent request failed: %s', error instanceof Error ? error.message : String(error)); + const errorChunk: StreamingChunk = { + type: 'error', + error: 'Sorry, I encountered an error while processing your request. Please try again.', + details: error instanceof Error ? error.message : String(error), + }; + stream.writeSSE({ data: JSON.stringify(errorChunk) }); + } + }) +); + +function getToolStatusMessage(toolName: string): string { + switch (toolName) { + case 'startTutorialAtStep': + return 'Starting tutorial...'; + case 'askDocsAgentTool': + return 'Searching documentation...'; + default: + return 'Processing your request...'; + } +} + +export default router; diff --git a/doc-agents/src/api/title-generator/route.ts b/doc-agents/src/api/title-generator/route.ts new file mode 100644 index 00000000..0e840cab --- /dev/null +++ b/doc-agents/src/api/title-generator/route.ts @@ -0,0 +1,104 @@ +import { createRouter } from '@agentuity/runtime'; +import { generateText } from 'ai'; +import { openai } from '@ai-sdk/openai'; + +const router = createRouter(); + +interface ConversationMessage { + author: 'USER' | 'ASSISTANT'; + content: string; +} + +function sanitizeTitle(input: string): string { + if (!input) return ''; + let s = input.trim(); + // Strip wrapping quotes/backticks + if ( + (s.startsWith('"') && s.endsWith('"')) || + (s.startsWith("'") && s.endsWith("'")) || + (s.startsWith('`') && s.endsWith('`')) + ) { + s = s.slice(1, -1).trim(); + } + // Remove markdown emphasis + s = s.replace(/\*\*([^*]+)\*\*|\*([^*]+)\*|__([^_]+)__|_([^_]+)_/g, (_m, a, b, c, d) => a || b || c || d || ''); + // Remove emojis (basic unicode emoji ranges) + s = s.replace(/[\u{1F300}-\u{1FAFF}\u{1F900}-\u{1F9FF}\u{2600}-\u{26FF}\u{2700}-\u{27BF}]/gu, ''); + // Collapse whitespace + s = s.replace(/\s+/g, ' ').trim(); + // Sentence case + s = sentenceCase(s); + // Trim trailing punctuation noise + s = s.replace(/[\s\-–—:;,\.]+$/g, '').trim(); + // Enforce 60 chars + if (s.length > 60) s = s.slice(0, 60).trim(); + return s; +} + +function sentenceCase(str: string): string { + if (!str) return ''; + const lower = str.toLowerCase(); + return lower.charAt(0).toUpperCase() + lower.slice(1); +} + +function formatHistory(messages: ConversationMessage[]): string { + return messages + .map( + (m) => + `${m.author}: ${m.content.slice(0, 200)}${m.content.length > 200 ? '...' : ''}` + ) + .join('\n'); +} + +// POST /api/title-generator +router.post('/', async (c) => { + try { + const body = await c.req.json(); + const conversationHistory = body.conversationHistory as ConversationMessage[]; + + if (!conversationHistory || !Array.isArray(conversationHistory)) { + return c.json({ error: 'conversationHistory is required and must be an array' }, 400); + } + + if (conversationHistory.length === 0) { + return c.json({ title: 'New chat' }); + } + + const historyText = formatHistory(conversationHistory); + const prompt = `Generate a very short session title summarizing the conversation topic. + +Requirements: +- sentence case +- no emojis +- <= 60 characters +- no quotes or markdown +- output the title only, no extra text + +Conversation: +${historyText}`; + + const response = await generateText({ + model: openai('gpt-4o-mini'), + prompt, + system: + 'You are a title generator for chat sessions. Generate concise, descriptive titles only. Output only the title text, nothing else.', + }); + + const title = sanitizeTitle(response.text); + + return c.json({ + title: title || 'New chat', + }); + } catch (error) { + c.var.logger.error('Title generation failed: %s', error); + return c.json( + { + error: 'Failed to generate title', + details: error instanceof Error ? error.message : String(error), + }, + 500 + ); + } +}); + +export default router; diff --git a/doc-agents/src/generated/app.ts b/doc-agents/src/generated/app.ts index 7bcb7b0d..189755a8 100644 --- a/doc-agents/src/generated/app.ts +++ b/doc-agents/src/generated/app.ts @@ -206,12 +206,16 @@ if (isDevelopment() && process.env.VITE_PORT) { } // Mount API routes -const { default: router_0 } = await import('../api/doc-qa/route.js'); -app.route('/api/doc-qa', router_0); -const { default: router_1 } = await import('../api/process-docs/index.js'); -app.route('/api/process-docs', router_1); -const { default: router_2 } = await import('../api/process-docs/route.js'); -app.route('/api/process-docs', router_2); +const { default: router_0 } = await import('../api/agent_pulse/route.js'); +app.route('/api/agent_pulse', router_0); +const { default: router_1 } = await import('../api/title-generator/route.js'); +app.route('/api/title-generator', router_1); +const { default: router_2 } = await import('../api/doc-qa/route.js'); +app.route('/api/doc-qa', router_2); +const { default: router_3 } = await import('../api/process-docs/index.js'); +app.route('/api/process-docs', router_3); +const { default: router_4 } = await import('../api/process-docs/route.js'); +app.route('/api/process-docs', router_4); // Mount workbench API routes (/_agentuity/workbench/*) const workbenchRouter = createWorkbenchRouter(); diff --git a/doc-agents/src/generated/registry.ts b/doc-agents/src/generated/registry.ts index 3c37abba..5d96566f 100644 --- a/doc-agents/src/generated/registry.ts +++ b/doc-agents/src/generated/registry.ts @@ -1,5 +1,6 @@ // @generated // Auto-generated by Agentuity - DO NOT EDIT +import agentPulse from '../agent/agent_pulse/agent.js'; import docProcessing from '../agent/doc_processing/agent.js'; import docQA from '../agent/doc_qa/agent.js'; import type { AgentRunner } from '@agentuity/runtime'; @@ -9,6 +10,40 @@ import type { InferInput, InferOutput } from '@agentuity/core'; // Schema Type Exports // ============================================================================ +/** + * Input type for AgentPulse agent + * Multi-turn tutorial and documentation assistant using LLM with tools for tutorial navigation and documentation search + */ +export type AgentPulseInput = InferInput; + +/** + * Output type for AgentPulse agent + * Multi-turn tutorial and documentation assistant using LLM with tools for tutorial navigation and documentation search + */ +export type AgentPulseOutput = InferOutput; + +/** + * Input schema type for AgentPulse agent + * Multi-turn tutorial and documentation assistant using LLM with tools for tutorial navigation and documentation search + */ +export type AgentPulseInputSchema = typeof agentPulse['inputSchema']; + +/** + * Output schema type for AgentPulse agent + * Multi-turn tutorial and documentation assistant using LLM with tools for tutorial navigation and documentation search + */ +export type AgentPulseOutputSchema = typeof agentPulse['outputSchema']; + +/** + * Agent type for AgentPulse + * Multi-turn tutorial and documentation assistant using LLM with tools for tutorial navigation and documentation search + */ +export type AgentPulseAgent = AgentRunner< + AgentPulseInputSchema, + AgentPulseOutputSchema, + typeof agentPulse['stream'] extends true ? true : false +>; + /** * Input type for DocProcessing agent * Documentation Sync Agent - Processes embedded MDX content from GitHub workflows @@ -104,6 +139,12 @@ export type DocQAAgent = AgentRunner< * ``` */ export const AgentDefinitions = { + /** + * AgentPulse + * Multi-turn tutorial and documentation assistant using LLM with tools for tutorial navigation and documentation search + * @type {AgentPulseAgent} + */ + agentPulse, /** * DocProcessing * Documentation Sync Agent - Processes embedded MDX content from GitHub workflows @@ -126,6 +167,7 @@ export const AgentDefinitions = { declare module "@agentuity/runtime" { // Augment the AgentRegistry interface with project-specific strongly-typed agents export interface AgentRegistry { + agentPulse: AgentPulseAgent; docProcessing: DocProcessingAgent; docQA: DocQAAgent; } diff --git a/doc-agents/src/generated/routes.ts b/doc-agents/src/generated/routes.ts index 5e5a2228..237adecd 100644 --- a/doc-agents/src/generated/routes.ts +++ b/doc-agents/src/generated/routes.ts @@ -70,6 +70,11 @@ declare module '@agentuity/react' { * Maps route keys (METHOD /path) to their input/output schemas */ export interface RouteRegistry { + 'POST /api/title_generator': { + inputSchema: never; + outputSchema: never; + stream: false; + }; 'POST /api/doc-qa': { inputSchema: POSTApiDocQaInputSchema; outputSchema: POSTApiDocQaOutputSchema; @@ -102,7 +107,11 @@ declare module '@agentuity/react' { * Maps SSE route paths to their schemas */ export interface SSERouteRegistry { - + '/api/agent_pulse': { + inputSchema: never; + outputSchema: never; + stream: false; + }; } /** @@ -112,6 +121,12 @@ declare module '@agentuity/react' { * Used by createClient() from @agentuity/core for type-safe RPC calls. */ export interface RPCRouteRegistry { + titleGenerator: { + /** + * Route: POST /api/title_generator + */ + post: { input: never; output: never; type: 'api' }; + }; docQa: { /** * Route: POST /api/doc-qa @@ -128,6 +143,12 @@ declare module '@agentuity/react' { */ post: { input: POSTApiProcessDocsInput; output: POSTApiProcessDocsOutput; type: 'api' }; }; + agentPulse: { + /** + * Route: POST /api/agent_pulse + */ + eventstream: { input: never; output: never; type: 'sse' }; + }; } } @@ -137,6 +158,11 @@ declare module '@agentuity/react' { * @internal */ const _rpcRouteMetadata = { + "titleGenerator": { + "post": { + "type": "api" + } + }, "docQa": { "post": { "type": "api" @@ -149,6 +175,11 @@ const _rpcRouteMetadata = { "post": { "type": "api" } + }, + "agentPulse": { + "eventstream": { + "type": "sse" + } } } as const; diff --git a/lib/api/client.ts b/lib/api/client.ts new file mode 100644 index 00000000..23f5f98d --- /dev/null +++ b/lib/api/client.ts @@ -0,0 +1,121 @@ +/** + * Base HTTP client for API communication + * Handles common concerns: auth, errors, timeouts + */ + +import { ApiError, ApiRequestOptions } from './types'; +import { config } from '@/lib/config'; + +const DEFAULT_TIMEOUT = 30000; // 30 seconds + +function buildUrl(baseUrl: string, endpoint: string): string { + const cleanEndpoint = endpoint.startsWith('/') ? endpoint : `/${endpoint}`; + return `${baseUrl}${cleanEndpoint}`; +} + +function buildHeaders( + customHeaders?: Record, + bearerToken?: string +): Record { + const headers: Record = { + 'Content-Type': 'application/json', + ...customHeaders, + }; + + if (bearerToken) { + headers['Authorization'] = `Bearer ${bearerToken}`; + } + + return headers; +} + +/** + * Make a fetch request with common handling + */ +export async function apiRequest( + endpoint: string, + options: ApiRequestOptions = {}, + baseUrl: string = config.agentBaseUrl, + bearerToken?: string +): Promise { + const url = buildUrl(baseUrl, endpoint); + const headers = buildHeaders(options.headers, bearerToken); + const timeout = options.timeout ?? DEFAULT_TIMEOUT; + + // Create abort controller for timeout + const controller = options.signal ? undefined : new AbortController(); + const signal = options.signal || controller?.signal; + + let timeoutId: NodeJS.Timeout | undefined; + + try { + // Set timeout if using our own abort controller + if (controller && timeout > 0) { + timeoutId = setTimeout(() => controller.abort(), timeout); + } + + const fetchOptions: RequestInit = { + method: options.method || 'GET', + headers, + signal, + }; + + if (options.body) { + fetchOptions.body = JSON.stringify(options.body); + } + + const response = await fetch(url, fetchOptions); + + if (!response.ok) { + let errorDetails: unknown; + try { + errorDetails = await response.json(); + } catch { + errorDetails = response.statusText; + } + + throw new ApiError( + `API request failed: ${response.statusText}`, + response.status, + errorDetails + ); + } + + const data = await response.json(); + return data as T; + } catch (error) { + if (error instanceof ApiError) { + throw error; + } + + if (error instanceof Error) { + if (error.name === 'AbortError') { + throw new ApiError(`Request timeout after ${timeout}ms`, 408); + } + throw new ApiError(error.message, 500, error); + } + + throw new ApiError('Unknown error occurred', 500, error); + } finally { + if (timeoutId) { + clearTimeout(timeoutId); + } + } +} + +/** + * Helper methods for common HTTP methods + */ +export const apiClient = { + get: (endpoint: string, options?: ApiRequestOptions) => + apiRequest(endpoint, { ...options, method: 'GET' }), + + post: (endpoint: string, body?: unknown, options?: ApiRequestOptions) => + apiRequest(endpoint, { ...options, method: 'POST', body }), + + put: (endpoint: string, body?: unknown, options?: ApiRequestOptions) => + apiRequest(endpoint, { ...options, method: 'PUT', body }), + + delete: (endpoint: string, options?: ApiRequestOptions) => + apiRequest(endpoint, { ...options, method: 'DELETE' }), +}; diff --git a/lib/api/services/agentPulse.ts b/lib/api/services/agentPulse.ts new file mode 100644 index 00000000..78cd1f63 --- /dev/null +++ b/lib/api/services/agentPulse.ts @@ -0,0 +1,145 @@ +/** + * Agent Pulse Service + * Handles communication with the agent-pulse streaming endpoint + */ + +import { config } from '@/lib/config'; + +interface ConversationMessage { + author: 'USER' | 'ASSISTANT'; + content: string; +} + +interface TutorialState { + tutorialId: string; + currentStep: number; +} + +export interface AgentPulseRequest { + message: string; + conversationHistory?: ConversationMessage[]; + tutorialData?: TutorialState; +} + +export interface StreamingChunk { + type: 'text-delta' | 'status' | 'tutorial-data' | 'finish' | 'error'; + textDelta?: string; + message?: string; + category?: string; + tutorialData?: any; + error?: string; + details?: string; +} + +export interface AgentPulseCallbacks { + onTextDelta?: (text: string) => void; + onStatus?: (message: string, category?: string) => void; + onTutorialData?: (data: any) => void; + onFinish?: () => void; + onError?: (error: string) => void; +} + +const AGENT_PULSE_TIMEOUT = 30000; // 30 seconds + +/** + * Call agent-pulse endpoint with streaming response + * Processes SSE events and calls appropriate callbacks + */ +export async function callAgentPulseStreaming( + payload: AgentPulseRequest, + callbacks: AgentPulseCallbacks +): Promise { + try { + const headers: Record = { + 'Content-Type': 'application/json', + }; + + if (process.env.AGENT_BEARER_TOKEN) { + headers['Authorization'] = `Bearer ${process.env.AGENT_BEARER_TOKEN}`; + } + + const url = `${config.agentBaseUrl}/api/agent_pulse`; + + const controller = new AbortController(); + const timeoutId = setTimeout(() => controller.abort(), AGENT_PULSE_TIMEOUT); + + try { + const response = await fetch(url, { + method: 'POST', + headers, + body: JSON.stringify(payload), + signal: controller.signal, + }); + + if (!response.ok) { + throw new Error(`Agent responded with status: ${response.status}`); + } + + const reader = response.body?.getReader(); + if (!reader) { + throw new Error('No response body from agent'); + } + + const decoder = new TextDecoder(); + let buffer = ''; + + while (true) { + const { done, value } = await reader.read(); + if (done) break; + + buffer += decoder.decode(value, { stream: true }); + + // Process complete lines + const lines = buffer.split('\n'); + buffer = lines.pop() || ''; // Keep the last incomplete line + + for (const line of lines) { + if (line.startsWith('data: ')) { + try { + const chunk = JSON.parse(line.slice(6)) as StreamingChunk; + + if (chunk.type === 'text-delta' && chunk.textDelta) { + callbacks.onTextDelta?.(chunk.textDelta); + } else if (chunk.type === 'status') { + callbacks.onStatus?.(chunk.message || '', chunk.category); + } else if (chunk.type === 'tutorial-data' && chunk.tutorialData) { + callbacks.onTutorialData?.(chunk.tutorialData); + } else if (chunk.type === 'finish') { + callbacks.onFinish?.(); + } else if (chunk.type === 'error') { + callbacks.onError?.(chunk.error || 'Unknown error'); + } + } catch (error) { + console.error('Error parsing SSE chunk:', error); + } + } + } + } + + // Process any remaining data + if (buffer.length > 0 && buffer.startsWith('data: ')) { + try { + const chunk = JSON.parse(buffer.slice(6)) as StreamingChunk; + if (chunk.type === 'text-delta' && chunk.textDelta) { + callbacks.onTextDelta?.(chunk.textDelta); + } else if (chunk.type === 'finish') { + callbacks.onFinish?.(); + } + } catch (error) { + console.error('Error parsing final SSE chunk:', error); + } + } + } finally { + clearTimeout(timeoutId); + } + } catch (error) { + const message = error instanceof Error ? error.message : String(error); + console.error('[agentPulse] call failed:', message); + callbacks.onError?.(message); + } +} + +// Alias for backwards compatibility +export const agentPulseService = { + callStreaming: callAgentPulseStreaming, +}; diff --git a/lib/api/services/agentQa.ts b/lib/api/services/agentQa.ts new file mode 100644 index 00000000..cfe52f05 --- /dev/null +++ b/lib/api/services/agentQa.ts @@ -0,0 +1,45 @@ +/** + * Agent QA Service + * Handles communication with the doc-qa agent + */ + +import { apiRequest } from '../client'; + +interface AgentQaRequest { + message: string; +} + +interface AgentQaResponse { + answer: string; + documents?: string[]; +} + +const AGENT_QA_TIMEOUT = 30000; // 30 seconds + +/** + * Query the doc-qa agent for answers and related documents + */ +export async function queryAgentQa(message: string): Promise { + try { + const response = await apiRequest( + '/api/doc-qa', + { + method: 'POST', + body: { message }, + timeout: AGENT_QA_TIMEOUT, + }, + undefined, // use default baseUrl from config + process.env.AGENT_BEARER_TOKEN + ); + + return response; + } catch (error) { + console.error('[agentQa] call failed:', error); + throw error; + } +} + +// Alias for backwards compatibility if needed +export const agentQaService = { + query: queryAgentQa, +}; diff --git a/lib/api/services/index.ts b/lib/api/services/index.ts new file mode 100644 index 00000000..f188398b --- /dev/null +++ b/lib/api/services/index.ts @@ -0,0 +1,12 @@ +/** + * API Services + * Centralized exports for all API service modules + */ + +export { generateTitle, titleGeneratorService } from './titleGenerator'; + +export { callAgentPulseStreaming, agentPulseService } from './agentPulse'; +export type { AgentPulseRequest, StreamingChunk, AgentPulseCallbacks } from './agentPulse'; + +export { queryAgentQa, agentQaService } from './agentQa'; +export type { AgentQaResponse } from './agentQa'; diff --git a/lib/api/services/titleGenerator.ts b/lib/api/services/titleGenerator.ts new file mode 100644 index 00000000..246aa1d9 --- /dev/null +++ b/lib/api/services/titleGenerator.ts @@ -0,0 +1,44 @@ +/** + * Title Generator Service + * Handles session title generation via the title-generator API + */ + +import { apiRequest } from '../client'; + +interface ConversationMessage { + author: 'USER' | 'ASSISTANT'; + content: string; +} + +interface TitleGeneratorResponse { + title: string; +} + +const TITLE_GEN_TIMEOUT = 3000; // 3 seconds for title generation + +/** + * Generate a title from conversation history + */ +export async function generateTitle(conversationHistory: ConversationMessage[]): Promise { + try { + const response = await apiRequest( + '/api/title-generator', + { + method: 'POST', + body: { conversationHistory }, + timeout: TITLE_GEN_TIMEOUT, + } + ); + + return response.title || 'New chat'; + } catch (error) { + console.error('[title-gen] failed:', error); + // Return default on error - don't break the flow + return 'New chat'; + } +} + +// Alias for backwards compatibility if needed +export const titleGeneratorService = { + generate: generateTitle, +}; diff --git a/lib/api/types.ts b/lib/api/types.ts new file mode 100644 index 00000000..c3bc5833 --- /dev/null +++ b/lib/api/types.ts @@ -0,0 +1,22 @@ +/** + * Shared API types and interfaces + */ + +export interface ApiRequestOptions { + method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH'; + headers?: Record; + body?: unknown; + timeout?: number; + signal?: AbortSignal; +} + +export class ApiError extends Error { + constructor( + message: string, + public status: number = 500, + public details?: unknown + ) { + super(message); + this.name = 'ApiError'; + } +} diff --git a/lib/config.ts b/lib/config.ts index 265a67d7..2380c88a 100644 --- a/lib/config.ts +++ b/lib/config.ts @@ -4,8 +4,7 @@ */ export const config = { - baseUrl: 'https://api.agentuity.com', - defaultStoreName: 'chat-sessions', + kvStoreName: 'docs-sandbox-chat-sessions', // V1 Agent endpoints - use base URL + specific endpoint paths agentBaseUrl: process.env.AGENT_BASE_URL || 'http://127.0.0.1:3500', } as const; diff --git a/lib/env.ts b/lib/env.ts deleted file mode 100644 index 10e94023..00000000 --- a/lib/env.ts +++ /dev/null @@ -1,64 +0,0 @@ -/** - * Environment variable validation and configuration utility - */ -export interface AgentConfig { - url: string; - bearerToken?: string; -} - -import { config } from '@/lib/config'; - -const buildAgentConfig = (endpoint: string): AgentConfig => { - const baseUrl = config.agentBaseUrl; - const bearerToken = process.env.AGENT_BEARER_TOKEN; - - if (!baseUrl) { - throw new Error( - 'Missing required configuration. Set AGENT_BASE_URL or ensure config.agentBaseUrl is defined.' - ); - } - if (!endpoint) { - throw new Error('Missing required agent endpoint'); - } - - return { - url: `${baseUrl}${endpoint}`, - bearerToken: bearerToken || undefined, - }; -}; - -export const getAgentQaConfig = (): AgentConfig => { - return buildAgentConfig('/api/doc-qa'); -}; - -export const getAgentPulseConfig = (): AgentConfig => { - return buildAgentConfig('/api/agent-pulse'); -}; - -/** - * Validates environment variables at startup - */ -export const validateEnv = (): boolean => { - try { - getAgentQaConfig(); - console.log('✓ Agent configuration validated'); - return true; - } catch (error) { - console.error('❌ Agent configuration validation failed:', error); - console.error('💡 Set AGENT_BASE_URL env var for agent communication'); - console.error(' Default: http://127.0.0.1:3500 (for local development)'); - console.error('💡 Optionally set AGENT_BEARER_TOKEN for authentication'); - return false; - } -}; - -/** - * Environment variable types - * Use .env.local for development and .env.production for production - */ -declare global { - interface ProcessEnv { - AGENT_BASE_URL?: string; - AGENT_BEARER_TOKEN?: string; - } -} diff --git a/lib/kv-store.ts b/lib/kv-store.ts index ca6cbdaf..72cc417b 100644 --- a/lib/kv-store.ts +++ b/lib/kv-store.ts @@ -1,8 +1,13 @@ /** - * KV Store utility functions for Agentuity - * Handles communication with the Agentuity KV store API + * KV Store utility functions for Agentuity V1 SDK + * Uses the native KeyValueStorageService from @agentuity/core + * + * IMPORTANT: Only use in server-side code (API routes, server actions) + * Never expose AGENTUITY_SDK_KEY to the browser */ +import { KeyValueStorageService } from '@agentuity/core'; +import { createServerFetchAdapter, getServiceUrls } from '@agentuity/server'; import { config } from './config'; // Types @@ -10,103 +15,72 @@ export interface KVStoreOptions { storeName?: string; } -export interface KVStoreResponse { - success: boolean; +export interface KVGetResult { + exists: boolean; data?: T; - error?: string; - statusCode?: number; } -/** - * Shared validation function for KV store operations - */ -function validateKVRequest(key: string): KVStoreResponse | null { - if (!key) { - return { - success: false, - error: 'Key parameter is required' - }; - } +export interface KVSetOptions extends KVStoreOptions { + ttl?: number; // TTL in seconds, minimum 60 +} - if (!process.env.AGENTUITY_API_KEY) { - return { - success: false, - error: 'AGENTUITY_API_KEY environment variable is required' - }; +export interface KVDeleteResult { + exists: boolean; +} + +// Create logger for SDK +const logger = { + trace: console.log, + debug: console.log, + info: console.log, + warn: console.warn, + error: console.error, + fatal: console.error, + child: () => logger, // Return self for chaining +} as any; + +// Initialize the KV service +function initializeKVService() { + if (!process.env.AGENTUITY_SDK_KEY) { + throw new Error('AGENTUITY_SDK_KEY environment variable is required'); } - return null; + const adapter = createServerFetchAdapter({ + headers: { + Authorization: `Bearer ${process.env.AGENTUITY_SDK_KEY}`, + 'User-Agent': 'Next.js App/1.0', + }, + }, logger); + + const serviceUrls = getServiceUrls(); + console.log('serviceUrls', serviceUrls); + return new KeyValueStorageService(serviceUrls.keyvalue, adapter); } /** * Retrieve a value from the KV store * @param key - The key to retrieve - * @param options - Optional configuration - * @returns Promise> + * @param options - Optional configuration with storeName + * @returns Promise> */ export async function getKVValue( key: string, options: KVStoreOptions = {} -): Promise> { - const { storeName } = options; - const finalStoreName = storeName || config.defaultStoreName; - - // Validate required parameters - const validationError = validateKVRequest(key); - if (validationError) { - return validationError; - } +): Promise> { + const storeName = options.storeName || config.kvStoreName; try { - const url = `${config.baseUrl}/sdk/kv/${encodeURIComponent(finalStoreName)}/${encodeURIComponent(key)}`; - const response = await fetch(url, { - method: 'GET', - headers: { - 'Authorization': `Bearer ${process.env.AGENTUITY_API_KEY}`, - 'Content-Type': 'application/json', - 'User-Agent': 'Next.js KV Client' - } - }); - - if (response.status === 404) { - return { - success: false, - error: `Key '${key}' not found in store '${finalStoreName}'`, - statusCode: 404 - }; - } - - if (!response.ok) { - const errorText = await response.text(); - return { - success: false, - error: `HTTP ${response.status}: ${errorText}`, - statusCode: response.status - }; - } - - const data = await response.text(); - - try { - const jsonData = JSON.parse(data) as T; - return { - success: true, - data: jsonData, - statusCode: response.status - }; - } catch (parseError) { - // Return raw data if JSON parsing fails - return { - success: true, - data: data as T, - statusCode: response.status - }; - } + const kv = initializeKVService(); + const result = await kv.get(storeName, key); + return { + exists: result.exists, + data: result.data as T + }; } catch (error) { + console.error(`Failed to get KV value for key '${key}':`, error); return { - success: false, - error: error instanceof Error ? error.message : 'Unknown error occurred' + exists: false }; } } @@ -115,174 +89,51 @@ export async function getKVValue( * Set a value in the KV store * @param key - The key to set * @param value - The value to store - * @param options - Optional configuration including TTL - * @returns Promise + * @param options - Optional configuration with storeName and TTL (in seconds, min 60) + * @returns Promise */ export async function setKVValue( key: string, value: any, - options: KVStoreOptions & { ttl?: number } = {} -): Promise { - const { storeName, ttl } = options; - const finalStoreName = storeName || config.defaultStoreName; - - // Validate required parameters - const validationError = validateKVRequest(key); - if (validationError) { - return validationError; + options: KVSetOptions = {} +): Promise { + const storeName = options.storeName || config.kvStoreName; + const ttl = options.ttl; + + // Validate TTL if provided + if (ttl !== undefined && ttl < 60) { + throw new Error('TTL must be at least 60 seconds'); } try { - const ttlStr = ttl ? `/${ttl}` : ''; - const url = `${config.baseUrl}/sdk/kv/${encodeURIComponent(finalStoreName)}/${encodeURIComponent(key)}${ttlStr}`; - - const response = await fetch(url, { - method: 'PUT', - headers: { - 'Authorization': `Bearer ${process.env.AGENTUITY_API_KEY}`, - 'Content-Type': 'application/json', - 'User-Agent': 'Next.js KV Client' - }, - body: JSON.stringify(value) - }); - - if (!response.ok) { - const errorText = await response.text(); - return { - success: false, - error: `HTTP ${response.status}: ${errorText}`, - statusCode: response.status - }; - } - - return { - success: true, - statusCode: response.status - }; - + const kv = initializeKVService(); + const setOptions = ttl ? { ttl } : undefined; + await kv.set(storeName, key, value, setOptions); + return true; } catch (error) { - return { - success: false, - error: error instanceof Error ? error.message : 'Unknown error occurred' - }; + console.error(`Failed to set KV value for key '${key}':`, error); + return false; } } /** * Delete a value from the KV store * @param key - The key to delete - * @param options - Optional configuration - * @returns Promise + * @param options - Optional configuration with storeName + * @returns Promise */ export async function deleteKVValue( key: string, options: KVStoreOptions = {} -): Promise { - const { storeName } = options; - const finalStoreName = storeName || config.defaultStoreName; - - // Validate required parameters - const validationError = validateKVRequest(key); - if (validationError) { - return validationError; - } - - try { - const url = `${config.baseUrl}/sdk/kv/${encodeURIComponent(finalStoreName)}/${encodeURIComponent(key)}`; - - const response = await fetch(url, { - method: 'DELETE', - headers: { - 'Authorization': `Bearer ${process.env.AGENTUITY_API_KEY}`, - 'User-Agent': 'Next.js KV Client' - } - }); - - if (!response.ok) { - const errorText = await response.text(); - return { - success: false, - error: `HTTP ${response.status}: ${errorText}`, - statusCode: response.status - }; - } - - return { - success: true, - statusCode: response.status - }; - - } catch (error) { - return { - success: false, - error: error instanceof Error ? error.message : 'Unknown error occurred' - }; - } -} - -/** - * Search for keys in the KV store by keyword pattern - * @param keyword - The keyword pattern to search for - * @param options - Optional configuration - * @returns Promise>> - */ -export async function searchKVByKeyword( - keyword: string, - options: KVStoreOptions = {} -): Promise>> { - const { storeName } = options; - const finalStoreName = storeName || config.defaultStoreName; - - // Validate API key - if (!process.env.AGENTUITY_API_KEY) { - return { - success: false, - error: 'AGENTUITY_API_KEY environment variable is required' - }; - } +): Promise { + const storeName = options.storeName || config.kvStoreName; try { - const url = `${config.baseUrl}/sdk/kv/search/${encodeURIComponent(finalStoreName)}/${encodeURIComponent(keyword)}`; - - const response = await fetch(url, { - method: 'GET', - headers: { - 'Authorization': `Bearer ${process.env.AGENTUITY_API_KEY}`, - 'Content-Type': 'application/json', - 'User-Agent': 'Next.js KV Client' - } - }); - - if (!response.ok) { - const errorText = await response.text(); - return { - success: false, - error: `HTTP ${response.status}: ${errorText}`, - statusCode: response.status - }; - } - - const data = await response.text(); - - try { - const jsonData = JSON.parse(data); - return { - success: true, - data: jsonData, - statusCode: response.status - }; - } catch (parseError) { - return { - success: false, - error: 'Failed to parse search results as JSON', - statusCode: response.status - }; - } - + const kv = initializeKVService(); + await kv.delete(storeName, key); + return true; } catch (error) { - return { - success: false, - error: error instanceof Error ? error.message : 'Unknown error occurred' - }; + console.error(`Failed to delete KV value for key '${key}':`, error); + return false; } } \ No newline at end of file diff --git a/lib/tutorial/state-manager.ts b/lib/tutorial/state-manager.ts index 0cf04401..3badd518 100644 --- a/lib/tutorial/state-manager.ts +++ b/lib/tutorial/state-manager.ts @@ -1,121 +1,138 @@ import { getKVValue, setKVValue } from "@/lib/kv-store"; -import { config } from '../config'; +import { config } from "../config"; import type { UserTutorialState, TutorialProgress, TutorialState } from './types'; -export class TutorialStateManager { - private static getTutorialKey(userId: string): string { - return `tutorial_state_${userId}`; - } +function getTutorialKey(userId: string): string { + return `tutorial_state_${userId}`; +} - /** - * Get the complete tutorial state for a user - */ - static async getUserTutorialState(userId: string): Promise { - const key = this.getTutorialKey(userId); - const response = await getKVValue(key, { - storeName: config.defaultStoreName - }); - - return response.success && response.data ? response.data : { - userId, - tutorials: {} - }; - } +/** + * Get the complete tutorial state for a user + */ +async function getUserTutorialState(userId: string): Promise { + const key = getTutorialKey(userId); + const response = await getKVValue(key, { + storeName: config.kvStoreName + }); + + return response.exists && response.data ? response.data : { + userId, + tutorials: {} + }; +} - /** - * Update tutorial progress for a user - */ - static async updateTutorialProgress( - userId: string, - tutorialId: string, - currentStep: number, - totalSteps: number - ): Promise { - const state = await this.getUserTutorialState(userId); - - const existing = state.tutorials[tutorialId]; - const now = new Date().toISOString(); - - state.tutorials[tutorialId] = { - tutorialId, - currentStep, - totalSteps, - startedAt: existing?.startedAt || now, - lastAccessedAt: now, - ...(currentStep >= totalSteps ? { completedAt: now } : {}) - }; - - const key = this.getTutorialKey(userId); - try { - await setKVValue(key, state, { storeName: config.defaultStoreName }); - } catch (error) { - console.error( - `Failed to update tutorial state. UserId: ${userId}, Error details:`, - error instanceof Error ? error.message : String(error) - ); - } +/** + * Update tutorial progress for a user + */ +async function updateTutorialProgress( + userId: string, + tutorialId: string, + currentStep: number, + totalSteps: number +): Promise { + const state = await getUserTutorialState(userId); + + const existing = state.tutorials[tutorialId]; + const now = new Date().toISOString(); + + state.tutorials[tutorialId] = { + tutorialId, + currentStep, + totalSteps, + startedAt: existing?.startedAt || now, + lastAccessedAt: now, + ...(currentStep >= totalSteps ? { completedAt: now } : {}) + }; + + const key = getTutorialKey(userId); + const success = await setKVValue(key, state, { storeName: config.kvStoreName }); + + if (!success) { + console.error(`Failed to update tutorial state. UserId: ${userId}`); } +} - /** - * Get the current active tutorial state for agent communication - * Returns the most recently accessed tutorial - */ - static async getCurrentTutorialState(userId: string): Promise { - const state = await this.getUserTutorialState(userId); +/** + * Get the current active tutorial state for agent communication + * Returns the most recently accessed tutorial + */ +async function getCurrentTutorialState(userId: string): Promise { + const state = await getUserTutorialState(userId); - const tutorials = Object.values(state.tutorials); - if (tutorials.length === 0) return null; + const tutorials = Object.values(state.tutorials); + if (tutorials.length === 0) return null; - // Find the most recently accessed tutorial that's not completed - const activeTutorials = tutorials.filter(t => !t.completedAt); - if (activeTutorials.length === 0) return null; + // Find the most recently accessed tutorial that's not completed + const activeTutorials = tutorials.filter(t => !t.completedAt); + if (activeTutorials.length === 0) return null; - const mostRecent = activeTutorials.reduce((latest, current) => - new Date(current.lastAccessedAt) > new Date(latest.lastAccessedAt) ? current : latest - ); + const mostRecent = activeTutorials.reduce((latest, current) => + new Date(current.lastAccessedAt) > new Date(latest.lastAccessedAt) ? current : latest + ); - return { - tutorialId: mostRecent.tutorialId, - currentStep: mostRecent.currentStep - }; - } + return { + tutorialId: mostRecent.tutorialId, + currentStep: mostRecent.currentStep + }; +} - /** - * Get tutorial progress for a specific tutorial - */ - static async getTutorialProgress(userId: string, tutorialId: string): Promise { - const state = await this.getUserTutorialState(userId); - return state.tutorials[tutorialId] || null; - } +/** + * Get tutorial progress for a specific tutorial + */ +async function getTutorialProgress(userId: string, tutorialId: string): Promise { + const state = await getUserTutorialState(userId); + return state.tutorials[tutorialId] || null; +} - /** - * Mark a tutorial as completed - */ - static async completeTutorial(userId: string, tutorialId: string): Promise { - const state = await this.getUserTutorialState(userId); +/** + * Mark a tutorial as completed + */ +async function completeTutorial(userId: string, tutorialId: string): Promise { + const state = await getUserTutorialState(userId); - if (state.tutorials[tutorialId]) { - state.tutorials[tutorialId].completedAt = new Date().toISOString(); - state.tutorials[tutorialId].lastAccessedAt = new Date().toISOString(); + if (state.tutorials[tutorialId]) { + state.tutorials[tutorialId].completedAt = new Date().toISOString(); + state.tutorials[tutorialId].lastAccessedAt = new Date().toISOString(); - const key = this.getTutorialKey(userId); - await setKVValue(key, state, { storeName: config.defaultStoreName }); - } + const key = getTutorialKey(userId); + await setKVValue(key, state, { storeName: config.kvStoreName }); } +} - /** - * Get all completed tutorials for a user - */ - static async getCompletedTutorials(userId: string): Promise { - const state = await this.getUserTutorialState(userId); - return Object.values(state.tutorials).filter(t => t.completedAt); - } +/** + * Get all completed tutorials for a user + */ +async function getCompletedTutorials(userId: string): Promise { + const state = await getUserTutorialState(userId); + return Object.values(state.tutorials).filter(t => t.completedAt); +} - /** - * Get all active (in-progress) tutorials for a user - */ - static async getActiveTutorials(userId: string): Promise { - const state = await this.getUserTutorialState(userId); - return Object.values(state.tutorials).filter(t => !t.completedAt); - } +/** + * Get all active (in-progress) tutorials for a user + */ +async function getActiveTutorials(userId: string): Promise { + const state = await getUserTutorialState(userId); + return Object.values(state.tutorials).filter(t => !t.completedAt); } + +// Backward compatibility alias (following pattern in other services) +export const TutorialStateManager = { + getUserTutorialState, + updateTutorialProgress, + getCurrentTutorialState, + getTutorialProgress, + completeTutorial, + getCompletedTutorials, + getActiveTutorials, +}; + +// Export functions for direct import if needed +export { + getUserTutorialState, + updateTutorialProgress, + getCurrentTutorialState, + getTutorialProgress, + completeTutorial, + getCompletedTutorials, + getActiveTutorials, +}; diff --git a/package.json b/package.json index eff5a819..141d6498 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,12 @@ "validate-env": "node -e \"require('./lib/env').validateEnv()\"" }, "dependencies": { + "@agentuity/auth": "^0.0.111", + "@agentuity/core": "^0.0.111", + "@agentuity/react": "^0.0.111", + "@agentuity/server": "^0.0.111", + "@clerk/backend": "^2.29.0", + "@clerk/clerk-react": "^5.59.2", "@radix-ui/react-dialog": "^1.1.14", "@radix-ui/react-visually-hidden": "^1.2.3", "allotment": "^1.20.4", From c0f3084f1229bd087ef8af3c3bd99027fbf3bd3c Mon Sep 17 00:00:00 2001 From: afterrburn Date: Thu, 8 Jan 2026 07:00:16 -0700 Subject: [PATCH 11/12] Update environment variables and enhance KV service initialization - Added new environment variables: AGENT_BEARER_TOKEN and AGENTUITY_REGION to .env.example for improved configuration. - Updated KV service initialization to require AGENTUITY_REGION alongside AGENTUITY_SDK_KEY for better error handling. - Refactored logger implementation to utilize createLogger from the agentuity server package for improved logging capabilities. --- .env.example | 4 +++- lib/kv-store.ts | 22 ++++++---------------- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/.env.example b/.env.example index 6ed09629..86f55baf 100644 --- a/.env.example +++ b/.env.example @@ -2,4 +2,6 @@ AGENT_BASE_URL=http://127.0.0.1:3500 # KV-store is hitting Agentuity Service API, this can be found in `agent-docs` after running `agentuity dev` -AGENTUITY_API_KEY= \ No newline at end of file +AGENTUITY_SDK_KEY= +AGENT_BEARER_TOKEN= +AGENTUITY_REGION=use \ No newline at end of file diff --git a/lib/kv-store.ts b/lib/kv-store.ts index 72cc417b..13ad8d51 100644 --- a/lib/kv-store.ts +++ b/lib/kv-store.ts @@ -7,7 +7,7 @@ */ import { KeyValueStorageService } from '@agentuity/core'; -import { createServerFetchAdapter, getServiceUrls } from '@agentuity/server'; +import { createServerFetchAdapter, getServiceUrls, createLogger } from '@agentuity/server'; import { config } from './config'; // Types @@ -29,31 +29,21 @@ export interface KVDeleteResult { } // Create logger for SDK -const logger = { - trace: console.log, - debug: console.log, - info: console.log, - warn: console.warn, - error: console.error, - fatal: console.error, - child: () => logger, // Return self for chaining -} as any; +const logger = createLogger('info'); // Initialize the KV service function initializeKVService() { - if (!process.env.AGENTUITY_SDK_KEY) { - throw new Error('AGENTUITY_SDK_KEY environment variable is required'); + if (!process.env.AGENTUITY_SDK_KEY || !process.env.AGENTUITY_REGION) { + throw new Error('AGENTUITY_SDK_KEY and AGENTUITY_REGION environment variables are required'); } const adapter = createServerFetchAdapter({ headers: { - Authorization: `Bearer ${process.env.AGENTUITY_SDK_KEY}`, - 'User-Agent': 'Next.js App/1.0', + Authorization: `Bearer ${process.env.AGENTUITY_SDK_KEY}` }, }, logger); - const serviceUrls = getServiceUrls(); - console.log('serviceUrls', serviceUrls); + const serviceUrls = getServiceUrls(process.env.AGENTUITY_REGION); return new KeyValueStorageService(serviceUrls.keyvalue, adapter); } From 3590756961d25362acfa742a8d5b99187f1efade Mon Sep 17 00:00:00 2001 From: afterrburn Date: Sun, 11 Jan 2026 16:40:22 -0700 Subject: [PATCH 12/12] Enhance agent pulse functionality and improve tutorial state management - Updated the agent pulse API to streamline message handling and response streaming. - Introduced a new state manager to handle tutorial actions and fetch complete tutorial step data. - Refactored the streaming processor to format AI responses as SSE-compatible chunks. - Improved error handling and logging throughout the agent pulse services. - Added tutorial data handling to provide users with relevant content during interactions. --- .../sessions/[sessionId]/messages/route.ts | 11 +- doc-agents/src/agent/agent_pulse/agent.ts | 69 ++++++-- .../src/agent/agent_pulse/context-builder.ts | 1 + .../src/agent/agent_pulse/state-manager.ts | 61 +++++++ .../agent/agent_pulse/streaming-processor.ts | 134 ++++++++++++++++ doc-agents/src/agent/agent_pulse/tutorial.ts | 77 +++++++++ doc-agents/src/agent/agent_pulse/types.ts | 17 +- doc-agents/src/api/agent_pulse/route.ts | 151 ++++++------------ lib/api/services/agentPulse.ts | 11 +- lib/api/services/index.ts | 3 +- 10 files changed, 402 insertions(+), 133 deletions(-) create mode 100644 doc-agents/src/agent/agent_pulse/state-manager.ts create mode 100644 doc-agents/src/agent/agent_pulse/streaming-processor.ts diff --git a/app/api/sessions/[sessionId]/messages/route.ts b/app/api/sessions/[sessionId]/messages/route.ts index b93bb75b..e303c063 100644 --- a/app/api/sessions/[sessionId]/messages/route.ts +++ b/app/api/sessions/[sessionId]/messages/route.ts @@ -132,10 +132,13 @@ export async function POST( const agentPayload = { message: message.content, - conversationHistory: updatedSession.messages.slice( - -DEFAULT_CONVERSATION_HISTORY_LIMIT - ), - tutorialData: currentTutorialState, + conversationHistory: updatedSession.messages + .slice(-DEFAULT_CONVERSATION_HISTORY_LIMIT) + .map(msg => ({ + author: msg.author, + content: msg.content, + })), + tutorialData: currentTutorialState ?? undefined, }; // Create a readable stream to send SSE events to the client diff --git a/doc-agents/src/agent/agent_pulse/agent.ts b/doc-agents/src/agent/agent_pulse/agent.ts index e6152026..c52d847c 100644 --- a/doc-agents/src/agent/agent_pulse/agent.ts +++ b/doc-agents/src/agent/agent_pulse/agent.ts @@ -1,5 +1,11 @@ import { createAgent } from '@agentuity/runtime'; import { s } from '@agentuity/schema'; +import { streamText, stepCountIs } from 'ai'; +import { openai } from '@ai-sdk/openai'; +import { buildContext, buildSystemPrompt } from './context-builder'; +import { createTools } from './tools'; +import { createStreamingProcessor } from './streaming-processor'; +import type { ConversationMessage, Action } from './types'; const agent = createAgent('AgentPulse', { description: 'Multi-turn tutorial and documentation assistant using LLM with tools for tutorial navigation and documentation search', @@ -21,26 +27,55 @@ const agent = createAgent('AgentPulse', { }) ).describe('Current tutorial state if user is in a tutorial'), }), - output: s.object({ - message: s.string().describe('The assistant response'), - tutorialAction: s.optional( - s.object({ - type: s.literal('START_TUTORIAL_STEP'), - tutorialId: s.string(), - currentStep: s.number(), - totalSteps: s.number(), - }) - ).describe('Tutorial action if agent initiated a tutorial'), - }), + output: s.any(), }, handler: async (ctx, input) => { - ctx.logger.info('AgentPulse received message: %s', input.message); + const { message, conversationHistory = [], tutorialData } = input; + + ctx.logger.info('AgentPulse received message: %s', message); + + // Create state for managing actions + const state: { action: Action | null } = { action: null }; + + // Build messages for the conversation + const messages: ConversationMessage[] = [ + ...conversationHistory, + { author: 'USER', content: message }, + ]; + + // Create tools with state context + const tools = await createTools(state, ctx); + + // Build tutorial context and system prompt + const tutorialContext = await buildContext(ctx, tutorialData); + const systemPrompt = await buildSystemPrompt(tutorialContext, ctx); + + // Generate streaming response using AI SDK + // Returns StreamTextResult which contains fullStream for processing + const result = streamText({ + model: openai('gpt-4.1'), + messages: messages.map((msg) => ({ + role: msg.author === 'USER' ? 'user' : 'assistant', + content: msg.content, + })), + tools, + system: systemPrompt, + stopWhen: stepCountIs(5), // Replaces deprecated maxSteps + onStepFinish: async ({ text, toolCalls, toolResults, finishReason, usage }) => { + ctx.logger.info('Step finished - reason: %s, toolCalls: %d, toolResults: %d, text: %s', + finishReason, toolCalls?.length || 0, toolResults?.length || 0, text || '(no text)'); + }, + onFinish: async ({ finishReason, usage, text, steps }) => { + ctx.logger.info('=== FINAL COMPLETION ==='); + ctx.logger.info('Finish reason: %s, Total steps: %d', finishReason, steps?.length || 0); + ctx.logger.info('Final text length: %d', text?.length || 0); + ctx.logger.info('Final text: %s', text || '(no text generated)'); + }, + }); - // For now, return a placeholder response - // The streaming and LLM logic will be handled in the API route - return { - message: 'AgentPulse is processing your request...', - }; + // Create and return streaming response (ReadableStream) + // createStreamingProcessor expects StreamTextResult and returns ReadableStream + return createStreamingProcessor(result, state, ctx.logger); }, }); diff --git a/doc-agents/src/agent/agent_pulse/context-builder.ts b/doc-agents/src/agent/agent_pulse/context-builder.ts index c93a9bb1..65dfe88c 100644 --- a/doc-agents/src/agent/agent_pulse/context-builder.ts +++ b/doc-agents/src/agent/agent_pulse/context-builder.ts @@ -85,6 +85,7 @@ You have access to various tools you can use -- use when appropriate! === TOOL-USAGE RULES (must follow) === - startTutorialById must only be used when user select a tutorial. If the user starts a new tutorial, the step number should be set to one. Valid step is between 1 and totalSteps of the specific tutorial. - Treat askDocsAgentTool as a search helper; ignore results you judge irrelevant. +- CRITICAL: After calling any tool, you MUST provide a text response to the user based on the tool results. Never end your response with just a tool call. === RESPONSE STYLE (format guidelines) === - Begin with a short answer, then elaborate if necessary. diff --git a/doc-agents/src/agent/agent_pulse/state-manager.ts b/doc-agents/src/agent/agent_pulse/state-manager.ts new file mode 100644 index 00000000..12786b0d --- /dev/null +++ b/doc-agents/src/agent/agent_pulse/state-manager.ts @@ -0,0 +1,61 @@ +import { ActionType, type Action, type TutorialData } from './types'; +import { getTutorialStep } from './tutorial'; + +/** + * Handles tutorial state and fetches complete tutorial step data + * This transforms the action (which only has IDs) into complete TutorialData with content + */ +export async function handleTutorialState( + state: { action: Action | null }, + ctx: any +): Promise { + try { + if (!state.action) { + return null; + } + + const action = state.action; + ctx.logger.info('Processing tutorial action: %s', JSON.stringify(action, null, 2)); + + switch (action.type) { + case ActionType.START_TUTORIAL_STEP: + if (action.tutorialId) { + // Fetch the complete tutorial step content + const tutorialStep = await getTutorialStep(action.tutorialId, action.currentStep, ctx); + + if (tutorialStep.success && tutorialStep.data) { + const tutorialData: TutorialData = { + tutorialId: action.tutorialId, + totalSteps: action.totalSteps, + currentStep: action.currentStep, + tutorialStep: { + title: tutorialStep.data.tutorialStep.title, + mdx: tutorialStep.data.tutorialStep.mdx, + snippets: tutorialStep.data.tutorialStep.snippets, + totalSteps: tutorialStep.data.tutorialStep.totalSteps, + }, + }; + ctx.logger.info('Tutorial state processed successfully'); + return tutorialData; + } else { + // Handle API errors gracefully + ctx.logger.error('Failed to fetch tutorial step: %s', tutorialStep.error || 'Unknown error'); + if (tutorialStep.details) { + ctx.logger.error('Error details: %s', JSON.stringify(tutorialStep.details)); + } + } + } + break; + default: + ctx.logger.warn('Unknown action type: %s', action.type); + } + + return null; + } catch (error) { + ctx.logger.error( + 'Failed to handle tutorial state: %s', + error instanceof Error ? error.message : String(error) + ); + throw error; + } +} diff --git a/doc-agents/src/agent/agent_pulse/streaming-processor.ts b/doc-agents/src/agent/agent_pulse/streaming-processor.ts new file mode 100644 index 00000000..076d6fbc --- /dev/null +++ b/doc-agents/src/agent/agent_pulse/streaming-processor.ts @@ -0,0 +1,134 @@ +import type { StreamTextResult, Tool } from 'ai'; +import type { StreamingChunk, Action } from './types'; +import { handleTutorialState } from './state-manager'; + +/** + * Creates a ReadableStream that processes AI streaming responses + * and formats them as SSE-compatible chunks + */ +export function createStreamingProcessor( + result: StreamTextResult<>, + state: { action: Action | null }, + logger: any +): ReadableStream { + return new ReadableStream({ + async start(controller) { + const encoder = new TextEncoder(); + + try { + let stepCount = 0; + // Stream AI response chunks + for await (const chunk of result.fullStream) { + // Track steps for debugging + if (chunk.type === 'start-step') { + stepCount++; + logger.info('=== STARTING STEP %d ===', stepCount); + } + + // Handle text deltas - the AI SDK provides text in the 'textDelta' field + if (chunk.type === 'text-delta') { + // NOTE: AI SDK types say 'textDelta' but runtime provides 'text' + const textContent = chunk.textDelta || (chunk as any).text; + + if (textContent) { + const sseChunk: StreamingChunk = { + type: 'text-delta', + textDelta: textContent, + }; + sendChunk(controller, encoder, sseChunk); + } + } else if (chunk.type === 'tool-call') { + const toolName = chunk.toolName || 'tool'; + const userFriendlyMessage = getToolStatusMessage(toolName); + const sseChunk: StreamingChunk = { + type: 'status', + message: userFriendlyMessage, + category: 'tool', + }; + sendChunk(controller, encoder, sseChunk); + logger.info('Tool called: %s', toolName); + } else if (chunk.type === 'reasoning-delta') { + logger.info('REASONING: %s', chunk.reasoningDelta); + } else if (chunk.type === 'tool-result') { + logger.info('Tool result received for: %s', chunk.toolName); + } else if (chunk.type === 'finish-step') { + logger.info('=== FINISHED STEP %d with reason: %s ===', stepCount, chunk.finishReason); + } else if (chunk.type === 'finish') { + logger.info('=== STREAM COMPLETE: finishReason=%s, totalSteps=%d ===', chunk.finishReason, stepCount); + } else if ( + chunk.type === 'start' || + chunk.type === 'start-step' || + chunk.type === 'tool-input-start' || + chunk.type === 'tool-input-delta' || + chunk.type === 'tool-input-end' + ) { + // These are internal AI SDK chunks - we don't need to send them to the client + logger.info('Internal chunk type: %s', chunk.type); + } else { + logger.info('Unhandled chunk type: %s', chunk.type); + } + } + + logger.info('=== EXITED STREAM LOOP - Total steps processed: %d ===', stepCount); + + // Process tutorial state and fetch complete tutorial data if available + const finalTutorialData = await handleTutorialState(state, logger); + + // Send tutorial data if available + if (finalTutorialData) { + const tutorialChunk: StreamingChunk = { + type: 'tutorial-data', + tutorialData: finalTutorialData, + }; + sendChunk(controller, encoder, tutorialChunk); + logger.info('Sent tutorial data chunk with step content'); + } + + // Send finish signal + const finishChunk: StreamingChunk = { + type: 'finish', + }; + sendChunk(controller, encoder, finishChunk); + + controller.close(); + } catch (error) { + logger.error( + 'Error in streaming response: %s', + error instanceof Error ? error.message : String(error) + ); + const errorChunk: StreamingChunk = { + type: 'error', + error: 'Sorry, I encountered an error while processing your request. Please try again.', + details: error instanceof Error ? error.message : String(error), + }; + sendChunk(controller, encoder, errorChunk); + controller.close(); + } + }, + }); +} + +/** + * Encodes and sends a chunk in SSE format + */ +function sendChunk( + controller: ReadableStreamDefaultController, + encoder: TextEncoder, + chunk: StreamingChunk +): void { + controller.enqueue(encoder.encode(`data: ${JSON.stringify(chunk)}\n\n`)); +} + +/** + * Maps tool names to user-friendly status messages + */ +function getToolStatusMessage(toolName: string): string { + switch (toolName) { + case 'startTutorialAtStep': + return 'Starting tutorial...'; + case 'askDocsAgentTool': + return 'Searching documentation...'; + default: + return 'Processing your request...'; + } +} diff --git a/doc-agents/src/agent/agent_pulse/tutorial.ts b/doc-agents/src/agent/agent_pulse/tutorial.ts index 648dc7d9..195a7775 100644 --- a/doc-agents/src/agent/agent_pulse/tutorial.ts +++ b/doc-agents/src/agent/agent_pulse/tutorial.ts @@ -111,3 +111,80 @@ export async function getTutorialMeta(tutorialId: string, ctx: any): Promise> { + try { + if (!TUTORIAL_API_BASE_URL) { + ctx.logger.warn('TUTORIAL_API_URL not configured'); + return { + success: false, + error: 'Tutorial API URL not configured', + }; + } + + const response = await fetch(`${TUTORIAL_API_BASE_URL}/api/tutorials/${tutorialId}/steps/${stepNumber}`); + + if (!response.ok) { + const errorData = (await response.json().catch(() => ({ error: response.statusText }))) as { + error?: string; + details?: any; + }; + ctx.logger.error( + 'Failed to fetch tutorial step %d for tutorial %s: %s', + stepNumber, + tutorialId, + JSON.stringify(errorData) + ); + return { + success: false, + status: response.status, + error: errorData.error || response.statusText, + details: errorData.details, + }; + } + + const responseData = (await response.json()) as ApiResponse; + + if (!responseData.success || !responseData.data) { + return { + success: false, + error: responseData.error || 'Invalid response format', + }; + } + + ctx.logger.info('Fetched step %d for tutorial %s', stepNumber, tutorialId); + return responseData; + } catch (error) { + ctx.logger.error('Error fetching tutorial step %d for tutorial %s: %s', stepNumber, tutorialId, error); + return { + success: false, + error: `Network error: ${error instanceof Error ? error.message : String(error)}`, + }; + } +} diff --git a/doc-agents/src/agent/agent_pulse/types.ts b/doc-agents/src/agent/agent_pulse/types.ts index b9a5a112..4e630603 100644 --- a/doc-agents/src/agent/agent_pulse/types.ts +++ b/doc-agents/src/agent/agent_pulse/types.ts @@ -1,3 +1,5 @@ +import type { TutorialSnippet } from './tutorial'; + export interface ConversationMessage { author: 'USER' | 'ASSISTANT'; content: string; @@ -36,12 +38,25 @@ export interface Action { totalSteps: number; } +// TutorialData matches the frontend's expected format +export interface TutorialData { + tutorialId: string; + totalSteps: number; + currentStep: number; + tutorialStep: { + title: string; + mdx: string; + snippets: TutorialSnippet[]; + totalSteps: number; + }; +} + export interface StreamingChunk { type: 'text-delta' | 'status' | 'tutorial-data' | 'finish' | 'error'; textDelta?: string; message?: string; category?: string; - tutorialData?: Action; + tutorialData?: TutorialData; error?: string; details?: string; } diff --git a/doc-agents/src/api/agent_pulse/route.ts b/doc-agents/src/api/agent_pulse/route.ts index bdacdb3a..c728c139 100644 --- a/doc-agents/src/api/agent_pulse/route.ts +++ b/doc-agents/src/api/agent_pulse/route.ts @@ -1,9 +1,6 @@ -import { createRouter, sse } from '@agentuity/runtime'; -import { streamText } from 'ai'; -import { openai } from '@ai-sdk/openai'; -import { buildContext, buildSystemPrompt } from '@agent/agent_pulse/context-builder'; -import { createTools } from '@agent/agent_pulse/tools'; -import type { ConversationMessage, StreamingChunk } from '@agent/agent_pulse/types'; +import { createRouter } from '@agentuity/runtime'; +import agentPulse from '@agent/agent_pulse'; +import type { ConversationMessage } from '@agent/agent_pulse/types'; interface ParsedRequest { message: string; @@ -11,6 +8,9 @@ interface ParsedRequest { tutorialData?: { tutorialId: string; currentStep: number }; } +/** + * Parses and validates incoming agent requests + */ function parseAgentRequest(jsonData: any): ParsedRequest { let message = ''; let conversationHistory: ConversationMessage[] = []; @@ -40,111 +40,50 @@ function parseAgentRequest(jsonData: any): ParsedRequest { const router = createRouter(); // POST /api/agent-pulse -router.post( - '/', - sse(async (c, stream) => { - const logger = c.var.logger; - - try { - const jsonData = await c.req.json(); - const parsedRequest = parseAgentRequest(jsonData); - - logger.info('AgentPulse received message: %s', parsedRequest.message); - - // Create state for managing actions - const state = { action: null as any }; - - // Build messages for the conversation - const messages: ConversationMessage[] = [...parsedRequest.conversationHistory, { author: 'USER', content: parsedRequest.message }]; - - // Create tools with state context - const tools = await createTools(state, { - logger, - // Provide minimal context for tutorial fetching - } as any); - - // Build tutorial context and system prompt - const tutorialContext = await buildContext( +router.post('/', async (c) => { + try { + const jsonData = await c.req.json(); + const parsedRequest = parseAgentRequest(jsonData); + + // Validate request + if (!parsedRequest.message || parsedRequest.message.trim() === '') { + return c.json( { - logger, - } as any, - parsedRequest.tutorialData + error: 'Message is required', + }, + { status: 400 } ); - const systemPrompt = await buildSystemPrompt(tutorialContext, { - logger, - } as any); - - // Generate streaming response - const result = await streamText({ - model: openai('gpt-4.1'), - messages: messages.map((msg) => ({ - role: msg.author === 'USER' ? 'user' : 'assistant', - content: msg.content, - })), - tools, - system: systemPrompt, - }); - - // Stream the response - for await (const chunk of result.fullStream) { - if (chunk.type === 'text-delta') { - const sseChunk: StreamingChunk = { - type: 'text-delta', - textDelta: chunk.text, - }; - stream.writeSSE({ data: JSON.stringify(sseChunk) }); - } else if (chunk.type === 'tool-call') { - const toolName = chunk.toolName || 'tool'; - const userFriendlyMessage = getToolStatusMessage(toolName); - const sseChunk: StreamingChunk = { - type: 'status', - message: userFriendlyMessage, - category: 'tool', - }; - stream.writeSSE({ data: JSON.stringify(sseChunk) }); - logger.debug('Tool called: %s', toolName); - } else if (chunk.type === 'reasoning-delta') { - logger.debug('REASONING: %s', chunk); - } else { - logger.debug('Skipping chunk type: %s', chunk.type); - } - } - - // Send tutorial data if available - if (state.action) { - const tutorialChunk: StreamingChunk = { - type: 'tutorial-data', - tutorialData: state.action, - }; - stream.writeSSE({ data: JSON.stringify(tutorialChunk) }); - } + } - // Send finish signal - const finishChunk: StreamingChunk = { - type: 'finish', - }; - stream.writeSSE({ data: JSON.stringify(finishChunk) }); - } catch (error) { - logger.error('Agent request failed: %s', error instanceof Error ? error.message : String(error)); - const errorChunk: StreamingChunk = { - type: 'error', + // Run agent and get stream + const stream = await agentPulse.run({ + message: parsedRequest.message, + conversationHistory: parsedRequest.conversationHistory, + tutorialData: parsedRequest.tutorialData, + }); + + // Return streaming response with proper headers + return new Response(stream, { + headers: { + 'Content-Type': 'text/event-stream', + 'Cache-Control': 'no-cache', + 'Connection': 'keep-alive', + }, + }); + } catch (error) { + c.var.logger.error('Agent request failed: %s', error instanceof Error ? error.message : String(error)); + + // Determine if it's a client error (4xx) or server error (5xx) + const statusCode = error instanceof Error && error.message.includes('Invalid') ? 400 : 500; + + return c.json( + { error: 'Sorry, I encountered an error while processing your request. Please try again.', details: error instanceof Error ? error.message : String(error), - }; - stream.writeSSE({ data: JSON.stringify(errorChunk) }); - } - }) -); - -function getToolStatusMessage(toolName: string): string { - switch (toolName) { - case 'startTutorialAtStep': - return 'Starting tutorial...'; - case 'askDocsAgentTool': - return 'Searching documentation...'; - default: - return 'Processing your request...'; + }, + { status: statusCode } + ); } -} +}); export default router; diff --git a/lib/api/services/agentPulse.ts b/lib/api/services/agentPulse.ts index 78cd1f63..147fc319 100644 --- a/lib/api/services/agentPulse.ts +++ b/lib/api/services/agentPulse.ts @@ -72,6 +72,8 @@ export async function callAgentPulseStreaming( }); if (!response.ok) { + const errorText = await response.text(); + console.error('[agentPulse] Error response:', errorText); throw new Error(`Agent responded with status: ${response.status}`); } @@ -85,9 +87,11 @@ export async function callAgentPulseStreaming( while (true) { const { done, value } = await reader.read(); + if (done) break; - buffer += decoder.decode(value, { stream: true }); + const decoded = decoder.decode(value, { stream: true }); + buffer += decoded; // Process complete lines const lines = buffer.split('\n'); @@ -96,7 +100,8 @@ export async function callAgentPulseStreaming( for (const line of lines) { if (line.startsWith('data: ')) { try { - const chunk = JSON.parse(line.slice(6)) as StreamingChunk; + const jsonStr = line.slice(6); + const chunk = JSON.parse(jsonStr) as StreamingChunk; if (chunk.type === 'text-delta' && chunk.textDelta) { callbacks.onTextDelta?.(chunk.textDelta); @@ -110,7 +115,7 @@ export async function callAgentPulseStreaming( callbacks.onError?.(chunk.error || 'Unknown error'); } } catch (error) { - console.error('Error parsing SSE chunk:', error); + console.error('[agentPulse] Error parsing SSE chunk:', error); } } } diff --git a/lib/api/services/index.ts b/lib/api/services/index.ts index f188398b..50dffe9d 100644 --- a/lib/api/services/index.ts +++ b/lib/api/services/index.ts @@ -8,5 +8,4 @@ export { generateTitle, titleGeneratorService } from './titleGenerator'; export { callAgentPulseStreaming, agentPulseService } from './agentPulse'; export type { AgentPulseRequest, StreamingChunk, AgentPulseCallbacks } from './agentPulse'; -export { queryAgentQa, agentQaService } from './agentQa'; -export type { AgentQaResponse } from './agentQa'; +export { queryAgentQa, agentQaService } from './agentQa'; \ No newline at end of file