The LangGraph runtime that drives the agent’s per-turn execution. Reference for advanced integrators who want to embed Cogtrix programmatically or replace specific pipeline phases.
src.orchestration.runner
Top-level coordinator. Receives a user prompt + session state, invokes the graph, returns the response and updated state.
Key callable:
run_turn(prompt, session, config)— single-turn execution.
src.orchestration.graph
LangGraph definition. Composes the pipeline phases (intent → optimizer → agent → safety → tools → compression → response) into a state machine.
Key callable:
build_graph(config)— returns the compiledStateGraph.
src.orchestration.session_orchestrator
Long-lived session management — multi-turn state, history persistence, working-memory eviction. Wraps the per-turn runner.
src.orchestration.run_config
Per-run configuration object that flows through the graph. Carries provider, model, memory mode, active tools, safety approvals, and runtime overrides.
Key type:
AgentRunConfig— pydantic model; serialised into the graph state.