string_therapy
Lean LLM controller that routes messages over a NetworkX graph and forwards to downstream HTTP endpoints
string_therapy runs as an HTTP routing service. Lisette picks a category and endpoint from a JSON-backed NetworkX graph, then forwards the request to the configured downstream API.
Quickstart
Install
pip install git+https://github.com/alix559/string_therapy.git
Configure
Set the model and API key:
export LISETTE_MODEL="your-model"
export LISETTE_API_KEY="your-key"
# Optional; omit this to use the packaged graph:
export ROUTER_GRAPH_PATH="/path/to/router_graph.json"
Start the service
string-therapy-serve
The service listens on port 5011 by default. Set CONTROLLER_PORT to change it.
Call the API
curl -s http://127.0.0.1:5011/health
curl -s http://127.0.0.1:5011/controller \
-H 'Content-Type: application/json' \
-d '{"message": "run a sales report"}'
Successful responses have this shape:
{
"status": "ok",
"request_id": "a1b2c3d4",
"response": "downstream response",
"parsed": {}
}
parsed is included only when the downstream service returns valid JSON.
Router graph JSON
See examples/router_graph.json (also packaged under string_therapy/examples/). Nodes are categories or endpoints; directed serves edges connect each category to its endpoints. The graph is loaded once at startup.
Deployment
The controller does not provide authentication. Put it behind an authenticated API gateway or private network when deploying it outside a trusted environment.
Developer Guide
This project uses nbdev. Edit notebooks under nbs/, then:
pip install -e ".[dev]"
nbdev_prepare
pytest -q
Documentation
Metadata
Release files for string-therapy 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| string_therapy-0.1.0.tar.gz | 15.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| string_therapy-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 29.0 kB
Release files / string_therapy-0.1.0.tar.gz
| Download URL | string_therapy-0.1.0.tar.gz |
|---|---|
| Size | 15.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f097777578e019a7e255794f6e0acff2bb89418199c9ef65ecf1332460c1808d
|
|
BLAKE2b-256 checksum How to use checksums |
5ce6b69f4e23b4012773445de2793c1e4af48cc6bc743974a8e7d1915642222a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.6
|
Release files / string_therapy-0.1.0-py3-none-any.whl
| Download URL | string_therapy-0.1.0-py3-none-any.whl |
|---|---|
| Size | 14.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
242b6df742a0e8b5dba455b58d9384573e603ecf09b7a1dd47859c84aedd1497
|
|
BLAKE2b-256 checksum How to use checksums |
38dd3dfbc5778a01a3ac83228369a36facb979203af7b2a195b4aa943af9113f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.6
|