diff --git a/README.md b/README.md index 745062a..527ff18 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,11 @@ -# Mintlify Starter Kit - -Click on `Use this template` to copy the Mintlify starter kit. The starter kit contains examples including - -- Guide pages -- Navigation -- Customizations -- API Reference pages -- Use of popular components +# Chainlit documentation ### 👩‍💻 Development -Install the [Mintlify CLI](https://www.npmjs.com/package/mintlify) to preview the documentation changes locally. To install, use the following command - -``` -npm i -g mintlify -``` - -Run the following command at the root of your documentation (where mint.json is) +Run the following command at the root of your documentation (where docs.json is) ``` -mintlify dev +npx mint dev ``` ### 😎 Publishing Changes @@ -30,5 +16,4 @@ You can also preview changes using PRs, which generates a preview link of the do #### Troubleshooting -- Mintlify dev isn't running - Run `mintlify install` it'll re-install dependencies. -- Page loads as a 404 - Make sure you are running in a folder with `mint.json` +See [documentation.](https://mintlify.com/docs/quickstart#troubleshooting) \ No newline at end of file diff --git a/advanced-features/ask-user.mdx b/advanced-features/ask-user.mdx index 92f65ad..40a60db 100644 --- a/advanced-features/ask-user.mdx +++ b/advanced-features/ask-user.mdx @@ -2,7 +2,7 @@ title: "Ask User" --- -The ask APIs prompt the user for input. Depending on the API, the user input can be a string, a file, or pick an action. +The ask APIs prompt the user for input. Depending on the API, the user input can be a string, a file, pick an action or fill a form. Until the user provides an input, both the UI and your code will be blocked. @@ -37,4 +37,34 @@ Until the user provides an input, both the UI and your code will be blocked. > Ask the user to pick an action. + + Ask the user to complete a custom form. + + +## Interactive Consent-Gated Forms + +The `AskElementMessage` API enables agents to send interactive, consent-gated UI components to users. This feature is particularly useful for: + +- **Compliance workflows** where explicit user consent is required +- **Data review** scenarios where users need to review and modify AI-generated data +- **Form completion** with pre-filled values for user confirmation +- **Audit trails** for sensitive operations + +The flow works as follows: + +1. **Agent** calls a consent-gated tool (e.g., expense logging API) +2. Backend sends a **CustomElement** to the frontend with editable fields and timeout +3. **User** modifies or confirms the pre-filled values and submits +4. Backend receives the **updated props** and proceeds with the tool call using user-approved data + +This pattern blocks further chat interactions until user input is received, preventing ambiguous or unauthorized actions. + + + + \ No newline at end of file diff --git a/advanced-features/mcp.mdx b/advanced-features/mcp.mdx new file mode 100644 index 0000000..906f757 --- /dev/null +++ b/advanced-features/mcp.mdx @@ -0,0 +1,189 @@ +--- +title: "MCP" +description: Model Control Protocol (MCP) allows you to integrate external tool providers with your Chainlit application. This enables your AI models to use tools through standardized interfaces. +--- + +## Overview + +MCP provides a mechanism for Chainlit applications to connect to either server-sent events (SSE) or streamable HTTP based services, or command-line (stdio) based tools. Once connected, your application can discover available tools, execute them, and integrate their responses into your application's flow. + + + End to end cookbook example showcasing MCP tool calling with Claude. + + + +