Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
FREEDOM251

Freedom251 › Blog › AI agents

How to install Jac and run your first AI-agent program

By Freedom251 Team · · 10 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.

Install Jac with its official shell installer, verify the jac command, then choose an LLM backend before writing an AI program. The installer provides the Jac runtime as a self-contained native binary; it does not automatically provide hosted-model credentials or a local model. After installing the optional byLLM dependencies, you can expose an ordinary Jac function as a tool and let an LLM decide when to call it.

This guide walks from a one-file Jac script to a tool-using agent, explains hosted and local model choices, and separates an application agent from Jac’s separate jac ai coding-agent command.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What does installing Jac give you, and what does an AI agent still need?

Installing Jac gives you the jac command-line runtime and compiler. Jaseci Labs describes the recommended installer as downloading a self-contained native binary, so system Python, pip, and uv are not required to install or run that binary. An AI-backed program has a second requirement: a model backend. That can be a hosted provider accessed with an API key, Ollama running locally, or Jac’s optional in-process local runtime.

In this article, an agent means an LLM-backed Jac function that has access to tools. The model can decide whether a tool is needed, supply its arguments, inspect the returned value, and then produce a response. A function that only generates text is useful as a first checkpoint, but the tool call is what demonstrates the agent pattern.

#1 Best Overall
Sale
TOZO A1 Wireless Earbuds Bluetooth 5.3 Light Weight in Ear Headphones | IPX5 Waterproof,2 Mics for AI Calls,Immersive Premium Sound Bass Headset with Charging Case,32 EQ via App Black
  • [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
  • [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
  • [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
  • [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
  • [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.

The shortest path

  1. Install and verify Jac.
  2. Install byLLM’s optional project dependencies.
  3. Configure either a hosted key or a local model.
  4. Save a .jac file containing an entry block and a tool-using function.
  5. Run it with jac run filename.jac.

The official installation guide describes the binary installation as taking “under 2 minutes,” while the AI quickstart and agent tutorial estimate about 20 and 45 minutes respectively. Those are documentation estimates, not independently measured timings.

How do I install Jac with the official installer?

On a machine with a shell and curl, run the official installer command:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -fsSL https://raw.githubusercontent.com/jaseci-labs/jaseci/main/scripts/install.sh | bash

The script puts the native jac executable on your PATH. Open a new shell if your environment does not immediately see the updated path, then verify the installation:

jac --version

The version printed is the version currently selected by the rolling installer. Do not assume it is a particular release number; pin one explicitly when reproducibility matters.

Pin, remove, or use another distribution method

The installer supports selecting a version with a --version V option and removing the installation with --uninstall. The same installation documentation lists an Arch User Repository package named jaclang and an official Docker image named jaseci/jaclang.

Use the native installer for the simplest first script. The AUR route fits an Arch-managed workstation. Docker is useful when you want the runtime isolated from the host; mount your project into /app and run jac run main.jac inside the container. These alternatives do not eliminate the need to configure a model backend for an AI program.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How do I run a normal Jac program before adding AI?

A Jac source file normally ends in .jac and uses an entry block as its starting point. Create hello.jac:

with entry {
    print("Hello from Jac");
}

Run it either of these equivalent ways:

jac hello.jac
jac run hello.jac

The explicit jac run form is convenient in scripts and makes it clear that you are executing a source file rather than invoking another CLI subcommand. For detailed diagnostics, the getting-started guide documents:

Rank #2
Smart Watch for Men Women Compatible with iPhone Samsung Android Phone 1.69 inch Full Touch Screen IP68 Waterproof Bluetooh Fitness Tracker Heart Rate/Sleep Monitor (Black)
  • 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
  • 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
  • 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
  • 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
  • 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.
jac -e all hello.jac

That diagnostic mode displays errors and warnings. Get this non-AI program working first; it separates Jac installation or syntax problems from later model-connection problems.

How do I install byLLM and choose a model backend?

The Jac binary includes byLLM capability, but the AI subsystem can need optional third-party dependencies in your project. Install those dependencies with:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
jac install byllm

This command does not itself supply a model or an API key. Choose one of the following backend paths.

Backend What you configure Operational trade-off
Hosted provider The provider’s API key, such as OPENAI_API_KEY, ANTHROPIC_API_KEY, or GOOGLE_API_KEY No local model download; requests go to the selected provider and require valid credentials.
Ollama Install Ollama separately, pull a model, and set default_model to an Ollama model identifier Runs inference locally through a separate Ollama service.
In-process local runtime Install the optional extra with jac install 'byllm[local]' No separate daemon, but the first call can download a model of about 5 GB.

Model names, provider requirements, and supported options can change, so check the current provider or local-runtime instructions when you set up a project.

Hosted models: supply the matching key

For a hosted model, set the environment variable required by the provider you selected before running Jac. The documented examples include:

export OPENAI_API_KEY="your-key"
# or
export ANTHROPIC_API_KEY="your-key"
# or
export GOOGLE_API_KEY="your-key"

Use only the variable corresponding to your configured backend. Keep keys in your shell environment or a secret-management system, not in a .jac file committed to source control. A successful Jac installation cannot compensate for a missing, expired, or incorrectly scoped provider credential.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Local models with Ollama

The official tutorial labels Ollama the recommended local path. Install Ollama using its current instructions, pull a model such as gemma3:4b, and configure byLLM’s model section:

[byllm.model]
default_model = "ollama/gemma3:4b"

The model identifier is an example from the tutorial, not a promise that it will remain the preferred model. Ollama must be installed and available as a separate local service, and the model named in the configuration must already be available to it.

Rank #3
Sale
New Bee Guitar Cable 10ft Electric Instrument Bass AMP Cord | 6.35mm Jack, Durable Design, Stage and Home Studio Use, Low Noise Shielded Electric Cord for Bass, Keyboard, Amp, Mixer
  • [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
  • [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
  • [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
  • [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
  • [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by

In-process local inference

If you do not want a separate Ollama daemon, install the optional local extra:

jac install 'byllm[local]'

This path keeps inference in the Jac process, but the first use can download approximately 5 GB of model data. Plan for that download and the associated disk space before diagnosing a long first startup as a code failure.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How do I write a first AI function without tools?

A text-only AI function is a useful connectivity checkpoint. The quickstart pattern declares the function’s name, argument type, return type, and by llm() behavior:

def translate2french(text: str) -> str by llm();

with entry {
    response = translate2french("Good morning");
    print(response);
}

Save this as hello_ai.jac and run:

jac run hello_ai.jac

The function signature gives byLLM a clear input and output contract. The official quickstart also uses a sem description to explain the function’s intended behavior; meaningful semantic guidance helps shape the generated prompt. This checkpoint tests model configuration, but it is not yet a tool-using agent.

How do I turn a Jac function into an AI-agent tool?

Pass ordinary Jac functions in the tools list of a by llm() declaration. The model can then choose a tool, provide its arguments, use the returned value, and formulate the final answer.

def get_current_time() -> str {
    import datetime;
    return datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S");
}

def answer(question: str) -> str by llm(
    tools=[get_current_time]
);

with entry {
    response = answer("What time is it right now?");
    print(response);
}

Save the file as first_agent.jac and run:

jac run first_agent.jac

Why this is an agent rather than a plain prompt

get_current_time is regular Jac code. It is not an LLM-generated description of a time; it executes the system clock and returns a string. The model receives the user’s question plus the available tool definition, recognizes that current time is needed, calls the function, and uses the result in its response. That model-controlled decision and tool result are the defining agent behavior in this example.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Design tool functions for reliable selection

  • Use a specific function name such as get_current_time, rather than an ambiguous name like helper.
  • Give parameters meaningful names and precise types so the model can construct valid arguments.
  • Keep return values readable and focused on the information the model needs.
  • Use a sem description when a function’s purpose or constraints are not obvious from its name and signature.
  • Expose only functions that are safe for the model to call in the current application.

The documentation describes this pattern as passing regular Jac functions as tools to a by llm() call. The illustrative response shown in a tutorial should not be treated as a guaranteed exact string: wording depends on the model, backend, prompt, and current time.

What is the difference between a Jac agent program and jac ai?

jac ai launches Jac’s built-in coding agent; it is not the same as the application function shown above. The coding agent can use configured or local models, read built-in guides, edit files, and run code in a project.

Rank #4
BSIMB 15.6" Digital Family Calendar & Chore Chart, No Subscription Fees
  • Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
  • Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
  • All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
  • Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
  • Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.

Use the safety option when you want approval before each file write and command execution:

jac ai --safe

Your own Jac program gives an LLM a defined set of application tools. The jac ai command gives an agent control over development tasks. Treat them as separate features even though both involve model-driven actions.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Which Jac setup should I choose for a first project?

Choose based on where inference should run and how much infrastructure you want to manage.

Decision Choose this when What you must prepare
Hosted API You want the quickest model setup and accept sending requests to a provider. A valid provider API key and the matching byLLM configuration.
Ollama You want local inference and are comfortable running a model service. Ollama, a pulled model such as gemma3:4b, and the ollama/... model setting.
In-process local You want to avoid a separate daemon. The byllm[local] extra and capacity for an approximately 5 GB first-use model download.

For the program shape, use a single file and jac run while learning. The jac create and jac start commands belong to a broader application workflow, such as a web or full-stack project, and are unnecessary for the first agent script.

What should I check when the first agent fails?

jac is not found after installation

Run jac --version in a new shell and check that the installer’s destination is on PATH. If you intentionally installed a pinned version, confirm that the selected executable is the one your shell resolves. The problem is local command discovery, not model configuration.

The Jac file runs, but by llm() cannot load

Run jac install byllm from the project and retry. The runtime is bundled, while byLLM’s optional third-party dependencies are resolved for the project separately.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A hosted call reports authentication or configuration errors

Check that the environment variable matches the selected provider, is visible in the same shell that runs Jac, and has not been revoked. Do not add the secret to the source file as a workaround.

Ollama requests cannot reach a model

Confirm that Ollama is installed and running, that the named model has been pulled, and that the configuration uses the documented ollama/model-name form. A Jac script can be correct while the separate local service or model name is unavailable.

The in-process option appears stalled on its first call

Allow for the initial model download, which the tutorial describes as about 5 GB. Check disk space and network access before changing the Jac code.

The model does not call the time tool

Make the request explicitly require current time and ensure get_current_time appears in the tools list. Tool selection remains a model decision; a vague question may not justify a call, and different models can make different choices.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

You need more information than the normal error provides

Reproduce the issue with diagnostic output, for example jac -e all hello.jac, then isolate the layer: run a plain Jac file, run the text-only AI function, and finally run the tool-using function. This sequence distinguishes syntax and installation faults from dependency, backend, and prompt/tool-selection faults.

What should you do after the first successful run?

Replace the clock helper with a safe function that solves a real, bounded task, such as formatting project data or looking up a value in a local file. Keep the tool’s inputs typed and its output concise. Add additional tools one at a time so you can see which function the model selected and inspect the returned data.

When the script grows into a web or full-stack application, move from the standalone-file workflow to the project workflow documented for jac create and jac start. Keep the backend choice explicit in project configuration, and recheck current Jac, byLLM, provider, and model instructions before upgrading because the documentation and available model identifiers are rolling.

Frequently Asked Questions

Can I use the same Jac source file with different model providers?

Usually, yes: the Jac function and its tool declarations can remain unchanged while you switch the byLLM backend configuration and provide the corresponding provider credential. Validate the selected model’s tool-calling support and its expected argument behavior after changing providers.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How should I keep model credentials out of a shared repository?

Store keys in environment variables or your team’s secret manager and add local secret files to your repository’s ignore rules. Review shell history and CI logs as well, because commands that include a key can leak it even when the Jac source is clean.

Can one agent expose more than one tool?

The tools argument is a list, so you can provide several Jac functions. Give each a distinct name, typed parameters, and a focused semantic description; otherwise the model may have difficulty choosing between overlapping functions.

Why can two runs produce different agent answers?

The final wording and tool decision depend on the selected model, backend settings, prompt, and live data such as the system clock. Treat the tool’s returned value as application data, but do not rely on an illustrative tutorial response being byte-for-byte reproducible.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

AI agentsbyLLMDeveloper ToolsJaclocal LLM

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.