### Langbase Quickstart Guide Source: https://langbase.com/docs/api-reference/migrate-to-api-v1 A step-by-step guide to getting started with Langbase, covering API key generation, LLM API key setup, project configuration, creating and running AI agents, and prompt design. ```APIDOC Quickstart Steps: 1. Generate Langbase API key 2. Add LLM API keys 3. Setup your project 4. Create a new pipe agent 5. Run AI support agent 6. Design a prompt 7. Run AI support agent (again) Alternative Quickstart: 1. Create a Pipe 2. Using an LLM model 3. Build your Pipe: Configure LLM model 4. Build your Pipe: Configure the Pipe's Meta 5. Design a Prompt 6. AI Studio: Playground & Experimentation 7. Save and Deploy 8. Pipe API 9. Usage Next Steps ``` -------------------------------- ### Langbase Memory Quickstart Guide Source: https://langbase.com/docs/sdk/pipe Steps to get started with Langbase AI Memory, including generating API keys, setting up LLM API keys, project setup, creating memory agents, and uploading/testing data. ```text Let's get started Step #1: Generate Langbase API key Step #2: Add LLM API keys Step 3: Setup your project Step #4: Create an AI Memory agent Step #5: Upload FAQs data Step #6: Retrieval testing of FAQs data Step #6: Create an AI support agent pipe Step #7: Run the AI support agent pipe Step #1: Create an AI memory agent Step #2: Upload FAQs data Step #3: Create an AI support agent pipe Step #4: Update system prompt Step #5: Connect memory agent to the pipe Step #6: Deploy the AI support agent pipe Step #7: Run the AI support agent pipe Next Steps ``` -------------------------------- ### Quickstart: Create a Runtime AI Agent Source: https://langbase.com/docs/examples/agent Guides users through the process of setting up and running a runtime AI agent using Langbase. This includes generating an API key, project setup, and agent configuration. ```javascript // Step #1: Generate Langbase API key // Obtain your API key from the Langbase dashboard. // Step #2: Setup your project // Install necessary Langbase SDK packages. // Example: npm install @langbase/sdk // Step #2: Configure and Run the agent // Import and initialize the Langbase agent. // const { Agent } = require('@langbase/sdk'); // const agent = new Agent({ apiKey: 'YOUR_API_KEY' }); // Configure agent parameters (e.g., model, prompt, memory). // const config = { // model: 'gpt-3.5-turbo', // prompt: 'You are a helpful assistant.', // memory: 'short_term' // }; // Run the agent. // agent.run(config).then(response => { // console.log(response); // }); // Next Steps: Explore advanced agent features and integrations. ``` -------------------------------- ### Setup Guides Source: https://langbase.com/docs/features/examples Guides for setting up AI agents, memories, and chatbots using the Langbase SDK. ```APIDOC Guide: Create an AI Agent Prerequisites: - Create an AI memory. Steps: 1. Create an AI Agent pipe. 2. Define system prompts. 3. Attach AI Memory to the agent. 4. Configure RAG prompt. Next steps: - (Further actions or links) Guide: Create an AI Memory Prerequisites: - Generate Langbase API Key. Steps: 1. Initialize BaseAI. 2. Create an AI Memory. 3. Add document metadata. 4. Commit changes. 5. Add Langbase API Key. 6. Deploy the Memory. Why use BaseAI? - (Explanation of benefits) Next steps: - (Further actions or links) Guide: Setup Chatbot Prerequisites: - Create an AI memory & AI agent. Steps: 1. Install Langbase SDK and components. 2. Create an API route. 3. Setup chatbot component. 4. Test your chatbot. Wrap up: - (Summary of setup) Next Steps: - (Further actions or links) ``` -------------------------------- ### Setup Docs Agent: Setup Chatbot Guide Source: https://langbase.com/docs/solutions/administration/ Guide on setting up a chatbot that uses AI memory and agents. It covers installation, creating API routes, configuring the chatbot component, and testing. ```APIDOC Setup Docs Agent: Setup Chatbot Guide This guide explains how to set up a chatbot powered by Langbase AI agents and memories. Prerequisites: - Create an AI memory. - Create an AI agent. Steps: 1. Step 1: Install Langbase SDK and components - Description: Install necessary libraries and packages for Langbase. - ID: step-1-install-langbase-sdk-and-components 2. Step 2: Create an API route - Description: Set up an API endpoint to handle chatbot requests. - ID: step-2-create-an-api-route 3. Step 3: Setup chatbot component - Description: Configure the chatbot logic, integrating the AI agent and memory. - ID: step-3-setup-chatbot-component 4. Step 4: Test your chatbot - Description: Interact with the chatbot to verify its functionality. - ID: step-4-test-your-chatbot 5. Wrap up - Description: Concluding remarks and final checks. - ID: wrap-up 6. Next Steps - Description: Suggestions for further development or deployment. - ID: next-steps ``` -------------------------------- ### Setup Docs Agent: Setup Chatbot Guide Source: https://langbase.com/docs/features/logs Guides users on setting up a chatbot using Langbase. It covers installing the SDK, creating API routes, configuring the chatbot component, and testing. ```APIDOC Guide: Setup Docs Agent - Setup Chatbot - Title: Prerequisites: Create an AI memory & AI agent - Description: Ensures necessary AI memory and agent are set up. - Title: Step 1: Install Langbase SDK and components - Description: Instructions for installing the Langbase SDK and required components. - Title: Step 2: Create an API route - Description: Guidance on creating an API endpoint for the chatbot. - Title: Step 3: Setup chatbot component - Description: Steps to configure the chatbot functionality. - Title: Step 4: Test your chatbot - Description: How to test the deployed chatbot. ``` -------------------------------- ### Langbase Pipe Quickstart Links Source: https://langbase.com/docs/pipe/quickstart Provides links to get started with the Langbase SDK and explore reference agent architectures. These links guide users to essential resources for building and deploying AI agents. ```html
``` -------------------------------- ### Langbase Quickstart: Setup Project Source: https://langbase.com/docs/api-reference/limits This section details the necessary steps to set up your local development environment for Langbase. It covers project initialization, dependency installation, and configuration required to start building AI agents and pipes. ```APIDOC Step 3: Setup your project Initialize your project directory, install the Langbase SDK (e.g., using pip), and configure any necessary environment variables or configuration files. ``` -------------------------------- ### Setup Docs Agent: Setup Chatbot Guide Source: https://langbase.com/docs/sdk/workflow A guide on setting up a chatbot using Langbase, covering installation, API route creation, chatbot component setup, and testing. ```APIDOC Guide: Setup Docs Agent - Setup Chatbot This guide provides instructions for setting up a chatbot application. * **Prerequisites**: Create an AI memory & AI agent * **Step 1**: Install Langbase SDK and components * **Step 2**: Create an API route * **Step 3**: Setup chatbot component * **Step 4**: Test your chatbot * **Wrap up**: Concluding remarks. * **Next Steps**: Future actions or integrations. ``` -------------------------------- ### Langbase AI Studio Setup Guide (Markdown) Source: https://langbase.com/docs/pipe/quickstart Provides step-by-step instructions for setting up a Langbase AI Studio pipe. It guides users through account creation, pipe naming, and initial pipe creation. ```md # Use Langbase AI Studio: (Build) ## Step #1: Create a Pipe To get started with Langbase, you'll need to create a free personal account on Langbase.com and verify your email address. *Done? Cool, cool!* 0. When logged in, you can always go to pipe.new/ to create a new Pipe. 1. Give your Pipe a name. Let’s call it "AI support agent". 2. Click on the [Create Pipe] button. And just like that, you have created your first Pipe. > **Note** > #### Start with a fork > You can also fork ``` -------------------------------- ### Langbase AI Studio Setup Guide (Markdown) Source: https://langbase.com/docs/pipe Provides step-by-step instructions for setting up a Langbase AI Studio pipe. It guides users through account creation, pipe naming, and initial pipe creation. ```md # Use Langbase AI Studio: (Build) ## Step #1: Create a Pipe To get started with Langbase, you'll need to create a free personal account on Langbase.com and verify your email address. *Done? Cool, cool!* 0. When logged in, you can always go to pipe.new/ to create a new Pipe. 1. Give your Pipe a name. Let’s call it "AI support agent". 2. Click on the [Create Pipe] button. And just like that, you have created your first Pipe. > **Note** > #### Start with a fork > You can also fork ``` -------------------------------- ### Project Setup and Execution Commands Source: https://langbase.com/examples/ai-translator This snippet provides shell commands for setting up and running the AI Translator project. It includes instructions for installing dependencies and starting the development server. ```sh # Replace `PIPE_API_KEY` with the copied API key. NEXT_LB_PIPE_API_KEY="PIPE_API_KEY" # Install the dependencies using the following command: npm install # Run the project using the following command: npm run dev ``` -------------------------------- ### Project Setup and Execution Source: https://langbase.com/examples/ai-chatbot Instructions for setting up the Langbase AI Chatbot example project. This includes configuring the API key, installing necessary dependencies, and starting the development server. The project is built with Next.js and can be deployed to various platforms. ```sh # Replace `USER/ORG-API-KEY` with the generated API key. LANGBASE_API_KEY="USER/ORG-API-KEY" # Install the dependencies using the following command: npm install # Run the project using the following command: npm run dev ``` -------------------------------- ### Setup Chatbot Guide Source: https://langbase.com/docs/api-reference/agent A step-by-step guide to setting up a chatbot using Langbase. It covers prerequisites, SDK installation, API route creation, chatbot component setup, and testing. ```apidoc Setup Chatbot Guide: - Prerequisites: Create an AI memory & AI agent - Step 1: Install Langbase SDK and components - Step 2: Create an API route - Step 3: Setup chatbot component - Step 4: Test your chatbot - Wrap up - Next Steps ``` -------------------------------- ### Langbase Setup Guides Source: https://langbase.com/docs/memory Guides for setting up Langbase agents and chatbots, covering prerequisites, installation, API key management, and testing. ```python # Example paths for setup guides: # /guides/setup-docs-agent/create-agent # /guides/setup-docs-agent/setup-chatbot # /guides/setup-docs-agent/create-memory ``` -------------------------------- ### Step 1: Install Langbase SDK and components Source: https://langbase.com/docs/guides/setup-docs-agent/setup-chatbot Details the initial step of installing the Langbase SDK and any necessary components required for building AI applications. ```bash # Step 1: Install Langbase SDK and components # Use pip to install the Langbase Python SDK. pip install langbase-sdk # Depending on your setup, you might also need to install specific # components or dependencies for memory or agent functionalities. # Refer to the official Langbase documentation for a complete list. ``` -------------------------------- ### Setup Docs Agent: Setup Chatbot Guide Source: https://langbase.com/docs/solutions/healthcare/ Guide for setting up a chatbot using Langbase. Covers prerequisites (AI memory & agent), installing SDK components, creating an API route, configuring the chatbot component, and testing the chatbot. ```APIDOC Prerequisites: Create an AI memory & AI agent Step 1: Install Langbase SDK and components Step 2: Create an API route Step 3: Setup chatbot component Step 4: Test your chatbot Wrap up Next Steps ``` -------------------------------- ### Setup Chatbot Guide Source: https://langbase.com/docs/api-reference/memory/create Steps to set up a chatbot using Langbase SDK, including prerequisites, installation, API route creation, chatbot component setup, and testing. ```bash Step 1: Install Langbase SDK and components Step 2: Create an API route Step 3: Setup chatbot component Step 4: Test your chatbot ``` -------------------------------- ### Setup Chatbot Guide Source: https://langbase.com/docs/sdk/tools/web-search Instructions for setting up a chatbot, including installing the Langbase SDK and creating an API route. ```APIDOC Guide: Setup Chatbot Sections: - Prerequisites: Create an AI memory & AI agent - Step 1: Install Langbase SDK and components - Step 2: Create an API route Related Endpoints: - /guides/setup-docs-agent/setup-chatbot ``` -------------------------------- ### Langbase SDK: Examples Source: https://langbase.com/docs/api-reference/migrate-to-api-v1 Provides examples of how to integrate Langbase into different application frameworks. Includes setup for popular JavaScript environments like Next.js and React, as well as Node.js. ```APIDOC SDK Examples: - Next.js & React Example: Demonstrates integrating Langbase components within a Next.js application, suitable for building interactive AI-powered features in web applications. - Node.js Example: Shows how to use the Langbase SDK in a Node.js backend environment for server-side AI processing and integrations. ``` -------------------------------- ### Langbase Agent Quickstart and Steps Source: https://langbase.com/docs/api-reference/memory/document-upload Provides a quickstart guide and step-by-step instructions for creating and managing AI agents with Langbase. It covers initial setup, configuration, and agent execution. ```APIDOC Langbase Agent Documentation: Quickstart: Create a Runtime AI Agent - Guides users through the initial process of creating an AI agent. Let's get started - Initial steps to begin working with Langbase agents. Step #1: Generate Langbase API key - Instructions for obtaining an API key required for agent operations. Step #2: Setup your project - Guidance on setting up the development environment. Step #2: Configure and Run the agent - Details on configuring agent parameters and running the agent. Next Steps - Further actions and resources after initial agent setup. ``` -------------------------------- ### Langbase Quickstart: AI Agent Source: https://langbase.com/docs/guides/setup-docs-agent/create-agent A quickstart guide to building an AI agent using Langbase, specifically for generating titles. It covers API key generation, project setup, and creating/running the AI agent. ```APIDOC Quickstart: Build an AI Agent to Generate Titles Steps: 1. Generate Langbase API key. 2. Add LLM API keys (e.g., OpenAI). 3. Setup your project environment. 4. Create a new pipe agent. 5. Run the AI support agent. Related Topics: - Getting started with Langbase. - Designing AI agents. ``` -------------------------------- ### Langbase Tools Quickstart Source: https://langbase.com/docs/supported-models-and-providers A guide to getting started with Langbase Tools, covering initial setup and basic usage for tasks like web crawling and searching. ```APIDOC Quickstart: Using Langbase Tools Overview: This guide walks through the initial steps to leverage Langbase Tools for various functionalities. Sections: - Let's get started - Step #1: Generate Langbase API key - Step #2: Setup your project - Step #3: Web Crawling with Langbase Tools - Step #4: Run the web crawler - Step #5: Web Search with Langbase Tools - Step #6: Run the web search - Next Steps ``` -------------------------------- ### Example Authenticated HTTP Request Source: https://modelcontextprotocol.io/specification/2025-03-26/basic/authorization Demonstrates a typical HTTP GET request including the Host and Authorization headers. This example illustrates how to correctly send an access token for API authentication. ```http GET /v1/contexts HTTP/1.1 Host: mcp.example.com Authorization: Bearer eyJhbGciOiJIUzI1NiIs... ``` -------------------------------- ### Langbase Tools Quickstart Source: https://langbase.com/docs/supported-models-and-providers/ A guide to getting started with Langbase Tools, covering initial setup and basic usage for tasks like web crawling and searching. ```APIDOC Quickstart: Using Langbase Tools Overview: This guide walks through the initial steps to leverage Langbase Tools for various functionalities. Sections: - Let's get started - Step #1: Generate Langbase API key - Step #2: Setup your project - Step #3: Web Crawling with Langbase Tools - Step #4: Run the web crawler - Step #5: Web Search with Langbase Tools - Step #6: Run the web search - Next Steps ``` -------------------------------- ### MCP Protocol Fallback Endpoint Examples Source: https://modelcontextprotocol.io/specification/2025-03-26/basic/authorization Illustrates the default endpoint paths for authorization, token, and registration when using an MCP server hosted at a specific URL and without metadata discovery. ```APIDOC MCP Server URL: https://api.example.com/v1/mcp Default Endpoints: Authorization: https://api.example.com/authorize Token: https://api.example.com/token Registration: https://api.example.com/register ``` -------------------------------- ### Langbase Initialization and Usage Source: https://langbase.com/docs/pipe/quickstart Demonstrates how to import necessary modules, configure Langbase with an API key from environment variables, and initiate a Langbase instance. It also shows an example of calling a method on the Langbase instance. ```javascript import 'dotenv/config'; import { Langbase, getRunner } from 'langbase'; const langbase = new Langbase({ apiKey: process.env.LANGBASE_API_KEY! }); async function main() { const { stream } = await langbase.run( "test", { "model": "gpt-3.5-turbo", "messages": [ {"role": "user", "content": "Hello"} ] } ); for await (const chunk of stream) { process.stdout.write(chunk); } } main(); ``` -------------------------------- ### Get Contexts API Request Source: https://modelcontextprotocol.io/specification/2025-03-26/basic/authorization Example HTTP request to retrieve contexts from the API. It includes the HTTP method, path, protocol, and essential headers like Host and Authorization. ```http GET /v1/contexts HTTP/1.1 Host: mcp.example.com Authorization: Bearer eyJhbGciOiJIUzI1NiIs... ``` -------------------------------- ### Langbase API Reference - Chunker Quickstart Source: https://langbase.com/docs/features/logs Steps to get started with chunking text using the Langbase API, including setup and the core chunking process. ```APIDOC API Reference: Chunking: - Quickstart: Splitting Text into Chunks - Steps: 1. Generate Langbase API key. 2. Setup your project (e.g., install SDK, configure environment). 3. Chunk the text using the provided API endpoint or SDK method. - Related: Langbase Agents, Composable AI ``` -------------------------------- ### Run Project Source: https://github.com/LangbaseInc/langbase-examples/tree/main/starters/documents-qna-rag Starts the development server for the project. The application will typically be accessible at http://localhost:3000. ```bash npm run dev ``` -------------------------------- ### MDX Content Rendering Structure Source: https://modelcontextprotocol.io/specification/2025-03-26/basic/authorization Example of how MDX content might be structured and rendered using React components like `_jsx` and `_jsxs`. ```javascript function MDXContent(props = {}) { const {wrapper: MDXLayout} = { ..._provideComponents(), ...props.components }; return MDXLayout ? _jsx(MDXLayout, { ...props, children: _jsx(_createMdxContent, { ...props }) }) : _createMdxContent(props); } function _missingMdxReference(id, component) { throw new Error("Expected " + (component ? "component" : "object") + " `" + id + "` to be defined: you likely forgot to import, pass, or provide it."); } ``` -------------------------------- ### Example: Authorization Code Grant Flow Source: https://modelcontextprotocol.io/specification/2025-03-26/basic/authorization Illustrates the OAuth 2.1 authorization code grant type for user authentication, detailing the interaction and error handling. ```APIDOC Authorization Code Grant Flow Example: - Scenario: MCP server also functions as the authorization server (or interacts with one). - User Interaction: Human user completes OAuth flow via web browser to obtain an access token. - Token Scope: Access token identifies the user and allows the client to act on their behalf. - Error Handling: - When authorization is required and not yet proven by the client, servers MUST respond with HTTP 401 Unauthorized. - Client Action: Clients initiate the OAuth 2.1 authorization flow after receiving HTTP 401 Unauthorized. - Reference: OAuth 2.1 IETF DRAFT (https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-12#name-authorization-code-grant) ``` -------------------------------- ### Langbase API Reference - Agent Quickstart Source: https://langbase.com/docs/features/logs Guide to creating and running AI agents with Langbase, covering setup, configuration, and execution. ```APIDOC API Reference: Agents: - Quickstart: Create a Runtime AI Agent - Steps: 1. Generate Langbase API key. 2. Setup your project. 3. Configure and Run the agent. 4. Next Steps (e.g., deployment, advanced configuration). - Usage: Agents can be used through Agent App or Agent API. - Features: Visualize Agent's Logic with Agent Flow. ``` -------------------------------- ### Setup Chatbot Guide Source: https://langbase.com/docs/sdk/memory/retrieve Guide for setting up a chatbot with Langbase, covering installation, API route creation, chatbot component setup, and testing. ```APIDOC Guides: Setup Chatbot: - Path: /guides/setup-docs-agent/setup-chatbot - Sections: - Prerequisites: Create an AI memory & AI agent (ID: prerequisites-create-an-ai-memory-and-ai-agent) - Step 1: Install Langbase SDK and components (ID: step-1-install-langbase-sdk-and-components) - Step 2: Create an API route (ID: step-2-create-an-api-route) - Step 3: Setup chatbot component (ID: step-3-setup-chatbot-component) - Step 4: Test your chatbot (ID: step-4-test-your-chatbot) - Wrap up (ID: wrap-up) - Next Steps (ID: next-steps) ``` -------------------------------- ### Setup Docs Agent: Setup Chatbot Guide Source: https://langbase.com/docs/api-reference/errors/usage_exceeded Guide on setting up a chatbot using Langbase, covering SDK installation, API routes, and chatbot component configuration. ```markdown # Setup Docs Agent: Setup Chatbot This guide details the steps to set up a chatbot powered by Langbase. ## Prerequisites: * **Create an AI memory & AI agent**: Ensure you have both an AI memory and an AI agent configured. ## Steps: 1. **Install Langbase SDK and components**: Get the necessary libraries. 2. **Create an API route**: Set up an endpoint for your chatbot. 3. **Setup chatbot component**: Configure the chatbot logic and integration. 4. **Test your chatbot**: Verify its functionality. ## Wrap up: Your Langbase-powered chatbot is now ready. ``` -------------------------------- ### UI Styling for langbase-llms Project Source: https://modelcontextprotocol.io/specification/2025-03-26/basic/authorization This snippet contains CSS rules for styling various components of the langbase-llms project. It covers layout, typography, and interactive element styling for sections like hero banners, feature cards, step-by-step guides, statistics displays, and call-to-action blocks. It also includes media queries for responsive design. ```css .path-icon { font-size: 3rem; margin-bottom: 1rem; display: block; } .path-card h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.5rem; color: #111827; } .path-card h4 { font-size: 1.125rem; font-weight: 600; color: #4b5563; margin-bottom: 1rem; } .path-card p { color: #6b7280; line-height: 1.6; } /* How it works section */ .how-section { padding: 4rem 2rem; max-width: 1200px; margin: 0 auto; width: 100%; } .steps-container { display: flex; align-items: flex-start; justify-content: center; gap: 1rem; margin: 3rem 0; flex-wrap: wrap; } .step-item { flex: 1; min-width: 250px; max-width: 350px; text-align: left; } .step-content h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; color: #111827; display: flex; align-items: center; gap: 0.75rem; } .step-number { width: 36px; height: 36px; background: #111827; color: white; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; font-weight: 700; flex-shrink: 0; } .step-content p { color: #6b7280; line-height: 1.6; font-size: 0.95rem; margin-left: calc(36px + 0.75rem); } .step-connector { width: 40px; height: 2px; background: #e5e7eb; position: relative; margin-top: 18px; } .step-connector::after { content: ''; position: absolute; right: -6px; top: -4px; width: 0; height: 0; border-left: 10px solid #e5e7eb; border-top: 5px solid transparent; border-bottom: 5px solid transparent; } /* Stats section */ .ecosystem-section { padding: 4rem 2rem; background: #f9fafb; border-radius: 24px; margin: 4rem auto; max-width: 1200px; } .stats-container { background: white; border-radius: 24px; padding: 3rem; box-shadow: 0 4px 20px rgba(0,0,0,0.05); width: 100%; margin: 0 0 3rem; border: 1px solid #e5e7eb; } .stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3rem; text-align: center; } .stat-card { padding: 1rem; } .stat-number { font-size: 3.5rem; font-weight: 800; color: #6366f1; margin-bottom: 0.5rem; line-height: 1; } .stat-label { color: #6b7280; font-size: 1.125rem; font-weight: 500; } .ecosystem-description { text-align: center; max-width: 800px; margin: 0 auto; color: #4b5563; font-size: 1.125rem; line-height: 1.8; } /* Final CTA section */ .final-cta { padding: 6rem 2rem; background: white; } .cta-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; max-width: 1000px; margin: 2rem auto 0; } .cta-card { background: #f9fafb; padding: 2.5rem; border-radius: 16px; text-decoration: none; color: inherit; transition: all 0.3s; text-align: center; border: 1px solid #e5e7eb; display: block; } .cta-card:hover { transform: translateY(-5px); background: white; box-shadow: 0 10px 30px rgba(0,0,0,0.1); border-color: #d1d5db; } .cta-icon { font-size: 2.5rem; margin-bottom: 1rem; display: block; } .cta-card h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.75rem; color: #111827; } .cta-card p { color: #6b7280; line-height: 1.6; } @media (max-width: 768px) { .hero-title { font-size: 3rem; } .hero-subtitle { font-size: 1.2rem; } .features-grid { grid-template-columns: 1fr; } .paths-grid, .steps-grid, .cta-cards { grid-template-columns: 1fr; } .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; } .cta-buttons { flex-direction: column; width: 100%; align-items: center; } .cta-primary, .cta-secondary { width: 80%; max-width: 300px; text-align: center; } .section-title { font-size: 2rem; } .stat-number { font-size: 2.5rem; } .steps-container { flex-direction: column; gap: 2rem; } .step-connector { display: none; } .step-item { max-width: 100%; } .step-content p { margin-left: 0; } .intro-content-wrapper { flex-direction: column; gap: 2rem; } .intro-logo { width: 100%; max-width: 200px; margin: 0 auto; } } ``` -------------------------------- ### Local Development Setup Source: https://langbase.com/langbase/tech-guide-writer Provides instructions for setting up the project locally, including forking a Langbase Pipe, copying an API key, and running the development server. ```bash # 1. Fork the tech-blog-writer Pipe on Langbase. # 2. Copy the Pipe's API key. # 3. Duplicate the .env.example file and rename it to .env.local. # 4. Add the following environment variables: # NEXT_LB_PIPE_API_KEY=YOUR_PIPE_API_KEY # Replace YOUR_PIPE_API_KEY with the copied API key. # 5. Run the project using the following command: npm run dev ``` -------------------------------- ### Setup Docs Agent: Setup Chatbot Guide Source: https://langbase.com/docs/sdk/memory/list Guide on setting up a documentation agent to function as a chatbot, including SDK installation and API key configuration. ```APIDOC Guide: Setup Docs Agent - Setup Chatbot Prerequisites: - Create an AI memory & AI agent. Steps: 1. Step 1: Install Langbase SDK and components. 2. Step 2: Create an API route... ``` -------------------------------- ### Langbase Initialization and Usage Source: https://langbase.com/docs/pipe Demonstrates how to import necessary modules, configure Langbase with an API key from environment variables, and initiate a Langbase instance. It also shows an example of calling a method on the Langbase instance. ```javascript import 'dotenv/config'; import { Langbase, getRunner } from 'langbase'; const langbase = new Langbase({ apiKey: process.env.LANGBASE_API_KEY! }); async function main() { const { stream } = await langbase.run( "test", { "model": "gpt-3.5-turbo", "messages": [ {"role": "user", "content": "Hello"} ] } ); for await (const chunk of stream) { process.stdout.write(chunk); } } main(); ``` -------------------------------- ### Next.js Chunk Loading Configuration (Module 30) Source: https://modelcontextprotocol.io/specification/2025-03-26/basic/authorization This snippet details an internal Next.js configuration for module '30', listing various static chunk files. It's associated with 'ApiReferenceProvider', suggesting it's part of the setup for API reference functionalities within the application. ```javascript self.__next_f.push([1,"30:I[71197,[\"3473\",\"static/chunks/891cff7f-2ca7d0df884db9d0.js\",\"4129\",\"static/chunks/7bf36345-5ba13855b95a82b2.js\",\"1725\",\"static/chunks/d30757c7-d1a658b63aa94b97.js\",\"8788\",\"static/chunks/271c4271-e47f34f62bcfeead.js\",\"7261\",\"static/chunks/7261-1f4bcac893329b6b.js\",\"3892\",\"static/chunks/3892-251b69e2384ed286.js\",\"7417\",\"static/chunks/7417-548f041b716e378a.js\",\"1953\",\"static/chunks/1953-46fbce29c74b759e.js\",\"3122\",\"static/chunks/3122-473c6d6ad707a1ff.js\",\"9095\",\"static/chunks/9095-5e8c25cebc4b2bd6.js\",\"7048\",\"static/chunks/7048-68b7efbe64e44ac4.js\",\"3619\",\"static/chunks/3619-3e497b0446e2fdfc.js\",\"2398\",\"static/chunks/2398-3c77a562bc9286bb.js\",\"3386\",\"static/chunks/3386-e9ab77a0b228eb22.js\",\"1862\",\"static/chunks/1862-d7c7b8aab3b4ffe6.js\",\"3698\",\"static/chunks/3698-fd57c96a8b0a15e1.js\",\"2755\",\"static/chunks/2755-e2a765a591a8496d.js\",\"7741\",\"static/chunks/7741-c09cd798b2e4497f.js\",\"2170\",\"static/chunks/2170-9de458c8146ab69b.js\",\"9841\",\"static/chunks/app/%255Fsites/%5Bsubdomain%5D/(multitenant)/%5B%5B...slug%5D%5D/page-fa3373776184b22e.js\"],\"ApiReferenceProvider\",1]) ``` -------------------------------- ### Setup Docs Agent: Create Agent Guide Source: https://langbase.com/docs/features/logs Provides a step-by-step guide for creating a documentation agent. It covers prerequisites like AI memory setup, system prompts, attaching memory, and RAG prompts. ```APIDOC Guide: Setup Docs Agent - Create Agent - Title: Step 1: Create an AI Agent pipe - Description: Instructions for creating the initial agent pipe. - Title: Step 2: System prompts - Description: Guidance on defining system prompts for the agent. - Title: Step 3: Attach AI Memory - Description: Steps to connect AI memory to the agent. - Title: Step 4: RAG prompt - Description: Details on configuring Retrieval Augmented Generation (RAG) prompts. ``` -------------------------------- ### OAuth 2.0 Default Endpoint Paths Source: https://modelcontextprotocol.io/specification/2025-03-26/basic/authorization Specifies the default relative paths for OAuth 2.0 endpoints (Authorization, Token, Registration) that clients MUST use as a fallback when servers do not implement OAuth 2.0 Authorization Server Metadata discovery. It also provides an example of how these paths are constructed with a base URL. ```APIDOC OAuth 2.0 Default Endpoint Paths: - Purpose: Fallback endpoint paths for servers without metadata discovery. - Endpoints: - Authorization Endpoint: - Default Path: /authorize - Description: Used for authorization requests. - Token Endpoint: - Default Path: /token - Description: Used for token exchange and refresh. - Registration Endpoint: - Default Path: /register - Description: Used for dynamic client registration. - Example Usage: - With MCP server at "https://api.example.com/v1/mcp", default endpoints are: - https://api.example.com/authorize - https://api.example.com/token - https://api.example.com/register - Note: Clients MUST first attempt metadata discovery before falling back to these default paths. All other protocol requirements remain unchanged. ``` -------------------------------- ### Setup Docs Agent: Setup Chatbot Guide Source: https://langbase.com/docs/features/safety A guide on setting up a chatbot for a documentation agent, covering installation, API route creation, and chatbot component configuration. ```APIDOC Setup Docs Agent: Setup Chatbot This guide details the steps to set up a chatbot for interacting with your documentation agent. Prerequisites: - Create an AI memory & AI agent Steps: 1. Install Langbase SDK and components: - Command: `pip install langbase-sdk langbase-components` 2. Create an API route: - Description: Define an API endpoint to handle chatbot requests. - Framework: e.g., FastAPI, Flask - Example (FastAPI): ```python from fastapi import FastAPI from langbase.chat import Chat app = FastAPI() chat_agent = Chat(memory='documentation-memory') # Assuming memory is deployed @app.post('/chat') async def chat_endpoint(message: str): response = await chat_agent.send_message(message) return {"reply": response} ``` 3. Setup chatbot component: - Description: Configure the chatbot's behavior and integration with the memory and agent. - Configuration: Pass memory name and agent configuration to the Chat class. 4. Test your chatbot: - Description: Interact with the deployed chatbot to verify its functionality. - Method: Send requests to the created API route. Wrap up: - Ensure all components are correctly configured and deployed. Next Steps: - Explore advanced features or further customization. Usage Example: ```python # Example of testing the chatbot API endpoint # import requests # response = requests.post('http://localhost:8000/chat', json={'message': 'How do I create a memory?'}) # print(response.json()) ``` ``` -------------------------------- ### Langbase SDK: Setup Project Source: https://langbase.com/docs/sdk/memory/document-list This snippet outlines the initial steps to set up a project for using the Langbase SDK. It typically involves installing the SDK and configuring API keys. ```Python # Step 1: Install the Langbase SDK # pip install langbase # Step 2: Generate a Langbase API key from your account settings. # Store this key securely, e.g., in environment variables. # Example of setting up the client (assuming API key is in environment variable LANGBASE_API_KEY) # from langbase import LangbaseClient # client = LangbaseClient() # Or explicitly pass the API key: # client = LangbaseClient(api_key="YOUR_GENERATED_API_KEY") print("Project setup complete. Langbase client is ready to use.") ``` -------------------------------- ### Setup Docs Agent: Create Agent Guide Source: https://langbase.com/docs/solutions/administration/ Guide on creating an AI Agent for documentation purposes. It covers prerequisites like AI memory, creating the agent pipe, system prompts, attaching memory, and RAG prompts. ```APIDOC Setup Docs Agent: Create Agent Guide This guide explains how to create an AI Agent for interacting with documentation. Prerequisites: - Create an AI memory. Steps: 1. Step 1: Create an AI Agent pipe - Description: Initialize a new pipe specifically for agent functionality. - ID: step-1-create-an-ai-agent-pipe 2. Step 2: System prompts - Description: Define system prompts to guide the agent's behavior and responses. - ID: step-2-system-prompts 3. Step 3: Attach AI Memory - Description: Connect a previously created AI memory to the agent pipe. - ID: step-3-attach-ai-memory 4. Step 4: RAG prompt - Description: Configure Retrieval Augmented Generation (RAG) prompts for context-aware responses. - ID: step-4-rag-prompt 5. Next steps - Description: Guidance on further actions after setting up the agent. - ID: next-steps ``` -------------------------------- ### Apache Installation and Configuration on Ubuntu Source: https://langbase.com/examples/it-linux-support-bot Provides commands to install, configure, and verify the Apache web server on Ubuntu systems. Includes steps for updating the package index, installing the apache2 package, managing the service, configuring the firewall, and checking the service status. ```csharp How do I install and configure Apache on Ubuntu 20.04? ``` ```sql sudo apt update ``` ```bash sudo apt install apache2 ``` ```bash sudo systemctl start apache2 sudo systemctl enable apache2 ``` ```arduino sudo ufw allow 'Apache Full' ``` ```lua sudo systemctl status apache2 ``` -------------------------------- ### Setup Docs Agent - Create Agent Example Source: https://langbase.com/docs/features/model-presets Details the prerequisites and initial steps for setting up a documentation agent, focusing on creating an AI memory. ```APIDOC Setup Docs Agent: Prerequisites: Create an AI memory Step 1: Create an AI Agent pipe ``` -------------------------------- ### Setup Memory Guide Source: https://langbase.com/docs/sdk/memory/create Steps for setting up an AI memory, including generating API keys, initializing BaseAI, creating memory, adding document metadata, committing changes, and deploying the memory. ```python # Guide: Setup Memory # Prerequisites: Generate Langbase API Key # Obtain your API key from the Langbase dashboard. # Why use BaseAI? # BaseAI provides a robust foundation for AI applications. # Step 1: Initialize BaseAI # from langbase import BaseAI # base_ai = BaseAI(api_key='YOUR_API_KEY') # Step 2: Create an AI Memory # from langbase.memory import Memory # memory = Memory.create(name='my-memory') # Step 3: Add doc metadata # memory.add_document_metadata(doc_id='doc1', metadata={'source': 'file.txt'}) # Step 4: Commit changes # memory.commit() # Step 5: Add Langbase API Key (if not initialized globally) # Ensure your API key is configured for the session. # Step 6: Deploy the Memory # memory.deploy() # Next steps: Integrate memory into agents or applications. ```