anorion 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.
- package/README.md +87 -0
- package/agents/001.yaml +32 -0
- package/agents/example.yaml +6 -0
- package/bin/anorion.js +8093 -0
- package/package.json +72 -0
- package/scripts/cli.ts +182 -0
- package/scripts/postinstall.js +6 -0
- package/scripts/setup.ts +255 -0
- package/src/agents/pipeline.ts +231 -0
- package/src/agents/registry.ts +153 -0
- package/src/agents/runtime.ts +593 -0
- package/src/agents/session.ts +338 -0
- package/src/agents/subagent.ts +185 -0
- package/src/bridge/client.ts +221 -0
- package/src/bridge/federator.ts +221 -0
- package/src/bridge/protocol.ts +88 -0
- package/src/bridge/server.ts +221 -0
- package/src/channels/base.ts +43 -0
- package/src/channels/router.ts +122 -0
- package/src/channels/telegram.ts +592 -0
- package/src/channels/webhook.ts +143 -0
- package/src/cli/index.ts +1036 -0
- package/src/cli/interactive.ts +26 -0
- package/src/gateway/routes-v2.ts +165 -0
- package/src/gateway/server.ts +512 -0
- package/src/gateway/ws.ts +75 -0
- package/src/index.ts +182 -0
- package/src/llm/provider.ts +243 -0
- package/src/llm/providers.ts +381 -0
- package/src/memory/context.ts +125 -0
- package/src/memory/store.ts +214 -0
- package/src/scheduler/cron.ts +239 -0
- package/src/shared/audit.ts +231 -0
- package/src/shared/config.ts +129 -0
- package/src/shared/db/index.ts +165 -0
- package/src/shared/db/prepared.ts +111 -0
- package/src/shared/db/schema.ts +84 -0
- package/src/shared/events.ts +79 -0
- package/src/shared/logger.ts +10 -0
- package/src/shared/metrics.ts +190 -0
- package/src/shared/rbac.ts +151 -0
- package/src/shared/token-budget.ts +157 -0
- package/src/shared/types.ts +166 -0
- package/src/tools/builtin/echo.ts +19 -0
- package/src/tools/builtin/file-read.ts +78 -0
- package/src/tools/builtin/file-write.ts +64 -0
- package/src/tools/builtin/http-request.ts +63 -0
- package/src/tools/builtin/memory.ts +71 -0
- package/src/tools/builtin/shell.ts +94 -0
- package/src/tools/builtin/web-search.ts +22 -0
- package/src/tools/executor.ts +126 -0
- package/src/tools/registry.ts +56 -0
- package/src/tools/skill-manager.ts +252 -0
package/README.md
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Anorion
|
|
2
|
+
|
|
3
|
+
An extensible agentic framework built with [Bun](https://bun.com).
|
|
4
|
+
|
|
5
|
+
Anorion provides a gateway for running AI agents with multi-channel support (Telegram, and more), persistent memory, scheduled tasks, and agent-to-agent bridging.
|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
- **Agent Runtime** — Spin up agents with configurable models, timeouts, and sub-agent support
|
|
10
|
+
- **Multi-Channel** — Telegram integration out of the box, extensible to any platform
|
|
11
|
+
- **Persistent Memory** — File-based memory provider for agent context across sessions
|
|
12
|
+
- **Scheduler** — Cron-based task scheduling for automated agent workflows
|
|
13
|
+
- **Bridge Protocol** — Peer-to-peer agent communication across instances
|
|
14
|
+
- **Plugin System** — Extensible architecture for custom tools and skills
|
|
15
|
+
|
|
16
|
+
## Quick Start
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Install dependencies
|
|
20
|
+
bun install
|
|
21
|
+
|
|
22
|
+
# Copy environment template
|
|
23
|
+
cp .env.example .env
|
|
24
|
+
|
|
25
|
+
# Edit .env with your keys
|
|
26
|
+
# Run the gateway
|
|
27
|
+
bun run index.ts
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Configuration
|
|
31
|
+
|
|
32
|
+
Anorion is configured via `anorion.yaml`. Copy and customize:
|
|
33
|
+
|
|
34
|
+
```yaml
|
|
35
|
+
gateway:
|
|
36
|
+
host: 0.0.0.0
|
|
37
|
+
port: 4250
|
|
38
|
+
apiKeys:
|
|
39
|
+
- name: admin
|
|
40
|
+
key: ${ANORION_ADMIN_KEY}
|
|
41
|
+
scopes: ["*"]
|
|
42
|
+
database: ./data/anorion.db
|
|
43
|
+
|
|
44
|
+
agents:
|
|
45
|
+
dir: ./agents
|
|
46
|
+
defaultModel: zai/glm-5
|
|
47
|
+
defaultTimeoutMs: 120000
|
|
48
|
+
maxSubagents: 5
|
|
49
|
+
|
|
50
|
+
channels:
|
|
51
|
+
telegram:
|
|
52
|
+
enabled: true
|
|
53
|
+
botToken: ${TELEGRAM_BOT_TOKEN}
|
|
54
|
+
allowedUsers:
|
|
55
|
+
- ${TELEGRAM_ALLOWED_USER_ID}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
See `.env.example` for all required environment variables.
|
|
59
|
+
|
|
60
|
+
## Architecture
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
anorion/
|
|
64
|
+
├── src/
|
|
65
|
+
│ ├── agents/ # Agent definitions and runtime
|
|
66
|
+
│ ├── bridge/ # Peer-to-peer agent bridge
|
|
67
|
+
│ ├── channels/ # Platform integrations (Telegram, etc.)
|
|
68
|
+
│ ├── gateway/ # HTTP API gateway
|
|
69
|
+
│ ├── llm/ # LLM provider abstractions
|
|
70
|
+
│ ├── memory/ # Persistent memory providers
|
|
71
|
+
│ ├── plugins/ # Plugin system
|
|
72
|
+
│ ├── scheduler/ # Cron-based task scheduler
|
|
73
|
+
│ ├── shared/ # Shared utilities
|
|
74
|
+
│ └── tools/ # Built-in tools
|
|
75
|
+
├── agents/ # Agent configuration files
|
|
76
|
+
├── skills/ # Agent skills
|
|
77
|
+
├── data/ # Runtime data (gitignored)
|
|
78
|
+
└── ui/ # Web UI components
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Requirements
|
|
82
|
+
|
|
83
|
+
- [Bun](https://bun.com) v1.3.10+
|
|
84
|
+
|
|
85
|
+
## License
|
|
86
|
+
|
|
87
|
+
MIT
|
package/agents/001.yaml
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: "001"
|
|
2
|
+
model: openrouter/z-ai/glm-5
|
|
3
|
+
systemPrompt: |
|
|
4
|
+
You are Agent 001, the first agent running on Anorion — an open-source agent gateway built by Venym Labs.
|
|
5
|
+
|
|
6
|
+
You are a direct, capable AI assistant. You help with daily queries, research, coding questions, and general tasks.
|
|
7
|
+
|
|
8
|
+
Your personality:
|
|
9
|
+
- Sharp and concise — no filler, no fluff
|
|
10
|
+
- Use tools when you need real-time info or to execute tasks
|
|
11
|
+
- Confident but honest — say when you don't know something
|
|
12
|
+
- A bit of edge is fine, you're not a corporate bot
|
|
13
|
+
|
|
14
|
+
You have access to tools for web search, shell commands, HTTP requests, file operations, and memory. Use them proactively when they'd help answer better.
|
|
15
|
+
|
|
16
|
+
Remember context across conversations using your memory tools. Save important facts about the user and recall them later.
|
|
17
|
+
tools:
|
|
18
|
+
- echo
|
|
19
|
+
- shell
|
|
20
|
+
- http-request
|
|
21
|
+
- file-read
|
|
22
|
+
- file-write
|
|
23
|
+
- web-search
|
|
24
|
+
- memory-save
|
|
25
|
+
- memory-search
|
|
26
|
+
- memory-list
|
|
27
|
+
- spawn-agent
|
|
28
|
+
maxIterations: 15
|
|
29
|
+
timeoutMs: 120000
|
|
30
|
+
tags:
|
|
31
|
+
- general
|
|
32
|
+
- daily
|