mirror of https://github.com/aliasrobotics/cai.git
Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com> |
||
|---|---|---|
| .. | ||
| README.md | ||
| agent_handoff.py | ||
| bare_minimum.py | ||
| context_variables.py | ||
| function_calling.py | ||
| simple_loop_no_helpers.py | ||
README.md
CAI basic
This folder contains basic examples demonstrating core CAI capabilities. These examples show the simplest implementations of CAI, with one input message, and a corresponding output. The simple_loop_no_helpers has a while loop to demonstrate how to create an interactive CAI session.
Examples
-
agent_handoff.py
- Demonstrates how to transfer a conversation from one agent to another.
- Usage: Transfers Spanish-speaking users from an English agent to a Spanish agent.
-
bare_minimum.py
- A bare minimum example showing the basic setup of an agent.
- Usage: Sets up an agent that responds to a simple user message.
-
context_variables.py
- Shows how to use context variables within an agent.
- Usage: Uses context variables to greet a user by name and print account details.
-
function_calling.py
- Demonstrates how to define and call functions from an agent.
- Usage: Sets up an agent that can respond with weather information for a given location.
-
simple_loop_no_helpers.py
- An example of a simple interaction loop without using helper functions.
- Usage: Sets up a loop where the user can continuously interact with the agent, printing the conversation.
Running the Examples
To run any of the examples, use the following command:
python3 <example_name>.py