Skip to content

feat(web-api): cover documents.classic, guided CRUD, and agentic v2 o… - #31

Merged
Natalia Markitantova (markitosha) merged 3 commits into
mainfrom
api-updates-c993f46
Aug 19, 2026
Merged

Natalia Markitantova (markitosha) merged 3 commits into
mainfrom
api-updates-c993f46

Conversation

@markitosha

Copy link
Copy Markdown
Collaborator

…n 5.0.0-rc / 0.11.0-rc

Classic interaction-scoped documents moved under documents.classic. Add /documents/guided and /agentic example routes so the new SDK surfaces are callable from the web-api examples.

…n 5.0.0-rc / 0.11.0-rc

Classic interaction-scoped documents moved under documents.classic. Add /documents/guided and /agentic example routes so the new SDK surfaces are callable from the web-api examples.
…ample

Keep a single /documents/generate route instead of a separate guided CRUD endpoint.
@markitosha
Natalia Markitantova (markitosha) marked this pull request as ready for review August 19, 2026 07:54
Copilot AI lite review requested due to automatic review settings August 19, 2026 07:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the SDK example applications to align with the new SDK surface areas (TypeScript @corti/sdk 5.0.0-rc and .NET Corti.Sdk 0.11.0-rc), including the split of classic interaction-scoped documents under documents.classic, and adds new example routes for guided documents and Agentic v2.

Changes:

  • Pin TypeScript and .NET examples to the new RC SDK versions.
  • Update classic document calls to use documents.classic and expand guided document demo to include list/get.
  • Add new /agentic example endpoints (Express + ASP.NET) and update docs/Postman accordingly.

Reviewed changes

Copilot reviewed 18 out of 20 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
sdk/typescript/README.md Updates TypeScript examples list to mention agentic v2 + classic/guided documents.
sdk/typescript/next-auth-examples/package.json Pins @corti/sdk to 5.0.0-rc.
sdk/typescript/next-auth-examples/package-lock.json Updates lockfile to @corti/sdk@5.0.0-rc.
sdk/typescript/express-web-api/src/routes/index.ts Registers new Agentic route handler.
sdk/typescript/express-web-api/src/routes/guidedDocuments.ts Guided docs demo now lists/gets persisted guided documents and returns sections.
sdk/typescript/express-web-api/src/routes/documents.ts Migrates classic document CRUD to client.documents.classic.*.
sdk/typescript/express-web-api/src/routes/ambientAsyncEndToEnd.ts Uses client.documents.classic.create for ambient end-to-end document creation.
sdk/typescript/express-web-api/src/routes/agentic.ts Adds Express /agentic route exercising Agentic v2 SDK calls.
sdk/typescript/express-web-api/README.md Updates endpoint documentation for agentic v2 and classic/guided documents routes.
sdk/typescript/express-web-api/package.json Pins @corti/sdk to 5.0.0-rc.
sdk/typescript/express-web-api/package-lock.json Updates lockfile to @corti/sdk@5.0.0-rc.
sdk/postman/WebApi.postman_collection.json Updates Postman collection to include /agentic and align with new routes.
sdk/postman/README.md Updates Postman docs to include agentic and classic/guided documents coverage.
sdk/dotnet/web-api/README.md Updates .NET Web API docs for agentic v2 and classic/guided documents routes.
sdk/dotnet/web-api/Program.cs Registers the new Agentic endpoint.
sdk/dotnet/web-api/Endpoints/GuidedDocumentsEndpoint.cs Guided docs demo now lists/gets persisted guided documents and returns Sections.
sdk/dotnet/web-api/Endpoints/DocumentsEndpoint.cs Migrates classic document CRUD to client.Documents.Classic.* and updates using directives.
sdk/dotnet/web-api/Endpoints/AmbientAsyncEndToEndEndpoint.cs Uses client.Documents.Classic.CreateAsync for ambient end-to-end document creation.
sdk/dotnet/web-api/Endpoints/AgenticEndpoint.cs Adds ASP.NET /agentic endpoint exercising Agentic v2 SDK calls.
sdk/dotnet/web-api/Corti.Sdk.Examples.Api.csproj Pins Corti.Sdk NuGet reference to 0.11.0-rc.
Files not reviewed (2)
  • sdk/typescript/express-web-api/package-lock.json: Generated file
  • sdk/typescript/next-auth-examples/package-lock.json: Generated file
Suppressed comments (2)

sdk/typescript/express-web-api/src/routes/agentic.ts:38

  • registryPage.data is assumed to be an array, but registryConnectors.length will throw if data is missing/undefined. Consider defaulting to an empty array (consistent with other list-handling in this repo).
    const registryPage = await client.agentic.registry.connectors.list({ pageSize: 10 });
    const registryConnectors = registryPage.data;

sdk/typescript/express-web-api/src/routes/agentic.ts:51

  • contextsPage.data is assumed to be an array, but contexts.length will throw if data is missing/undefined. Defaulting to [] avoids a runtime error and matches the defensive patterns used elsewhere in the examples.
    const contextsPage = await client.agentic.contexts.list({
      agentId: createdAgent.id,
      pageSize: 10,
    });
    const contexts = contextsPage.data;

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread sdk/typescript/express-web-api/src/routes/agentic.ts
Replace the RC pins now that the stable packages are on npm and NuGet.
@markitosha
Natalia Markitantova (markitosha) merged commit 208394c into main Aug 19, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants