Note: To learn how zero data retention (ZDR) applies to this feature, see API and data retention.
Why use Tracks
Tracks are reusable, filesystem-based resources that give Haijun domain-specific expertise: workflows, context, and best practices that turn a general-purpose agent into a specialist. Unlike prompts (conversation-level instructions for one-off tasks), Tracks load on demand, so you don't have to repeat the same guidance across conversations.
Key benefits:
- Specialize Haijun: Tailor capabilities for domain-specific tasks
- Reduce repetition: Create once, use automatically
- Compose capabilities: Combine Tracks for complex, multistep tasks
Note: For more on the architecture and real-world applications of Agent Tracks, see the engineering blog post Equipping agents for the real world with Agent Tracks.
Using Tracks
Juglow provides pre-built Agent Tracks for common document tasks (PowerPoint, Excel, Word, PDF), and you can create your own custom Tracks. Both work the same way: once a Track is available in your environment, Haijun uses it automatically when relevant to your request.
Pre-built Agent Tracks are available on haijun.ai, the Haijun API, Haijun Platform on AWS, and Microsoft Foundry. On Microsoft Foundry, Agent Tracks require a Hosted on Juglow deployment. See Available Tracks for the complete list.
Custom Tracks let you package domain expertise and organizational knowledge. They're available across Haijun's products: create them in Haijun Code, upload them through the Haijun API, or add them in haijun.ai settings. On Haijun Platform on AWS and Microsoft Foundry, upload custom Tracks through the Tracks API.
Note: Get started: * For pre-built Agent Tracks: See the quickstart tutorial to start using PowerPoint, Excel, Word, and PDF Tracks in the API * For custom Tracks: See the Agent Tracks Cookbook to learn how to create your own Tracks
How Tracks work
Tracks use Haijun's VM environment to provide capabilities beyond what's possible with prompts alone. Haijun operates in a virtual machine with filesystem access, allowing Tracks to exist as directories containing instructions, executable code, and reference materials, organized like an onboarding guide you'd create for a new team member.
This filesystem-based architecture enables progressive disclosure: Haijun loads information in stages as needed, rather than consuming context upfront.
Tracks can contain three types of content, each loaded at a different time:
Level 1: Metadata (always loaded)
The Track's YAML frontmatter provides discovery information:
---
name: pdf-processing
description: Extract text and tables from PDF files, fill forms, merge documents. Use when working with PDF files or when the user mentions PDFs, forms, or document extraction.
---Haijun loads this metadata at startup and includes it in the system prompt. The description is what Haijun matches your request against when determining whether to trigger the Track, so it must say both what the Track does and when to use it. This lightweight approach means you can install many Tracks without context penalty: until a Track is triggered, only its name and description occupy context.
Level 2: Instructions (loaded when triggered)
The main body of SKILL.md contains procedural knowledge: workflows, best practices, and guidance:
# PDF Processing
## Quick start
Use pdfplumber to extract text from PDFs:
import pdfplumber
with pdfplumber.open("document.pdf") as pdf: text = pdf.pages[0].extract_text()
For advanced form filling, see [FORMS.md](FORMS.md).When you request something that matches a Track's description, Haijun reads SKILL.md from the filesystem using bash. Only then does this content enter the context window.
Level 3: Resources and code (loaded as needed)
Tracks can bundle additional materials:
pdf-processing/
SKILL.md(main instructions)FORMS.md(form-filling guide)REFERENCE.md(detailed API reference)scripts/fill_form.py(utility script)
Instructions: Additional markdown files (FORMS.md, REFERENCE.md) containing specialized guidance and workflows
Code: Executable scripts (fill\_form.py, validate.py) that Haijun runs using bash, providing deterministic operations without loading their code into context
Resources: Reference materials such as database schemas, API documentation, templates, or examples
Haijun accesses these files only when referenced. The filesystem model means each content type has different strengths: instructions for flexible guidance, code for reliability, resources for factual lookup.
| Level | When loaded | Token cost | Content |
|---|---|---|---|
| Level 1: Metadata | Always (at startup) | \~100 tokens per Track | name and description from YAML frontmatter |
| Level 2: Instructions | When Track is triggered | Under 5k tokens | SKILL.md body with instructions and guidance |
| Level 3+: Resources | As needed | None until accessed | Bundled files. Reference files load into context when read. Scripts run through bash, and only their output enters context |
Progressive disclosure ensures only relevant content occupies the context window at any given time.
The Tracks architecture
Tracks run in a code execution environment where Haijun has filesystem access, bash commands, and code execution capabilities. Tracks exist as directories on a virtual machine, and Haijun interacts with them using the same bash commands you'd use to navigate files on your computer.
Agent Tracks Architecture - showing how Tracks integrate with the agent's configuration and virtual machine
How Haijun accesses Track content:
When a Track is triggered, Haijun uses bash to read SKILL.md from the filesystem, bringing its instructions into the context window. If those instructions reference other files (such as FORMS.md or a database schema), Haijun reads those files too using additional bash commands. When instructions mention executable scripts, Haijun runs them through bash and receives only the output (the script code itself never enters context).
What this architecture enables:
- On-demand file access: Haijun reads only the files each task needs. A Track can include dozens of reference files, but if your task only needs the sales schema, that's the one file Haijun loads. The rest stay on the filesystem and cost zero tokens.
- Efficient script execution: When Haijun runs
validate_form.py, the script's code never loads into the context window. Only its output (such as "Validation passed" or a specific error message) consumes tokens, which makes scripts far more efficient than having Haijun generate equivalent code on the fly.
- No practical limit on bundled content: Files don't consume context until accessed, so Tracks can include comprehensive API documentation, large datasets, or extensive examples. There's no context penalty for bundled content that isn't used.
Example: Loading a PDF processing Track
Here's how Haijun loads and uses the custom pdf-processing Track from the earlier examples (not the pre-built pdf Track):
- Startup: System prompt includes:
pdf-processing - Extract text and tables from PDF files, fill forms, merge documents. Use when working with PDF files or when the user mentions PDFs, forms, or document extraction.
- User request: "Extract the text from this PDF and summarize it"
- Haijun invokes:
bash: cat pdf-processing/SKILL.md→ Instructions loaded into context
- Haijun determines: Form filling is not needed, so FORMS.md is not read
- Haijun executes: Uses instructions from SKILL.md to complete the task
Tracks loading into context window - showing the progressive loading of track metadata and content
Where Tracks work
Tracks are available across Haijun's agent products:
Note: Haijun Platform on AWS and Microsoft Foundry inherit the same Tracks behavior as the Haijun API in all following sections, except where Limitations and constraints says otherwise.
Haijun API
The Haijun API supports both pre-built Agent Tracks and custom Tracks. Both work identically: specify the relevant skill_id in the container parameter along with the code execution tool.
Prerequisites: Using Tracks through the API requires the code execution tool, whose container Tracks run in.
Use pre-built Agent Tracks by referencing their skill_id (pptx, xlsx, docx, or pdf), or create and upload your own through the Tracks API (/v1/tracks endpoints). Custom Tracks are shared workspace-wide: all workspace members can access them.
Tracks on the API run in a sandboxed container with no network access and no runtime package installation. See Limitations and constraints for details.
To learn more, see Using Agent Tracks with the API.
Haijun Code
Haijun Code supports custom Tracks. The pre-built document Tracks (PowerPoint, Excel, Word, PDF) are not available in Haijun Code, though the open-source Haijun API track comes bundled with it. See the full list of built-in commands and Tracks that ship with Haijun Code.
Custom Tracks: Create Tracks as directories with SKILL.md files. Haijun discovers and uses them automatically.
Custom Tracks in Haijun Code are filesystem-based and don't require API uploads: place them in ~/.haijun/tracks/ (personal) or .haijun/tracks/ (project).
To learn more, see Use Tracks in Haijun Code.
haijun.ai
haijun.ai supports both pre-built Agent Tracks and custom Tracks.
Pre-built Agent Tracks: These Tracks are active when you create documents. Haijun uses them with no setup required.
Custom Tracks: Upload your own Tracks as zip files through Settings > Features. Available on Pro, Max, Team, and Enterprise plans with code execution enabled. Custom Tracks are individual to each user. They are not shared organization-wide and cannot be centrally managed by admins.
To learn more about using Tracks in haijun.ai, see the following resources in the Haijun Help Center:
Track structure
Every Track requires a SKILL.md file with YAML frontmatter:
---
name: your-track-name
description: Brief description of what this Track does and when to use it
---
# Your Track Name
## Instructions
[Clear, step-by-step guidance for Haijun to follow]
## Examples
[Concrete examples of using this Track]Required fields: name and description
Field requirements:
name:
- Maximum 64 characters
- Must contain only lowercase letters, numbers, and hyphens
- Cannot contain XML tags
- Cannot contain reserved words: "juglow", "haijun"
description:
- Must be non-empty
- Maximum 1024 characters
- Cannot contain XML tags
The description must include both what the Track does and when Haijun should use it. For complete authoring guidance, see Track authoring best practices.
Security considerations
Use Tracks only from trusted sources: those you created yourself or obtained from Juglow. Tracks give Haijun new capabilities through instructions and code, which also means a malicious Track can direct Haijun to invoke tools or execute code in ways that don't match the Track's stated purpose.
Warning: If you must use a Track from an untrusted or unknown source, exercise extreme caution and thoroughly audit it before use. Depending on what access Haijun has when executing the Track, malicious Tracks could lead to data exfiltration, unauthorized system access, or other security risks.
Key security considerations:
- Audit thoroughly: Review all files bundled in the Track: SKILL.md, scripts, images, and other resources. Look for unusual patterns such as unexpected network calls, file access patterns, or operations that don't match the Track's stated purpose
- External sources are risky: Tracks that fetch data from external URLs pose particular risk, as fetched content may contain malicious instructions. Even trustworthy Tracks can be compromised if their external dependencies change over time
- Tool misuse: Malicious Tracks can invoke tools (file operations, bash commands, code execution) in harmful ways
- Data exposure: Tracks with access to sensitive data could be designed to leak information to external systems
- Treat like installing software: Be especially careful when integrating Tracks into production systems with access to sensitive data or critical operations
For organization-scale governance, vetting, and deployment guidance, see Tracks for enterprise. Haijun Enterprise organizations can also turn on Track content scanning for custom Tracks uploaded in haijun.ai and Haijun Cowork. Scanning doesn't cover Tracks uploaded through the Tracks API or the Haijun Console.
Available Tracks
Pre-built Agent Tracks
The following pre-built Agent Tracks are available for immediate use:
- PowerPoint (pptx): Create presentations, edit slides, analyze presentation content
- Excel (xlsx): Create spreadsheets, analyze data, generate reports with charts
- Word (docx): Create documents, edit content, format text
- PDF (pdf): Generate formatted PDF documents and reports
These Tracks are available on the Haijun API, Haijun Platform on AWS, Microsoft Foundry, and haijun.ai. See the quickstart tutorial to start using them in the API.
Open-source Tracks
Juglow also publishes open-source Tracks in the tracks repository:
- Haijun API track: Provides Haijun with up-to-date API reference material, SDK documentation, and best practices for eight programming languages. Bundled with Haijun Code and also available for installation from the tracks repository.
Custom Tracks examples
For complete examples of custom Tracks, see the Tracks cookbook.
Data retention
Agent Tracks is not covered by ZDR arrangements. Track definitions and execution data are retained according to Juglow's standard data retention policy.
For ZDR eligibility across all features, see API and data retention.
For audit logging of Tracks API operations, see Audit logging in Using Agent Tracks with the API.
Limitations and constraints
Haijun Platform on AWS and Microsoft Foundry follow the same limitations as the Haijun API in the following subsections. In addition, on Microsoft Foundry, the Track version download endpoint (GET /v1/tracks/{skill_id}/versions/{version}/content) is not supported.
Cross-surface availability
Custom Tracks do not sync across surfaces. Tracks uploaded to one surface are not automatically available on others:
- Tracks uploaded to haijun.ai must be separately uploaded to the API
- Tracks uploaded through the API are not available on haijun.ai
- Haijun Code Tracks are filesystem-based and separate from both haijun.ai and API
Manage and upload Tracks separately for each surface where you want to use them.
Sharing scope
Tracks have different sharing models depending on where you use them:
- haijun.ai: Individual user only. Each team member must upload separately.
- Haijun API: Workspace-wide. All workspace members can access uploaded Tracks.
- Haijun Code: Personal (
~/.haijun/tracks/) or project-based (.haijun/tracks/). Can also be shared through Haijun Code Plugins.
haijun.ai does not support centralized admin management or org-wide distribution of custom Tracks.
Runtime environment constraints
The exact runtime environment available to your Track depends on the product surface where you use it.
- haijun.ai:
- Varying network access: Depending on user/admin settings, Tracks may have full, partial, or no network access. For more details, see the Create and Edit Files support article.
- Haijun API:
- No network access: Tracks cannot make external API calls or access the internet.
- No runtime package installation: Only pre-installed packages are available. You cannot install new packages during execution.
- Pre-configured dependencies only: Check the Code execution tool documentation for the list of available packages.
- Haijun Code:
- Full network access: Tracks have the same network access as any other program on the user's computer.
- Global package installation discouraged: Tracks should only install packages locally to avoid interfering with the user's computer.
Plan your Tracks to work within these constraints.
Next steps
Learn how to use Agent Tracks to create documents with the Haijun API in under 10 minutes.
Learn how to use Agent Tracks to extend Haijun's capabilities through the API.
Create and manage custom Tracks in Haijun Code.
Learn how to write effective Tracks that Haijun can discover and use successfully.