@sulala/agent-os 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/README.md +101 -0
  2. package/dist/cli.js +16306 -0
  3. package/dist/index.js +15972 -0
  4. package/package.json +39 -0
package/README.md ADDED
@@ -0,0 +1,101 @@
1
+ # Agent OS
2
+
3
+ Lightweight **Bun-based Agent Operating System** — micro-agents, installable skills, workflows.
4
+
5
+ ## Quick start
6
+
7
+ ```bash
8
+ # Install deps
9
+ bun install
10
+
11
+ # For dev, agents are loaded from ./data/agents (pre-configured).
12
+ # For production, copy to ~/.agent-os/agents/ or set AGENT_OS_AGENTS_DIR.
13
+
14
+ # Set LLM API key (OpenAI or OpenRouter)
15
+ export OPENAI_API_KEY=sk-...
16
+ # or: export OPENROUTER_API_KEY=sk-or-...
17
+
18
+ # Start server
19
+ bun run dev
20
+ ```
21
+
22
+ Then:
23
+
24
+ ```bash
25
+ # List agents
26
+ curl http://127.0.0.1:3010/api/agents
27
+
28
+ # Run agent (HTTP)
29
+ curl -X POST http://127.0.0.1:3010/api/agents/run \
30
+ -H "Content-Type: application/json" \
31
+ -d '{"agent_id":"echo_agent","task":"Hello, what can you do?"}'
32
+
33
+ # Or run from CLI
34
+ AGENT_OS_AGENTS_DIR=./data/agents bun run cli echo_agent "What is 2+2?"
35
+ ```
36
+
37
+ ## Configuration
38
+
39
+ | Env | Description |
40
+ |-----|-------------|
41
+ | `PORT` | Server port (default: 3010) |
42
+ | `HOST` | Server host (default: 127.0.0.1) |
43
+ | `OPENAI_API_KEY` | OpenAI API key |
44
+ | `OPENROUTER_API_KEY` | OpenRouter API key (alternative) |
45
+ | `AGENT_OS_AGENTS_DIR` | Override agents directory (default: ~/.agent-os/agents/) |
46
+
47
+ ## Project structure
48
+
49
+ ```
50
+ tinyagent/
51
+ src/
52
+ core/ # Agent registry, runtime, LLM, tools
53
+ types/ # Agent config schema
54
+ server.ts # HTTP API
55
+ index.ts # Entry point
56
+ examples/ # Example agent configs
57
+ skills/ # Example skills (weather, etc.)
58
+ docs/ # Specs (AGENT_SPEC, SKILL_SPEC, etc.)
59
+ ```
60
+
61
+ ## Built-in tools (Phase 2)
62
+
63
+ | Tool | Description |
64
+ |--------|---------------------------|
65
+ | `echo` | Echo back text |
66
+ | `time` | Get current date/time |
67
+
68
+ Agents get all tools by default. Restrict via `tools: ["echo"]` in agent config.
69
+
70
+ ## Skills (Phase 3)
71
+
72
+ Skills live under `~/.agent-os/skills/<name>/` (or `AGENT_OS_SKILLS_DIR`). Example:
73
+
74
+ ```
75
+ ~/.agent-os/skills/weather/
76
+ skill.yaml
77
+ tools.yaml
78
+ ```
79
+
80
+ Agents declare skills:
81
+
82
+ ```json
83
+ {
84
+ "id": "weather_agent",
85
+ "name": "Weather Assistant",
86
+ "model": "gpt-4o-mini",
87
+ "skills": ["weather"],
88
+ "tools": ["weather_current"]
89
+ }
90
+ ```
91
+
92
+ At runtime, the skill loader reads `tools.yaml` and registers HTTP tools into the tool registry.
93
+
94
+ ## Channels (Telegram)
95
+
96
+ You can talk to your agent from Telegram. Create a bot with [@BotFather](https://t.me/BotFather), add the token and default agent in **Dashboard → Settings → Telegram**, expose your server over HTTPS (e.g. ngrok), and set the webhook. Full steps: [doc/TELEGRAM_SETUP.md](doc/TELEGRAM_SETUP.md).
97
+
98
+ ## Roadmap
99
+
100
+ See [roadmap.md](./roadmap.md) for phases. Phases 1–3 (Core Runtime, Tool System, Skill System) are implemented at a minimal level.
101
+