Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/AtakanTekparmak/agento
/ functions
Functions
44 in github.com/AtakanTekparmak/agento
⨍
Functions
44
◇
Types & classes
2
↓ 6 callers
Function
process_results
Process the results of a function call session to remove the history from the results and remove any list of ChatMessages from the variables.
agento/engine.py:87
↓ 5 callers
Function
execute_python_code
Execute Python code with given functions and context variables, and return the results of function calls and variables defined in the code.
agento/engine.py:5
↓ 4 callers
Function
load_system_prompt
Loads the system prompt from the specified file.
agento/utils.py:60
↓ 3 callers
Function
Agent
Function to create an agent. The process() function is the main function that is called to process the user query and/or history. The p
agento/agent.py:12
↓ 3 callers
Function
create_functions_schema
Creates the functions schema for the prompt.
agento/utils.py:32
↓ 3 callers
Function
extract_python_code
Extracts Python code from the given content. Args: content (str): The content to extract Python code from. Returns: Tup
agento/utils.py:14
↓ 3 callers
Function
format_agent_name
Format the agent name into snake case. Args: agent_name (str): The name of the agent. Returns: str: The formatted agent
agento/utils.py:142
↓ 2 callers
Function
chat
Get a chat completion from the specified provider. Args: messages (List[ChatMessage]): The messages to send to the client. m
agento/client.py:19
↓ 2 callers
Function
create_transfer_function
Create the transfer functions. Used for an agent with a team to transfer the task to the next agent. Args: team
agento/agent.py:41
↓ 2 callers
Function
is_list_of_chat_messages
Check if the object is a list of ChatMessages or is a tuple of (str, list[ChatMessage]). Args: obj (Any): The object to
agento/engine.py:98
↓ 2 callers
Function
print_history
Prints the chat history in a nice and readable format using Rich. Args: history (List[ChatMessage]): The chat history to print.
agento/utils.py:107
↓ 1 callers
Function
add_messages_to_history
Add messages to the history. This method is used to add the messages from a sub-agent to the history of the main agent. Args:
agento/client.py:48
↓ 1 callers
Function
init_or_update_history
If the history is empty, create a new history with the system prompt. If the history is not empty, update the history with the user q
agento/agent.py:84
↓ 1 callers
Function
make_wrapper
(func_name, func)
agento/engine.py:48
↓ 1 callers
Function
replace_context_variables
(content: str)
agento/utils.py:76
↓ 1 callers
Function
replace_functions_schema
(content: str)
agento/utils.py:70
↓ 1 callers
Function
replace_instructions
(content: str)
agento/utils.py:73
↓ 1 callers
Function
replace_prompt_beginning
(content: str)
agento/utils.py:79
Function
add
(a, b)
tests/test_engine.py:14
Function
eat_apples
Eat a certain quantity of apples. Args: apples (List[str]): A list of apples. quantity (int): The quantity of apples to eat.
multi_agent_example.py:17
Function
eat_apples
Eat a certain quantity of apples. Args: apples (List[str]): A list of apples. quantity (int): The quantity of apples to eat.
single_agent_example.py:17
Function
get_apples
Get a certain quantity of apples. Args: quantity (int): The quantity of apples to get. Returns: List[str]: A list of ap
multi_agent_example.py:5
Function
get_apples
Get a certain quantity of apples. Args: quantity (int): The quantity of apples to get. Returns: List[str]: A list of ap
single_agent_example.py:5
Function
greet
(name)
tests/test_engine.py:35
Function
mock_system_prompt_file
(tmp_path)
tests/test_utils.py:33
Function
multiply
(a, b)
tests/test_engine.py:17
Function
process
Process the user query and update the history using agent: {name}. The process is as follows: 1. The history is i
agento/agent.py:127
Function
sell_apples
Sell all the apples provided. Args: apples (List[str]): A list of apples. Returns: str: The money earned from selling t
multi_agent_example.py:30
Function
sell_apples
Sell all the apples provided. Args: apples (List[str]): A list of apples. Returns: str: The money earned from selling t
single_agent_example.py:30
Function
test_create_functions_schema
()
tests/test_utils.py:17
Function
test_execute_python_code_basic
Test the basic execution of Python code.
tests/test_engine.py:5
Function
test_execute_python_code_with_context_variables
Test the execution of Python code with context variables.
tests/test_engine.py:25
Function
test_execute_python_code_with_functions
Test the execution of Python code with functions.
tests/test_engine.py:12
Function
test_execute_python_code_with_functions_and_context
Test the execution of Python code with functions and context variables.
tests/test_engine.py:33
Function
test_extract_python_code
()
tests/test_utils.py:4
Function
test_function
This is a test function.
tests/test_utils.py:18
Function
test_load_system_prompt
(mock_system_prompt_file)
tests/test_utils.py:41
Function
test_process_results_basic
Test the processing of results without chat messages or history.
tests/test_engine.py:44
Function
test_process_results_with_chat_messages
Test the processing of results with chat messages.
tests/test_engine.py:65
Function
test_process_results_with_history
Test the processing of results with history.
tests/test_engine.py:81
Function
test_process_results_with_invalid_input
Test the processing of results with invalid input.
tests/test_engine.py:96
Function
test_process_results_with_transfer_to_agent
Test the processing of results with a transfer to agent.
tests/test_engine.py:54
Function
transfer_to_agent
Transfer the task to the agent with the given name and return the agent's response. Args: task
agento/agent.py:61
Function
wrapper
(*args, **kwargs)
agento/engine.py:49