AIPACK

Hello World Agent

AIPACK is a way to run agents, and in its simplest form, an agent is a multi-stage markdown file with the extension .aip.

For example, let's build a very simple hello world agent that will greet us in 5 different languages.

NOTE: (optional) If you are using VSCode, feel free to install the AIPACK VSCode extension. It will ensure the correct file association.

Prerequisites

Level 1 - Hello John

In the folder aip-demo-1/,

NOTE: If you use VSCode or another editor, a good approach is to open the aip-demo-1/ folder in VSCode (or another editor/IDE) and then open the integrated terminal. This way, everything stays organized and connected.

Agent

Create a hello.aip file with a single stage # Instruction:

# Instruction

Can you say "Hello World" in 5 different languages?

IMPORTANT: Make sure to set the ..._API_KEY in the terminal where you run the aip run ... command, as specified in the install instructions.

Run

Now, in the terminal

aip run hello.aip

Result

In the terminal, you should see something like this:

======= RUNNING: hello.aip
     Agent path: hello.aip

Running agent command: hello.aip
                 from: hello.aip
   with default model: mini (gpt-4.1-mini)

==== Running input: 0
-> Sending rendered instruction to gpt-4.1-mini ...
<- ai_response content received - gpt-4.1-mini-2025-04-14 | Duration: 1s 188ms | ~$0.0001 | Prompt Tokens: 21 (cached: 0) | Completion Tokens: 58 (reasoning: 0)
-> Agent Output:
Sure! Here is "Hello World" in five different languages:

1. English: Hello World  
2. Spanish: Hola Mundo  
3. French: Bonjour le monde  
4. German: Hallo Welt  
5. Japanese: こんにちは世界 (Konnichiwa Sekai)
==== DONE (input: 0)

======= COMPLETED: hello.aip

[ r ]: Replay  [ a ]: Open Agent  [ q ]: Quit

Explanation

Here's what happened:

NOTE: We do not have to include the .aip extension. So, aip run hello would have run the same file.

NEXT: Hello World - Save Output