Ability to get a default configuration for agents in internal/examples/server
I would like to add some e2e tests for a python client and it would be handy being able to pass a default config via an option to the cli command instead of the UI so that I can run everything in CI.
@xrmx Which CLI are you referring to?
Instead of a CLI, the server can expose a REST API to accept the config and the Python test can do a POST to the server like for example:
curl -X POST localhost:4321/api/save_config -H "Content-Type: application/json" -d '{"instance_id":"0199c79
4738b7895bb6c5f7fbbf7b3d0", "body":"Zm9vLWJhcg=="}'
@xrmx Which CLI are you referring to?
The internal/examples/server binary
Instead of a CLI, the server can expose a REST API to accept the config and the Python test can do a POST to the server like for example:
That would require to call it after the client has connected which should not be a problem. Said that I think the server atm is not showing plain http (no websocket) clients in the ui so not sure if that's only an ui issue or these client are just forgot.
A complete solution could be:
- Adding a flag to the server like
--default-config <<filepath>>to initialize the default config for all the clients connections - Providing a REST api to set the config for a particular client/instance_id at runtime
@xrmx Does any of the above solutions work for you?