cayu.environments.base
Public Cayu API. Definitions are grouped by their public source module, and definitions from private implementation modules appear on their package’s page; adding a symbol does not move existing links. The import shown at each entry is a supported public namespace. Read the Python API overview and install the required extra.
copy_environment
Section titled “copy_environment”from cayu.environments import copy_environmentcopy_environment(environment: Environment) -> EnvironmentRelease source · Runtime guarantees · Capability guides
DEFAULT_WORKSPACE_INSTRUCTION_PATHS
Section titled “DEFAULT_WORKSPACE_INSTRUCTION_PATHS”from cayu.environments import DEFAULT_WORKSPACE_INSTRUCTION_PATHSDEFAULT_WORKSPACE_INSTRUCTION_PATHS = ('AGENTS.md', '.cayu/AGENTS.md')Release source · Runtime guarantees · Capability guides
DEFAULT_WORKSPACE_INSTRUCTIONS_MAX_BYTES
Section titled “DEFAULT_WORKSPACE_INSTRUCTIONS_MAX_BYTES”from cayu.environments import DEFAULT_WORKSPACE_INSTRUCTIONS_MAX_BYTESDEFAULT_WORKSPACE_INSTRUCTIONS_MAX_BYTES = 32 * 1024Release source · Runtime guarantees · Capability guides
Environment
Section titled “Environment”from cayu.environments import EnvironmentExecution context an agent session can use.
The environment is intentionally thin for now. Concrete local, Docker, hosted, or customer-hosted environments can bind workspace, runner, vault, and MCP services without making those details part of AgentSpec.
init (method)
Section titled “init (method)”Environment.__init__(spec: EnvironmentSpec, *, workspace: Workspace | None=None, artifact_store: ArtifactStore | None=None, runner: Runner | None=None, vault: Vault | None=None, proxy: CredentialProxy | None=None, knowledge_store: KnowledgeStore | None=None, knowledge_access_scope: KnowledgeAccessScope | None=None, binding: WorkspaceBinding | None=None, mcp_servers: Iterable[McpServerSpec] | None=None, workspace_instructions: WorkspaceInstructionsInput | None=None) -> Noneknowledge_store (property)
Section titled “knowledge_store (property)”Environment.knowledge_store() -> KnowledgeStore | NoneReturn the registration-time knowledge store binding.
The binding is intentionally read-only. Runtime execution profiles and isolated intervention admission both authenticate this exact object; replacing it after admission would turn those checks into a check/use race.
knowledge_access_scope (property)
Section titled “knowledge_access_scope (property)”Environment.knowledge_access_scope() -> KnowledgeAccessScope | NoneReturn a defensive copy of the registration-time access scope.
resolve_secret (method)
Section titled “resolve_secret (method)”async Environment.resolve_secret(ref: SecretRef, *, scope: dict[str, Any] | None=None) -> ResolvedSecretResolve a secret ref through the environment vault.
Release source · Runtime guarantees · Capability guides
EnvironmentSpec
Section titled “EnvironmentSpec”from cayu.environments import EnvironmentSpecBases: BaseModel.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
name |
str |
required |
metadata |
dict[str, Any] |
Field(default_factory=dict) |
execution_profile_identity |
ExecutionProfileBehaviorIdentity | None |
None |
lifecycle_policy |
EnvironmentLifecyclePolicy | None |
None |
workspace_checkpoint_policy |
WorkspaceCheckpointPolicy | None |
None |
copy_workspace_checkpoint_policy (method)
Section titled “copy_workspace_checkpoint_policy (method)”EnvironmentSpec.copy_workspace_checkpoint_policy(value: object) -> WorkspaceCheckpointPolicy | Nonecopy_lifecycle_policy (method)
Section titled “copy_lifecycle_policy (method)”EnvironmentSpec.copy_lifecycle_policy(value: object) -> EnvironmentLifecyclePolicy | Nonecopy_metadata (method)
Section titled “copy_metadata (method)”EnvironmentSpec.copy_metadata(value: dict[str, Any]) -> dict[str, Any]validate_nonblank_name (method)
Section titled “validate_nonblank_name (method)”EnvironmentSpec.validate_nonblank_name(value: str, info) -> strRelease source · Runtime guarantees · Capability guides
load_workspace_instructions
Section titled “load_workspace_instructions”from cayu.environments import load_workspace_instructionsasync load_workspace_instructions(environment: Environment) -> WorkspaceInstructions | NoneRelease source · Runtime guarantees · Capability guides
WorkspaceInstructions
Section titled “WorkspaceInstructions”from cayu.environments import WorkspaceInstructionsBases: BaseModel.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
content |
str |
required |
sources |
tuple[str, ...] |
('explicit',) |
validate_content (method)
Section titled “validate_content (method)”WorkspaceInstructions.validate_content(value: str) -> strvalidate_sources (method)
Section titled “validate_sources (method)”WorkspaceInstructions.validate_sources(value) -> tuple[str, ...]Release source · Runtime guarantees · Capability guides
WorkspaceInstructionsConfig
Section titled “WorkspaceInstructionsConfig”from cayu.environments import WorkspaceInstructionsConfigBases: BaseModel.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
paths |
tuple[str, ...] |
DEFAULT_WORKSPACE_INSTRUCTION_PATHS |
mode |
Literal['first_found', 'merge'] |
'first_found' |
max_bytes |
int |
DEFAULT_WORKSPACE_INSTRUCTIONS_MAX_BYTES |
validate_paths (method)
Section titled “validate_paths (method)”WorkspaceInstructionsConfig.validate_paths(value) -> tuple[str, ...]validate_max_bytes (method)
Section titled “validate_max_bytes (method)”WorkspaceInstructionsConfig.validate_max_bytes(value: int) -> int