@circuitorg/agent-cli 1.1.17 → 1.2.2
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 +53 -152
- package/bin/circuit-darwin-arm64 +0 -0
- package/bin/circuit-darwin-x64 +0 -0
- package/bin/circuit-linux-arm64 +0 -0
- package/bin/circuit-linux-x64 +0 -0
- package/bin/circuit-win32-x64.exe +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,117 +8,57 @@ The official command-line tool for creating, testing, and publishing agents on t
|
|
|
8
8
|
- [📑 Table of Contents](#-table-of-contents)
|
|
9
9
|
- [🚀 Features](#-features)
|
|
10
10
|
- [📦 Installation](#-installation)
|
|
11
|
-
- [Installation Methods Explained](#installation-methods-explained)
|
|
12
|
-
- [Option 1: Install via Bun (Requires Bun runtime)](#option-1-install-via-bun-requires-bun-runtime)
|
|
13
11
|
- [🎯 Quick Start](#-quick-start)
|
|
14
|
-
- [First Steps](#first-steps)
|
|
15
|
-
- [Creating Your First Agent](#creating-your-first-agent)
|
|
16
12
|
- [📚 Command Reference](#-command-reference)
|
|
17
13
|
- [Core Commands](#core-commands)
|
|
18
|
-
- [Agent Management Commands](#agent-management-commands)
|
|
19
14
|
- [Wallet Commands](#wallet-commands)
|
|
20
|
-
- [
|
|
15
|
+
- [Command Details](#command-details)
|
|
16
|
+
- [`circuit init`](#circuit-init)
|
|
17
|
+
- [`circuit run`](#circuit-run)
|
|
18
|
+
- [`circuit stop`](#circuit-stop)
|
|
21
19
|
- [Getting Started with Agents](#getting-started-with-agents)
|
|
22
20
|
- [🔧 Troubleshooting](#-troubleshooting)
|
|
23
|
-
- [Common Issues](#common-issues)
|
|
24
|
-
- ["No supported project type detected"](#no-supported-project-type-detected)
|
|
25
|
-
- ["Server failed to start within timeout"](#server-failed-to-start-within-timeout)
|
|
26
|
-
- ["Authentication Required"](#authentication-required)
|
|
27
|
-
- [Need Help?](#need-help)
|
|
28
21
|
- [🔗 Related](#-related)
|
|
29
22
|
|
|
30
23
|
## 🚀 Features
|
|
31
24
|
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
36
|
-
- **Zero Dependencies**: Standalone executables work out of the box
|
|
37
|
-
- **Cross-Platform**: Works on macOS, Linux, and Windows
|
|
25
|
+
- Initialize new agents with a single command
|
|
26
|
+
- Test agents locally before publishing
|
|
27
|
+
- Support for TypeScript and Python
|
|
28
|
+
- Cross-platform: macOS, Linux, and Windows
|
|
38
29
|
|
|
39
30
|
## 📦 Installation
|
|
40
31
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
**How to install Circuit CLI:**
|
|
44
|
-
|
|
45
|
-
1. **Bun package manager** - Requires Bun runtime
|
|
46
|
-
2. **NPM package manager** - Coming soon
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
#### Option 1: Install via Bun (Requires Bun runtime)
|
|
50
|
-
|
|
51
|
-
**⚠️ Prerequisites**:
|
|
52
|
-
- You must have Bun or node installed - bun install link: (`curl -fsSL https://bun.sh/install | bash`)
|
|
32
|
+
**Prerequisites**: Bun or Node.js installed ([Install Bun](https://bun.sh))
|
|
53
33
|
|
|
54
34
|
```bash
|
|
55
35
|
bun install -g @circuitorg/agent-cli
|
|
56
36
|
```
|
|
57
37
|
|
|
58
|
-
**Note**: This method installs a minified JavaScript bundle, not a compiled binary. The `circuit` command will run using your local Bun runtime.
|
|
59
|
-
|
|
60
38
|
|
|
61
39
|
## 🎯 Quick Start
|
|
62
40
|
|
|
63
|
-
### First Steps
|
|
64
|
-
|
|
65
|
-
```bash
|
|
66
|
-
# Verify installation
|
|
67
|
-
circuit --version
|
|
68
|
-
|
|
69
|
-
# RECOMMENDED FIRST STEP: Get an overview of the tooling and quick start guide
|
|
70
|
-
circuit help
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
### Creating Your First Agent
|
|
74
|
-
|
|
75
|
-
**Streamlined Workflow:**
|
|
76
|
-
|
|
77
41
|
```bash
|
|
78
|
-
#
|
|
42
|
+
# Authenticate
|
|
79
43
|
circuit login
|
|
80
44
|
|
|
81
|
-
#
|
|
45
|
+
# Create a new agent
|
|
82
46
|
circuit init
|
|
83
|
-
# Follow the prompts to:
|
|
84
|
-
# - Choose TypeScript or Python
|
|
85
|
-
# - Name your agent
|
|
86
|
-
# - Set up the project structure
|
|
87
47
|
|
|
88
|
-
#
|
|
89
|
-
cd <
|
|
48
|
+
# Navigate to agent directory
|
|
49
|
+
cd <agent-name>
|
|
90
50
|
|
|
91
|
-
#
|
|
92
|
-
bun install #
|
|
93
|
-
#
|
|
94
|
-
uv sync # For Python agents
|
|
51
|
+
# Install dependencies
|
|
52
|
+
bun install # TypeScript
|
|
53
|
+
uv sync # Python
|
|
95
54
|
|
|
96
|
-
#
|
|
55
|
+
# Test locally
|
|
97
56
|
circuit run
|
|
98
57
|
|
|
99
|
-
#
|
|
58
|
+
# Publish to production
|
|
100
59
|
circuit publish
|
|
101
60
|
```
|
|
102
61
|
|
|
103
|
-
**Existing Agent Setup:**
|
|
104
|
-
|
|
105
|
-
```bash
|
|
106
|
-
# Navigate to your existing agent directory
|
|
107
|
-
cd <existing-agent-dir>
|
|
108
|
-
|
|
109
|
-
# Initialize with --no-dir to configure existing project
|
|
110
|
-
circuit init --no-dir
|
|
111
|
-
# This adds the agent to CLI registry and updates config files
|
|
112
|
-
|
|
113
|
-
# Install dependencies
|
|
114
|
-
bun install # or uv sync for Python
|
|
115
|
-
|
|
116
|
-
# Test your agent
|
|
117
|
-
circuit run
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
> **Note**: For existing agents, copy your execution logic into the execute/stop functions in the generated template files. See the SDK documentation for details on the Agent class structure.
|
|
121
|
-
|
|
122
62
|
|
|
123
63
|
## 📚 Command Reference
|
|
124
64
|
|
|
@@ -130,16 +70,11 @@ circuit run
|
|
|
130
70
|
| `circuit login` | Authenticate with Circuit platform |
|
|
131
71
|
| `circuit logout` | Sign out from Circuit platform |
|
|
132
72
|
| `circuit init` | Initialize a new agent project |
|
|
133
|
-
| `circuit run` |
|
|
73
|
+
| `circuit run` | Test your agent locally |
|
|
74
|
+
| `circuit stop` | Stop a running agent session |
|
|
134
75
|
| `circuit publish` | Publish agent to production |
|
|
135
76
|
| `circuit help` | Show detailed help and getting started guide |
|
|
136
|
-
|
|
137
|
-
### Agent Management Commands
|
|
138
|
-
|
|
139
|
-
| Command | Description |
|
|
140
|
-
|---------|-------------|
|
|
141
|
-
| `circuit agent info` | Show current agent information |
|
|
142
|
-
| `circuit agent status` | Check agent ment status |
|
|
77
|
+
| `circuit info` | Display CLI and current agent information |
|
|
143
78
|
|
|
144
79
|
### Wallet Commands
|
|
145
80
|
|
|
@@ -148,88 +83,54 @@ circuit run
|
|
|
148
83
|
| `circuit wallet list` | List your available wallets |
|
|
149
84
|
| `circuit wallet import` | Import a new wallet for testing |
|
|
150
85
|
|
|
151
|
-
###
|
|
86
|
+
### Command Details
|
|
87
|
+
|
|
88
|
+
#### `circuit init`
|
|
89
|
+
Creates a new agent project:
|
|
90
|
+
- Prompts for language (TypeScript or Python) and agent name
|
|
91
|
+
- Generates project structure with `.circuit.toml` config file
|
|
92
|
+
|
|
93
|
+
Each agent stores its configuration in a local `.circuit.toml` file.
|
|
152
94
|
|
|
153
|
-
|
|
95
|
+
#### `circuit run`
|
|
96
|
+
Runs your un-published agent code:
|
|
97
|
+
- Creates a session if needed
|
|
98
|
+
- Starts local agent server
|
|
99
|
+
- Executes your agent's run command
|
|
154
100
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
| `--wallet <address>` | Use specific wallet address |
|
|
158
|
-
| `--mode local\|live\|custom` | Set simulation mode |
|
|
159
|
-
| `--action execute\|stop` | Choose action to perform |
|
|
160
|
-
| `--port <number>` | Port for custom server mode |
|
|
101
|
+
**Flags:**
|
|
102
|
+
- `--wallet <address>` or `-w <address>` - Specify wallet address
|
|
161
103
|
|
|
162
|
-
**Examples:**
|
|
163
104
|
```bash
|
|
164
|
-
# Interactive mode (recommended)
|
|
165
105
|
circuit run
|
|
106
|
+
circuit run --wallet 0x123...
|
|
107
|
+
```
|
|
166
108
|
|
|
167
|
-
|
|
168
|
-
|
|
109
|
+
#### `circuit stop`
|
|
110
|
+
Stops a running agent session and cleans up resources.
|
|
169
111
|
|
|
170
|
-
|
|
171
|
-
|
|
112
|
+
**Flags:**
|
|
113
|
+
- `--wallet <address>` or `-w <address>` - Specify wallet address
|
|
172
114
|
|
|
173
|
-
|
|
174
|
-
circuit
|
|
115
|
+
```bash
|
|
116
|
+
circuit stop
|
|
117
|
+
circuit stop --wallet 0x123...
|
|
175
118
|
```
|
|
176
119
|
|
|
177
120
|
### Getting Started with Agents
|
|
178
121
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
3. Create a complete project structure with:
|
|
184
|
-
- Main agent file with example code
|
|
185
|
-
- Configuration file (`circuit.json`)
|
|
186
|
-
- Dependencies file (`package.json` or `pyproject.toml`)
|
|
187
|
-
- Ready-to-run agent template
|
|
122
|
+
`circuit init` generates:
|
|
123
|
+
- Main agent file: `index.ts` (TypeScript) or `main.py` (Python)
|
|
124
|
+
- Configuration: `.circuit.toml`
|
|
125
|
+
- Dependencies: `package.json` or `pyproject.toml`
|
|
188
126
|
|
|
189
|
-
|
|
190
|
-
-
|
|
191
|
-
-
|
|
192
|
-
- Execute and stop functions
|
|
193
|
-
- Proper error handling
|
|
194
|
-
- Circuit SDK v1.0 integration with new unified API
|
|
195
|
-
- Template-specific examples (balance checking, transfers, custom transactions)
|
|
127
|
+
Your agent code implements two commands:
|
|
128
|
+
- `run` - Executes your agent logic
|
|
129
|
+
- `stop` - Handles cleanup when stopping
|
|
196
130
|
|
|
197
131
|
|
|
198
132
|
## 🔧 Troubleshooting
|
|
199
|
-
|
|
200
|
-
### Common Issues
|
|
201
|
-
|
|
202
|
-
#### "No supported project type detected"
|
|
203
|
-
|
|
204
|
-
Make sure you're in a directory with the correct project structure:
|
|
205
|
-
|
|
206
|
-
- **TypeScript**: `index.ts` + `package.json`
|
|
207
|
-
- **Python**: `main.py` + `pyproject.toml`
|
|
208
|
-
|
|
209
|
-
#### "Server failed to start within timeout"
|
|
210
|
-
|
|
211
|
-
Check that your agent server:
|
|
212
|
-
1. Has a `/health` endpoint
|
|
213
|
-
2. Starts within the timeout period (default: 30 seconds)
|
|
214
|
-
3. Binds to the correct port
|
|
215
|
-
|
|
216
|
-
#### "Authentication Required"
|
|
217
|
-
|
|
218
|
-
Run `circuit login` to authenticate with the Circuit platform.
|
|
219
|
-
|
|
220
|
-
### Need Help?
|
|
221
|
-
|
|
222
|
-
```bash
|
|
223
|
-
# Show available commands
|
|
224
|
-
circuit --help
|
|
225
|
-
|
|
226
|
-
# Show help for specific command
|
|
227
|
-
circuit agent --help
|
|
228
|
-
|
|
229
|
-
# Enable verbose output
|
|
230
|
-
circuit --verbose
|
|
231
|
-
```
|
|
232
|
-
|
|
133
|
+
**User feedback and common questions will be populated here as it comes in**
|
|
233
134
|
## 🔗 Related
|
|
234
135
|
|
|
235
136
|
- [Circuit Agents SDK Typescript](https://www.npmjs.com/package/@circuitorg/agent-sdk)
|
package/bin/circuit-darwin-arm64
CHANGED
|
Binary file
|
package/bin/circuit-darwin-x64
CHANGED
|
Binary file
|
package/bin/circuit-linux-arm64
CHANGED
|
Binary file
|
package/bin/circuit-linux-x64
CHANGED
|
Binary file
|
|
Binary file
|