Prepare
Complete the Docker Compose quickstart, configure model credentials, and enableBUILDER_ALLOW_LOCAL_ENVIRONMENT=true. The commands require Bash, curl, and jq. Run them in order in one Bash terminal.
Set your Service address, platform user token, and authorized namespace. For an existing team deployment, use the configuration supplied by your administrator.
Need a user token? Sign in and list namespaces
Need a user token? Sign in and list namespaces
Enter your platform username and password. On a new deployment, use Choose a namespace from the response and use its
admin and the password from .env, or the password you changed in Profile.tenant and name for TENANT and NAMESPACE above. The user token manages resources; see application integration for application credentials.1. Create an environment
Create a Local Environment so file tools run inside the Dataplane container. If you already have an available environment, setENVIRONMENT_ID and skip this request. See Environments for other types.
2. Create an Agent
Create a notes assistant using the deployment’s default model and only the file reading and writing tools. Setbinding.kind to managed and select the tool environment with defaultEnvironmentId.
AGENT_ID to reuse this Agent in later sessions. Use a different agentKey when creating another Agent. This example allows file reads and writes without confirmation; see tool permissions for configuration.
3. Create a session
Create a Session referencing the Agent to retain messages and execution history. Creating a session does not start work; submit a task next.4. Submit a task
Send a message to the session to create a Turn.202 Accepted response means the task was received. For a network retry, keep the same Idempotency-Key and message. Use a new key for a new task.
5. Inspect progress and results
Read the snapshot to inspect existing messages, tool results, and task status:as_of cursor:
turn.completed for your TURN_ID, press Ctrl-C to stop the stream and query the final result. Closing the stream does not cancel the task.
status is completed, tool records show meeting-actions.md was written and read, and the response preserves the Friday deadline, Monday review, and unconfirmed time. The file resides in the execution environment; see files and artifacts for downloads and Artifact publication.
If the status is failed, inspect error. For requires_action, inspect the snapshot’s required_actions. See sessions and tasks for handling these states.
Next
KeepAGENT_ID and continue to Session API application integration. To add capabilities, see Agent configuration, tools and MCP, and SSE events.