-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feat(examples): Add supervisor example #9235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(examples): Add supervisor example #9235
Conversation
|
description: ` | ||
Schedule calendar events using natural language. | ||
|
||
Use this when the user wants to create, modify, or check calendar appointments. | ||
Handles date/time parsing, availability checking, and event creation. | ||
|
||
Input: Natural language scheduling request (e.g., 'meeting with design team next Tuesday at 2pm') | ||
`.trim(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shower thought: we should have some kind of prompt
template literal that dedents + trims
description: prompt`
Schedule calendar events using natural language.
Use this when the user wants to create, modify, or check calendar appointments.
Handles date/time parsing, availability checking, and event creation.
Input: Natural language scheduling request (e.g., 'meeting with design team next Tuesday at 2pm')
`,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
huh that's an interesting idea. I think we'd want interpolation to work like regular string interpolation, which should be easy to do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah that should just work out of the box! This is moreso just me not wanting to do weird dedenting to properly format prompts in my code 😁
// Customize context received by sub-agent | ||
// Access full thread messages from the config | ||
const currentMessages = | ||
getCurrentTaskInput<InternalAgentState>(config).messages; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned on docs PR, this is an error because it appears InternalAgentState
is not exported from langchain
so I didn't import it at the top
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm maybe we should change it then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
Just translates the Python version of the supervisor tutorial to js. - Depends on langchain-ai/langchainjs#9228 - See also langchain-ai/langchainjs#9235 --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: Lauren Hirata Singh <[email protected]>
Just translates the Python version of the supervisor tutorial to js. - Depends on langchain-ai/langchainjs#9228 - See also langchain-ai/langchainjs#9235 --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: Lauren Hirata Singh <[email protected]>
To accompany https://docs.langchain.com/oss/javascript/langchain/supervisor from langchain-ai/docs#981
BaseMessage.toFormattedString()
#9228