The julep CLI tool provides a comprehensive command-line interface for interacting with the Julep platform. It enables authentication, management of agents, tasks, and tools, project initialization, synchronization, interaction with agents via chat, task execution, log retrieval, and more. This specification outlines the commands, options, and best practices to ensure a consistent and user-friendly experience.
- Julep CLI Specification
The julep CLI is designed to streamline interactions with the Julep platform, allowing developers to efficiently manage AI agents, tasks, tools, and projects directly from the terminal. It adheres to industry-standard CLI conventions, ensuring an intuitive and predictable user experience.
For commands that output raw data (like get, list, etc.), the CLI will print/return YAML by default. If the --json flag is specified, the output will be in JSON format instead.
There are 3 main components to the julep CLI:
- The project management stuff (init, sync, etc.)
- The static stuff (agents, tasks, tools, etc.)
- The dynamic stuff (chat, run, logs, etc.)
Different files that are important:
~/.config/julep/config.yml: The configuration file for the CLI.julep.yaml: The configuration file for the project.julep-lock.json: The lock file for the project that tracks server state.src/*.yaml: The object definitions for the project (agents, tasks, tools, etc.).
agents:
- definition: path/to/agent.yaml
- definition: path/to/agent.yaml
tasks:
- agent_id: "{agents[0].id}"
definition: path/to/task.yaml
- agent_id: "{agents[1].id}"
definition: path/to/task.yaml
tools:
- agent_id: "{agents[0].id}"
definition: path/to/tool.yaml
- agent_id: "{agents[1].id}"
definition: path/to/tool.yaml{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://example.com/julep-lock.schema.json",
"title": "Julep Lockfile Schema",
"type": "object",
"properties": {
"lockfile_version": {
"type": "string",
"description": "Version of the lockfile format."
},
"updated_at": {
"type": "string",
"format": "date-time",
"description": "Timestamp representing when the lockfile was last updated."
},
"agents": {
"type": "array",
"items": {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "Path to the agent definition file."
},
"id": {
"type": "string",
"description": "Unique identifier of the agent from the remote server."
},
"last_synced": {
"type": "string",
"format": "date-time",
"description": "Timestamp of the last synchronization with the remote server."
},
"revision_hash": {
"type": "string",
"description": "Hash of the local file used for change detection."
}
},
"required": ["path", "id", "last_synced", "revision_hash"],
"additionalProperties": false
}
},
"tasks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "Path to the task definition file."
},
"id": {
"type": "string",
"description": "Unique identifier of the task from the remote server."
},
"last_synced": {
"type": "string",
"format": "date-time",
"description": "Timestamp of the last synchronization with the remote server."
},
"revision_hash": {
"type": "string",
"description": "Hash of the local file used for change detection."
}
},
"required": ["path", "id", "last_synced", "revision_hash"],
"additionalProperties": false
}
},
"tools": {
"type": "array",
"items": {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "Path to the tool definition file."
},
"id": {
"type": "string",
"description": "Unique identifier of the tool from the remote server."
},
"last_synced": {
"type": "string",
"format": "date-time",
"description": "Timestamp of the last synchronization with the remote server."
},
"revision_hash": {
"type": "string",
"description": "Hash of the local file used for change detection."
}
},
"required": ["path", "id", "last_synced", "revision_hash"],
"additionalProperties": false
}
},
"relationships": {
"type": "object",
"properties": {
"tasks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Identifier of the task."
},
"agent_id": {
"type": "string",
"description": "Identifier of the associated agent."
}
},
"required": ["id", "agent_id"],
"additionalProperties": false
}
},
"tools": {
"type": "array",
"items": {
"type": "object",
"properties": {
"tool_id": {
"type": "string",
"description": "Identifier of the tool."
},
"agent_id": {
"type": "string",
"description": "Identifier of the associated agent."
}
},
"required": ["id", "agent_id"],
"additionalProperties": false
}
}
},
"required": ["tasks", "tools"],
"additionalProperties": false
}
},
"required": ["lockfile_version", "agents", "tasks", "tools", "relationships"],
"additionalProperties": false
} Example:
{
// Minimal versioning for the lock file's structure.
// Bump if you ever change this schema in a backward-incompatible way.
"lockfile_version": "0.1.0",
// (Optional) Timestamp or ISO string representing when this lock was last updated.
// "updated_at": "2025-01-27T14:13:52.123Z",
// Agents, tasks, and tools sections store local definitions alongside remote IDs.
"agents": [
{
"path": "src/agents/awesome-agent.yaml",
"id": "agent_123456", // The remote ID from the server
"last_synced": "2025-01-27T14:13:52.123Z",
"revision_hash": "abc123def456..." // Hash of local file for change detection
}
],
"tasks": [
{
"path": "src/tasks/generate-story.yaml",
"id": "task_789abcd",
"last_synced": "2025-01-27T14:13:52.125Z",
"revision_hash": "def456abc789..."
}
],
"tools": [
{
"path": "src/tools/web_search.yaml",
"id": "tool_xyz999",
"last_synced": "2025-01-27T14:13:52.130Z",
"revision_hash": "ghi678jkl012..."
}
],
// A separate section for relationships/"foreign key" references
// so that tasks and tools can specify which agent they relate to.
"relationships": {
"tasks": [
{
"id": "task_789abcd",
"agent_id": "agent_123456"
}
],
"tools": [
{
"id": "tool_xyz999",
"agent_id": "agent_123456"
}
]
}
}The julep-lock.json file serves several critical purposes:
-
State Tracking: It maintains a record of the remote server state, mapping local files to their remote counterparts by storing IDs and revision hashes.
-
Change Detection: The
revision_hashfield enables the CLI to detect when local files have changed and need to be synced. -
Relationship Management: Through the
relationshipssection, it tracks which tasks and tools are associated with which agents. -
Team Collaboration: By checking the lock file into version control, team members can share the same remote state and avoid conflicts.
The julep-lock.json file should be committed to version control. This is important because:
- It ensures all team members are working with the same remote state
- It prevents accidental creation of duplicate remote resources
- It maintains consistent relationships between agents, tasks, and tools across the team
- It enables tracking of remote state changes through version control history
This is similar to how package managers like npm and yarn use lock files to ensure consistent dependencies across team members.
**tasks**: An array where each item includesidandagent_id.- This is the CLI's record that this remote task is associated with that remote agent.
**tools**: Same pattern: aidreferences a remote tool, andagent_idreferences the remote agent.- You could expand the
relationshipsobject to store other relationships (e.g., task-tool references) if that's a thing in your system. You have the flexibility to break down relationships by type.
On **julep sync**:
- Parse
julep.yamlplus any local.yamldefinitions. - Compare to
julep-lock.json:- If you find a definition that's not in the lock file, create it on the server. Then save the new
idto the lock file. - If you see a definition in the lock file but the
revision_hashchanged, update it on the server. - If an entry is in the lock file but the file no longer exists locally, prompt the user to delete the remote definition (or do so automatically).
- If you find a definition that's not in the lock file, create it on the server. Then save the new
- Do the same logic for tasks and tools.
- Finally, examine or rebuild the
relationshipsarray by reading each local definition. If a local definition says "this task uses agent X," the CLI sets or updates the corresponding relationship in the lock file.
The julep CLI can be installed using pipx:
pipx install julep-cliThis will install the CLI tool which can then be invoked using the julep command:
julep --versionNote: While the package name is julep-cli, the installed command is simply julep.
The CLI stores configuration data, such as the API key, in ~/.config/julep/config.yml. After authentication, this file is created automatically.
Note: This CLI is still in development and is not yet stable. Currently implemented commands include:
Authenticate with the Julep platform by providing your API key.
Description:
Prompt the user to enter their API key and save it to the configuration file.
Usage:
julep authBehavior:
- Prompts the user to input their API key.
- Saves the API key to
~/.config/julep/config.yml.
Options:
--api-key,-k: Directly provide the API key without prompting.--environment,-e: Set the environment to use. Defaults toproduction.
Example:
julep auth --api-key your_julep_api_keyManage AI agents within the Julep platform.
Description:
Parent command for managing agents. Includes subcommands to create, update, delete, and list agents.
-
Create an Agent
Description:
Create a new AI agent.Usage:
julep agents create --name "Agent Name" --model "Model Name" --about "Agent Description"
Options:
--name,-n(optional): Name of the agent.--model,-m(optional): Model to be used by the agent (e.g.,gpt-4).--about,-a(optional): Description of the agent.--default-settings, (optional): Default settings for the agent. Value is parsed as json.--metadata, (optional): Metadata for the agent. Value is parsed as json.--instructions, (optional): Instructions for the agent, repeat the option to add multiple.--definition,-d(optional): Path to an agent definition file.
Either provide a definition file or use the other options to create the agent.
Example:
julep agents create --name "Storyteller" --model "gpt-4" --about "An agent that crafts engaging stories."
-
Update an Agent
Description:
Update an existing AI agent's details.Usage:
julep agents update --id <agent_id> [--name "New Name"] [--model "New Model"] [--about "New Description"] [--metadata '{"key": "value"}'] [--instructions "Instruction 1"] [--instructions "Instruction 2"]
Options:
--id, (required): ID of the agent to update.--name,-n(optional): New name for the agent.--model,-m(optional): New model for the agent.--about,-a(optional): New description for the agent.--metadata, (optional): Metadata for the agent. Value is parsed as json.--default-settings, (optional): Default settings for the agent. Value is parsed as json.--instructions, (optional): Instructions for the agent, repeat the option to add multiple.
Example:
julep agents update --id abc123 --name "Creative Storyteller" --model "gpt-4.5"
-
Delete an Agent
Description:
Delete an existing AI agent.Usage:
julep agents delete --id <agent_id> [--force]
Behavior:
- If
--forceis not provided, the CLI will prompt for confirmation before deleting the agent.
Options:
--id, (required): ID of the agent to delete.--force,-f(optional): Force the deletion without prompting for confirmation.
Example:
julep agents delete --id abc123
- If
-
List Agents
Description:
List all AI agents or filter based on metadata.Usage:
julep agents list [--metadata-filter '{"key": "value"}'] [--json]Options:
--metadata-filter, (optional): Filter agents based on specific criteria (JSON).--json, (optional): Output the list in JSON format.
Example:
julep agents list --metadata-filter '{"model": "gpt-4"}' -
Get an Agent
Description:
Get an agent by its ID.Usage:
julep agents get --id <agent_id> [--json]
Options:
--json, (optional): Output the agent in JSON format.
Example:
julep agents get --id abc123
Manage tasks associated with AI agents.
Description:
Parent command for managing tasks. Includes subcommands to create, update, delete, and list tasks.
-
Create a Task
Description:
Create a new task for an agent.Usage:
julep tasks create --name "Task Name" --agent-id <agent_id> --definition "path/to/task.yaml" [--metadata '{"status": "beta"}'] [--inherit-tools]
Options:
--agent-id,-a(required): ID of the agent the task is associated with.--definition,-d(required): Path to the task definition YAML file.--name,-n(optional): Name of the task (if not provided, the name will be the file name of the definition).--description, (optional): Description of the task (if not provided, the description will be the file name of the definition).--metadata, (optional): Metadata for the task. Value is parsed as json.--inherit-tools, (optional): Inherit tools from the associated agent. Defaults to false if not specified.
If passed other options, they override the values in the definition file.
Example:
julep tasks create --name "Generate Story" --description "Writes a short story" --agent-id abc123 --definition ./tasks/generate_story.yaml --metadata '{"category":"fiction"}'
-
Update a Task
Description:
Update an existing task's details.Usage:
julep tasks update --id <task_id> [--name "New Name"] [--description "New Description"] [--definition "new/path/to/task.yaml"] [--metadata '{"status": "published"}'] [--inherit-tools true|false]
Options:
--id, (required): ID of the task to update.--name,-n(optional): New name for the task.--description, (optional): New description for the task.--definition,-d(optional): Path to the updated task definition YAML file.--metadata, (optional): Metadata for the task. Value is parsed as json.--inherit-tools, (optional): Inherit tools from the associated agent (true/false).
Example:
julep tasks update --id task456 --name "Advanced Story Generation" --metadata '{"priority":"high"}'
-
Delete a Task
Description:
Delete an existing task.Usage:
julep tasks delete --id <task_id> [--force]
Options:
--id, (required): ID of the task to delete.--force,-f(optional): Force the deletion without prompting for confirmation.
Example:
julep tasks delete --id task456
-
List Tasks
Description:
List all tasks or filter based on criteria.Usage:
julep tasks list [--agent-id <agent_id>] [--json]
Options:
--agent-id,-a(optional): Filter tasks by associated agent ID.--json, (optional): Output the list in JSON format.
Example:
julep tasks list --agent-id abc123
Manage tools associated with AI agents.
Description:
Parent command for managing tools. Includes subcommands to create, update, delete, and list tools.
-
Create a Tool
Description:
Create a new tool for an agent.Usage:
julep tools create --name "Tool Name" --type <type> --agent-id <agent_id> --definition "path/to/config.yaml"
Options:
--agent-id,-a(required): ID of the agent the tool is associated with.--definition,-d(required): Path to the tool configuration YAML file.--name,-n(optional): Name of the tool.
If passed other options, they override the values in the definition file.
Example:
julep tools create --name "Web Search" --agent-id abc123 --definition ./tools/web_search.yaml -
Update a Tool
Description:
Update an existing tool's details.Usage:
julep tools update --id <tool_id> [--name "New Name"] [--definition "new/path/to/config.yaml"]
Options:
--id, (required): ID of the tool to update.--definition,-d(optional): Path to the updated tool configuration YAML file.--name,-n(optional): New name for the tool.
Example:
julep tools update --id tool789 --name "Advanced Web Search" -
Delete a Tool
Description:
Delete an existing tool.Usage:
julep tools delete --id <tool_id> [--force]
Options:
--id, (required): ID of the tool to delete.--force,-f(optional): Force the deletion without prompting for confirmation.
Example:
julep tools delete --id tool789
-
List Tools
Description:
List all tools or filter based on criteria.Usage:
julep tools list [--agent-id <agent_id>] [--json]
Options:
--agent-id,-a(optional): Filter tools by associated agent ID.--task-id,-t(optional): Filter tools by associated task ID.--json, (optional): Output the list in JSON format.
One of
--agent-idor--task-idmust be provided.Example:
julep tools list --agent-id abc123
Initialize a new Julep project using predefined templates.
Description:
Initialize a new Julep project by copying a template from the library repository.
Usage:
julep init --template=<template_name> [--path=<path>]Options:
--template,-t(optional): Name of the template to use (defaults tohello-world).--path,-p(optional): Destination directory for the initialized project (default: current directory).--yes,-y(optional): Skip confirmation prompt.
Confirm before copying the template to the destination directory. Then open the project README.md
Behavior:
- Copies the specified template folder from the
/libraryrepository to the destination directory. - Ensures the destination directory contains a
julep.yamlfile, validating it as a valid Julep package.
Synchronize local directories with Julep packages.
Description:
Synchronize the local Julep package with the Julep platform.
Usage:
julep sync --source=<path> [--force-local] [--force-remote] [--watch]Options:
--source,-s(required): Source directory containing the Julep package (must includejulep.yaml).--force-local, (optional): Force the local state to be overwritten by the remote state.--force-remote, (optional): Force the remote state to be overwritten by the local state.--watch,-w(optional): Watch the source directory for changes and synchronize automatically.
Behavior:
- Validates the presence of
julep.yamlin the source directory. - Compares local and remote states:
- If local is newer and no conflicts, updates remote
- If remote is newer and no
--force-localspecified, raises an error with guidance - If
--force-localspecified, updates local to match remote - If
--force-remotespecified, updates remote to match local
- Provides feedback on the synchronization status.
Import an agent from the Julep platform.
Description:
Import an agent from the Julep platform.
Usage:
julep import --id <agent_id> --output=<path>Options:
--id, (required): ID of the agent to import.--output,-o(optional): Path to the directory to save the imported agent (defaults to the current directory).--yes,-y(optional): Skip confirmation prompt.
Interact with a specific agent via chat.
Description:
Initiate an interactive chat session with a specified AI agent.
Usage:
julep chat --agent=<agent_id_or_name>Options:
--agent,-a(required): ID or name of the agent to chat with.--situation,-s(optional): Situation to chat about.--settings, (optional): Chat settings (JSON string).
Example:
julep chat --agent "Storyteller"Behavior:
- Initiates an interactive terminal session.
- Sends user inputs to the agent and displays responses in real-time.
- Optionally loads and saves chat history based on provided options.
Execute specific tasks with provided inputs.
Description:
Run a defined task with specified input parameters.
Usage:
julep run --task=<task_id_or_name> --input='<input_json>'Options:
--task,-t(required): ID or name of the task to execute.--input, (optional): JSON string representing the input for the task (defaults to{}).--input-file, (optional): Path to a file containing the input for the task.--wait, (optional): Wait for the task to complete before exiting, stream logs to stdout.
Example:
julep run --task "Generate Story" --input '{"idea": "A cat who learns to fly"}'Behavior:
- Submits the task for execution with the provided input.
- If
--waitis specified, waits for the task to complete and outputs the final result.
Manage task executions.
Description:
Parent command for managing executions. Includes subcommands to create, list, and cancel executions.
-
Create an Execution
Description:
Create a new execution for a task.Usage:
julep executions create --task=<task_id_or_name> --input='<input_json>'
Options:
--task,-t(required): ID or name of the task to execute.--input, (optional): JSON string representing the input for the task (defaults to{}).--input-file, (optional): Path to a file containing the input for the task.
Example:
julep executions create --task "Generate Story" --input '{"idea": "A cat who learns to fly"}'
-
List Executions
Description:
List all executions or filter based on criteria.Usage:
julep executions list [--task-id <task_id>] [--json]
Options:
--task-id,-t(optional): Filter executions by associated task ID.--json, (optional): Output the list in JSON format.
Example:
julep executions list --task-id abc123
-
Cancel an Execution
Description:
Cancel an existing execution.Usage:
julep executions cancel --id <execution_id>
Options:
--id, (required): ID of the execution to cancel.
Example:
julep executions cancel --id exec123
Retrieve logs related to specific task executions.
Description:
Fetch and display logs for a particular task execution.
Usage:
julep logs --execution-id=<execution_id>Options:
--execution-id,-e(required): ID of the task execution to retrieve logs for.--tail,-t(optional): Continuously stream logs as they are generated.--since=<timestamp>,-s(optional): Retrieve logs generated after the specified timestamp.--json, (optional): Output the logs in JSON format.
Example:
julep logs --execution-id exec123 --tailBehavior:
- Fetches logs for the specified execution ID.
- If
--tailis used, streams logs in real-time.
Initiate a guided setup for new Julep projects.
Description:
julep assistant launches an interactive prompt (a "wizard" mode) that uses AI to interpret plain-English requests and transform them into valid julep CLI commands. Think of it as a chat-based REPL that helps you build and manage your Julep resources more intuitively.
Usage:
julep assistantBehavior:
- Opens a session where you can type natural language instructions (e.g., "Create a GPT-4 agent named MarketingBot").
- The assistant uses an LLM (Large Language Model) to suggest one or more CLI commands that match your request (e.g.,
julep agents create --name "MarketingBot" --model "gpt-4"). - Displays the suggested command(s) and prompts for confirmation:
- (Y): Run the command immediately, showing output in the same session.
- (n): Skip or cancel the suggestion.
- (edit): Manually revise the command prior to execution.
- Returns to the prompt for follow-up instructions, giving you a conversational workflow (e.g., "Now list all my tasks", "Delete the agent I just created", etc.).
Example Session:
$ julep assistant
Welcome to Julep Assistant!
Type your request in plain English, or type 'exit' to quit.
assistant> Create a GPT-4 agent named MarketingBot
Proposed command:
julep agents create --name "MarketingBot" --model "gpt-4"
Execute? (Y/n/edit)
Y
[Running command...]
Agent created successfully (id: agent_654321)
assistant> List all tasks
Proposed command:
julep tasks list
Execute? (Y/n/edit)
Y
[Running command...]
[No tasks found]
assistant> exit
Rationale & Benefits:
- Simplifies Onboarding: Users can manage agents, tasks, and tools with minimal knowledge of CLI flags and syntax.
- Conversational Guidance: The assistant can ask clarifying questions if a request is ambiguous and recall recently created or updated resources.
- Expandable: Future enhancements might include richer multi-step workflows, advanced editing, and deeper project insights (e.g., referencing
julep-lock.jsonstate).
This feature is particularly useful for new users or those who want a quick, conversational way to build out a project without memorizing every julep subcommand. Simply type what you want in natural language, confirm or edit the generated commands, and let the assistant handle the rest.
Description: Display the version of the CLI.
Usage:
julep --versionDescription: Display help information for the CLI.
Usage:
julep --helpThe following options can be used with any command:
The CLI supports reading from standard input (stdin) and writing to standard output (stdout) for better integration with Unix-style pipelines and scripting:
- Use
-as a filename to read from stdin or write to stdout - Commands that accept file inputs (like
createandupdate) can read from stdin - List/get commands can output directly to stdout for piping
Examples:
Reading definition from stdin:
cat agent.yaml | julep agents create -d - # Read definition from stdin
echo '{"name": "MyAgent"}' | julep agents create -i - # Read JSON from stdinPiping between commands:
julep agents get abc123 | julep agents create -d - # Clone an agent
julep agents list | jq '.[] | select(.model=="gpt-4")' # Filter with jqWriting output:
julep agents list > agents.yaml # Save list to file
julep agents get abc123 | ssh remote-host "julep agents create -d -" # Transfer to remoteBehavior:
- Commands detect if stdin is a pipe or terminal
- JSON/YAML format is auto-detected for stdin
- Binary data is supported for applicable inputs
- Exit codes follow Unix conventions (0=success, non-zero=error)
--quiet, -q: Suppress all output except errors and explicitly requested data. Useful for scripting.
Example:
julep agents list --quiet # Only outputs the agent list, no status messages--color, --no-color: Enable or disable colored output. By default, color is:
- Enabled for TTY (interactive terminal) sessions
- Disabled for non-TTY sessions (pipes, redirects, etc.)
- Disabled if NO_COLOR environment variable is set
- Disabled if TERM=dumb
The CLI will automatically detect these conditions and adjust color output accordingly.
Examples:
julep agents list --no-color # Force disable colored output
julep agents list --color # Force enable colored outputEnvironment Variables:
NO_COLOR: Set this to any value to disable color outputFORCE_COLOR: Set this to any value to force color output
- Add
julep import agent --id <agent_id> --output=<path>