General Introduction
Julep AI is a platform for creating and managing AI intelligences that remember past interactions and perform complex multi-step tasks.Julep AI provides long-term memory and multi-step process management capabilities, supports integration with external tools and APIs, and enables it to handle complex scenarios. Users can write simple YAML files to define individual steps of a task, decision points, loops, parallel processing, etc., and automate the execution of these tasks in the cloud.
Julep AI introduces a new Domain Specific Language (DSL) and server for managing AI intelligences and multi-step tasks. This DSL enables users to more intuitively describe and manage complex workflows without having to write large amounts of traditional code.Julep AI's cloud platform takes care of executing these tasks, ensuring that they are reliable and efficient.
Function List
- Persistent AI Agent: Intelligentsia are able to memorize context and information to support long-term interactions.
- statefull session: Track past interactions and provide personalized responses.
- multistep task: Build complex multi-step processes through loops and decisions.
- task management: Handles tasks that can run for long periods of time and ensures that tasks are completed successfully.
- Built-in tools and API integration: Supports the use of built-in tools and external APIs to extend the functionality of intelligences.
- self-healing: Automatically retry failed steps and resend the message to ensure that the task runs smoothly.
- RAG (Retrieval Augmentation Generation): Use a document store to build a system for retrieving and using your own data.
Using Help
Installation process
- Register for an account: Visit the Julep AI website, click on the "Register" button and fill in the necessary information to complete your registration.
- Getting the API key: After logging in, find the API key generation option in the user panel to generate and save the API key.
- Download SDK: Download the appropriate SDK (e.g. Python, Node.js, etc.) according to the platform requirements and install it according to the documentation.
Guidelines for use
Creating Intelligentsia
- Defining Intelligence: In the control panel, click on "Create Intelligence" and fill in the name and description of the intelligence.
- configuration model: Choose a suitable AI model (e.g. GPT-4) and set default parameters (e.g. temperature, maximum number of tokens, etc.).
- Add Tools: Add needed tools for intelligences, such as web search, API calls, etc.
Defining multi-step processes
- Writing YAML files: In the control panel, write a multi-step process using YAML to define decision trees, loops, and parallel execution.
- Uploading files: Upload the written YAML file to the platform and test it.
- Deployment process: Once the test passes, click the "Deploy" button to bring the process online.
Rapid Prototyping
- Create a new project: In the control panel, click "New Project", fill in the project name and description.
- Add Function Module: Select and add the required functional modules (e.g. RAG, status management, etc.) according to the requirements.
- Testing and Iteration: Testing on the platform to adjust and optimize functional modules in real time.
Production level preparation
- Configuration infrastructure: In the control panel, configure infrastructure options such as auto-scaling, load balancing, etc.
- Setting up error handling: Define error handling mechanisms to ensure that tasks are automatically retried in case of failure.
- On-line projects: After completing the configuration, click the "Go Live" button to push the project into production.
modular design
- Select Module: In the control panel, browse and select the desired module (e.g., external API connection, LLM switching, etc.).
- drag-and-drop integration: Integrate modules into projects using a drag-and-drop interface.
- Testing and Optimization: Real-time testing of module functionality for optimization and tuning.
Unlimited Expansion
- Configuring Extended Options: In the Control Panel, configure the Auto Scaling and Load Balancing options.
- Monitoring Performance: Monitor system performance and user concurrency in real time using the monitoring tools provided by the platform.
- Adjustment of the configuration: Adjust the expansion and load balancing configurations based on monitoring data to ensure stable system operation.
future-proofing
- Add new model: In the Control Panel, click "Add New Model" to select and configure a new AI model.
- Integration of new tools: Browse the new tools offered by the platform, select and integrate them into existing projects.
- Testing and deployment: Test new models and tools to ensure compatibility and stability, then deploy live.
sample task
Julep is well suited for applications that require AI use cases that go beyond simple cue response models.
Quick Example
Imagine a research AI agent that can perform the following actions:
- Select a topic
- 30 search queries on this topic
- Simultaneous web search
- Summarizing the results
- Send summary to Discord
In Julep, this will be a separate task, 80 lines of code and then run fully hosted all done independently. All steps are performed on Julep's own servers, so you don't have to do anything.
This is a valid example:
name: Research Agent
# Optional: Define the input schema for the task
input_schema:
type: object
properties:
topic:
type: string
description: The main topic to research
num_questions:
type: integer
description: The number of search queries to generate
# Define the tools that the agent can use
tools:
- name: web_search
type: integration
integration:
provider: brave
setup:
api_key: <your-brave-api-key>
- name: discord_webhook
type: api_call
api_call:
url: https://discord.com/api/webhooks/<your-webhook-id>/<your-webhook-token>
method: POST
headers:
Content-Type: application/json
# Special variables:
# - inputs: for accessing the input to the task
# - outputs: for accessing the output of previous steps
# - _: for accessing the output of the previous step
# Define the main workflow
main:
- prompt:
- role: system
content: >-
You are a research assistant.
Generate {{inputs[0].num_questions|default(30, true)}} diverse search queries related to the topic:
{{inputs[0].topic}}
Write one query per line.
unwrap: true
# Evaluate the search queries using a simple python expression
- evaluate:
search_queries: "_.split(NEWLINE)"
# Run the web search in parallel for each query
- over: "_.search_queries"
map:
tool: web_search
arguments:
query: "_"
parallelism: 5
# Collect the results from the web search
- evaluate:
search_results: _
# Summarize the results
- prompt:
- role: system
content: >
You are a research summarizer. Create a comprehensive summary of the following research results on the topic {{inputs[0].topic}}.
The summary should be well-structured, informative, and highlight key findings and insights. Keep the summary concise and to the point.
The length of the summary should be less than 150 words.
Here are the search results:
{{_.search_results}}
unwrap: true
settings:
model: gpt-4o-mini
- evaluate:
discord_message: |-
f'''
**Research Summary for {inputs[0].topic}**
{_}
'''
# Send the summary to Discord
- tool: discord_webhook
arguments:
json_:
content: _.discord_message[:2000] # Discord has a 2000 character limit
In this example, Julep will automatically manage parallel execution, retry failed steps, resend API requests, and keep the task running reliably until completion.
Sample Output Results
This runs in 30 seconds and returns the following output:
Summary of Artificial Intelligence Research
Summary of Artificial Intelligence (AI) Research Results
summary
In recent years, there have been significant advances in the field of Artificial Intelligence (AI), characterized by the development of methods and technologies that enable machines to perceive their environment, learn from data, and make decisions. This summary focuses on insights gained from various AI-related research findings.Key findings
- Definition and scope of artificial intelligence ::
Artificial intelligence is defined as a branch of computer science that focuses on creating systems capable of performing tasks that require human-like intelligence, including learning, reasoning, and problem solving (Wikipedia). It covers a variety of subfields, including machine learning, natural language processing, robotics, and computer vision.- Impact and application ::
AI technology is being integrated into numerous fields to increase efficiency and productivity. Applications range from self-driving cars and medical diagnostics to customer service automation and financial forecasting (OpenAI). Google's commitment to making AI work for everyone highlights its potential to significantly improve everyday life by enhancing the user experience across platforms (Google AI).- ethical consideration ::
There is an ongoing discussion about the ethical implications of AI, including concerns about privacy, bias, and responsibility in decision-making processes. The need for a framework to ensure the safe and responsible use of AI technologies (OpenAI) was emphasized.- Learning mechanisms ::
AI systems utilize different learning mechanisms such as supervised learning, unsupervised learning, and reinforcement learning. These methods allow AI to improve performance by learning from past experiences and data (Wikipedia). The difference between supervised and unsupervised learning is crucial; supervised learning relies on labeled data, while unsupervised learning recognizes patterns without predefined labels (unsupervised).- future direction ::
Future developments in AI are expected to focus on enhancing the interpretability and transparency of AI systems to ensure that they are able to provide rational decisions and actions (OpenAI). Efforts are also being made to make AI systems more accessible and user-friendly, encouraging wider adoption of it by different people and industries (Google AI).reach a verdict
Artificial intelligence represents a transformative force across multiple domains, promising to reshape industries and improve quality of life. However, as its capabilities expand, it is critical to address the ethical and societal implications that come with it. Continued research and collaboration among technologists, ethicists, and policymakers will be critical to navigating the future landscape of AI.
Python Deployment Process
To start using Julep, install it using pip:
pip install julep
Get your API key from here.
### Step 0: Setup import time import yaml from julep import Julep # or AsyncJulep client = Julep(api_key="your_julep_api_key") ### Step 1: Create an Agent agent = client.agents.create( name="Storytelling Agent", model="claude-3.5-sonnet", about="You are a creative storyteller that crafts engaging stories on a myriad of topics.", ) ### Step 2: Create a Task that generates a story and comic strip task_yaml = """ name: Storyteller description: Create a story based on an idea. tools: - name: research_wikipedia type: integration integration: provider: wikipedia method: search main: # Step 1: Generate plot idea - prompt: - role: system content: You are {{agent.name}}. {{agent.about}} - role: user content: > Based on the idea '{{_.idea}}', generate a list of 5 plot ideas. Go crazy and be as creative as possible. Return your output as a list of long strings inside ```yaml 标签位于您的回复末尾。 展开:true - 评价: 情节想法:load_yaml(_.split('```yaml')[1].split('```')[0].strip()) # 第二步:从情节思路中提取研究领域 - 迅速的: - 角色:系统 内容:您是 {{agent.name}}。{{agent.about}} - 角色:用户 内容: > 以下是一些故事情节的想法: {% 表示 _.plot_ideas 中的想法 %} - {{主意}} {% 结束 %} 为了发展故事情节,我们需要研究情节思路。 我们应该研究什么?写下你认为有趣的情节想法的维基百科搜索查询。 将输出作为 yaml 列表返回```yaml tags at the end of your response. unwrap: true settings: model: gpt-4o-mini temperature: 0.7 - evaluate: research_queries: load_yaml(_.split('```yaml')[1].split('```')[0].strip()) # Step 3: Research each plot idea - foreach: in: _.research_queries do: tool: research_wikipedia arguments: query: _ - evaluate: wikipedia_results: 'NEWLINE.join([f"- {doc.metadata.title}: {doc.metadata.summary}" for item in _ for doc in item.documents])' # Step 4: Think and deliberate - prompt: - role: system content: You are {{agent.name}}. {{agent.about}} - role: user content: |- Before we write the story, let's think and deliberate. Here are some plot ideas: {% for idea in outputs[1].plot_ideas %} - {{idea}} {% endfor %} Here are the results from researching the plot ideas on Wikipedia: {{_.wikipedia_results}} Think about the plot ideas critically. Combine the plot ideas with the results from Wikipedia to create a detailed plot for a story. Write down all your notes and thoughts. Then finally write the plot as a yaml object inside ```yaml 标签位于响应末尾。yaml 对象应具有以下结构: ```yaml title: "<string>" characters: - name: "<string>" about: "<string>" synopsis: "<string>" scenes: - title: "<string>" description: "<string>" characters: - name: "<string>" role: "<string>" plotlines: - "<string>"``` 确保 yaml 有效,且角色和场景不为空。还要注意分号和编写 yaml 的其他问题。 展开:true - 评价: 情节:“load_yaml(_.split('```yaml')[1].split('```')[0].strip())” """ 任务 = 客户端.任务.创建( agent_id=代理.id, **yaml.safe_load(任务_yaml) ) ### 步骤 3:执行任务 执行 = 客户端.执行.创建( 任务ID=任务ID, 输入={“idea”:“一只学飞的猫”} ) # 🎉 观看故事和漫画面板的生成 while (result := client.executions.get(execution.id)).status 不在 ['成功', '失败'] 中: 打印(结果.状态,结果.输出) 时间.睡眠(1) # 📦执行完成后,检索结果 如果 result.status ==“成功”: 打印(结果.输出) 别的: 引发异常(结果.错误)