# Simplify container deployments with environment variable support in serve()

> serve() now reads AGENT_OS_HOST and AGENT_OS_PORT environment variables as fallbacks when explicit values are not passed.

- Published: 2026-03-06
- Author: Agno Team
- Category: Changelog
- Canonical: https://agno-com-nine.vercel.app/articles/simplify-container-deployments-with-environment-variable-support-in-serve
- Markdown: https://agno-com-nine.vercel.app/articles/simplify-container-deployments-with-environment-variable-support-in-serve.md

`serve()` now reads `AGENT_OS_HOST` and `AGENT_OS_PORT` environment variables as fallbacks when explicit values are not passed. This removes the need to hardcode host and port configuration at the call site, making containerized and orchestrated deployments cleaner to manage.

Details**:**

- Set `AGENT_OS_HOST` and `AGENT_OS_PORT` in your environment to configure `serve()` without code changes
- Explicit arguments passed to `serve()` continue to take precedence
- No changes required for existing deployments that pass host and port directly

See [environmental fallback docs](https://docs.agno.com/agent-os/overview#environment-variable-fallbacks) for more.
