crestapps/crestapps.agentskills/crestapps-core-response-handlers
Claude Code and agent skill by crestapps/crestapps.agentskills
- community
Checking that the SKILL.md file is still in the repository.
Skill for routing CrestApps.Core 2.0 chat messages through IChatResponseHandler implementations instead of always calling the AI. Covers the built-in AI handler (ChatResponseHandlerNames.AI), streaming and deferred results with ChatResponseHandlerResult, ChatResponseHandlerContext members, registering custom webhook or live-agent handlers, IChatResponseHandlerResolver selection by session or interaction handler name and chat mode, ResponseHandlerProfileSettings for profile-created sessions, the conversation-mode fallback to the AI handler, and how the AI handler sets AIInvocationScope before building the orchestration context. Use it when handing chats to a live agent, a webhook or an external platform, or when a custom handler is ignored.
Install
npx vskill@latest install crestapps/crestapps.agentskills/crestapps-core-response-handlersSKILL.md
The same SKILL.md was published earlier as crestapps/crestapps.agentskills/crestapps-core-response-handlers.
CrestApps.Core Response Handlers
Implement Response Handlers
Implement IChatResponseHandler when a message should not always use the default AI orchestration path. A handler returns either ChatResponseHandlerResult.Streaming(...) with an IAsyncEnumerable<ChatResponseUpdate> or ChatResponseHandlerResult.Deferred() when a later callback, background task, or relay will deliver the response.
ChatResponseHandlerContext exposes Prompt, ConnectionId, SessionId, ChatType, ConversationHistory, Services, Profile, ChatSession, Interaction, AssistantAppearance, and Properties, plus the AG-UI members ClientContext, SharedState, SupportsToolApproval, ClientTools and ContinuesOnNextPage (see crestapps-core-ag-ui), which AIChatResponseHandler copies into AICompletionContextKeys entries. Profile and ChatSession are populated only for AIChatSession; Interaction is populated only for ChatInteraction.
Deferred Webhook Example
Register the handler as scoped:
Handler Selection
IChatResponseHandlerResolver.Resolve(handlerName, chatMode) selects by AIChatSession.ResponseHandlerName or ChatInteraction.ResponseHandlerName; GetAll() lists every registered handler. For a profile-created session, set ResponseHandlerProfileSettings.InitialResponseHandlerName (profile templates carry it as ProfileTemplateMetadata.InitialResponseHandlerName); the active session can change its handler name later. An empty or unknown name falls back to the built-in handler named ChatResponseHandlerNames.AI with a warning. ChatMode.Conversation always uses the AI handler, even when a custom name is requested, because voice conversations need the orchestration pipeline.
The Built-in AI Handler
AIChatResponseHandler builds the orchestration context for the profile or interaction and streams the orchestrator's output. It stores the chat interaction, the chat session and the AIChatSession item in AIInvocationScope.Current before building the context, so context handlers and IAIProfileProviders can read the active chat, and adds the completion context and data source afterwards. A custom handler that runs the orchestrator itself should do the same with AIInvocationScope.Begin().
Use a unique, stable handler name and make deferred handlers responsible for their own eventual delivery. Do not return a made-up handled result: the supported result factories are Streaming(...) and Deferred().
Related skills
- Use
orchardcore-ai-response-handlersfor the Orchard Core module wrapper (admin-configured chat sessions and chat interactions) built on this sameIChatResponseHandlercontract. - Use
crestapps-core-external-relaysfor theIExternalChatRelaycontract used by deferred, relay-backed handlers.
Upgrading from 1.x
ChatMode.Realtimeis gone.Resolvetakes aChatMode, and onlyConversationforces the AI handler.- The supported results remain
ChatResponseHandlerResult.Streaming(...)andDeferred(); there is noHandled,TransferredorNotHandledresult, whatever older docs show.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/crestapps-core/skills/crestapps-core-response-handlers/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/crestapps/crestapps.agentskills/crestapps-core-response-handlers)