julep
A new DSL and server for AI agents and multi-step tasks
Stars: 4416
Julep is an advanced platform for creating stateful and functional AI apps powered by large language models. It offers features like statefulness by design, automatic function calling, production-ready deployment, cron-like asynchronous functions, 90+ built-in tools, and the ability to switch between different LLMs easily. Users can build AI applications without the need to write code for embedding, saving, and retrieving conversation history, and can connect to third-party applications using Composio. Julep simplifies the process of getting started with AI apps, whether they are conversational, functional, or agentic.
README:
English | 中文翻译 | 日本語翻訳 | French
Explore Docs (wip)
·
Discord
·
𝕏
·
LinkedIn
[!NOTE] Get your API key here.
Contributions 🌟 (Click to expand)
We're excited to welcome new contributors to the Julep project! We've created several "good first issues" to help you get started. Here's how you can contribute:
- Check out our CONTRIBUTING.md file for guidelines on how to contribute.
- Browse our good first issues to find a task that interests you.
- If you have any questions or need help, don't hesitate to reach out on our Discord channel.
Your contributions, big or small, are valuable to us. Let's build something amazing together! 🚀
- Introduction
- Key Features
- Quick Example
- Installation
- Python Quick Start 🐍
- Node.js Quick Start 🟩
- Components
- Concepts
- Understanding Tasks
- Tool Types
- Integrations
- Other Features
- Reference
- Local Quickstart
- What's the difference between Julep and LangChain etc?
Julep is a platform for creating AI agents that remember past interactions and can perform complex tasks. It offers long-term memory and manages multi-step processes.
Julep enables the creation of multi-step tasks incorporating decision-making, loops, parallel processing, and integration with numerous external tools and APIs.
While many AI applications are limited to simple, linear chains of prompts and API calls with minimal branching, Julep is built to handle more complex scenarios which:
- have multiple steps,
- make decisions based on model outputs,
- spawn parallel branches,
- use lots of tools, and
- run for a long time.
[!TIP] Imagine you want to build an AI agent that can do more than just answer simple questions—it needs to handle complex tasks, remember past interactions, and maybe even use other tools or APIs. That's where Julep comes in. Read Understanding Tasks to learn more.
- 🧠 Persistent AI Agents: Remember context and information over long-term interactions.
- 💾 Stateful Sessions: Keep track of past interactions for personalized responses.
- 🔄 Multi-Step Tasks: Build complex, multi-step processes with loops and decision-making.
- ⏳ Task Management: Handle long-running tasks that can run indefinitely.
- 🛠️ Built-in Tools: Use built-in tools and external APIs in your tasks.
- 🔧 Self-Healing: Julep will automatically retry failed steps, resend messages, and generally keep your tasks running smoothly.
- 📚 RAG: Use Julep's document store to build a system for retrieving and using your own data.
[!TIP] Julep is ideal for applications that require AI use cases beyond simple prompt-response models.
Imagine a Research AI agent that can do the following:
- Take a topic,
- Come up with 30 search queries for that topic,
- Perform those web searches in parallel,
- Summarize the results,
- Send the summary to Discord.
[!NOTE] In Julep, this would be a single task under 80 lines of code and run fully managed all on its own. All of the steps are executed on Julep's own servers and you don't need to lift a finger.
Here's a working 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 executions, retry failed steps, resend API requests, and keep the tasks running reliably until completion.
This runs in under 30 seconds and returns the following output:
Research Summary for AI (Click to expand)
Research Summary for AI
The field of Artificial Intelligence (AI) has seen significant advancements in recent years, marked by the development of methods and technologies that enable machines to perceive their environment, learn from data, and make decisions. The primary focus of this summary is on the insights derived from various research findings related to AI.
Definition and Scope of AI:
- AI is defined as a branch of computer science focused on creating systems that can perform tasks requiring human-like intelligence, including learning, reasoning, and problem-solving (Wikipedia).
- It encompasses various subfields, including machine learning, natural language processing, robotics, and computer vision.
Impact and Applications:
- AI technologies are being integrated into numerous sectors, improving efficiency and productivity. Applications range from autonomous vehicles and healthcare diagnostics to customer service automation and financial forecasting (OpenAI).
- Google's commitment to making AI beneficial for everyone highlights its potential to significantly improve daily life by enhancing user experiences across various platforms (Google AI).
Ethical Considerations:
- There is an ongoing discourse regarding the ethical implications of AI, including concerns about privacy, bias, and accountability in decision-making processes. The need for a framework that ensures the safe and responsible use of AI technologies is emphasized (OpenAI).
Learning Mechanisms:
- AI systems utilize different learning mechanisms, such as supervised learning, unsupervised learning, and reinforcement learning. These methods allow AI to improve performance over time by learning from past experiences and data (Wikipedia).
- The distinction between supervised and unsupervised learning is critical; supervised learning relies on labeled data, while unsupervised learning identifies patterns without predefined labels (Unsupervised).
Future Directions:
- Future AI developments are expected to focus on enhancing the interpretability and transparency of AI systems, ensuring that they can provide justifiable decisions and actions (OpenAI).
- There is also a push towards making AI systems more accessible and user-friendly, encouraging broader adoption across different demographics and industries (Google AI).
AI represents a transformative force across multiple domains, promising to reshape industries and improve quality of life. However, as its capabilities expand, it is crucial to address the ethical and societal implications that arise. Continued research and collaboration among technologists, ethicists, and policymakers will be essential in navigating the future landscape of AI.
To get started with Julep, install it using npm or pip:
Node.js:
npm install @julep/sdk
# or
bun add @julep/sdk
Python:
pip install julep
[!NOTE] Get your API key here.
While we are in beta, you can also reach out on Discord to get rate limits lifted on your API key.
[!TIP] 💻 Are you a show me the code!™ kind of person? We have created a ton of cookbooks for you to get started with. Check out the cookbooks to browse through examples.
💡 There's also lots of ideas that you can build on top of Julep. Check out the list of ideas to get some inspiration.
### 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 tags at the end of your response.
unwrap: true
- evaluate:
plot_ideas: load_yaml(_.split('```yaml')[1].split('```')[0].strip())
# Step 2: Extract research fields from the plot ideas
- prompt:
- role: system
content: You are {{agent.name}}. {{agent.about}}
- role: user
content: >
Here are some plot ideas for a story:
{% for idea in _.plot_ideas %}
- {{idea}}
{% endfor %}
To develop the story, we need to research for the plot ideas.
What should we research? Write down wikipedia search queries for the plot ideas you think are interesting.
Return your output as a yaml list inside ```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 tags at the end of your response. The yaml object should have the following structure:
```yaml
title: "<string>"
characters:
- name: "<string>"
about: "<string>"
synopsis: "<string>"
scenes:
- title: "<string>"
description: "<string>"
characters:
- name: "<string>"
role: "<string>"
plotlines:
- "<string>"```
Make sure the yaml is valid and the characters and scenes are not empty. Also take care of semicolons and other gotchas of writing yaml.
unwrap: true
- evaluate:
plot: "load_yaml(_.split('```yaml')[1].split('```')[0].strip())"
"""
task = client.tasks.create(
agent_id=agent.id,
**yaml.safe_load(task_yaml)
)
### Step 3: Execute the Task
execution = client.executions.create(
task_id=task.id,
input={"idea": "A cat who learns to fly"}
)
# 🎉 Watch as the story and comic panels are generated
while (result := client.executions.get(execution.id)).status not in ['succeeded', 'failed']:
print(result.status, result.output)
time.sleep(1)
# 📦 Once the execution is finished, retrieve the results
if result.status == "succeeded":
print(result.output)
else:
raise Exception(result.error)
You can find the full python example here.
// Step 0: Setup
const dotenv = require("dotenv");
const { Julep } = require("@julep/sdk");
const yaml = require("yaml");
dotenv.config();
const client = new Julep({
apiKey: process.env.JULEP_API_KEY,
environment: process.env.JULEP_ENVIRONMENT || "production",
});
/* Step 1: Create an Agent */
async function createAgent() {
const agent = await 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.",
});
return agent;
}
/* Step 2: Create a Task that generates a story and comic strip */
const taskYaml = `
name: Storyteller
description: Create a story based on an idea.
tools:
- name: research_wikipedia
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 tags at the end of your response.
unwrap: true
- evaluate:
plot_ideas: load_yaml(_.split('\`\`\`yaml')[1].split('\`\`\`')[0].strip())
# Step 2: Extract research fields from the plot ideas
- prompt:
- role: system
content: You are {{agent.name}}. {{agent.about}}
- role: user
content: >
Here are some plot ideas for a story:
{% for idea in _.plot_ideas %}
- {{idea}}
{% endfor %}
To develop the story, we need to research for the plot ideas.
What should we research? Write down wikipedia search queries for the plot ideas you think are interesting.
Return your output as a yaml list inside \`\`\`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 tags at the end of your response. The yaml object should have the following structure:
\`\`\`yaml
title: "<string>"
characters:
- name: "<string>"
about: "<string>"
synopsis: "<string>"
scenes:
- title: "<string>"
description: "<string>"
characters:
- name: "<string>"
role: "<string>"
plotlines:
- "<string>"\`\`\`
Make sure the yaml is valid and the characters and scenes are not empty. Also take care of semicolons and other gotchas of writing yaml.
unwrap: true
- evaluate:
plot: "load_yaml(_.split('\`\`\`yaml')[1].split('\`\`\`')[0].strip())"
`;
async function createTask(agentId) {
const task = await client.tasks.create(agentId, yaml.parse(taskYaml));
return task;
}
/* Step 3: Execute the Task */
async function executeTask(taskId) {
const execution = await client.executions.create(taskId, {
input: { idea: "A cat who learns to fly" },
});
// 🎉 Watch as the story and comic panels are generated
while (true) {
const result = await client.executions.get(execution.id);
console.log(result.status, result.output);
if (result.status === "succeeded" || result.status === "failed") {
// 📦 Once the execution is finished, retrieve the results
if (result.status === "succeeded") {
console.log(result.output);
} else {
throw new Error(result.error);
}
break;
}
await new Promise((resolve) => setTimeout(resolve, 1000));
}
}
// Main function to run the example
async function main() {
try {
const agent = await createAgent();
const task = await createTask(agent.id);
await executeTask(task.id);
} catch (error) {
console.error("An error occurred:", error);
}
}
main()
.then(() => console.log("Done"))
.catch(console.error);
You can find the full Node.js example here.
Julep is made up of the following components:
- Julep Platform: The Julep platform is a cloud service that runs your workflows. It includes a language for describing workflows, a server for running those workflows, and an SDK for interacting with the platform.
- Julep SDKs: Julep SDKs are a set of libraries for building workflows. There are SDKs for Python and JavaScript, with more on the way.
- Julep API: The Julep API is a RESTful API that you can use to interact with the Julep platform.
Think of Julep as a platform that combines both client-side and server-side components to help you build advanced AI agents. Here's how to visualize it:
-
Your Application Code:
- You can use the Julep SDK in your application to define agents, tasks, and workflows.
- The SDK provides functions and classes that make it easy to set up and manage these components.
-
Julep Backend Service:
- The SDK communicates with the Julep backend over the network.
- The backend handles execution of tasks, maintains session state, stores documents, and orchestrates workflows.
-
Integration with Tools and APIs:
- Within your workflows, you can integrate external tools and services.
- The backend facilitates these integrations, so your agents can, for example, perform web searches, access databases, or call third-party APIs.
Julep is built on several key technical components that work together to create powerful AI workflows:
graph TD
User[User] ==> Session[Session]
Session --> Agent[Agent]
Agent --> Tasks[Tasks]
Agent --> LLM[Large Language Model]
Tasks --> Tools[Tools]
Agent --> Documents[Documents]
Documents --> VectorDB[Vector Database]
Tasks --> Executions[Executions]
classDef client fill:#9ff,stroke:#333,stroke-width:1px;
class User client;
classDef core fill:#f9f,stroke:#333,stroke-width:2px;
class Agent,Tasks,Session core;
- Agents: AI-powered entities backed by large language models (LLMs) that execute tasks and interact with users.
- Users: Entities that interact with agents through sessions.
- Sessions: Stateful interactions between agents and users, maintaining context across multiple exchanges.
- Tasks: Multi-step, programmatic workflows that agents can execute, including various types of steps like prompts, tool calls, and conditional logic.
- Tools: Integrations that extend an agent's capabilities, including user-defined functions, system tools, or third-party API integrations.
- Documents: Text or data objects associated with agents or users, vectorized and stored for semantic search and retrieval.
- Executions: Instances of tasks that have been initiated with specific inputs, with their own lifecycle and state machine.
Tasks are the core of Julep's workflow system. They allow you to define complex, multi-step AI workflows that your agents can execute. Here's a brief overview of task components:
- Name, Description and Input Schema: Each task has a unique name and description for easy identification. An input schema (optional) that is used to validate the input to the task.
- Main Steps: The core of a task, defining the sequence of actions to be performed. Each step can be a prompt, tool call, evaluate, wait_for_input, log, get, set, foreach, map_reduce, if-else, switch, sleep, or return. (See Types of Workflow Steps for more details)
- Tools: Optional integrations that extend the capabilities of your agent during task execution.
You create a task using the Julep SDK and specify the main steps that the agent will execute. When you execute a task, the following lifecycle happens:
sequenceDiagram
participant D as Your Code
participant C as Julep Client
participant S as Julep Server
D->>C: Create Task
C->>S: Submit Execution
Note over S: Execute Task
Note over S: Manage State
S-->>C: Execution Events
C-->>D: Progress Updates
S->>C: Execution Completion
C->>D: Final Result
Tasks in Julep can include various types of steps, allowing you to create complex and powerful workflows. Here's an overview of the available step types:
Name | About | Syntax |
---|---|---|
Prompt |
Send a message to the AI model and receive a response
Note: The prompt step uses Jinja templates and you can access context variables in them. |
- prompt: "Analyze the following data: {{agent.name}}" # <-- this is a jinja template - prompt:
- role: system
content: "You are {{agent.name}}. {{agent.about}}"
- role: user
content: "Analyze the following data: {{_.data}}" |
Tool Call |
Execute an integrated tool or API that you have previously declared in the task.
Note: The tool call step uses Python expressions inside the arguments. |
- tool: web_search
arguments:
query: '"Latest AI developments"' # <-- this is a python expression (notice the quotes)
num_results: len(_.topics) # <-- python expression to access the length of a list |
Evaluate |
Perform calculations or manipulate data
Note: The evaluate step uses Python expressions. |
- evaluate:
average_score: sum(scores) / len(scores) |
Wait for Input |
Pause workflow until input is received. It accepts an `info` field that can be used by your application to collect input from the user.
|
- wait_for_input:
info:
message: '"Please provide additional information about {_.required_info}."' # <-- python expression to access the context variable |
Log |
Log a specified value or message.
|
- log: "Processing completed for item {{_.item_id}}" # <-- jinja template to access the context variable |
Name | About | Syntax |
---|---|---|
Get | Retrieve a value from the execution's key-value store. |
- get: user_preference |
Set |
Assign a value to a key in the execution's key-value store.
|
- set:
user_preference: '"dark_mode"' # <-- python expression |
Name | About | Syntax |
---|---|---|
Foreach | Iterate over a collection and perform steps for each item |
- foreach:
in: _.data_list # <-- python expression to access the context variable
do:
- log: "Processing item {{_.item}}" # <-- jinja template to access the context variable |
Map-Reduce | Map over a collection and reduce the results |
- map_reduce:
over: _.numbers # <-- python expression to access the context variable
map:
- evaluate:
squared: "_ ** 2"
reduce: results + [_] # <-- (optional) python expression to reduce the results. This is the default if omitted. - map_reduce:
over: _.topics
map:
- prompt: Write an essay on {{_}}
parallelism: 10 |
Parallel | Run multiple steps in parallel |
- parallel:
- tool: web_search
arguments:
query: '"AI news"'
- tool: weather_check
arguments:
location: '"New York"' |
Name | About | Syntax |
---|---|---|
If-Else | Conditional execution of steps |
- if: _.score > 0.8 # <-- python expression
then:
- log: High score achieved
else:
- error: Score needs improvement |
Switch | Execute steps based on multiple conditions |
- switch:
- case: _.category == 'A'
then:
- log: "Category A processing"
- case: _.category == 'B'
then:
- log: "Category B processing"
- case: _ # Default case
then:
- error: Unknown category |
Name | About | Syntax |
---|---|---|
Sleep | Pause the workflow for a specified duration |
- sleep:
seconds: 30
# minutes: 1
# hours: 1
# days: 1 |
Return |
Return a value from the workflow
|
- return:
result: '"Task completed successfully"' # <-- python expression
time: datetime.now().isoformat() # <-- python expression |
Yield | Run a subworkflow and await its completion |
- yield:
workflow: process_data
arguments:
input_data: _.raw_data # <-- python expression |
Error | Handle errors by specifying an error message |
- error: "Invalid input provided" # <-- Strings only |
Each step type serves a specific purpose in building sophisticated AI workflows. This categorization helps in understanding the various control flows and operations available in Julep tasks.
Agents can be given access to a number of "tools" -- any programmatic interface that a foundation model can "call" with a set of inputs to achieve a goal. For example, it might use a web_search(query)
tool to search the Internet for some information.
Unlike agent frameworks, julep is a backend that manages agent execution. Clients can interact with agents using our SDKs. julep takes care of executing tasks and running integrations.
Tools in julep can be one of:
-
User-defined
functions
: These are function signatures that you can give the model to choose from, similar to how [openai]'s function-calling works. They need to be handled by the client. The workflow will pause until the client calls the function and gives the results back to julep. -
system
tools: Built-in tools that can be used to call the julep APIs themselves, like triggering a task execution, appending to a metadata field, etc. -
integrations
: Built-in third party tools that can be used to extend the capabilities of your agents. -
api_calls
: Direct api calls during workflow executions as tool calls.
These are function signatures that you can give the model to choose from, similar to how [openai]'s function-calling works. An example:
name: Example system tool task
description: List agents using system call
tools:
- name: send_notification
description: Send a notification to the user
type: function
function:
parameters:
type: object
properties:
text:
type: string
description: Content of the notification
main:
- tool: send_notification
arguments:
content: '"hi"' # <-- python expression
Whenever julep encounters a user-defined function, it pauses, giving control back to the client and waits for the client to run the function call and give the results back to julep.
Built-in tools that can be used to call the julep APIs themselves, like triggering a task execution, appending to a metadata field, etc.
system
tools are built into the backend. They get executed automatically when needed. They do not require any action from the client-side.
For example,
name: Example system tool task
description: List agents using system call
tools:
- name: list_agent_docs
description: List all docs for the given agent
type: system
system:
resource: agent
subresource: doc
operation: list
main:
- tool: list_agents
arguments:
limit: 10 # <-- python expression
-
agent
:-
list
: List all agents. -
get
: Get a single agent by id. -
create
: Create a new agent. -
update
: Update an existing agent. -
delete
: Delete an existing agent.
-
-
user
:-
list
: List all users. -
get
: Get a single user by id. -
create
: Create a new user. -
update
: Update an existing user. -
delete
: Delete an existing user.
-
-
session
:-
list
: List all sessions. -
get
: Get a single session by id. -
create
: Create a new session. -
update
: Update an existing session. -
delete
: Delete an existing session. -
chat
: Chat with a session. -
history
: Get the chat history with a session.
-
-
task
:-
list
: List all tasks. -
get
: Get a single task by id. -
create
: Create a new task. -
update
: Update an existing task. -
delete
: Delete an existing task.
-
-
doc
(subresource foragent
anduser
):-
list
: List all documents. -
create
: Create a new document. -
delete
: Delete an existing document. -
search
: Search for documents.
-
Additional operations available for some resources:
-
embed
: Embed a resource (specific resources not specified in the provided code). -
change_status
: Change the status of a resource (specific resources not specified in the provided code). -
chat
: Chat with a resource (specific resources not specified in the provided code). -
history
: Get the chat history with a resource (specific resources not specified in the provided code). -
create_or_update
: Create a new resource or update an existing one (specific resources not specified in the provided code).
Note: The availability of these operations may vary depending on the specific resource and implementation details.
[!TIP] > Example cookbook: cookbooks/06-browser-use.ipynb
Julep comes with a number of built-in integrations (as described in the section below). integration
tools are directly executed on the julep backend. Any additional parameters needed by them at runtime can be set in the agent/session/user's metadata
fields.
See Integrations for details on the available integrations.
[!TIP] > Example cookbook: cookbooks/01-website-crawler.ipynb
julep can also directly make api calls during workflow executions as tool calls. Same as integration
s, additional runtime parameters are loaded from metadata
fields.
For example,
name: Example api_call task
tools:
- type: api_call
name: hello
api_call:
method: GET
url: https://httpbin.org/get
main:
- tool: hello
arguments:
json:
test: _.input # <-- python expression
Julep supports various integrations that extend the capabilities of your AI agents. Here's a list of available integrations and their supported arguments:
Brave Search |
setup:
api_key: string # The API key for Brave Search
arguments:
query: string # The search query for searching with Brave
output:
result: list[dict] # A list of search results, each containing: title, link, snippet |
Example cookbook: cookbooks/02-sarcastic-news-headline-generator.ipynb |
BrowserBase |
setup:
api_key: string # The API key for BrowserBase
project_id: string # The project ID for BrowserBase
session_id: string # (Optional) The session ID for BrowserBase
arguments:
urls: list[string] # The URLs for loading with BrowserBase
output:
documents: list # The documents loaded from the URLs |
Example cookbook: cookbooks/06-browser-use.ipynb |
setup:
host: string # The host of the email server
port: integer # The port of the email server
user: string # The username of the email server
password: string # The password of the email server
arguments:
to: string # The email address to send the email to
from: string # The email address to send the email from
subject: string # The subject of the email
body: string # The body of the email
output:
success: boolean # Whether the email was sent successfully |
Example cookbook: cookbooks/00-Devfest-Email-Assistant.ipynb |
|
Spider |
setup:
spider_api_key: string # The API key for Spider
arguments:
url: string # The URL for which to fetch data
params: dict # (Optional) The parameters for the Spider API
content_type: string # (Optional) The content type to return. Default is "application/json". Other options: "text/csv", "application/xml", "application/jsonl"
output:
result: list[dict] # A list of results, each containing: content, error, status, costs, url |
Example cookbook: cookbooks/01-website-crawler.ipynb |
Weather |
setup:
openweathermap_api_key: string # The API key for OpenWeatherMap
arguments:
location: string # The location for which to fetch weather data
output:
result: string # The weather data for the specified location |
Example cookbook: cookbooks/03-trip-planning-assistant.ipynb |
Wikipedia |
arguments:
query: string # The search query string
load_max_docs: integer # (Optional) Maximum number of documents to load. Default is 2.
output:
documents: list # The documents returned from the Wikipedia search |
Example cookbook: cookbooks/03-trip-planning-assistant.ipynb |
FFmpeg |
arguments:
cmd: string # The FFmpeg command to execute
file: string # The base64 encoded file to process
output:
fileoutput: string # The output file from the FFmpeg command in base64 encoding
result: boolean # Whether the FFmpeg command was executed successfully
mime_type: string # The MIME type of the output file |
|
Llama Parse |
setup:
llamaparse_api_key: string # The API key for Llama Parse
params: dict # (Optional) Additional parameters for the Llama Parse integration
arguments:
file: string | Array<string> # The base64 encoded file to parse or an array of http/https URLs to load.
filename: string # (Optional). The filename of the file. Default is a random UUID. Only used if file is a base64 encoded string.
params: dict # (Optional) Additional parameters for the Llama Parse integration. Overrides the setup parameters.
base64: boolean # Whether the input file is base64 encoded. Default is false.
output:
documents: list[Document] # A list of parsed documents |
Example cookbook: cookbooks/07-personalized-research-assistant.ipynb |
Cloudinary |
method: media_upload | media_edit # The method to use for the Cloudinary integration
setup:
cloudinary_cloud_name: string # Your Cloudinary cloud name
cloudinary_api_key: string # Your Cloudinary API key
cloudinary_api_secret: string # Your Cloudinary API secret
params: dict # (Optional) Additional parameters for the Cloudinary integration
arguments:
file: string # The URL of the file upload. Only available for media_upload method.
upload_params: dict # (Optional) Additional parameters for the upload. Only available for media_upload method.
public_id: string # (Optional) The public ID for the file. For media_edit method it is MANDATORY. For media_upload method it is optional. Default is a random UUID.
transformation: list[dict] # The transformations to apply to the file. Only available for media_edit method.
return_base64: boolean # Whether to return the file in base64 encoding. Default is false.
output:
url: string # The URL of the uploaded file. Only available for media_upload method.
meta_data: dict # Additional metadata from the upload response. Only available for media_upload method.
public_id: string # The public ID of the uploaded file. Only available for media_upload method.
transformed_url: string # (Optional) The transformed URL. Only available for media_edit method.
base64: string # (Optional) The base64 encoded file if return_base64 is true. |
Example cookbook: cookbooks/05-video-processing-with-natural-language.ipynb |
Arxiv |
method: search # The method to use for the Arxiv integration
setup:
# No specific setup parameters are required for Arxiv
arguments:
query: string # The search query for searching with Arxiv
id_list: list[string] | None # (Optional) The list of Arxiv IDs to search with
max_results: integer # The maximum number of results to return, must be between 1 and 300000
download_pdf: boolean # Whether to download the PDF of the results. Default is false.
sort_by: string # The sort criterion for the results, options: relevance, lastUpdatedDate, submittedDate
sort_order: string # The sort order for the results, options: ascending, descending
output:
result: list[dict] # A list of search results, each containing: entry_id, title, updated, published, authors, summary, comment, journal_ref, doi, primary_category, categories, links, pdf_url, pdf_downloaded |
Example cookbook: cookbooks/07-personalized-research-assistant.ipynb |
For more details, refer to our Integrations Documentation.
Julep offers a range of advanced features to enhance your AI workflows:
Extend your agent's capabilities by integrating external tools and APIs:
client.agents.tools.create(
agent_id=agent.id,
name="web_search",
description="Search the web for information.",
integration={
"provider": "brave",
"method": "search",
"setup": {"api_key": "your_brave_api_key"},
},
)
Julep provides robust session management for persistent interactions:
session = client.sessions.create(
agent_id=agent.id,
user_id=user.id,
context_overflow="adaptive"
)
# Continue conversation in the same session
response = client.sessions.chat(
session_id=session.id,
messages=[
{
"role": "user",
"content": "Follow up on the previous conversation."
}
]
)
Easily manage and search through documents for your agents:
# Upload a document
document = client.agents.docs.create(
title="AI advancements",
content="AI is changing the world...",
metadata={"category": "research_paper"}
)
# Search documents
results = client.agents.docs.search(
text="AI advancements",
metadata_filter={"category": "research_paper"}
)
- Node.js SDK Reference | NPM Package
- Python SDK Reference | PyPI Package
Explore our API documentation to learn more about agents, tasks, and executions:
Requirements:
- latest docker compose installed
Steps:
git clone https://github.com/julep-ai/julep.git
cd julep
docker volume create cozo_backup
docker volume create cozo_data
cp .env.example .env # <-- Edit this file
docker compose --env-file .env --profile temporal-ui --profile single-tenant --profile self-hosted-db up --build
Think of LangChain and Julep as tools with different focuses within the AI development stack.
LangChain is great for creating sequences of prompts and managing interactions with LLMs. It has a large ecosystem with lots of pre-built integrations, which makes it convenient if you want to get something up and running quickly. LangChain fits well with simple use cases that involve a linear chain of prompts and API calls.
Julep, on the other hand, is more about building persistent AI agents that can maintain context over long-term interactions. It shines when you need complex workflows that involve multi-step tasks, conditional logic, and integration with various tools or APIs directly within the agent's process. It's designed from the ground up to manage persistent sessions and complex workflows.
Use Julep if you imagine building a complex AI assistant that needs to:
- Keep track of user interactions over days or weeks.
- Perform scheduled tasks, like sending daily summaries or monitoring data sources.
- Make decisions based on prior interactions or stored data.
- Interact with multiple external services as part of its workflow.
Then Julep provides the infrastructure to support all that without you having to build it from scratch.
Julep is a platform that includes a language for describing workflows, a server for running those workflows, and an SDK for interacting with the platform. In order to build something with Julep, you write a description of the workflow in YAML
, and then run the workflow in the cloud.
Julep is built for heavy-lifting, multi-step, and long-running workflows and there's no limit to how complex the workflow can be.
LangChain is a library that includes a few tools and a framework for building linear chains of prompts and tools. In order to build something with LangChain, you typically write Python code that configures and runs the model chains you want to use.
LangChain might be sufficient and quicker to implement for simple use cases that involve a linear chain of prompts and API calls.
Use LangChain when you need to manage LLM interactions and prompt sequences in a stateless or short-term context.
Choose Julep when you need a robust framework for stateful agents with advanced workflow capabilities, persistent sessions, and complex task orchestration.
For Tasks:
Click tags to check more tools for each tasksFor Jobs:
Alternative AI tools for julep
Similar Open Source Tools
julep
Julep is an advanced platform for creating stateful and functional AI apps powered by large language models. It offers features like statefulness by design, automatic function calling, production-ready deployment, cron-like asynchronous functions, 90+ built-in tools, and the ability to switch between different LLMs easily. Users can build AI applications without the need to write code for embedding, saving, and retrieving conversation history, and can connect to third-party applications using Composio. Julep simplifies the process of getting started with AI apps, whether they are conversational, functional, or agentic.
py-llm-core
PyLLMCore is a light-weighted interface with Large Language Models with native support for llama.cpp, OpenAI API, and Azure deployments. It offers a Pythonic API that is simple to use, with structures provided by the standard library dataclasses module. The high-level API includes the assistants module for easy swapping between models. PyLLMCore supports various models including those compatible with llama.cpp, OpenAI, and Azure APIs. It covers use cases such as parsing, summarizing, question answering, hallucinations reduction, context size management, and tokenizing. The tool allows users to interact with language models for tasks like parsing text, summarizing content, answering questions, reducing hallucinations, managing context size, and tokenizing text.
code2prompt
Code2Prompt is a powerful command-line tool that generates comprehensive prompts from codebases, designed to streamline interactions between developers and Large Language Models (LLMs) for code analysis, documentation, and improvement tasks. It bridges the gap between codebases and LLMs by converting projects into AI-friendly prompts, enabling users to leverage AI for various software development tasks. The tool offers features like holistic codebase representation, intelligent source tree generation, customizable prompt templates, smart token management, Gitignore integration, flexible file handling, clipboard-ready output, multiple output options, and enhanced code readability.
effective_llm_alignment
This is a super customizable, concise, user-friendly, and efficient toolkit for training and aligning LLMs. It provides support for various methods such as SFT, Distillation, DPO, ORPO, CPO, SimPO, SMPO, Non-pair Reward Modeling, Special prompts basket format, Rejection Sampling, Scoring using RM, Effective FAISS Map-Reduce Deduplication, LLM scoring using RM, NER, CLIP, Classification, and STS. The toolkit offers key libraries like PyTorch, Transformers, TRL, Accelerate, FSDP, DeepSpeed, and tools for result logging with wandb or clearml. It allows mixing datasets, generation and logging in wandb/clearml, vLLM batched generation, and aligns models using the SMPO method.
yomo
YoMo is an open-source LLM Function Calling Framework for building Geo-distributed AI applications. It is built atop QUIC Transport Protocol and Stateful Serverless architecture, making AI applications low-latency, reliable, secure, and easy. The framework focuses on providing low-latency, secure, stateful serverless functions that can be distributed geographically to bring AI inference closer to end users. It offers features such as low-latency communication, security with TLS v1.3, stateful serverless functions for faster GPU processing, geo-distributed architecture, and a faster-than-real-time codec called Y3. YoMo enables developers to create and deploy stateful serverless functions for AI inference in a distributed manner, ensuring quick responses to user queries from various locations worldwide.
OpenAI
OpenAI is a Swift community-maintained implementation over OpenAI public API. It is a non-profit artificial intelligence research organization founded in San Francisco, California in 2015. OpenAI's mission is to ensure safe and responsible use of AI for civic good, economic growth, and other public benefits. The repository provides functionalities for text completions, chats, image generation, audio processing, edits, embeddings, models, moderations, utilities, and Combine extensions.
RainbowGPT
RainbowGPT is a versatile tool that offers a range of functionalities, including Stock Analysis for financial decision-making, MySQL Management for database navigation, and integration of AI technologies like GPT-4 and ChatGlm3. It provides a user-friendly interface suitable for all skill levels, ensuring seamless information flow and continuous expansion of emerging technologies. The tool enhances adaptability, creativity, and insight, making it a valuable asset for various projects and tasks.
multi-agent-orchestrator
Multi-Agent Orchestrator is a flexible and powerful framework for managing multiple AI agents and handling complex conversations. It intelligently routes queries to the most suitable agent based on context and content, supports dual language implementation in Python and TypeScript, offers flexible agent responses, context management across agents, extensible architecture for customization, universal deployment options, and pre-built agents and classifiers. It is suitable for various applications, from simple chatbots to sophisticated AI systems, accommodating diverse requirements and scaling efficiently.
IntelliNode
IntelliNode is a javascript module that integrates cutting-edge AI models like ChatGPT, LLaMA, WaveNet, Gemini, and Stable diffusion into projects. It offers functions for generating text, speech, and images, as well as semantic search, multi-model evaluation, and chatbot capabilities. The module provides a wrapper layer for low-level model access, a controller layer for unified input handling, and a function layer for abstract functionality tailored to various use cases.
langserve
LangServe helps developers deploy `LangChain` runnables and chains as a REST API. This library is integrated with FastAPI and uses pydantic for data validation. In addition, it provides a client that can be used to call into runnables deployed on a server. A JavaScript client is available in LangChain.js.
xFasterTransformer
xFasterTransformer is an optimized solution for Large Language Models (LLMs) on the X86 platform, providing high performance and scalability for inference on mainstream LLM models. It offers C++ and Python APIs for easy integration, along with example codes and benchmark scripts. Users can prepare models in a different format, convert them, and use the APIs for tasks like encoding input prompts, generating token ids, and serving inference requests. The tool supports various data types and models, and can run in single or multi-rank modes using MPI. A web demo based on Gradio is available for popular LLM models like ChatGLM and Llama2. Benchmark scripts help evaluate model inference performance quickly, and MLServer enables serving with REST and gRPC interfaces.
EasyInstruct
EasyInstruct is a Python package proposed as an easy-to-use instruction processing framework for Large Language Models (LLMs) like GPT-4, LLaMA, ChatGLM in your research experiments. EasyInstruct modularizes instruction generation, selection, and prompting, while also considering their combination and interaction.
hugging-chat-api
Unofficial HuggingChat Python API for creating chatbots, supporting features like image generation, web search, memorizing context, and changing LLMs. Users can log in, chat with the ChatBot, perform web searches, create new conversations, manage conversations, switch models, get conversation info, use assistants, and delete conversations. The API also includes a CLI mode with various commands for interacting with the tool. Users are advised not to use the application for high-stakes decisions or advice and to avoid high-frequency requests to preserve server resources.
lollms
LoLLMs Server is a text generation server based on large language models. It provides a Flask-based API for generating text using various pre-trained language models. This server is designed to be easy to install and use, allowing developers to integrate powerful text generation capabilities into their applications.
WordLlama
WordLlama is a fast, lightweight NLP toolkit optimized for CPU hardware. It recycles components from large language models to create efficient word representations. It offers features like Matryoshka Representations, low resource requirements, binarization, and numpy-only inference. The tool is suitable for tasks like semantic matching, fuzzy deduplication, ranking, and clustering, making it a good option for NLP-lite tasks and exploratory analysis.
VITA
VITA is an open-source interactive omni multimodal Large Language Model (LLM) capable of processing video, image, text, and audio inputs simultaneously. It stands out with features like Omni Multimodal Understanding, Non-awakening Interaction, and Audio Interrupt Interaction. VITA can respond to user queries without a wake-up word, track and filter external queries in real-time, and handle various query inputs effectively. The model utilizes state tokens and a duplex scheme to enhance the multimodal interactive experience.
For similar tasks
julep
Julep is an advanced platform for creating stateful and functional AI apps powered by large language models. It offers features like statefulness by design, automatic function calling, production-ready deployment, cron-like asynchronous functions, 90+ built-in tools, and the ability to switch between different LLMs easily. Users can build AI applications without the need to write code for embedding, saving, and retrieving conversation history, and can connect to third-party applications using Composio. Julep simplifies the process of getting started with AI apps, whether they are conversational, functional, or agentic.
For similar jobs
sweep
Sweep is an AI junior developer that turns bugs and feature requests into code changes. It automatically handles developer experience improvements like adding type hints and improving test coverage.
teams-ai
The Teams AI Library is a software development kit (SDK) that helps developers create bots that can interact with Teams and Microsoft 365 applications. It is built on top of the Bot Framework SDK and simplifies the process of developing bots that interact with Teams' artificial intelligence capabilities. The SDK is available for JavaScript/TypeScript, .NET, and Python.
ai-guide
This guide is dedicated to Large Language Models (LLMs) that you can run on your home computer. It assumes your PC is a lower-end, non-gaming setup.
classifai
Supercharge WordPress Content Workflows and Engagement with Artificial Intelligence. Tap into leading cloud-based services like OpenAI, Microsoft Azure AI, Google Gemini and IBM Watson to augment your WordPress-powered websites. Publish content faster while improving SEO performance and increasing audience engagement. ClassifAI integrates Artificial Intelligence and Machine Learning technologies to lighten your workload and eliminate tedious tasks, giving you more time to create original content that matters.
chatbot-ui
Chatbot UI is an open-source AI chat app that allows users to create and deploy their own AI chatbots. It is easy to use and can be customized to fit any need. Chatbot UI is perfect for businesses, developers, and anyone who wants to create a chatbot.
BricksLLM
BricksLLM is a cloud native AI gateway written in Go. Currently, it provides native support for OpenAI, Anthropic, Azure OpenAI and vLLM. BricksLLM aims to provide enterprise level infrastructure that can power any LLM production use cases. Here are some use cases for BricksLLM: * Set LLM usage limits for users on different pricing tiers * Track LLM usage on a per user and per organization basis * Block or redact requests containing PIIs * Improve LLM reliability with failovers, retries and caching * Distribute API keys with rate limits and cost limits for internal development/production use cases * Distribute API keys with rate limits and cost limits for students
uAgents
uAgents is a Python library developed by Fetch.ai that allows for the creation of autonomous AI agents. These agents can perform various tasks on a schedule or take action on various events. uAgents are easy to create and manage, and they are connected to a fast-growing network of other uAgents. They are also secure, with cryptographically secured messages and wallets.
griptape
Griptape is a modular Python framework for building AI-powered applications that securely connect to your enterprise data and APIs. It offers developers the ability to maintain control and flexibility at every step. Griptape's core components include Structures (Agents, Pipelines, and Workflows), Tasks, Tools, Memory (Conversation Memory, Task Memory, and Meta Memory), Drivers (Prompt and Embedding Drivers, Vector Store Drivers, Image Generation Drivers, Image Query Drivers, SQL Drivers, Web Scraper Drivers, and Conversation Memory Drivers), Engines (Query Engines, Extraction Engines, Summary Engines, Image Generation Engines, and Image Query Engines), and additional components (Rulesets, Loaders, Artifacts, Chunkers, and Tokenizers). Griptape enables developers to create AI-powered applications with ease and efficiency.