Skip to main content
Connect sim.ai workflows to a Moss knowledge base. MossSimSearch wraps a Moss index and returns results in sim.ai’s expected shape — ready to serve from a webhook that sim.ai calls as an external HTTP tool.
Note: For a complete FastAPI server and setup guide, see the sim.ai cookbook.

How it works

sim.ai workflows call external HTTP tools. You run a small webhook server backed by MossSimSearch and point an HTTP tool node at it. When the workflow triggers the tool, Moss answers in under 10 ms and the result flows back into the workflow.

Required tools

  • Moss Portal project with credentials
  • Python 3.10+
  • uv (optional but recommended)
  • A sim.ai workspace with a deployed workflow

Integration guide

1

Installation

Install sim-moss along with FastAPI and Uvicorn:
If you are using the cookbook example, you can sync the dependencies directly using uv:
2

Environment setup

Set your Moss credentials as environment variables. You can create a .env file or export them directly:
3

Serve from a webhook

Wrap the search in a FastAPI webhook server:
Start the webhook server locally using uvicorn (or uv run uvicorn):
The server pre-loads the Moss index on startup. Check /health to confirm readiness.
4

Add the tool to your sim.ai workflow

In your sim.ai workflow editor, add an HTTP tool node:Map the response: results[*].content → injected into the LLM context block.

API

POST /search

Request
Response

GET /health

Returns {"status": "ok", "index_loaded": true} once the index is warm.

Configuration

MossSimSearch

SimSearchResult