You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Executes the workload synchronously and returns an `ExecutionReport`. This is the primary method for running workloads in synchronous contexts.
24
+
25
+
-**Async alternative**: Use `execute_async()` for async/await environments
26
+
-**Parameters**: See [execute() API reference](api-reference.md#codon_sdk.agents.CodonWorkload.execute) for details
27
+
28
+
**`report.node_results(node_name)`**
29
+
30
+
Retrieves all outputs from a specific node during workload execution. Returns a list of results in execution order.
31
+
32
+
-**Usage**: `final_output = report.node_results("output_node")[-1]` gets the most recent result
33
+
-**Multiple executions**: If a node runs multiple times, you get all results as a list
34
+
-**Parameters**: See [node_results() API reference](api-reference.md#codon_sdk.agents.ExecutionReport.node_results) for details
35
+
36
+
**`report.ledger`**
37
+
38
+
Complete audit trail of execution events for compliance monitoring and debugging.
39
+
40
+
**Key Properties**
41
+
42
+
-**`logic_id`**: Unique identifier for this specific workload configuration. Changes when nodes/edges are modified. See [logic_id API reference](api-reference.md#codon_sdk.agents.CodonWorkload.logic_id).
43
+
-**`agent_class_id`**: Stable identifier for this workload type (format: 'name:version'). Consistent across deployments. See [agent_class_id API reference](api-reference.md#codon_sdk.agents.CodonWorkload.agent_class_id).
44
+
19
45
## Key Concepts
20
46
21
47
**Nodes**: Individual Python functions that perform specific tasks (e.g., "summarize", "validate", "format"). Each node receives input, processes it, and can emit output to other nodes.
Copy file name to clipboardExpand all lines: docs/public/instrumentation/index.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,4 +28,6 @@ pip install codon-sdk
28
28
pip install codon-instrumentation-langgraph
29
29
```
30
30
31
-
Each integration provides telemetry and observability for its respective framework while working alongside the core Codon SDK.
31
+
Each integration provides telemetry and observability for its respective framework while working alongside the core Codon SDK.
32
+
33
+
**Universal Interface:** All instrumentation packages convert framework-specific workflows into standard CodonWorkloads. This means you get the same `execute()`, `execute_async()`, `node_results()`, and other methods regardless of whether you built from scratch or wrapped an existing framework. See [Execution and Results](../building-from-scratch.md#execution-and-results) for the complete interface.
1. Every LangGraph node was registered as a Codon node via `add_node`, producing a `NodeSpec`.
84
-
2. Edges in the LangGraph became workload edges, so `runtime.emit` drives execution.
85
-
3.`execute` seeded tokens with the provided state, ran the graph in token order, and captured telemetry & audit logs.
86
-
4. You can inspect `report.ledger` for compliance, or `report.node_results(...)` for business outputs.
84
+
1.**LangGraph → CodonWorkload**: Your LangGraph was converted into a standard CodonWorkload with the same execution interface as [building from scratch](../building-from-scratch.md#execution-and-results)
85
+
2.**Node Registration**: Every LangGraph node was registered as a Codon node via `add_node`, producing a `NodeSpec`
86
+
3.**Edge Conversion**: Edges in the LangGraph became workload edges, so `runtime.emit` drives execution
87
+
4.**Token Execution**: `execute` seeded tokens with the provided state, ran the graph in token order, and captured telemetry & audit logs
88
+
5.**Universal Interface**: You can use all the same methods - `execute()`, `report.node_results()`, `logic_id`, etc. - documented in [Execution and Results](../building-from-scratch.md#execution-and-results)
0 commit comments