@circuitorg/agent-cli 1.0.6 → 1.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 +55 -97
- 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 +2 -1
package/README.md
CHANGED
|
@@ -13,16 +13,11 @@ The official command-line tool for creating, testing, and deploying agents on th
|
|
|
13
13
|
- [🎯 Quick Start](#-quick-start)
|
|
14
14
|
- [First Steps](#first-steps)
|
|
15
15
|
- [Creating Your First Agent](#creating-your-first-agent)
|
|
16
|
-
- [Step 1a - From Scratch](#step-1a---from-scratch)
|
|
17
|
-
- [Step 1b - Adding an existing agent to the CLI agent registry](#step-1b---adding-an-existing-agent-to-the-cli-agent-registry)
|
|
18
|
-
- [Steps 2-5: Soft deploy, create session for testing, test locally, deploy live](#steps-2-5-soft-deploy-create-session-for-testing-test-locally-deploy-live)
|
|
19
16
|
- [📚 Command Reference](#-command-reference)
|
|
20
17
|
- [Core Commands](#core-commands)
|
|
21
|
-
- [Agent Commands](#agent-commands)
|
|
22
|
-
- [Simulation Commands](#simulation-commands)
|
|
23
|
-
- [Simulation Mode Flags](#simulation-mode-flags)
|
|
24
|
-
- [Authentication Commands](#authentication-commands)
|
|
18
|
+
- [Agent Management Commands](#agent-management-commands)
|
|
25
19
|
- [Wallet Commands](#wallet-commands)
|
|
20
|
+
- [Run Command Flags](#run-command-flags)
|
|
26
21
|
- [Getting Started with Agents](#getting-started-with-agents)
|
|
27
22
|
- [🔧 Troubleshooting](#-troubleshooting)
|
|
28
23
|
- [Common Issues](#common-issues)
|
|
@@ -79,65 +74,53 @@ circuit
|
|
|
79
74
|
```
|
|
80
75
|
|
|
81
76
|
### Creating Your First Agent
|
|
82
|
-
#### Step 1a - From Scratch
|
|
83
|
-
|
|
84
|
-
```bash
|
|
85
|
-
# (First time setup only) Authenticate your cli tool with your circuit account
|
|
86
|
-
circuit auth login
|
|
87
77
|
|
|
78
|
+
**Streamlined Workflow:**
|
|
88
79
|
|
|
89
|
-
|
|
90
|
-
circuit
|
|
80
|
+
```bash
|
|
81
|
+
# 1. Authenticate your cli tool with your circuit account
|
|
82
|
+
circuit login
|
|
91
83
|
|
|
84
|
+
# 2. Initialize a new agent project (optionally pass --no-dir to use an existing folder)
|
|
85
|
+
circuit init
|
|
92
86
|
# Follow the prompts to:
|
|
93
87
|
# - Choose TypeScript or Python
|
|
94
88
|
# - Name your agent
|
|
95
89
|
# - Set up the project structure
|
|
96
90
|
|
|
97
|
-
# Navigate to your new agent
|
|
98
|
-
cd
|
|
91
|
+
# 3. Navigate to your new agent (Skip if you passed --no-dir above)
|
|
92
|
+
cd <generated-folder>
|
|
99
93
|
|
|
100
|
-
# Install
|
|
101
|
-
bun install
|
|
94
|
+
# 4. Install dependencies
|
|
95
|
+
bun install # For TypeScript agents
|
|
102
96
|
# OR
|
|
103
|
-
uv sync
|
|
97
|
+
uv sync # For Python agents
|
|
104
98
|
|
|
99
|
+
# 5. Test your agent (handles setup, session creation automatically)
|
|
100
|
+
circuit run
|
|
101
|
+
|
|
102
|
+
# 6. Deploy to production when ready
|
|
103
|
+
circuit deploy
|
|
105
104
|
```
|
|
106
105
|
|
|
107
|
-
|
|
108
|
-
>Note: If you already have agents and want to deploy via the cli tool, you will need to go through the following steps to ensure the agent is aligned with the current deployment structure.
|
|
106
|
+
**Existing Agent Setup:**
|
|
109
107
|
|
|
110
108
|
```bash
|
|
111
|
-
# Navigate to your existing agent
|
|
109
|
+
# Navigate to your existing agent directory
|
|
112
110
|
cd <existing-agent-dir>
|
|
113
111
|
|
|
114
|
-
# Initialize
|
|
115
|
-
|
|
116
|
-
#
|
|
117
|
-
# If you already have a pyproject.toml file, it will simply add the correct circuit config section
|
|
118
|
-
circuit agent init --no-dir
|
|
112
|
+
# Initialize with --no-dir to configure existing project
|
|
113
|
+
circuit init --no-dir
|
|
114
|
+
# This adds the agent to CLI registry and updates config files
|
|
119
115
|
|
|
120
|
-
# Install
|
|
121
|
-
bun install
|
|
116
|
+
# Install dependencies
|
|
117
|
+
bun install # or uv sync for Python
|
|
122
118
|
|
|
123
|
-
#
|
|
119
|
+
# Test your agent
|
|
120
|
+
circuit run
|
|
124
121
|
```
|
|
125
|
-
- Next you will need to copy over your existing execution and stop logic, place into the execute and stop functions defined in the template main.py file. See the sdk repo for more details on the overall structure of the app, but at a high level, you will simply need to define your execute and stop functions, and pass to the Agent class, which will handle exposing the correct endpoints based on its deployment location.
|
|
126
|
-
|
|
127
|
-
#### Steps 2-5: Soft deploy, create session for testing, test locally, deploy live
|
|
128
|
-
```bash
|
|
129
|
-
# Soft deploy your agent to register the agent with Circuit and allow the creation of a test session
|
|
130
|
-
circuit agent deploy
|
|
131
122
|
|
|
132
|
-
|
|
133
|
-
circuit agent sessions create
|
|
134
|
-
|
|
135
|
-
# Test your agent locally
|
|
136
|
-
circuit agent simulate execute
|
|
137
|
-
|
|
138
|
-
# When ready, deploy to Circuit
|
|
139
|
-
circuit agent deploy --live
|
|
140
|
-
```
|
|
123
|
+
> **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.
|
|
141
124
|
|
|
142
125
|
|
|
143
126
|
## 📚 Command Reference
|
|
@@ -147,82 +130,57 @@ circuit agent deploy --live
|
|
|
147
130
|
| Command | Description |
|
|
148
131
|
|---------|-------------|
|
|
149
132
|
| `circuit` | Start interactive mode with menu |
|
|
150
|
-
| `circuit
|
|
151
|
-
| `circuit
|
|
152
|
-
| `circuit
|
|
153
|
-
| `circuit
|
|
133
|
+
| `circuit whoami` | Show current authenticated user |
|
|
134
|
+
| `circuit login` | Authenticate with Circuit platform |
|
|
135
|
+
| `circuit logout` | Sign out from Circuit platform |
|
|
136
|
+
| `circuit init` | Initialize a new agent project |
|
|
137
|
+
| `circuit run` | Run/test your agent (handles setup automatically) |
|
|
138
|
+
| `circuit deploy` | Deploy agent to production |
|
|
139
|
+
| `circuit help` | Show detailed help and getting started guide |
|
|
154
140
|
|
|
155
|
-
### Agent Commands
|
|
141
|
+
### Agent Management Commands
|
|
156
142
|
|
|
157
143
|
| Command | Description |
|
|
158
144
|
|---------|-------------|
|
|
159
|
-
| `circuit agent` |
|
|
160
|
-
| `circuit agent init` | Initialize a new agent project |
|
|
161
|
-
| `circuit agent deploy` | Deploy an agent to Circuit platform |
|
|
162
|
-
| `circuit agent configure` | Configure agent settings |
|
|
163
|
-
| `circuit agent validate` | Validate agent configuration |
|
|
164
|
-
| `circuit agent info` | Show agent information |
|
|
145
|
+
| `circuit agent info` | Show current agent information |
|
|
165
146
|
| `circuit agent status` | Check agent deployment status |
|
|
166
|
-
| `circuit agent sessions` | Manage agent sessions |
|
|
167
|
-
| `circuit agent sessions create` | Create a new agent session |
|
|
168
|
-
| `circuit agent sessions kill` | Kill an agent session |
|
|
169
147
|
|
|
170
|
-
###
|
|
148
|
+
### Wallet Commands
|
|
171
149
|
|
|
172
150
|
| Command | Description |
|
|
173
151
|
|---------|-------------|
|
|
174
|
-
| `circuit
|
|
175
|
-
| `circuit
|
|
176
|
-
| `circuit agent simulate stop` | Stop agent execution locally |
|
|
152
|
+
| `circuit wallet list` | List your available wallets |
|
|
153
|
+
| `circuit wallet import` | Import a new wallet for testing |
|
|
177
154
|
|
|
178
|
-
|
|
155
|
+
### Run Command Flags
|
|
179
156
|
|
|
180
|
-
|
|
157
|
+
The `circuit run` command supports these optional flags to skip interactive prompts:
|
|
181
158
|
|
|
182
159
|
| Flag | Description |
|
|
183
160
|
|------|-------------|
|
|
184
|
-
| `--
|
|
185
|
-
| `--custom`
|
|
186
|
-
| `--
|
|
187
|
-
| `--port <number>`
|
|
161
|
+
| `--wallet <address>` | Use specific wallet address |
|
|
162
|
+
| `--mode local\|live\|custom` | Set simulation mode |
|
|
163
|
+
| `--action execute\|stop` | Choose action to perform |
|
|
164
|
+
| `--port <number>` | Port for custom server mode |
|
|
188
165
|
|
|
189
166
|
**Examples:**
|
|
190
167
|
```bash
|
|
191
|
-
#
|
|
192
|
-
circuit
|
|
168
|
+
# Interactive mode (recommended)
|
|
169
|
+
circuit run
|
|
193
170
|
|
|
194
|
-
#
|
|
195
|
-
circuit
|
|
171
|
+
# Skip prompts with flags
|
|
172
|
+
circuit run --wallet 0x123... --mode local --action execute
|
|
196
173
|
|
|
197
|
-
#
|
|
198
|
-
circuit
|
|
174
|
+
# Connect to custom server
|
|
175
|
+
circuit run --mode custom --port 8080
|
|
199
176
|
|
|
200
177
|
# Stop simulation with custom server
|
|
201
|
-
circuit
|
|
178
|
+
circuit run --mode custom --port 8080 --action stop
|
|
202
179
|
```
|
|
203
180
|
|
|
204
|
-
### Authentication Commands
|
|
205
|
-
|
|
206
|
-
| Command | Description |
|
|
207
|
-
|---------|-------------|
|
|
208
|
-
| `circuit auth` | Interactive authentication menu |
|
|
209
|
-
| `circuit auth login` | Login to Circuit platform |
|
|
210
|
-
| `circuit auth logout` | Logout from Circuit platform |
|
|
211
|
-
| `circuit auth whoami` | Check current user |
|
|
212
|
-
|
|
213
|
-
### Wallet Commands
|
|
214
|
-
|
|
215
|
-
| Command | Description |
|
|
216
|
-
|---------|-------------|
|
|
217
|
-
| `circuit wallet` | Interactive wallet management menu |
|
|
218
|
-
| `circuit wallet import` | Import a wallet |
|
|
219
|
-
| `circuit wallet list` | List all wallets |
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
181
|
### Getting Started with Agents
|
|
224
182
|
|
|
225
|
-
When you run `circuit
|
|
183
|
+
When you run `circuit init`, the CLI will:
|
|
226
184
|
|
|
227
185
|
1. Prompt you to choose TypeScript or Python
|
|
228
186
|
2. For TypeScript: Select from available templates (bare, self-send)
|
|
@@ -261,7 +219,7 @@ Check that your agent server:
|
|
|
261
219
|
|
|
262
220
|
#### "Authentication Required"
|
|
263
221
|
|
|
264
|
-
Run `circuit
|
|
222
|
+
Run `circuit login` to authenticate with the Circuit platform.
|
|
265
223
|
|
|
266
224
|
### Need Help?
|
|
267
225
|
|
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
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@circuitorg/agent-cli",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "A CLI tool for deploying agents to the Circuit platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"dev": "bun --hot src/index.ts",
|
|
16
16
|
"test": "bun test",
|
|
17
17
|
"test:coverage": "bun test --coverage",
|
|
18
|
+
"test:package": "bun scripts/test-package.ts",
|
|
18
19
|
"typecheck": "bun tsc --noEmit",
|
|
19
20
|
"format": "bun x prettier --write src/**/*.ts",
|
|
20
21
|
"format:check": "bun x prettier --check src/**/*.ts",
|