a Service doesn't use streaming to interact with external services
the service is supposed to open some port on the pod and serve an HTTP service (no need to support TLS at the moment)
initially this port is fixed and it must be 8000, in the future we can make it configurable
add a new agent "python-service" that allows you to deploy a python application without consuming from a topic or producing messages
add LangServe, FastAPI and Uvicorn to the bundled Python libraries
when you are running in docker the auto-reload feature works out of the box, as soon as you change your Python files the Python daemon is restarted
It is expected that the langstream gateway will act as a proxy to the service, adding:
TLS support for public networks
Authentication
Running Python application on Kubernetes
LangStream agents are already deployed as a StatefulSet (with persistent disks) and an headless Service.
Deploying an application here allows you to easily leverage all the Kubernetes features, for instance:
resource management (you can set set size of the machines, CPU, memory...)
scalability (you can set the number of replicats)
region awareness
...
Bonus feature added by this PR:
When you declare a Python agent you can easily pass environment variables from secrets:
Summary:
when you are running in docker the auto-reload feature works out of the box, as soon as you change your Python files the Python daemon is restarted
It is expected that the langstream gateway will act as a proxy to the service, adding:
Running Python application on Kubernetes
LangStream agents are already deployed as a StatefulSet (with persistent disks) and an headless Service. Deploying an application here allows you to easily leverage all the Kubernetes features, for instance:
Bonus feature added by this PR:
When you declare a Python agent you can easily pass environment variables from secrets:
This PR adds a sample application about how to integrate also with LangSmith![image](https://github.com/LangStream/langstream/assets/9469110/373b011d-f1dd-4ef5-b550-06eee3e01124)