nodes
Create, read, update, delete, and list graph nodes for reusable skills, knowledge, scripts, and environment variables.
Instructions
Manage graph nodes (SKILL, KNOWLEDGE, SCRIPT, ENV).
Supports create, read, update, delete, and list operations.
Args:
operation: Operation to perform (create, read, update, delete, list)
node_type: Type of node (SKILL, KNOWLEDGE, SCRIPT, ENV)
node_id: Node ID (for read, update, delete)
data: Node data (for create, update) - can be dict or JSON string
filters: Filter criteria (for list) - can be dict or JSON string
Returns:
Operation result
SCRIPT Node Best Practices:
- Do NOT include `if __name__ == '__main__':` blocks - they are
automatically stripped during execution to prevent unintended side effects
- Export functions/classes that should be callable from user code
- Keep example/test code in separate functions, not in __main__ blocks
- Use PEP 723 metadata for dependencies
- To use environment variables, create an ENV node and connect it to the
SCRIPT using a CONTAINS relationship: SCRIPT -[:CONTAINS]-> ENV
The ENV variables will be automatically loaded during execution
Examples:
Create a SKILL node:
```
nodes(
operation="create",
node_type="SKILL",
data={
"name": "data-pipeline",
"description": "ETL pipeline for data processing",
"body": "# Data Pipeline\n\nThis skill..."
}
)
```
Create a SCRIPT node (note: no __main__ block):
```
nodes(
operation="create",
node_type="SCRIPT",
data={
"name": "fetch_data",
"description": "Fetch data from API",
"function_signature": "fetch_data(url: str) -> dict",
"body": '''# /// script
requires-python = ">=3.12"
dependencies = ["requests>=2.31.0"]
///
import requests
def fetch_data(url: str) -> dict: response = requests.get(url) response.raise_for_status() return response.json() ''' } ) ```
List SCRIPT nodes:
```
nodes(
operation="list",
node_type="SCRIPT",
filters={"name": "fetch"}
)
```Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| filters | No | ||
| node_id | No | ||
| node_type | Yes | ||
| operation | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||