Designed to allow Relevance AI users to manage their Relevance AI environments locally and deploy from files or Git to any Relevance AI project.
Note: This codebase is not designed to be used as a package or imported into your project. Use these functions as your building blocks to create your CI-CD pipelines.
The package can be used in two major ways:
The example script examples/from_relevanceai_to_local.py fetches agents and tools (with optional support for knowledge sets) from your Relevance AI project and writes them to local JSON files. This helps you:
The example script examples/from_local_to_relevanceai.py reads local JSON files (for agents and tools) and pushes them to your production Relevance AI environment. This is useful for:
The example script examples/trigger_conversations_from_failure.py shows how you can identify and regenerate conversations that have errored, starting them from just before the last error.
The example script examples/get_agent_conversation_costs.py calculates the costs of past conversations for a given agent within a specified timeframe. This is useful for understanding the cost distribution and usage patterns of your agents over time. Note: May not properly count subagents' costs.
The package provides core functions to interact directly with the Relevance AI API:
-
Agents
get_all_agentscreate_agentget_agent_toolsdelete_agentupdate_agentschedule_message_to_agentget_agent_analyticssave_agents_to_file
-
Knowledge
get_all_knowledgeget_knowledgedelete_knowledgeadd_knowledge_dataget_knowledge_metadata
-
Tools
get_toolget_all_toolscreate_toolsdelete_toolsget_tool_run_historytrigger_toolpoll_tool_runupdate_toolsave_tools_to_file
-
Conversations
get_conversationsget_list_conversation_studio_historyget_conversation_actionsretrigger_conversation_after_messagetrigger_agent_debug_conversationget_trigger_messageget_conversations_where_specific_tool_failedget_conversations_between_dates
-
Snippets
upsert_snippet
Contributions to enhance features or extend functionality are welcome! If you have suggestions or improvements, please open an issue or submit a pull request.
Manage your environment seamlessly with manage-aiworkforce.