@cortices/agent 0.3.7 → 0.3.9
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 +112 -7
- package/bin/cortices-native.mjs +0 -0
- package/bin/cortices-opencode.mjs +0 -0
- package/dist/claude-daemon.mjs +1 -1
- package/dist/codex-daemon.mjs +1 -1
- package/dist/cortices-daemon.mjs +1 -1
- package/dist/opencode-daemon.mjs +1 -1
- package/dist/scripts/memory.mjs +2 -0
- package/dist/scripts/plan.mjs +1 -1
- package/dist/scripts/schedule.mjs +1 -1
- package/dist/scripts/service.mjs +1 -1
- package/dist/sdk.mjs +1 -1
- package/dist/wasm/cortices_core.js +1 -1
- package/dist/wasm/cortices_core_bg.wasm +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,26 +1,131 @@
|
|
|
1
1
|
# @cortices/agent
|
|
2
2
|
|
|
3
|
-
Connect your AI coding agents to [Cortices](https://cortices.io) — a real-time dashboard to monitor, chat with, and
|
|
3
|
+
Connect your AI coding agents to [Cortices](https://cortices.io) — a real-time dashboard to monitor, chat with, and manage your agents from anywhere. Works behind NAT with no port forwarding needed.
|
|
4
|
+
|
|
5
|
+
## Supported Agents
|
|
6
|
+
|
|
7
|
+
| Agent | Command | Requirement |
|
|
8
|
+
|-------|---------|-------------|
|
|
9
|
+
| Claude Code | `cortices-claude` | [Claude Code CLI](https://docs.anthropic.com/en/docs/claude-code) |
|
|
10
|
+
| OpenAI Codex | `cortices-codex` | `CODEX_API_KEY` or `OPENAI_API_KEY` |
|
|
11
|
+
| OpenCode | `cortices-opencode` | [OpenCode](https://opencode.ai) |
|
|
12
|
+
| Native (multi-provider) | `cortices-native` | API key for any supported provider |
|
|
4
13
|
|
|
5
14
|
## Quick Start
|
|
6
15
|
|
|
7
16
|
```bash
|
|
8
|
-
# 1. Sign up at https://cortices.io and create an API key
|
|
17
|
+
# 1. Sign up at https://cortices.io and create an API key (Settings → API Keys)
|
|
9
18
|
|
|
10
|
-
# 2.
|
|
19
|
+
# 2. Run your agent
|
|
11
20
|
npx @cortices/agent --api-key ck_your_key_here
|
|
12
21
|
```
|
|
13
22
|
|
|
14
|
-
Your agent
|
|
23
|
+
Your agent appears in your [dashboard](https://cortices.io/dashboard) instantly.
|
|
15
24
|
|
|
16
25
|
## Options
|
|
17
26
|
|
|
18
27
|
```
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
28
|
+
--api-key KEY Your Cortices API key (required)
|
|
29
|
+
--dir DIR Working directory (default: current directory)
|
|
30
|
+
--name NAME Agent name shown in dashboard (default: auto-generated)
|
|
31
|
+
--interactive Require approval for each tool call from the dashboard
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Install as a Background Service
|
|
35
|
+
|
|
36
|
+
Run your agent as a persistent service that starts on boot and auto-restarts on failure.
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
# Install
|
|
40
|
+
npx @cortices/agent install --api-key ck_xxx --dir /path/to/project --name my-agent
|
|
41
|
+
|
|
42
|
+
# Manage
|
|
43
|
+
npx @cortices/agent list # List installed agents
|
|
44
|
+
npx @cortices/agent status NAME # Check agent status
|
|
45
|
+
npx @cortices/agent uninstall NAME # Remove agent
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
- **Linux**: creates a systemd user service
|
|
49
|
+
- **macOS**: creates a launchd agent
|
|
50
|
+
|
|
51
|
+
### Viewing Logs
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
# Linux
|
|
55
|
+
journalctl --user -u cortices-agent-NAME -f
|
|
56
|
+
|
|
57
|
+
# macOS
|
|
58
|
+
tail -f ~/Library/Logs/Cortices/NAME.log
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Native Agent (Multi-Provider)
|
|
62
|
+
|
|
63
|
+
The native agent (`cortices-native`) works with multiple LLM providers without requiring an external CLI:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
# Use with Anthropic (default)
|
|
67
|
+
ANTHROPIC_API_KEY=sk-ant-... npx @cortices/agent native --api-key ck_xxx
|
|
68
|
+
|
|
69
|
+
# Use with OpenAI
|
|
70
|
+
OPENAI_API_KEY=sk-... npx @cortices/agent native --api-key ck_xxx --model openai/gpt-4o
|
|
71
|
+
|
|
72
|
+
# Use with Google
|
|
73
|
+
GOOGLE_API_KEY=... npx @cortices/agent native --api-key ck_xxx --model google/gemini-2.5-pro
|
|
74
|
+
|
|
75
|
+
# Use with OpenRouter (access any model)
|
|
76
|
+
OPENROUTER_API_KEY=... npx @cortices/agent native --api-key ck_xxx --model openrouter/anthropic/claude-sonnet-4
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
You can also configure provider API keys from the dashboard under **Settings → Credentials**, so the agent picks them up automatically.
|
|
80
|
+
|
|
81
|
+
## Dashboard Features
|
|
82
|
+
|
|
83
|
+
Once connected, the dashboard gives you:
|
|
84
|
+
|
|
85
|
+
- **Chat** — send messages to your agent and see streaming responses
|
|
86
|
+
- **File Browser** — browse the agent's working directory with git status indicators
|
|
87
|
+
- **File Viewer** — view files with syntax highlighting
|
|
88
|
+
- **Git Diff** — unified diffs for any changed file
|
|
89
|
+
- **Tool Calls** — see what the agent is doing in real time (file edits, bash commands, etc.)
|
|
90
|
+
- **Scheduled Tasks** — set up recurring tasks with cron expressions
|
|
91
|
+
- **Plans** — define long-running, multi-step goals that the agent works through over time
|
|
92
|
+
- **Memories** — store persistent context (facts, preferences, learnings) that your agent remembers across sessions
|
|
93
|
+
|
|
94
|
+
## Scheduled Tasks
|
|
95
|
+
|
|
96
|
+
Create recurring tasks directly from the dashboard, or via the agent's built-in CLI:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
# Run a bash command every 5 minutes (free, no LLM cost)
|
|
100
|
+
schedule create --name "health check" --cron "*/5 * * * *" --command "curl -s https://example.com/health"
|
|
101
|
+
|
|
102
|
+
# Run a Claude prompt daily at 9am UTC
|
|
103
|
+
schedule create --name "daily summary" --cron "0 9 * * *" --prompt "Summarize yesterday's git commits"
|
|
22
104
|
```
|
|
23
105
|
|
|
106
|
+
## Plans
|
|
107
|
+
|
|
108
|
+
Plans are stateful, multi-step tasks that maintain progress across runs:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
# Create a plan that runs every 4 hours
|
|
112
|
+
plan create --name "migrate to TypeScript" \
|
|
113
|
+
--cron "0 */4 * * *" \
|
|
114
|
+
--description "Convert all .js files in src/ to TypeScript. Track progress in state."
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
The agent tracks its progress, remembers what it did last run, and picks up where it left off.
|
|
118
|
+
|
|
119
|
+
## Permission Modes
|
|
120
|
+
|
|
121
|
+
- **Auto-approve (default)** — the agent executes tools automatically; you watch from the dashboard
|
|
122
|
+
- **Interactive (`--interactive`)** — every tool call requires your approval from the dashboard before it runs
|
|
123
|
+
|
|
124
|
+
## Requirements
|
|
125
|
+
|
|
126
|
+
- Node.js 18+
|
|
127
|
+
- The CLI for your chosen agent type (Claude Code, Codex, or OpenCode) — not needed for native agent
|
|
128
|
+
|
|
24
129
|
## Learn More
|
|
25
130
|
|
|
26
131
|
Visit [cortices.io](https://cortices.io) to get started.
|
package/bin/cortices-native.mjs
CHANGED
|
File without changes
|
|
File without changes
|