Skip to content

Commit 52efb71

Browse files
Merge pull request #1090 from julep-ai/d/improvements
documentation: misc improvements
2 parents 663a1cb + e7fc4f7 commit 52efb71

File tree

10 files changed

+212
-135
lines changed

10 files changed

+212
-135
lines changed

documentation/docs/advanced/execution-lifecycle.mdx renamed to documentation/docs/advanced/lifecycle.mdx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
2-
title: 'Execution Lifecycle'
2+
title: 'Lifecycle'
33
description: 'Understanding the Lifecycle of Task when executed in Julep'
44
icon: 'arrows-spin'
55
---
66

77
## Overview
88

9-
Understanding the execution lifecycle of a Julep task is crucial for building effective workflows.
9+
Understanding the lifecycle of a Julep task is crucial for building effective workflows.
1010
Let's explore this through the lens of a [Trip Plan task](/docs/tutorials/trip-planning) - a practical example that showcases key aspects of task execution.
1111

1212
The Trip Plan task is an ideal example because it demonstrates:
@@ -19,7 +19,7 @@ The Trip Plan task is an ideal example because it demonstrates:
1919

2020
Below is a visual representation of how this task flows through Julep's execution lifecycle:
2121

22-
<Frame caption="Understanding the Execution Lifecycle through Trip Plan Task">
22+
<Frame caption="Lifecycle of the Trip Plan Task">
2323
<img
2424
src="/images/lifecycle.svg"
2525
width={1000}
+96
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
---
2+
title: 'Local Setup'
3+
description: 'Learn how to run Julep locally'
4+
icon: 'code'
5+
---
6+
## Overview
7+
8+
This guide will help you set up Julep locally. Before we setup any of the components, we would you to install Docker.
9+
10+
You can find the installation instructions [here](https://docs.docker.com/get-docker/).
11+
12+
## Setup Instructions
13+
14+
### 1. Clone the Repository
15+
Clone the repository from your preferred source:
16+
17+
```bash
18+
git clone <repository_url>
19+
```
20+
21+
### 2. Navigate to the Root Directory
22+
Change to the root directory of the project:
23+
24+
```bash
25+
cd <repository_root>
26+
```
27+
28+
### 3. Set Up Environment Variables
29+
- Create a `.env` file in the root directory.
30+
- Refer to the [`.env.example`](https://github.com/julep-ai/julep/blob/dev/.env.example) file for a list of required variables.
31+
- Ensure that all necessary variables are set in the `.env` file.
32+
33+
### 4. Create a Docker Volume for Backup
34+
Create a Docker volume named `grafana_data`, `memory_store_data`, `temporal-db-data`, `prometheus_data` and `seadweedfs_data`:
35+
36+
```bash
37+
docker volume create grafana_data
38+
docker volume create memory_store_data
39+
docker volume create temporal-db-data
40+
docker volume create prometheus_data
41+
docker volume create seadweedfs_data
42+
docker volume create memories
43+
```
44+
<Info>
45+
The volumes are used to store the data for the Grafana, Memory Store (Timescale DB), Temporal DB, Prometheus, and SeadweedFS, and Memories respectively.
46+
</Info>
47+
48+
### 5. Run the Project using Docker Compose
49+
You can run the project in two different modes: **Single Tenant** or **Multi-Tenant**. Choose one of the following commands based on your requirement:
50+
51+
#### Single-Tenant Mode
52+
Run the project in single-tenant mode:
53+
54+
```bash
55+
docker compose --env-file .env --profile temporal-ui --profile single-tenant --profile embedding-cpu --profile self-hosted-db up --force-recreate --build --watch
56+
```
57+
58+
> **Note:** In single-tenant mode, you can interact with the SDK directly without the need for the API KEY.
59+
60+
#### Multi-Tenant Mode
61+
Run the project in multi-tenant mode:
62+
63+
```bash
64+
docker compose --env-file .env --profile temporal-ui --profile multi-tenant --profile embedding-cpu --profile self-hosted-db up --force-recreate --build --watch
65+
```
66+
67+
> **Note:** In multi-tenant mode, you need to generate a JWT token locally that act as an API KEY to interact with the SDK.
68+
69+
### 6. Generate a JWT Token (Only for Multi-Tenant Mode)
70+
71+
To generate a JWT token, `jwt-cli` is required. Kindly install the same before proceeding with the next steps.
72+
73+
Use the following command and replace `JWT_SHARED_KEY` with the corresponding key from your `.env` file to generate a JWT token:
74+
75+
```bash
76+
jwt encode --secret JWT_SHARED_KEY --alg HS512 --exp=$(date -j -v +10d +%s) --sub '00000000-0000-0000-0000-000000000000' '{}'
77+
```
78+
79+
This command generates a JWT token that will be valid for 10 days.
80+
81+
### 7. Access and Interact
82+
- **Temporal UI**: You can access the Temporal UI through the specified port in your `.env` file.
83+
- **API Interactions**: Depending on the chosen mode, interact with the setup using the provided endpoints.
84+
85+
### Troubleshooting
86+
- Ensure that all required Docker images are available.
87+
- Check for missing environment variables in the `.env` file.
88+
- Use the `docker compose logs` command to view detailed logs for debugging.
89+
90+
## Support
91+
92+
If you need help with further questions in Julep:
93+
94+
- Join our [Discord community](https://discord.com/invite/JTSBGRZrzj)
95+
- Check the [GitHub repository](https://github.com/julep-ai/julep)
96+
- Contact support at [[email protected]](mailto:[email protected])

documentation/docs/concepts/tasks.mdx

+48-54
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,24 @@ icon: 'list-check'
88

99
Tasks are GitHub Actions-style workflows that define multi-step actions in Julep. Think of them as recipes that tell an agent exactly how to accomplish a goal. For example, a task might outline the steps to "Summarize a Research Paper" or "Debug a Code Issue".
1010

11-
<Note>
12-
Watch our [video walkthrough](https://www.loom.com/embed/c5cda67936254465aaff4548245b3e13?hideEmbedTopBar=true) to see tasks in action.
13-
</Note>
14-
15-
<AccordionGroup>
16-
<Accordion title="Chain Multiple AI Interactions" icon="link" defaultOpen={true}>
17-
Connect multiple AI operations seamlessly
18-
</Accordion>
19-
<Accordion title="Decision Making" icon="code-branch" defaultOpen={true}>
20-
Make decisions based on intermediate results
21-
</Accordion>
22-
<Accordion title="Parallel Operations" icon="arrows-split-up-and-left" defaultOpen={true}>
23-
Run operations in parallel for efficiency
24-
</Accordion>
25-
<Accordion title="External Integration" icon="plug" defaultOpen={true}>
26-
Integrate with external tools and APIs
27-
</Accordion>
28-
<Accordion title="State Management" icon="database" defaultOpen={true} >
29-
Maintain state throughout execution
30-
</Accordion>
31-
</AccordionGroup>
11+
<Frame>
12+
<iframe
13+
src="https://www.loom.com/embed/c5cda67936254465aaff4548245b3e13?hideEmbedTopBar=true"
14+
alt="Tasks in action"
15+
width="720"
16+
height="480"
17+
allow="autoplay; encrypted-media"
18+
allowfullscreen
19+
/>
20+
</Frame>
21+
22+
Here are some of the key features of tasks:
23+
24+
- Connect multiple AI operations seamlessly
25+
- Make decisions based on intermediate results
26+
- Run operations in parallel for efficiency
27+
- Integrate with external tools and APIs
28+
- Maintain state throughout execution
3229

3330
## Components
3431

@@ -49,8 +46,14 @@ input_schema:
4946
5047
### Tools
5148
52-
Tools are functions that can be used by an agent to perform tasks. Julep supports a wide range of tools from Integrations to external API calls to custom deinfed functions.
53-
More information on tools can be found [here](/docs/concepts/tools).
49+
Tools are functions that can be used by an agent to perform tasks. Julep supports:
50+
51+
- [User-defined functions](/docs/concepts/tools#user-defined-functions)
52+
- [System tools](/docs/concepts/tools#system-tools)
53+
- [Integrations](/docs/concepts/tools#integration-tools)
54+
- [API calls](/docs/concepts/tools#api-call-tools)
55+
56+
Learn more about tools [here](/docs/concepts/tools).
5457
5558
```yaml
5659
tools:
@@ -84,39 +87,30 @@ main:
8487
8588
### Steps
8689
87-
<Info>
90+
<Note>
8891
We use tasks and workflows interchangeably. They are the same except Julep's branding reflects tasks.
89-
</Info>
90-
91-
#### Basic Steps
92-
93-
1. **Tool Call**: Runs a specified tool with given arguments
94-
2. **Prompt**: Runs a prompt using a model
95-
3. **Evaluate**: Runs Python expressions and uses the result as output
96-
4. **Wait for Input**: Suspends execution and waits for user input
97-
5. **Log**: Logs information during workflow execution
98-
99-
100-
#### Data Operations
101-
102-
1. **Embed**: Embeds text for semantic operations
103-
2. **Search**: Searches for documents in the agent's doc store
104-
3. **Set**: Sets a value in the workflow's key-value store
105-
4. **Get**: Retrieves a value from the workflow's key-value store
106-
107-
#### Control Flow
108-
109-
1. **Foreach**: Runs a step for every value from a list in serial order
110-
2. **Map-reduce**: Runs a step for every value of the input list in parallel
111-
3. **Parallel**: Executes multiple steps in parallel
112-
4. **Switch**: Executes different steps based on a condition
113-
5. **If-else**: Conditional step with then and else branches
114-
6. **Sleep**: Pauses the workflow execution for a specified time
115-
7. **Return**: Ends the current workflow and optionally returns a value
116-
8. **Yield**: Switches to another named workflow
117-
9. **Error**: Throws an error and exits the workflow
92+
</Note>
11893
119-
> You can learn more about workflow steps in the [Workflow Steps](/docs/advanced/types-of-task-steps) section.
94+
Below is a table of all the steps that can be used in a task.
95+
96+
| Name | Description |
97+
|---------------|-----------------------------------------------------------------------------|
98+
| [Tool Call](/docs/advanced/types-of-task-steps#tool-call-step) | Execute tools defined in the task |
99+
| [Prompt](/docs/advanced/types-of-task-steps#prompt-step) | Send messages to the AI model |
100+
| [Evaluate](/docs/advanced/types-of-task-steps#evaluate-step) | Perform calculations or data manipulation |
101+
| [Wait for Input](/docs/advanced/types-of-task-steps#wait-for-input-step) | Pause workflow for user input |
102+
| [Set](/docs/advanced/types-of-task-steps#set-step) | Store values for later use |
103+
| [Get](/docs/advanced/types-of-task-steps#get-step) | Retrieve values from storage |
104+
| [Foreach](/docs/advanced/types-of-task-steps#foreach-step) | Iterate over a collection |
105+
| [Map-reduce](/docs/advanced/types-of-task-steps#map-reduce-step) | Process collections in parallel |
106+
| [Parallel](/docs/advanced/types-of-task-steps#parallel-step) | Execute steps concurrently |
107+
| [Switch](/docs/advanced/types-of-task-steps#switch-step) | Multiple condition handling |
108+
| [If-else](/docs/advanced/types-of-task-steps#if-else-step) | Conditional execution |
109+
| [Sleep](/docs/advanced/types-of-task-steps#sleep-step) | Pause execution |
110+
| [Return](/docs/advanced/types-of-task-steps#return-step) | Return values from workflow |
111+
| [Yield](/docs/advanced/types-of-task-steps#yield-step) | Execute subworkflows |
112+
113+
> You can learn more about workflow steps as to how they work in the [Workflow Steps](/docs/advanced/types-of-task-steps) section.
120114
121115
### Context Variables
122116

documentation/docs/concepts/tools.mdx

+16-10
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ Tools in Julep consist of three main components:
1616

1717
1. **Name**: A unique identifier for the tool.
1818
2. **Type**: The category of the tool. In Julep, there are four types of tools:
19-
- **User-defined `functions`**: Function signatures provided to the model, similar to OpenAI's function-calling. These require client handling, and the workflow pauses until the client executes the function and returns the results to Julep.
20-
- **`system` tools**: Built-in tools for calling Julep APIs, such as triggering task execution or appending to a metadata field.
21-
- **`integrations`**: Built-in third-party tools that enhance the capabilities of your agents.
22-
- **`api_calls`**: Direct API calls executed during workflow processes as tool calls.
19+
- **User-defined `functions`**: Function signatures provided to the model, similar to OpenAI's function-calling. These require client handling, and the workflow pauses until the client executes the function and returns the results to Julep. [Learn more](#user-defined-functions)
20+
- **`system` tools**: Built-in tools for calling Julep APIs, such as triggering task execution or appending to a metadata field. [Learn more](#system-tools)
21+
- **`integrations`**: Built-in third-party tools that enhance the capabilities of your agents. [Learn more](#integration-tools)
22+
- **`api_calls`**: Direct API calls executed during workflow processes as tool calls. [Learn more](#api-call-tools)
2323
3. **Arguments**: The inputs required by the tool.
2424

25-
### Tool Types Definitions:
25+
#### User-defined `functions`
2626

27-
1. **User-defined `functions`**: These are function signatures that you can give the model to choose from, similar to how [openai]'s function-calling works. An example:
27+
These are function signatures that you can give the model to choose from, similar to how [openai]'s function-calling works. An example:
2828

2929
```yaml Task YAML
3030
name: Example system tool task
@@ -52,7 +52,9 @@ main:
5252
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.
5353
</Note>
5454
55-
2. **`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.
55+
#### `System` Tools
56+
57+
Built-in tools that can be used to call the julep APIs themselves, like triggering a task execution, appending to a metadata field, etc.
5658

5759
`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,
5860

@@ -75,7 +77,7 @@ main:
7577
limit: 10 # <-- python expression
7678
```
7779

78-
<Accordion title="Available `system` resources and operations">
80+
<Accordion title="Available system resources and operations">
7981
<Accordion title="Agent">
8082
<ul>
8183
<li><strong>list</strong>: List all agents.</li>
@@ -133,7 +135,9 @@ main:
133135
</Accordion>
134136
</Accordion>
135137

136-
3. **`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.
138+
#### `Integration` Tools
139+
140+
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.
137141

138142
An example of how to create a `integration` tool for an agent using the `wikipedia` integration:
139143

@@ -158,7 +162,9 @@ main:
158162
Checkout the list of integrations that Julep supports [here](/docs/integrations).
159163
</Info>
160164

161-
4. **Direct `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,
165+
#### `API Call` Tools
166+
167+
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,
162168

163169
```yaml Task YAML
164170
name: Example api_call task
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,55 @@
11
---
22
title: 'Supported Integrations'
3+
description: 'List of supported integrations in Julep'
34
icon: 'plug'
45
---
56

7+
## Overview
68

7-
### [Communication Data](/docs/integrations/communication_data/)
9+
Julep supports a wide range of integrations to help you build powerful workflows. This page provides an overview of the supported integrations and their capabilities.
810

9-
Handle communication-related tasks such as sending emails via SMTP or accessing real-time weather data.
11+
## Communication & Data
1012

11-
### [Media File Processing](/docs/integrations/media_file_processing/)
13+
Tools for sending messages and accessing real-time data feeds.
1214

13-
Manage and process media files efficiently, including image uploads, video editing, and document parsing.
15+
| Integration | Description |
16+
|------------|-------------|
17+
| [Email](/docs/integrations/communication_data/email) | SMTP email sending and management |
18+
| [Weather](/docs/integrations/communication_data/weather) | Real-time weather data access |
1419

15-
### [Search & Research](/docs/integrations/search_research/)
20+
## Media & File Processing
1621

17-
Perform robust search and research operations, accessing academic papers, web searches, and other information retrieval services.
22+
Solutions for handling documents, video, and digital assets.
1823

19-
### [Web Browser Automation](/docs/integrations/web_browser_automation/)
24+
| Integration | Description |
25+
|------------|-------------|
26+
| [Llama Parse](/docs/integrations/media_file_processing/llama-parse) | Document parsing and extraction|
27+
| [FFmpeg](/docs/integrations/media_file_processing/ffmpeg) | Video processing and editing |
28+
| [Cloudinary](/docs/integrations/media_file_processing/cloudinary) | Cloud based Image and Video Processing |
2029

21-
Automate web browser tasks, manage browser sessions, and perform various web interactions seamlessly.
30+
## Search & Research
31+
32+
Access to search engines and knowledge bases for information retrieval.
33+
34+
| Integration | Description |
35+
|------------|-------------|
36+
| [Brave Search](/docs/integrations/search_research/brave-search) | Web search capabilities |
37+
| [Wikipedia](/docs/integrations/search_research/wikipedia) | Wikipedia article access |
38+
| [arXiv](/docs/integrations/search_research/arxiv) | Academic paper search |
39+
40+
## Web & Browser Automation
41+
42+
Tools for automated web interaction and data collection.
43+
44+
| Integration | Description |
45+
|------------|-------------|
46+
| [BrowserBase](/docs/integrations/web_browser_automation/browserbase) | Headless browser automation |
47+
| [Spider](/docs/integrations/web_browser_automation/spider) | Web crawling and scraping |
48+
| [Remote Browser](/docs/integrations/web_browser_automation/remote_browser) | Remote browser control |
49+
50+
## Next Steps
51+
52+
- [Getting Started](/docs/getting-started)
53+
- [Tutorials](/docs/tutorials)
54+
- [Guides](/docs/guides)
55+
- [Advanced Topics](/docs/advanced)

0 commit comments

Comments
 (0)