Skip to content
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

Adding support for a new runnable for InlineAgents #340

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

divekarshubham
Copy link

Description

This PR introduces a new Bedrock Inline-Agents Runnable that allows using InvokeInlineAgent API with return of control functions as tools and configurable agentic properties.

Usage

See Jupyter notebook for usage with AgentExecutor

@divekarshubham divekarshubham marked this pull request as ready for review January 28, 2025 08:12
Copy link
Collaborator

@jdbaker01 jdbaker01 left a comment

Choose a reason for hiding this comment

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

Good start, I really like how inline agents fits the interfaces better than the create agent/invoke agent pattern. Left a comment on the interface itself. We should adhere to the messages input/output contract similar to how the chat models do it.

prompt_override_configuration: Optional[Dict]
inline_session_state: Optional[Dict]

class BedrockInlineAgentsRunnable(RunnableSerializable[Dict, OutputType]):
Copy link
Collaborator

Choose a reason for hiding this comment

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

The contract seems to deviate from how other Runnables are implemented. Notice here in the Anthropic Chat Model that they use message as input and output: https://github.com/langchain-ai/langchain/blob/master/libs/core/langchain_core/language_models/chat_models.py#L127

If we support message in and message out then this will easily plugin to LCEL, LG and other constructs they have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants