AI Personal Learning
and practical guidance

Julep AI: An AI Cloud Platform for Building Multi-Step Intelligent Body Workflows Using DSLs

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.


Julep AI: AI Cloud Platform for Building Multi-Step Intelligent Body Workflows Using DSL-1

 

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

  1. Register for an account: Visit the Julep AI website, click on the "Register" button and fill in the necessary information to complete your registration.
  2. Getting the API key: After logging in, find the API key generation option in the user panel to generate and save the API key.
  3. 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

  1. Defining Intelligence: In the control panel, click on "Create Intelligence" and fill in the name and description of the intelligence.
  2. configuration model: Choose a suitable AI model (e.g. GPT-4) and set default parameters (e.g. temperature, maximum number of tokens, etc.).
  3. Add Tools: Add needed tools for intelligences, such as web search, API calls, etc.

Defining multi-step processes

  1. Writing YAML files: In the control panel, write a multi-step process using YAML to define decision trees, loops, and parallel execution.
  2. Uploading files: Upload the written YAML file to the platform and test it.
  3. Deployment process: Once the test passes, click the "Deploy" button to bring the process online.

Rapid Prototyping

  1. Create a new project: In the control panel, click "New Project", fill in the project name and description.
  2. Add Function Module: Select and add the required functional modules (e.g. RAG, status management, etc.) according to the requirements.
  3. Testing and Iteration: Testing on the platform to adjust and optimize functional modules in real time.

Production level preparation

  1. Configuration infrastructure: In the control panel, configure infrastructure options such as auto-scaling, load balancing, etc.
  2. Setting up error handling: Define error handling mechanisms to ensure that tasks are automatically retried in case of failure.
  3. On-line projects: After completing the configuration, click the "Go Live" button to push the project into production.

modular design

  1. Select Module: In the control panel, browse and select the desired module (e.g., external API connection, LLM switching, etc.).
  2. drag-and-drop integration: Integrate modules into projects using a drag-and-drop interface.
  3. Testing and Optimization: Real-time testing of module functionality for optimization and tuning.

Unlimited Expansion

  1. Configuring Extended Options: In the Control Panel, configure the Auto Scaling and Load Balancing options.
  2. Monitoring Performance: Monitor system performance and user concurrency in real time using the monitoring tools provided by the platform.
  3. Adjustment of the configuration: Adjust the expansion and load balancing configurations based on monitoring data to ensure stable system operation.

future-proofing

  1. Add new model: In the Control Panel, click "Add New Model" to select and configure a new AI model.
  2. Integration of new tools: Browse the new tools offered by the platform, select and integrate them into existing projects.
  3. 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
input_schema: type: object
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
- name: web_search
type: integration
integration: web_search
name: web_search type: integration
setup.
api_key: 
- name: discord_webhook
type: api_call
api_call.
url: https://discord.com/api/webhooks//
method: POST
method: POST
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.
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.
map: tool: web_search arguments: "_.search_queries" map: tool: web_search
parallelism: 5
# Collect the results from the web search
- Collect the results from the web search
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.
The length of the summary should be less than 150 words.
{{_.search_results}}
  Here are the search results: {{_.search_results}}
settings: {{_.search_results}}
model: gpt-4o-mini
- evaluate: {{_.search_results}
discord_message: |-
f'''
**Research Summary for {inputs[0].topic}**
{_}
'''

# Send the summary to Discord
- tool: discord_webhook
arguments.
_.discord_message[:2000] # Discord has a 2000 character limit.
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",
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.

name: research_wikipedia
- name: research_wikipedia
type: integration
integration: research_wikipedia
provider: wikipedia
method: search

method: search
# 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 `` The `yaml tag is at the end of your reply.
Expand: true

- Evaluation:
Plot Ideas: load_yaml (_.split('```yaml')[1].split('```')[0].strip()))

# Step 2: Extract research areas from plot ideas
- Quickly:
- Role: System
Content: you are {{agent.name}} {{agent.about}}
- Role: User
Content: >
Here are some storyline ideas:
{% denotes ideas in _.plot_ideas %}
- {{idea}}
{% end %}

In order to develop a storyline, we need to research plot ideas.
What should we research? Write down a Wikipedia search query for plot ideas you find interesting.
Return the output as a list of ```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_in: _.research_queries_in
in: _.research_queries
do: in: _.research_queries
tool: research_wikipedia
arguments: query: _.research_queries
_.research_queries

- 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: {doc.metadata.title}: {doc.metadata.summary}
- 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 ``` The yaml tag is located at the end of the response. yaml objects should have the following structure:

```yaml
title: ""
characters.
- name: ""
about: ""
synopsis: ""
scenes.
- title:""
description: ""
characters.
- name: ""
role: ""
plotlines.
- "" ```

Make sure the yaml is valid and that the role and scene are not empty. Also be aware of semicolons and other issues with writing yaml.
Expand: true

- Evaluation:
Plot: "load_yaml (_.split('```` yaml')[1].split('````')[0].strip()))"
"""

Tasks = Client. Task. Create (
agent_id = agent.id.
**yaml.safe_load (task_yaml)
)

### Step 3: Execute the task

Execute = Client . Execute . Create (
task id = task id.
Input = {"idea": "A cat learning to fly"}
)

# 🎉 Watch the story and comic panel generation
while (result := client.executions.get(execution.id)).status not in ['success', 'failure']:
Print (result. status, result. Output)
time. Sleep(1)

# 📦 Retrieve the result after execution is complete
if result.status == "success":
Print (result. Output)
Other:
Raise an exception (result. Error)
May not be reproduced without permission:Chief AI Sharing Circle " Julep AI: An AI Cloud Platform for Building Multi-Step Intelligent Body Workflows Using DSLs

Chief AI Sharing Circle

Chief AI Sharing Circle specializes in AI learning, providing comprehensive AI learning content, AI tools and hands-on guidance. Our goal is to help users master AI technology and explore the unlimited potential of AI together through high-quality content and practical experience sharing. Whether you are an AI beginner or a senior expert, this is the ideal place for you to gain knowledge, improve your skills and realize innovation.

Contact Us
en_USEnglish