environments
Execution environment configuration types for v2 agents.
Concrete environment types determine where and how an agent process is deployed (tmux pane, cloud API, etc.) and the communication protocol used (file-based signals vs HTTP-based). Each concrete type is a frozen dataclass.
Type alias
AgentEnvironment: Union of all supported environment config types. Add new types here as they are implemented. If a behavioral contract (shared method or attribute) is ever identified that all environments must satisfy, replace this alias with an ABC or Protocol.
TypeVar
AgentEnvironmentT: Bound to AgentEnvironment. Use in generic code that needs to preserve the concrete environment type through a function signature. Update the bound here whenever AgentEnvironment gains a new member.
TmuxEnvironment
dataclass
Deploy agent as a Claude Code process in a tmux pane.
Attributes:
| Name | Type | Description |
|---|---|---|
session |
str
|
The tmux session name where the pane will be created. Must be explicitly provided via graph YAML or CLI flag. |
Source code in src/agentrelay/environments.py
23 24 25 26 27 28 29 30 31 32 | |