Creating nodes
Nodes are the executable units inside an agent tree.
In the editor
Create a tree, add a root node, then add children or specialist handoffs. Set:
- a clear name and capability;
- model and AI connection;
- business and execution prompts;
- timeout, retry, and output policies;
- connector bindings where external data is required.
From Python
import orchetree
@orchetree.node(
tree="Research",
capability="analysis",
business_prompt="Compare the supplied evidence.",
execution_prompt="Return claims with supporting sources.",
)
def analyse(inputs: dict) -> dict:
return inputs
Run orchetree sync to upsert the definition. Removing a decorated definition
marks its SDK-managed resource inactive rather than hard-deleting it.
From Node.js
Node.js uses function wrapping rather than Python decorators:
import { node } from "orchetree";
function analyse(input: unknown) {
return input;
}
node(
{
tree: "Research",
capability: "analysis",
business_prompt: "Compare the supplied evidence.",
},
analyse,
);