Overview
Mechanex exposes three lower-level modules for understanding model structure and how context affects answers:mx.modelfor computation graph metadatamx.attributionfor attribution patching scoresmx.raagfor retrieval-augmented answer generation
mx.model.get_graph() is backed by the current API contract. mx.attribution and mx.raag are exported by the SDK but are not present in the current OpenAPI fixture, so treat them as experimental wrappers until the backend contract includes their endpoints. They also check that local model state exists before posting; use them after mx.load(...) or mx.set_local_model(...).
Model Graph
Usemx.model.get_graph() to retrieve the model computation graph from the /graph endpoint.
mx.model.graph() is an alias for get_graph(). mx.model.get_paths() is deprecated and now derives names from the graph response.
Attribution
Load or attach a local model before using attribution:mx.attribution.compute_scores() to compare a clean prompt against a corrupted prompt and return attribution-patching scores when the backend endpoint is available.
target_module_paths is optional. When omitted, Mechanex sends an empty path list and lets the backend choose the applicable target set.
RAAG
Use RAAG after loading or attaching local model state, as with attribution. Usemx.raag.generate() for retrieval-augmented answer generation when the backend endpoint is available. Pass question entries plus either inline documents or a Pinecone index name.