Skip to main content

Prerequisites

1

Install and sign in to Nexus

Open the Nexus app and sign in. The SDK drives this running app, so it must be open while your code runs.
2

Turn on Developer access

In Settings → Developer access, enable it. This starts the local MCP server the SDK connects to and writes a per-user descriptor the SDK discovers automatically.
3

Install the SDK

Requires Python 3.10+.
4

Check the connection

This confirms the app is reachable, you’re signed in, and the agent runtime is ready. A healthy check looks like this:
Any line marked tells you what to fix — re-check that the app is open, you’re signed in, and Developer access is on.

Your first run

Client() discovers the running app and connects — no endpoint or key to configure. client.run(...) starts an agent run and returns a Run; .text() drives it to completion and returns the run’s transcript — the answer plus each tool step as a line. Add live=True to watch it print while you wait. The printed transcript looks like this — the lines are the tool steps the agent took, and the prose is its answer:

Streaming the work as it happens

Instead of .text(), iterate the run to see it live. It yields typed events — ToolCall (a tool-call boundary) and TextChunk (the answer, as it streams):
Iterate or call .text() — a run is single-use. The TextChunks reconstruct the same answer .text() returns; iterating just lets you render it (and the tool steps) as it arrives.

Picking an agent

Pass agent= to target a platform: "solidworks", "abaqus", "fluent", "ansys_mechanical", "comsol", … Omit it to use the default agent. Run cosmon doctor to see which agents your app exposes.

Next steps

Guide

Attended vs unattended, answering the agent with handlers, and batch runs.

Examples

Runnable scripts for every capability — copy, run, adapt.

Python reference

The full API surface, async client, streaming, and errors.

Command line

The cosmon CLI — doctor, run, and chats from the shell.