Planning

Planning mode tells the session to produce a structured plan before it starts calling tools. Use it for multi-step work (refactors, release reviews, audits) where you want the agent to decompose the goal first instead of jumping straight into edits.

Set it through the session planning option: PlanningMode in Rust and Go, planningMode in Node.js, and planning_mode in Python. The accepted values are:

ValueBehavior
"auto"The runtime detects from the message when a plan is worthwhile.
"enabled"Force a plan on every request, even simple ones.
"disabled"Skip planning entirely for the lowest-latency path.

"auto" is the default structured pre-analysis path.

Rust
Node.js
Python
Go
Rust
use a3s_code_core::{Agent, PlanningMode, SessionOptions};
#[tokio::main]
async fn main() -> a3s_code_core::Result<()> {
let agent = Agent::new("agent.acl").await?;
let session = agent
.session_builder("/repo")
.options(SessionOptions::new().with_planning_mode(PlanningMode::Auto))
.build()
.await?;
let result = session
.send("Plan and complete the release-readiness review.", None)
.await?;
println!("{}", result.text);
println!("{} tool calls executed", result.tool_calls_count);
session.close().await;
agent.close().await;
Ok(())
}

Planning state is attached to the run, so a host UI can render a task list from run events and update completion as the agent works. Planning organizes the work; verification commands still provide the completion evidence.

Runnable session examples ship at sdk/node/examples/orchestration/parallel-pipeline.mjs and sdk/python/examples/orchestration_workflow.py.