So I was thinking about the config again in light ...
# proj-sdk
s
So I was thinking about the config again in light of Engel's earlier comments and the needs I have coming from the app server, and created this PR: https://github.com/All-Hands-AI/agent-sdk/pull/511 (I want to use the same
env_parser.py
in the app server too.) Key benefits: • Configuration is completely done by environment variables. (Which is favored by docker and K8 where injecting a file means either building a custom image or injecting one manually after the container starts). • Configuration is fully Pydantic (So you could generate a schema for if you wanted) • Configuration is extendable using our polymorphic mechanism. • I still support the
SESSION_API_KEY
variable for the legacy runtime api Example: I can define environment variables for my config like so:
Copy code
export OH_STATIC_FILES_PATH="scripts/agent_server_ui/static",
export OH_WEBHOOKS_0_BASE_URL="https://my-webhook-server",
export OH_SOME_UNKNOWN_VARIABLE="BOOP!"
This effectively gets turned into the JSON:
Copy code
{
  "static_files_path": "scripts/agent_server_ui/static",
  "webhooks": [
    {
      "base_url": "https://my-webhook-server"
    }
  ]
}
And then parsed by pydantic.
👀 1