Overseas access: www.kdjingpai.com
Bookmark Us
Current Position:fig. beginning " AI Answers

As a developer, how to extend custom function nodes based on Lang-Agent?

2025-08-27 315
Link directMobile View
qrcode

Extending custom nodes in Lang-Agent requires the development of both front-end components and back-end logic:

Front-end development (React)

  1. existsrc/nodesDirectory to create a new component (e.g. MyNode.tsx)
  2. Implement node UI: inherit base node properties, define parameter input form
  3. Registered nodes: insrc/nodes/index.tsAdd node type identifiers and icons to

Back-end development (Python)

  1. existlang_agent/nodesDirectory to create processing classes (e.g. my_node.py)
  2. Realize the core logic:
    • Inherit BaseNode class
    • Rewrite execute method to handle business logic
    • Define input/output parameter checksum rules
  3. Registered nodes: inlang_agent/nodes/__init__.pyImporting new classes

Development proposals

  • References to built-in node implementations (e.g. counter_node)
  • Follow state variable naming conventions (to avoid conflicts)
  • Adding TypeScript type definitions to complex nodes
  • Provide documentation for node usage

After completing the development, the new node will automatically appear in the Resources panel, which supports combining it with other nodes.

Recommended

Can't find AI tools? Try here!

Just type in the keyword Accessibility Bing SearchYou can quickly find all the AI tools on this site.

Top