Each agent should have one or more examples. These examples are sample conversations between an end-user and the agent app, including the dialogue and actions performed by the agent app. These are effectively few-shot prompt examples for the LLM.

The console provides an interface for you to enter actions.

Multilingual agent apps

If you want your agent app to handle multiple languages, your examples should use each of the languages.

Example input summary and output summary

In addition to input and output parameters, agents support receiving an input summary and emitting an output summary for exchanging information with other agents. Summaries are helpful for passing abstract contextual information between agents, while parameters are more helpful for passing structured, well defined fields between agents. Parameters are the only way to exchange data between flows and agents.

Add relevant input summaries to examples to condition the agent to adjust its actions based on the input summaries at runtime. Add output summaries including relevant, accurate details about the example conversation to show the agent what details are important to summarize.

Example state

At a given point in the conversation, an agent will be in one of the following states:

  • OK: The agent successfully achieved its goal and control will now transfer to the parent agent.
  • CANCELLED: The user decided not to proceed with the goal assigned to the agent. The control will now transfer to the parent agent.
  • FAILED: The agent cannot proceed with the goal due to some error (e.g. tool returns 500 error). The session will end with status fail.
  • ESCALATED: The agent decided that it cannot achieve the goal and needs to escalate the situation to a human. The session will end with status escalated.
  • PENDING: The conversation is still continuing within the agent.

The top-level example and its agent invocations should be denoted with a state which corresponds to the agent they are referencing.

Selection strategy

Selection strategy controls whether or not each example is included in the agent's prompt.

  • DEFAULT: the example may be omitted if the prompt nears the token limit.
  • STATIC: the example is always included.
  • NEVER: the example is never included in the prompt. The example will have no effect whatsoever on the agent's performance.