| Crates.io | toi_server |
| lib.rs | toi_server |
| version | 0.1.1 |
| created_at | 2025-05-14 02:35:17.716129+00 |
| updated_at | 2025-06-16 22:06:39.982634+00 |
| description | A personal assistant server |
| homepage | |
| repository | https://github.com/theOGognf/toi |
| max_upload_size | |
| id | 1672790 |
| size | 393,431 |
A personal assistant server with type-safe tool search and tool usage via HTTP API endpoints.
The server requires the following supporting services:
The server binary also has some native dependencies, so the Docker image is the easiest way to get started.
At least two environment variables are required for configuration:
DATABASE_URL: required by Diesel for connecting to the backing databaseTOI_CONFIG_PATH: path to the server configuration fileThe actual server configuration file at the path defined by TOI_CONFIG_PATH
should have HTTP client options for the embedding, generation, and
reranking APIs. It also supports environment variable interpolation for some
values, so you can put something like this to keep API secrets safe:
{
"server": {
"bind_addr": "0.0.0.0:6969",
"user_agent": "${USER_AGENT}"
},
"embedding": {
"base_url": "http://embedding:8000"
},
"generation": {
"base_url": "http://generation:8000",
"headers": {
"api_key": "${MY_API_KEY}"
}
},
"reranking": {
"base_url": "http://reranking:8000"
}
}
If you decide to use different models from the ones provided by the project's Docker Compose file, then be sure to tune/set the embedding distance and reranking similarity threshold values referenced by the configuration struct.
Generally, the flow of a user's request goes as follows:
/assistant endpointIn addition to wanting to learn some of the dependencies I used in this project, I've been thinking about making a self-hosted personal assistant that I could use and easily extend myself for a while now. Recently, there's been a flurry of AI tool usage articles, followed by the announcement of the Model Context Protocol (MCP), and now MCP servers are popping-up everywhere. Eventually, I couldn't resist the intrusive thought of "well, you could just build type-safe tools using plain ol' HTTP endpoints, OpenAPI schemas, and JSON Schemas".
And so that's what this is.