Skip to content

docs: Add two-container architecture and agent-server env var documentation#370

Draft
saurya wants to merge 1 commit intomainfrom
docs/agent-server-env-forwarding
Draft

docs: Add two-container architecture and agent-server env var documentation#370
saurya wants to merge 1 commit intomainfrom
docs/agent-server-env-forwarding

Conversation

@saurya
Copy link

@saurya saurya commented Mar 4, 2026

Summary

This PR adds comprehensive documentation explaining how environment variables work in OpenHands' two-container architecture, addressing confusion from multiple user-reported issues.

Related Issues (in OpenHands/OpenHands repo)

  • #12120 - LLM_TIMEOUT environment variable not being applied
  • #12227 - SANDBOX_USE_HOST_NETWORK bug
  • #12857 - Connection failures due to env var propagation
  • #12859 - Agent-server configuration issues
  • #12854 - Environment variable inconsistencies

Related Code PR

Changes

Added a new section "Two-Container Architecture (V1)" to environment-variables.mdx that explains:

  1. Architecture Overview - The split between app-server and agent-server containers
  2. Auto-Forwarded Variables - LLM_* prefixed variables are now automatically forwarded
  3. Explicit Configuration - How to use OH_AGENT_SERVER_ENV for custom variables
  4. Agent-Server Networking - Documents AGENT_SERVER_USE_HOST_NETWORK and related settings
  5. Practical Examples - Real-world configuration examples

Preview

The new section includes:

  • Note/Warning callouts for important information
  • Tables documenting all relevant environment variables
  • Code examples showing common use cases

Documentation Source

This documentation is based on:

…tation

This commit adds comprehensive documentation explaining:
1. The V1 two-container architecture (app-server vs agent-server)
2. Auto-forwarded environment variables (LLM_* prefixes)
3. The OH_AGENT_SERVER_ENV mechanism for explicit overrides
4. Agent-server networking configuration (including AGENT_SERVER_USE_HOST_NETWORK)
5. Practical examples for common use cases

This documentation addresses user confusion from issues:
- OpenHands/OpenHands#12120
- OpenHands/OpenHands#12227
- OpenHands/OpenHands#12857
- OpenHands/OpenHands#12859
- OpenHands/OpenHands#12854

Co-authored-by: openhands <openhands@all-hands.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants