You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**CLI** — local testing harness that simulates the platform for development
15
+
-**[Integration Guide](docs/integration-guide.md)** — step-by-step guide to building an engine
16
+
17
+
> **📦 Reference Implementation** — See [`github/agent-platform-engine-example`](https://github.com/github/agent-platform-engine-example) for a complete working engine built with this SDK.
// Returns discovered MCP servers the user has configured
188
+
}
189
+
```
157
190
158
191
### Event Factories
159
192
160
-
For advanced usage, you can create event objects directly:
193
+
For advanced usage, create event objects directly:
161
194
162
195
```typescript
163
196
import {
164
197
createAssistantMessageEvent,
198
+
createToolMessageEvent,
165
199
createToolExecutionEvent,
166
200
createModelCallFailureEvent,
167
201
createTruncationEvent,
168
202
createResponseEvent,
169
203
} from"@github/copilot-engine-sdk";
170
204
```
171
205
206
+
## CLI — Local Testing
207
+
208
+
The SDK includes a CLI tool for testing engines locally without the full platform infrastructure. It simulates the platform API, clones a repo, and runs your engine command.
209
+
210
+
```bash
211
+
cd cli && go build ./cmd/engine-cli
212
+
213
+
engine-cli run "node dist/index.js" \
214
+
--repo https://github.com/owner/repo \
215
+
--problem-statement "Fix the bug in auth.ts" \
216
+
--action fix \
217
+
--timeout 5m
218
+
```
219
+
220
+
The CLI:
221
+
- Clones the target repository to a temp directory
222
+
- Starts a mock HTTP server that mimics the platform API
223
+
- Spawns your engine with the required environment variables
224
+
- Displays progress events in formatted output
225
+
226
+
See `engine-cli run --help` for all options.
227
+
172
228
## Environment Variables
173
229
174
230
Engines receive these environment variables from the platform:
@@ -183,6 +239,11 @@ Engines receive these environment variables from the platform:
183
239
|`GITHUB_INFERENCE_URL`| Inference API endpoint |
184
240
|`GITHUB_GIT_TOKEN`| Token for git operations |
185
241
242
+
## Documentation
243
+
244
+
-**[Integration Guide](docs/integration-guide.md)** — step-by-step guide to building an engine from scratch
0 commit comments