General Introduction
Agent Inbox is an open source project developed by the LangChain team to provide a new user experience for interacting with AI intelligences. The project allows users to manage and optimize interactions with multiple AI intelligences through a centralized interface.Agent Inbox supports a variety of configuration and customization options, enabling users to tailor the agent's behavior and response to their needs. The goal of the project is to simplify the process of managing AI intelligences, improve the efficiency of interactions, and provide a more intuitive user experience.
Online hosted version: dev.agentinbox.ai
Function List
- centralized management: Manage the interaction of multiple AI intelligences through a single interface.
- Customized Configuration: A variety of configuration options are supported, allowing users to adjust agent behavior according to their needs.
- real time response: Provides real-time logging of agent responses and interactions.
- Multi-language support: Supports interrupt input and output modes for multiple programming languages.
- open source project: The code is publicly available and can be freely viewed, modified and contributed to by users.
Using Help
Installation process
- clone warehouse::
git clone https://github.com/langchain-ai/agent-inbox.git
cd agent-inbox
- Installation of dependencies::
yarn install
- Configuring the API Key::
- Click the "Settings" button in the sidebar and enter the LangChain API key.
- Create your first inbox: Open the Settings pop-up window (bottom left corner of the sidebar), click "Add Inbox" and fill in the relevant information.
Usage Process
- Initiation of projects::
yarn start
- Connecting LangGraph Deployment::
- Add the LangGraph graph name or helper ID.
- Enter the URL of the LangGraph deployment.
- Name the inbox (optional).
- Managing interruptions::
- Update all instances in the code that use interrupts to be compatible with Agent Inbox.
- Define interrupt input and output modes using Python or TypeScript.
Main Functions
- Acceptance of interruptions: Accepts an interrupt parameter or action and sends an ActionRequest.
- Edit Interrupt: Edit the parameters of the interrupt and send the modified ActionRequest.
- Ignore interruptions: Depending on the configuration, the user can choose to ignore interrupts.
- Responding to Interruptions: The user can respond according to the type of interrupt.
Detailed Operation Procedure
- Configuring Interrupt Mode::
- Python interrupt mode:
python
class HumanInterrupt(BaseModel).
action: str
args: Dict[str, Any] - TypeScript interrupt mode:
typescript
interface HumanInterrupt {
action: string;
args: Record;
}
- Python interrupt mode:
- Send Response::
- Depending on the type of interrupt, the appropriate HumanResponse is sent:
python
class HumanResponse(BaseModel).
action_request: ActionRequest
- Depending on the type of interrupt, the appropriate HumanResponse is sent:
Introduction of ambient agents
Most current AI applications follow a common chat model (e.g. ChatGPT). While easy to implement, they incur unnecessary interaction overhead, limit our human self-scalability, and fail to utilize the full potential of the Large Language Model (LLM).
Over the past six months, we've been exploring a different approach at LangChain:Environmental agents Respond to environmental signals and require user input only when an important opportunity is detected or feedback is needed. Rather than forcing the user into a new chat window, these agents help you focus on what matters most.
We built the LangGraph to simplify the implementation of these patterns. Today, we share our first reference implementation: aEmail AssistantIt demonstrates the keyEnvironmental agentsPatterns. Over the next few days, we'll be posting more examples and tools to help you build your own environmental workflows.
What is an environmental agent?
When using the ChatGPT (or any other chatbot) when they rely on you to initiate a conversation. Agents are initiated by a human sending a message.
This is great for some use cases, but has significant limitations for others. It requires the user to go into the chat interface and send a message each time in order for the agent to perform its job. Getting the agent to start working incurs a lot of overhead.
Another limitation is that you can only have one conversation at a time. This makes it difficult for us humans to expand our capabilities -- an agent can only do one thing for us at a time.
If we consider a UX paradigm that allows us to overcome these limitations, it should exhibit two key characteristics:
- It should not be triggered (only) by human messages
- It should allow multiple agents to run simultaneously
These characteristics define what we call Environmental agents The
💡Environmental agents Listen to the event stream and act accordingly, possibly on multiple events at the same time
It is worth noting that we do not believe thatEnvironmental agentsmust be fully autonomous. In fact, we believe that it will beEnvironmental agentsA key part of the push to the public is to thoughtfully consider the importance of when? as well as what way These agents interact with humans.
human-computer interaction
We usehuman-computer interactionto refer to these agents when? as well as what way interacting with humans. We'll get to that later. what way But now let's discuss when? The
We usually seeEnvironmental agentsThe three commonhuman-computer interactionModalities: notification, questions and review.
Notice: Let the user know that an event is important, but take no action. This is useful for flagging events that the user should see, but the agent has no authority to act on them. In the context of an email assistant, this might be an agent flagging a Docusign in my inbox -- it can't sign that Docusign, but I should know it exists.
Question: Ask the user a question to help unblock the agent. The agent may be trying to take some action, but it is not clear how best to perform it because it is missing some relevant information. Instead of hallucinating or guessing, it's better to have the agent ask the human directly what to do. In the context of an email assistant, this might be an agent asking me if I want to attend a meeting. Unless the prompt has instructions to the agent about my meeting preferences, it can't possibly know. A human EA would ask me, and so should an agent.
Review: Review the actions that the agent wants to take. Some actions are "dangerous" enough that it may be worth hard-coding a review for any action the agent wants to take. A human could approve the action, edit it directly, or provide direct feedback to the agent on how to change it. In the context of an email assistant, this might be an outgoing email. It might write a draft, but I have to approve it, edit the message content directly, or tell the agent to fix it somehow.
The Importance of Human-Computer Interaction
We believe thathuman-computer interactionComponents forEnvironmental agentsbrings three key benefits:
- It reduces risk and makes it easier for agents to go into production
- It mimics human communication to build user trust and adoption
- It enhances long-term memory and learning
HCI reduces risk. If an agent is running completely autonomously in the background, it really can't make mistakes. You have to trust the agent a lot to let it take certain actions (e.g. updating databases, sending emails to important customers, etc.). Withhuman-computer interactionYou can easily control these operations and require explicit manual approval. This way you can make sure that you don't send the wrong emails.
HCI mimics the way humans communicate. An important part of working with others is communicating with them. When you are hesitant, ask them questions and let them help you consider ideas. If we have "coworkers" who are proxies, having them communicate in a similar mode builds user trust, which promotes adoption. Consider something like Devin Something like this. They choose users with Devin One of the main interfaces for interaction is Slack. that's where we interact with human developers, so why shouldn't we interact with AI developers that way? Communication is important.
Human-computer interaction enhances long-term memory and learning. We strongly believe that a key part of AI agents is their ability to learn and better align with human users over time. In order to achieve this consistency, they need some form of user feedback. This kind ofhuman-computer interactioncomponents provide this feedback.
Proxy Inbox
Thus, we discussed the fact that agents should when? Communication with humans ( notifications(math.) genus ask questions(math.) genus censor out ), but we did not discuss that they should what way Communication.
on trialEnvironmental agentsWhen it came to Slack, we initially started with Slack. The main benefit was that we were all already using Slack for our day-to-day work, so it was an effective way to get our attention and stay focused on communicating with our humans.
The downside of Slack is that it's easy to miss all the notifications. If you don't respond to some notifications, the backlog of Slack notifications grows.The Slack channel (or DM) isn't the easiest to navigate. It also has limitations in how you can communicate with agents - you can easily send them messages, but anything else is trickier.
We've switched to what we call "proxy inboxes". This is the same asEnvironmental agentsInteractive new UX. it's modeled to combine an email inbox with a customer support ticketing system. It shows all open lines of communication between you and the agent - making it easy to track down any outstanding actions. It is a standalone UI that makes it easy to add any panels, buttons, or other UI features, enabling you to capture user feedback more easily. Currently, items are only sorted by time, but in the future you will be able to sort them by priority. Currently, this inbox is single-player, but in the future you will be able to see which items have been assigned to you and which have been assigned to others.
Note: The open source implementation of the proxy inbox will be released on Thursday (already).
Why LangGraph is Great for Environmental Agents
Before we build theEnvironmental agentsWe make sure that LangGraph is able to support these types of agents. LangGraph Platform ) has some key features that you might not want to build yourself:
internally installedpersistence layer. LangGraph is backed by a persistence layer that holds the state of the agent between each operation (or node of the graph). This allows the agent to essentially "pause" and wait for user feedback. This is useful for enablinghuman-computer interactionPatterns as well as short-term conversational memory are important.
internally installedHuman-computer interaction supportThe LangGraph native supporthuman-computer interactionPatterns. The built-in persistence layer is an important part of this, but we've also recently added the "Interruptions." This is a new built-in method of communicating with end users.
internally installedLong-term memory. LangGraph has built-in long-term memory (essentially a namespace key-value store with support for semantic search). This allows the agent to use thehuman-computer interactionIt is easy to update its "memory" afterward.
Cron Tasks. ManyEnvironmental agentsRun on a schedule to check for new events. the LangGraph Platform comes with a built-in cron task to support this.
Building an AI Email Assistant
By constructing our dailyEnvironmental agentsWe have made LangGraph well suited for constructingEnvironmental agentsOne of the main ones is an e-mail assistant. One of the main ones is an email assistant. If you've contacted me in the last six months, there's a good chance that the AI agent drafted that email (and if I've overlooked you, it must be the AI agent's fault).
Today, we are launching this email helper, which is both a free to use hosted email agent and an open source project. We want hosted email agents to be easy to try and experience!Environmental agents, and the open source version can serve as a reference implementation of this new design paradigm.