### Example of Clear Task Descriptions for Tembo Source: https://docs.tembo.io/integrations/slack Illustrates effective ways to describe tasks when using the Tembo tool. Clear and specific instructions lead to better results from the coding agent. Vague descriptions are less effective. ```bash @tembo Add error handling to the user registration endpoint ``` ```bash @tembo Optimize the product search query by adding an index on the name column ``` -------------------------------- ### Tembo Advanced Slack Command Example Source: https://docs.tembo.io/integrations/slack Provides a concrete example of using the advanced bracket format for a Tembo Slack command. This example shows how to specify the target branch, repository, and the specific AI agent to be used for task execution, followed by the task description. ```text @tembo [branch=dev, repo=owner/webapp, agent=claudeCode:claude-4-5-sonnet] Add password strength validation ``` -------------------------------- ### Basic PostClone Hook for Dependency Installation Source: https://docs.tembo.io/features/hooks An example of a `postClone` hook in `.tembo.json` that installs project dependencies using `npm ci`. This hook runs immediately after the repository is cloned and before Tembo starts working on the issue. ```json { "hooks": { "postClone": [ "npm ci", "cp .env.example .env.local", "npm run db:migrate" ] } } ``` -------------------------------- ### Prompt Utilizing Variables for Configuration Source: https://docs.tembo.io/automations-library/tips-writing-prompts Showcases how to use variables within prompts to enhance flexibility and reusability. This example defines configuration variables like `STALE_THRESHOLD` and `TARGET_CHANNEL` to dynamically adjust automation behavior. ```text Configuration: - STALE_THRESHOLD: 14 days - TARGET_CHANNEL: #standup - PRIORITY_THRESHOLD: high Find issues older than {STALE_THRESHOLD} that are {PRIORITY_THRESHOLD} priority... Post results to {TARGET_CHANNEL}... ``` -------------------------------- ### Install Tembo MCP Server Globally using npm Source: https://docs.tembo.io/features/mcp-servers This command installs the Tembo MCP server globally on your system using npm. This allows you to run the server as a command-line tool from any directory. ```bash npm install -g @tembo-io/mcp ``` -------------------------------- ### Install Tembo SDK Source: https://docs.tembo.io/features/public-api Provides instructions for installing the Tembo SDK using different package managers: npm, yarn, and pnpm. The SDK simplifies interaction with the Tembo API by offering a type-safe interface. ```bash npm install @tembo-io/sdk ``` ```bash yarn add @tembo-io/sdk ``` ```bash pnpm add @tembo-io/sdk ``` -------------------------------- ### Specific Prompt Example for Issue Management Source: https://docs.tembo.io/automations-library/tips-writing-prompts Demonstrates how to transform a vague prompt into a specific, actionable set of instructions for issue management automation. This includes identifying issues, checking conditions, and performing specific actions like commenting or labeling. ```text 1. Find Linear issues created in the last 24 hours with label "bug" 2. For each issue, check if it has reproduction steps 3. If missing reproduction steps, comment: "Please add reproduction steps to help us fix this faster" 4. If it has reproduction steps, add label "triaged" ``` -------------------------------- ### Create PostgreSQL User for Tembo Source: https://docs.tembo.io/integrations/postgres Example SQL to create a dedicated read-only user for Tembo. This user requires CONNECT, USAGE on schema, and SELECT permissions on tables. Ensure you replace 'your-secure-password' and 'your_database' with your actual credentials. ```sql CREATE USER tembo_monitor WITH PASSWORD 'your-secure-password'; GRANT CONNECT ON DATABASE your_database TO tembo_monitor; GRANT USAGE ON SCHEMA public TO tembo_monitor; GRANT SELECT ON ALL TABLES IN SCHEMA public TO tembo_monitor; ``` -------------------------------- ### Install and Run Tembo MCP Server using npx Source: https://docs.tembo.io/features/mcp-servers This command installs and runs the Tembo MCP server using npx, allowing you to leverage Tembo's task management features with MCP-compatible applications like Claude Desktop without a global installation. ```bash npx -y @tembo-io/mcp ``` -------------------------------- ### CI/CD Integration Example (GitHub Actions) Source: https://docs.tembo.io/features/public-api Provides an example of how to trigger Tembo tasks from a CI pipeline, specifically using GitHub Actions. This involves making a POST request to the Tembo API with task details. ```yaml # GitHub Actions example - name: Create Tembo task for test failures if: failure() run: | curl -X POST https://internal.tembo.io/task/create \ -H "Authorization: Bearer ${{ secrets.TEMBO_API_KEY }}" \ -H "Content-Type: application/json" \ -d '{ "prompt": "Fix failing tests in CI: ${{ github.run_url }}", "repositories": ["${{ github.server_url }}/${{ github.repository }}"], "branch": "${{ github.ref_name }}" }' ``` -------------------------------- ### Tembo Basic Slack Command Usage Source: https://docs.tembo.io/integrations/slack Demonstrates the basic command format for interacting with Tembo in Slack. This command is used to initiate a task by providing a natural language description. The bot listens for mentions and processes the subsequent text as a task. ```text @tembo [your task description] ``` -------------------------------- ### Error Handling Example Source: https://docs.tembo.io/api-reference/public-api/list-repositories This snippet demonstrates the structure of an error response, indicating a required field missing. ```APIDOC ## Error Response Example ### Description This endpoint returns an error object when a required parameter is missing. ### Method N/A (Example of an error response) ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response #### Error Response - **error** (string) - A message describing the error. #### Response Example ```json { "error": { "type": "string", "example": "Organization ID is required" } } ``` ``` -------------------------------- ### Execute Playwright/TypeScript Code with Kernel MCP Source: https://docs.tembo.io/features/mcp-servers This example demonstrates how to execute Playwright/TypeScript code using the Kernel MCP server. It enables automated browser interactions, testing, and more within a cloud browser environment, with automatic video replay for debugging. ```typescript // Example of executing Playwright code via Kernel MCP // Assuming 'kernel' is an initialized MCP client with Kernel capabilities const browser = await kernel.create_browser(); try { await browser.goto('https://example.com'); const title = await browser.title(); console.log('Page title:', title); // ... perform other Playwright actions } finally { await browser.delete(); } ``` -------------------------------- ### Get Current User Info Source: https://docs.tembo.io/api-reference/public-api/get-current-user-info Retrieves information about the currently authenticated user. ```APIDOC ## GET /me ### Description Get information about the current authenticated user. ### Method GET ### Endpoint /me ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **orgId** (string or null) - Organization ID for the authenticated user - **userId** (string or null) - User ID for the authenticated user #### Response Example ```json { "orgId": "123e4567-e89b-12d3-a456-426614174000", "userId": "456e7890-e89b-12d3-a456-426614174001" } ``` ``` -------------------------------- ### Specify Multiple Repositories for Tembo Command Source: https://docs.tembo.io/integrations/slack Demonstrates how to target multiple repositories when using the Tembo command-line tool. This is useful for tasks that span across different parts of a project or multiple microservices. Supported formats include comma-separated or space-separated repository names. ```bash @tembo [repo=owner/frontend,owner/backend] Add user authentication ``` ```bash @tembo [repo=frontend backend] Add user authentication ``` -------------------------------- ### OpenAPI Specification for Get Current User Info Source: https://docs.tembo.io/api-reference/public-api/get-current-user-info This OpenAPI 3.1.0 specification defines the GET /me endpoint for the Tembo Public API. It outlines the request method, path, and expected JSON response structure, including 'orgId' and 'userId' fields. No specific client-side code is provided here, as this is a server-side API definition. ```yaml openapi: 3.1.0 info: title: Tembo Public API description: Public API Endpoints for Tembo version: 1.0.0 servers: - url: https://internal.tembo.io/ description: Tembo API security: [] paths: /me: get: tags: - public-api summary: Get Current User Info description: Get information about the current authenticated user operationId: getPublic-apiMe parameters: [] responses: '200': description: Successfully retrieved user information content: application/json: schema: type: object properties: orgId: type: - string - 'null' format: uuid description: Organization ID for the authenticated user example: 123e4567-e89b-12d3-a456-426614174000 userId: type: - string - 'null' format: uuid description: User ID for the authenticated user example: 456e7890-e89b-12d3-a456-426614174001 required: - orgId - userId ``` -------------------------------- ### Nix Development Shell Configuration (flake.nix) Source: https://docs.tembo.io/features/sandbox-environment This snippet demonstrates the structure of a `flake.nix` file required for Tembo's Nix development shell support. It defines a development environment with specified packages and targets the x86_64-linux platform, ensuring reproducible builds and consistent environments. ```nix { description = "My project development environment"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; }; outputs = { self, nixpkgs }: { devShells.x86_64-linux.default = nixpkgs.legacyPackages.x86_64-linux.mkShell { packages = with nixpkgs.legacyPackages.x86_64-linux; [ nodejs python3 # Add any other tools your project needs ]; }; }; } ``` -------------------------------- ### Prompt Including Output Formatting Guidelines Source: https://docs.tembo.io/automations-library/tips-writing-prompts This snippet highlights the importance of specifying output format within prompts, suggesting the use of Slack Block Kit for structured messages with headers, sections, and bullet points to enhance readability. ```text Specify how output should be formatted. Use Slack Block Kit with headers, sections, bullet points, and links. Well-structured messages are easier to scan than dense paragraphs. ``` -------------------------------- ### Get Current User API Source: https://docs.tembo.io/features/public-api Verify your authentication and retrieve organization info. ```APIDOC ## GET /me ### Description Verify your authentication and retrieve organization info. ### Method GET ### Endpoint https://internal.tembo.io/me ### Parameters None ### Request Example ```bash curl -H "Authorization: Bearer YOUR_API_KEY" https://internal.tembo.io/me ``` ### Response #### Success Response (200) - **userId** (string) - The unique identifier for the user. - **orgId** (string) - The unique identifier for the organization. - **name** (string) - The name of the user. #### Response Example ```json { "userId": "user_pqr456", "orgId": "org_abc789", "name": "Jane Doe" } ``` ``` -------------------------------- ### Tembo Advanced Slack Command Usage (Bracket Format) Source: https://docs.tembo.io/integrations/slack Illustrates the advanced command syntax using the bracket format for specifying options like branch, repository, and agent. This format allows for more precise control over Tembo's task execution. Options are provided as key-value pairs within brackets. ```text @tembo [option1=value1, option2=value2] [your task description] ``` -------------------------------- ### GET /repository/list Source: https://docs.tembo.io/api-reference/public-api/list-repositories Retrieves a list of enabled code repositories for the organization. This endpoint is part of the public API for Tembo. ```APIDOC ## GET /repository/list ### Description Gets a list of enabled repositories for the organization. ### Method GET ### Endpoint https://internal.tembo.io/repository/list ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **codeRepositories** (array) - Array of enabled code repositories for the organization. - **id** (string) - Unique identifier for the code repository (format: uuid). Example: `123e4567-e89b-12d3-a456-426614174000` - **name** (string) - Name of the repository. Example: `my-awesome-project` - **url** (string) - Repository URL (format: uri). Example: `https://github.com/username/my-awesome-project` - **branch** (string) - Default branch name. Example: `main` - **description** (string) - Repository description. Example: `An awesome web application built with React` - **enabledAt** (string) - Timestamp when the repository was enabled (format: date-time). Example: `2023-12-01T10:30:00.000Z` - **createdAt** (string) - Timestamp when the repository record was created (format: date-time). Example: `2023-12-01T09:15:00.000Z` - **updatedAt** (string) - Timestamp when the repository record was last updated (format: date-time). Example: `2023-12-01T11:45:00.000Z` - **organizationId** (string) - Organization ID that owns this repository (format: uuid). Example: `456e7890-e89b-12d3-a456-426614174001` - **integration** (object) - Associated integration details. - **id** (string) - Unique identifier for the integration (format: uuid). Example: `123e4567-e89b-12d3-a456-426614174000` - **type** (string) - Type of integration (e.g., github, gitlab). Example: `github` - **name** (string) - Name of the integration. Example: `GitHub Integration` - **configuration** (object) - Integration configuration settings. #### Response Example ```json { "codeRepositories": [ { "id": "123e4567-e89b-12d3-a456-426614174000", "name": "my-awesome-project", "url": "https://github.com/username/my-awesome-project", "branch": "main", "description": "An awesome web application built with React", "enabledAt": "2023-12-01T10:30:00.000Z", "createdAt": "2023-12-01T09:15:00.000Z", "updatedAt": "2023-12-01T11:45:00.000Z", "organizationId": "456e7890-e89b-12d3-a456-426614174001", "integration": { "id": "123e4567-e89b-12d3-a456-426614174000", "type": "github", "name": "GitHub Integration", "configuration": {} } } ] } ``` #### Error Response (400) - **message** (string) - Error message describing the issue (e.g., "Bad request - missing organization ID"). #### Error Response Example ```json { "message": "Bad request - missing organization ID" } ``` ``` -------------------------------- ### GET /task/list Source: https://docs.tembo.io/api-reference/public-api/list-tasks Retrieves a paginated list of issues for the organization. Supports filtering by page number and number of items per page. ```APIDOC ## GET /task/list ### Description Gets a paginated list of issues for the organization. ### Method GET ### Endpoint /task/list ### Parameters #### Query Parameters - **limit** (integer) - Optional - Number of items to return per page (max 100). Defaults to 10. - **page** (integer) - Optional - Page number to retrieve (starts from 1). Defaults to 1. ### Request Example ```json { "example": "GET /task/list?limit=10&page=1" } ``` ### Response #### Success Response (200) - **issues** (array) - A list of issue objects. - **id** (string) - The unique identifier for the issue. - **title** (string) - The title of the issue. - **description** (string) - The detailed description of the issue. - **status** (string) - The current status of the issue. - **createdAt** (string) - The timestamp when the issue was created. - **updatedAt** (string) - The timestamp when the issue was last updated. - **organizationId** (string) - The identifier of the organization the issue belongs to. - **meta** (object) - Metadata for pagination. - **totalCount** (integer) - The total number of issues available. - **totalPages** (integer) - The total number of pages. - **currentPage** (integer) - The current page number. - **pageSize** (integer) - The number of items per page. - **hasNext** (boolean) - Indicates if there is a next page. - **hasPrevious** (boolean) - Indicates if there is a previous page. #### Response Example ```json { "example": { "issues": [ { "id": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "title": "Example Issue", "description": "This is a sample issue description.", "status": "open", "createdAt": "2023-10-27T10:00:00Z", "updatedAt": "2023-10-27T10:00:00Z", "organizationId": "f1e2d3c4-b5a6-7890-1234-567890fedcba" } ], "meta": { "totalCount": 50, "totalPages": 5, "currentPage": 1, "pageSize": 10, "hasNext": true, "hasPrevious": false } } } ``` ```