Skip to main content

Overview

Chat Tools allow your app to provide custom functions that become available in Omi chat when users install your app. These tools enable the AI assistant to interact with your service directly through natural language conversations.

Custom Actions

Define tools that perform actions on external services

Natural Language

Users interact with tools through normal conversation

Automatic Discovery

Tools become available when users install your app
Example: A Slack integration app might provide tools to:
  • Send messages to Slack channels
  • List available channels
  • Search messages in Slack
When a user installs your app, these tools automatically become available in their Omi chat, allowing them to say things like “Send a message to #general saying hello” or “What Slack channels do I have?”
Chat Tools require your app to have the external_integration capability enabled. They are not a separate capability, but rather a feature that works with external integration apps.

How Chat Tools Work

1

User Chats with Omi

User makes a request in natural language
2

AI Decides to Use Tool

Omi’s AI determines your tool is the best way to fulfill the request
3

Omi Calls Your Endpoint

POST request with uid, app_id, tool_name, plus extracted parameters
4

Your Server Processes

Execute the action and return a result
5

User Sees Result

Omi displays your response to the user

Part 1: Implementing Chat Tools

Step 1: Create Tool Endpoints

Your backend server needs to expose endpoints that Omi will call when tools are invoked.
Your endpoints should:
  • Accept POST requests with JSON payload (or GET with query parameters)
  • Receive these standard fields:
    • uid: User ID
    • app_id: Your app ID
    • tool_name: Name of the tool being called
    • geolocation (optional): User’s cached location, see Geolocation below
    • Plus any tool-specific parameters
  • Return JSON with either:
    • result: Success message (string)
    • error: Error message (string)

Example: Send Message Tool

Example: Search Tool

Step 2: Handle Authentication

If your tools require user authentication:

Store Tokens Securely

Save OAuth tokens in a secure database associated with uid

Validate Authentication

Check if user has connected their account before processing

Return Helpful Errors

If auth is missing, return a clear error message

Step 3: Error Handling Best Practices

Always return helpful error messages that guide users on how to fix the issue.

Part 2: Adding Chat Tools in Omi App Store

Chat tools are defined via a manifest endpoint hosted on your server. When you create or update your app in the Omi App Store, Omi will automatically fetch the tool definitions from your manifest URL.

Single Source of Truth

Tool definitions live on your server

Easy Updates

Modify your manifest and re-save the app to refresh

Full Control

Define parameters with JSON Schema

Version Control

Track changes in your codebase

Step 1: Create the Manifest File

Create a JSON file at /.well-known/omi-tools.json on your server:

Step 2: Host the Manifest

Make sure your manifest is accessible via HTTPS. Common locations:
  • https://your-app.com/.well-known/omi-tools.json (recommended)
  • https://your-app.com/omi/manifest.json
  • https://your-app.com/api/tools-manifest

Step 3: Add Manifest URL in Omi App Store

1

Open Omi App

Navigate to Apps → Create App (or edit an existing app)
2

Select Capability

Choose External Integration capability
3

Enter Manifest URL

In the Chat Tools Manifest URL field, enter:
4

Submit

Omi will automatically fetch your tool definitions
Endpoint URLs in Manifest: You can use relative paths (e.g., /api/send_message) in your manifest. Omi will automatically resolve them using your App Home URL as the base URL.

Manifest Schema Reference

Parameters Schema

Example: FastAPI Manifest Endpoint


Sending Chat Messages Proactively

Your app can send messages directly to a user’s chat without waiting for them to invoke a tool. This is useful for:
  • Sending results from long-running background tasks
  • Proactive notifications based on external events
  • Asynchronous updates from your service

Enabling Chat Messages

Add the chat_messages configuration to your manifest:

Sending Messages via API

Once enabled, use the notification API to send messages:

API Request Fields

Example: Background Task Completion

Rate Limits

Chat messages are rate-limited to prevent notification fatigue:
  • Maximum: 10 messages per hour per app per user
  • Response: HTTP 429 with Retry-After header when exceeded
Abuse of chat messages (spam, excessive notifications) may result in your app being removed from the store.

Tool Definition Best Practices

Use descriptive, action-oriented names:
Write detailed descriptions that help the AI understand:
  • When to use: “Use this when the user wants to…”
  • Required parameters: List what’s needed
  • What it does: Clear explanation of the action
Example:
Choose the appropriate method:
Provide custom messages shown during tool execution:
  • “Searching Slack…”
  • “Sending message…”
  • “Creating calendar event…”
If not provided, Omi generates a default based on the tool name.

Request and Response Format

Request Format

POST Request:
GET Request:

Geolocation

Tool call payloads include an optional geolocation field when the user has shared their location with Omi. Use it to make your tool location-aware (e.g., tag entries with where the user was, find nearby stores, localize search results).
Backward compatible: The geolocation field is only present when location data is available. If the user has never granted location permission or their cached location has expired, the field is omitted entirely from the payload — it’s not set to null. Always treat it as optional when parsing.
Location data is cached server-side for 30 minutes. If the user moves significantly, your tool will receive updated coordinates on the next call.

Response Format

HTTP Status: 200

Best Practices

Clear Responses

Keep responses concise but informative
  • ✅ “Successfully sent message to #general”
  • ❌ “OK”

Helpful Errors

Guide users on how to fix issues
  • ✅ “Slack not connected. Please connect your account.”
  • ❌ “Error 401”

Secure Auth

Store tokens encrypted and implement token refresh for long sessions

Rate Limiting

Protect your endpoints from abuse

Rate Limiting Example


Testing Your Tools

1

Test Endpoints Directly

Use curl or Postman before adding to your app:
2

Create the App

Add your tool definitions in the Omi App Store
3

Install the App

Install it in your test account
4

Connect Your Account

If auth is required, click the connect button in app settings
5

Test in Chat

Try using the tools naturally:
  • “Send a message to #general saying hello”
  • “What Slack channels do I have?”
  • “Search Slack for messages about the project”

Troubleshooting

  • Verify the app is installed and enabled (enabled: true)
  • Check that chat_tools array is properly formatted
  • Ensure endpoints are accessible and return proper responses
  • Verify the app has external_integration capability
  • Check endpoint logs for errors
  • Verify authentication is working
  • Ensure response format matches specification
  • Test endpoints directly with curl/Postman
  • Check that required parameters are being sent
  • Improve tool description to be more specific about when to use it
  • Add examples in the description
  • Ensure tool name is descriptive
  • Make sure the description clearly states when the tool should be used

Complete Example

Slack Integration Example

See a complete working example that demonstrates OAuth authentication, multiple chat tools, handling invocations, and error handling

Developer API

Access your own personal Omi data programmatically

Data Import APIs

Create conversations and memories via REST API

Integration Apps

Learn about external integrations

OAuth Guide

Set up authentication for your app

Submit Your App

Publish your app to the store

Notifications

Send push notifications to users