Learn how to write prompts and other context engineering techniques for your teams.
description
, instructions
and a number of other settings. The description
is added to the start of the system message and instructions
are added as a list. For example:
additional_context
parameter.
In this example, we add additional context to the system message that the agent has access to specific tables in a database.
Parameter | Type | Default | Description |
---|---|---|---|
description | str | None | A description of the Team that is added to the start of the system message. |
instructions | List[str] | None | List of instructions added to the system prompt in <instructions> tags. Default instructions are also created depending on values for markdown , expected_output etc. |
additional_context | str | None | Additional context added to the end of the system message. |
expected_output | str | None | Provide the expected output from the Team. This is added to the end of the system message. |
markdown | bool | False | Add an instruction to format the output using markdown. |
add_datetime_to_context | bool | False | If True, add the current datetime to the prompt to give the team a sense of time. This allows for relative times like “tomorrow” to be used in the prompt |
add_name_to_context | bool | False | If True, add the name of the team to the context. |
add_location_to_context | bool | False | If True, add the location of the team to the context. This allows for location-aware responses and local context. |
add_session_summary_to_context | bool | False | If True, add the session summary to the context. See sessions for more information. |
add_memories_to_context | bool | False | If True, add the user memories to the context. See memory for more information. |
add_dependencies_to_context | bool | False | If True, add the dependencies to the context. See dependencies for more information. |
add_knowledge_to_context | bool | False | If True, add retrieved knowledge to the context, to enable RAG. See knowledge for more information. |
system_message | str | None | Override the default system message. |
system_message
parameter. This will ignore all other settings and use the system message you provide.
input
sent to the Team.run()
or Team.print_response()
is used as the user message.
See dependencies for how to do dependency injection for your user message.
add_history_to_context
.
additional_input
parameter.
These messages are added to the context as if they were part of the conversation history.
You can give your team examples of how it should respond (also called “few-shot prompting”):