English | 中文翻译 | 日本語翻訳 | French
Explore Docs (wip)
·
Discord
·
𝕏
·
LinkedIn
[!NOTE] Get your API key here.
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:
[!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.
[!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:
[!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:
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:
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:
Julep Backend Service:
Integration with Tools and 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;
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:
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. |
```yaml - prompt: "Analyze the following data: {{agent.name}}" # <-- this is a jinja template ``` ```yaml - 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. |
```yaml - 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. |
```yaml - 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.
Note: The wait_for_input step is useful when you want to pause the workflow and wait for user input e.g. to collect a response to a prompt. |
```yaml - 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.
Note: The log step uses Jinja templates and you can access context variables in them. |
```yaml - 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. | ```yaml - get: user_preference ``` |
Set |
Assign a value to a key in the execution's key-value store.
Note: The set step uses Python expressions. |
```yaml - set: user_preference: '"dark_mode"' # <-- python expression ``` |
Name | About | Syntax |
---|---|---|
Foreach | Iterate over a collection and perform steps for each item | ```yaml - 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 | ```yaml - 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. ``` ```yaml - map_reduce: over: _.topics map: - prompt: Write an essay on {{_}} parallelism: 10 ``` |
Parallel | Run multiple steps in parallel | ```yaml - parallel: - tool: web_search arguments: query: '"AI news"' - tool: weather_check arguments: location: '"New York"' ``` |
Name | About | Syntax |
---|---|---|
If-Else | Conditional execution of steps | ```yaml - if: _.score > 0.8 # <-- python expression then: - log: High score achieved else: - error: Score needs improvement ``` |
Switch | Execute steps based on multiple conditions | ```yaml - 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 | ```yaml - sleep: seconds: 30 # minutes: 1 # hours: 1 # days: 1 ``` |
Return |
Return a value from the workflow
Note: The return step uses Python expressions. |
```yaml - return: result: '"Task completed successfully"' # <-- python expression time: datetime.now().isoformat() # <-- python expression ``` |
Yield | Run a subworkflow and await its completion | ```yaml - yield: workflow: process_data arguments: input_data: _.raw_data # <-- python expression ``` |
Error | Handle errors by specifying an error message | ```yaml - 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:
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.functions
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.
system
toolsBuilt-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
system
resources and operationsagent
:
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 for agent
and user
):
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
integrations
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
api_calls
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 | ```yaml setup: api_key: string # The API key for Brave Search arguments: query: string # The search query for searching with Brave output: result: string # The result of the Brave Search ``` | **Example cookbook**: [cookbooks/02-sarcastic-news-headline-generator.ipynb](https://github.com/julep-ai/julep/blob/dev/cookbooks/02-sarcastic-news-headline-generator.ipynb) |
BrowserBase | ```yaml 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](https://github.com/julep-ai/julep/blob/dev/cookbooks/06-browser-use.ipynb) |
```yaml 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](https://github.com/julep-ai/julep/blob/dev/cookbooks/00-Devfest-Email-Assistant.ipynb) | |
Spider | ```yaml setup: spider_api_key: string # The API key for Spider arguments: url: string # The URL for which to fetch data mode: string # The type of crawlers (default: "scrape") params: dict # (Optional) The parameters for the Spider API output: documents: list # The documents returned from the spider ``` | **Example cookbook**: [cookbooks/01-website-crawler.ipynb](https://github.com/julep-ai/julep/blob/dev/cookbooks/01-website-crawler.ipynb) |
Weather | ```yaml 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](https://github.com/julep-ai/julep/blob/dev/cookbooks/03-trip-planning-assistant.ipynb) |
Wikipedia | ```yaml 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](https://github.com/julep-ai/julep/blob/dev/cookbooks/03-trip-planning-assistant.ipynb) |
FFmpeg | ```yaml 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 |
```yaml
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 |
|
Cloudinary | ```yaml 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](https://github.com/julep-ai/julep/blob/dev/cookbooks/05-video-processing-with-natural-language.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"}
)
Explore our API documentation to learn more about agents, tasks, and executions:
Requirements:
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:
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.