Skip to content

Conversation

christian-bromann
Copy link
Member

@christian-bromann christian-bromann commented Aug 6, 2025

This patch aims to create examples for the following features characterizing createReactAgent:

  1. Specify Custom System Prompt
  2. Explicit Control Over Message Generation
  3. Access External Context in Message Generation
  4. Access Thread Level State in Message Generation
  5. Access Long Term Memory in Message Generation
  6. Update Thread Level Before Model Invocation
  7. Access External Context in Tools
  8. Access Thread Level Context in Tools
  9. Access Long Term Memory in Tools
  10. Update Thread Level Context in Tools
  11. Update Long Term Memory in Tools
  12. Update Tools Before Model Call
  13. Update Model to Use Before Model Call
  14. Post Model Hook

Note: langchain dependency tests are failing due to the fact that we haven't published any version for @langchain/agents. We still may move the code into langchain directly.

Copy link

vercel bot commented Aug 6, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
langchainjs-docs Ready Ready Preview Comment Aug 26, 2025 9:13pm
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
langchainjs-api-refs Ignored Ignored Aug 26, 2025 9:13pm

* - Intelligent Workflow Management:
* Enables tools to coordinate with each other and avoid redundant actions
*
* Example Scenario:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe better example: using a sub agent as a tool. you want to pass all message to sub agent which is inside tool

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to:

A supervisor agent has a delegate_to_subagent tool. When the user asks for a conversation-wide summary or action items, the supervisor calls the tool, which passes the full message history plus a task to the sub-agent. The sub-agent returns a polished result back to the supervisor.

* - Specialized Routing: Directs different types of queries to models that excel in those particular domains
*
* Example Scenario:
* You're building a coding assistant that handles both simple syntax questions and complex algorithm design.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: we can access state, long term memory, and context before we update the model to use, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is correct!

@christian-bromann
Copy link
Member Author

@hwchase17 thanks for the feedback, I've update the examples accordingly.

@christian-bromann christian-bromann merged commit d36c166 into cb/v1-prebuilts Aug 26, 2025
27 of 37 checks passed
@christian-bromann christian-bromann deleted the cb/v1-prebuilts-examples branch August 26, 2025 21:09
@christian-bromann christian-bromann restored the cb/v1-prebuilts-examples branch August 26, 2025 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants