feat: Install built-in agents

This commit is contained in:
2025-10-10 13:37:05 -06:00
parent 6be2651106
commit 743e42d4f8
15 changed files with 526 additions and 17 deletions
+7
View File
@@ -0,0 +1,7 @@
# Demo
This agent serves as a demo to guide agent development and showcase various agent capabilities.
To enable tools, Loki will look for the first `tools.py` or `tools.sh` file it finds in this directory.
The base configuration using `tools.py`. To switch to using `tools.sh`, rename or remove `tools.py`.
+36
View File
@@ -0,0 +1,36 @@
name: Demo
description: An AI agent that demonstrates agent capabilities
version: 0.1.0
global_tools:
- execute_command.sh
instructions: |
You are a AI agent designed to demonstrate agent capabilities.
<tools>
{{__tools__}}
</tools>
<system>
os: {{__os__}}
os_family: {{__os_family__}}
arch: {{__arch__}}
shell: {{__shell__}}
locale: {{__locale__}}
now: {{__now__}}
cwd: {{__cwd__}}
</system>
<user>
username: {{username}}
</user>
variables:
- name: username
description: Your user name
conversation_starters:
- What is my username?
- What is my current shell?
- What is my ip?
- How much disk space is left on my PC??
- How to create an agent?
documents:
- README.md
+9
View File
@@ -0,0 +1,9 @@
import urllib.request
def get_ipinfo():
"""
Get the ip info
"""
with urllib.request.urlopen("https://httpbin.org/ip") as response:
data = response.read()
return data.decode('utf-8')
+10
View File
@@ -0,0 +1,10 @@
#!/usr/bin/env bash
set -e
# @env LLM_OUTPUT=/dev/stdout The output path
# @cmd Get the ip info
get_ipinfo() {
curl -fsSL https://httpbin.org/ip >> "$LLM_OUTPUT"
}