Skip to main content
Internals

System Prompt

How agentOS injects context into agent sessions.

agentOS automatically injects a system prompt into every agent session that describes the VM environment and available tools. The prompt is additive and never replaces the agent’s own instructions (CLAUDE.md, AGENTS.md, etc.).

The prompt is assembled and injected at the start of each session rather than baked into the VM image, so it always reflects the tools currently exposed to that session.

Customization

const session = await vm.createSession("pi", {
  env: { ANTHROPIC_API_KEY: process.env.ANTHROPIC_API_KEY! },
  // Append custom instructions
  additionalInstructions: "Always write tests before implementation.",
  // Suppress the base OS prompt (tool docs are still injected)
  skipOsInstructions: true,
});