[DNM] feat(appkit): add AgentPlugin and ChatUIPlugin for LangChain/LangGraph agents (POC)#138
Open
smurching wants to merge 1 commit intodatabricks:mainfrom
Open
[DNM] feat(appkit): add AgentPlugin and ChatUIPlugin for LangChain/LangGraph agents (POC)#138smurching wants to merge 1 commit intodatabricks:mainfrom
smurching wants to merge 1 commit intodatabricks:mainfrom
Conversation
…h agents Promotes the agent pattern from app-templates/agent-langchain-ts into first-class appkit SDK plugins so any Databricks app developer can build AI agent apps using the same declarative, plugin-first pattern. New plugins (packages/appkit/src/plugins/agent/, chat-ui/): - AgentPlugin: sets up a LangGraph ReAct agent (ChatDatabricks + MCP tools), streams responses in Responses API SSE format at POST /api/agent (standard appkit route) and POST /invocations (Databricks serving convention) - ChatUIPlugin: dynamically mounts a pre-built chat UI Express app as a sub-application under /api/chatUI Framework changes: - Plugin base class: add optional injectAppRoutes?(app) for root-level routes - ServerPlugin: call injectAppRoutes on each plugin after /api/* mounts - New deps: @databricks/langchainjs, @langchain/core, @langchain/langgraph, @langchain/mcp-adapters Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Sid Murching <sid.murching@databricks.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
POC implementing the agent plugin plan. Promotes the LangChain/LangGraph agent pattern from
app-templates/agent-langchain-tsinto first-class AppKit SDK plugins.AgentPlugin(packages/appkit/src/plugins/agent/) — sets up a LangGraph ReAct agent (ChatDatabricks + optional MCP tools), streams responses in Responses API SSE format atPOST /api/agentand registersPOST /invocationsat the app root (Databricks serving convention)ChatUIPlugin(packages/appkit/src/plugins/chat-ui/) — dynamically mounts a pre-built chat UI Express app as a sub-applicationinjectAppRoutes?(app)hook toPluginbase class;ServerPlugincalls it after mounting all/api/*routers@databricks/langchainjs,@langchain/core,@langchain/langgraph,@langchain/mcp-adaptersUsage
Test plan
pnpm typecheck)pnpm test)ENABLE_AGENT_EXAMPLE=trueand test chat UI in browser🤖 Generated with Claude Code