AIPACK

Hello World - Save Output

Now that we have our first Hello World agent, we can add an # Output stage to save the AI's output to a file.

Agent

We don't have to quit the terminal; we can just edit the hello.aip file as follows:

# Instruction

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

# Output 

```lua

local content = ai_response.content

aip.file.save("ai-response.md", content)

return "All good"

```

You can just press r in the same terminal if you haven't quit. (Or just run the agent aip run hello - the .aip is optional.)

Result

Sure! Here is "Hello World" in five different languages:

1. Spanish: Hola Mundo  
2. French: Bonjour le monde  
3. German: Hallo Welt  
4. Japanese: こんにちは世界 (Konnichiwa Sekai)  
5. Arabic: مرحبا بالعالم (Marhaban bil 'aalam)

Explanation