create-bk-agent 0.15.0 → 0.16.1
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 +19 -7
- package/dist/src/index.js +10 -1
- package/dist/src/prompts.js +5 -5
- package/package.json +33 -33
- package/templates/autonomous/package.json +1 -1
- package/templates/autonomous/tsconfig.json +2 -1
- package/templates/coding/package.json +1 -1
- package/templates/coding/src/index.ts +42 -48
- package/templates/coding/tsconfig.json +2 -1
- package/templates/domain-agent/package.json +1 -1
- package/templates/domain-agent/tsconfig.json +2 -1
- package/templates/mcp-server/package.json +1 -1
- package/templates/mcp-server/tsconfig.json +2 -1
- package/templates/minimal/package.json +1 -1
- package/templates/minimal/tsconfig.json +2 -1
package/README.md
CHANGED
|
@@ -26,13 +26,25 @@ Installing dependencies...
|
|
|
26
26
|
|
|
27
27
|
## Templates
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
29
|
+
### `coding` — complete, ready to run
|
|
30
|
+
10 specialized agents (backend, frontend, QA, security, architecture…) and all
|
|
31
|
+
coding tools (read/write files, run commands, git, search) are already configured.
|
|
32
|
+
Add your API key, describe your project in `AGENT.md`, and it works out of the box.
|
|
33
|
+
**Choose this when you want a coding assistant, not when you want to build one.**
|
|
34
|
+
|
|
35
|
+
### `domain-agent` — blank multi-agent architecture
|
|
36
|
+
Orchestrator + specialists pattern with no pre-built agents or tools. You define
|
|
37
|
+
the agents and tools for your specific domain (Docker, AWS, databases, APIs, etc.).
|
|
38
|
+
The framework handles orchestration, delegation, and parallel execution.
|
|
39
|
+
**Choose this when you are building a new type of agent from scratch.**
|
|
40
|
+
|
|
41
|
+
| Template | What it gives you | You provide |
|
|
42
|
+
|----------|------------------|-------------|
|
|
43
|
+
| `coding` | 10 agents + all coding tools | API key + `AGENT.md` |
|
|
44
|
+
| `domain-agent` | Orchestration skeleton | Agents + tools for your domain |
|
|
45
|
+
| `autonomous` | Trigger system (cron / webhook / event) | Agent logic |
|
|
46
|
+
| `mcp-server` | MCP server boilerplate | Tools to expose |
|
|
47
|
+
| `minimal` | Bare engine | Everything |
|
|
36
48
|
|
|
37
49
|
## Providers
|
|
38
50
|
|
package/dist/src/index.js
CHANGED
|
@@ -38,7 +38,16 @@ const path = __importStar(require("path"));
|
|
|
38
38
|
const fs = __importStar(require("fs"));
|
|
39
39
|
const prompts_1 = require("./prompts");
|
|
40
40
|
const scaffold_1 = require("./scaffold");
|
|
41
|
-
|
|
41
|
+
// Read version from package.json so it always matches the published version
|
|
42
|
+
const FRAMEWORK_VERSION = (() => {
|
|
43
|
+
try {
|
|
44
|
+
const pkg = JSON.parse(fs.readFileSync(path.join(__dirname, '..', '..', 'package.json'), 'utf-8'));
|
|
45
|
+
return pkg.version ?? '0.16.0';
|
|
46
|
+
}
|
|
47
|
+
catch {
|
|
48
|
+
return '0.16.0';
|
|
49
|
+
}
|
|
50
|
+
})();
|
|
42
51
|
const NEXT_STEPS = {
|
|
43
52
|
coding: ['Edit AGENT.md to describe your project', 'npm run dev'],
|
|
44
53
|
'domain-agent': ['Rename agents/ and tools/ to match your domain', 'Implement tools in src/tools/', 'npm run dev'],
|
package/dist/src/prompts.js
CHANGED
|
@@ -6,11 +6,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.askQuestions = askQuestions;
|
|
7
7
|
const prompts_1 = __importDefault(require("prompts"));
|
|
8
8
|
const TEMPLATES = [
|
|
9
|
-
{ title: 'coding', value: 'coding', description: '
|
|
10
|
-
{ title: 'domain-agent', value: 'domain-agent', description: '
|
|
11
|
-
{ title: 'autonomous', value: 'autonomous', description: '
|
|
12
|
-
{ title: 'mcp-server', value: 'mcp-server', description: 'MCP server — expose tools
|
|
13
|
-
{ title: 'minimal', value: 'minimal', description: '
|
|
9
|
+
{ title: 'coding', value: 'coding', description: '10 agents + all coding tools included. Ready to run — improve UI and extend' },
|
|
10
|
+
{ title: 'domain-agent', value: 'domain-agent', description: 'Blank multi-agent architecture. You define agents and tools for your domain' },
|
|
11
|
+
{ title: 'autonomous', value: 'autonomous', description: 'Event-driven agent — cron schedules, webhooks, custom events' },
|
|
12
|
+
{ title: 'mcp-server', value: 'mcp-server', description: 'MCP server — expose your tools to Claude Desktop / Cursor / VS Code' },
|
|
13
|
+
{ title: 'minimal', value: 'minimal', description: 'Bare engine — full control, bring your own agents and tools' },
|
|
14
14
|
];
|
|
15
15
|
const PROVIDERS = [
|
|
16
16
|
{ title: 'Anthropic (Claude)', value: 'anthropic', description: 'claude-sonnet-4-6 recommended' },
|
package/package.json
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "create-bk-agent",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Create a new BackendKit agent project",
|
|
5
|
-
"main": "dist/src/index.js",
|
|
6
|
-
"bin": {
|
|
7
|
-
"create-bk-agent": "./dist/bin/create-bk-agent.js"
|
|
8
|
-
},
|
|
9
|
-
"files": [
|
|
10
|
-
"dist/",
|
|
11
|
-
"templates/"
|
|
12
|
-
],
|
|
13
|
-
"repository": {
|
|
14
|
-
"type": "git",
|
|
15
|
-
"url": "https://github.com/BackendKit-labs/backendkit-agent-framework.git",
|
|
16
|
-
"directory": "packages/create-bk-agent"
|
|
17
|
-
},
|
|
18
|
-
"publishConfig": { "access": "public" },
|
|
19
|
-
"engines": { "node": ">=20.0.0" },
|
|
20
|
-
"scripts": {
|
|
21
|
-
"build": "tsc",
|
|
22
|
-
"prepack": "node scripts/copy-templates.js && npm run build",
|
|
23
|
-
"typecheck": "tsc --noEmit"
|
|
24
|
-
},
|
|
25
|
-
"dependencies": {
|
|
26
|
-
"prompts": "^2.4.2"
|
|
27
|
-
},
|
|
28
|
-
"devDependencies": {
|
|
29
|
-
"@types/node": "^20.0.0",
|
|
30
|
-
"@types/prompts": "^2.4.9",
|
|
31
|
-
"typescript": "^5.4.0"
|
|
32
|
-
}
|
|
33
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "create-bk-agent",
|
|
3
|
+
"version": "0.16.1",
|
|
4
|
+
"description": "Create a new BackendKit agent project",
|
|
5
|
+
"main": "dist/src/index.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"create-bk-agent": "./dist/bin/create-bk-agent.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"dist/",
|
|
11
|
+
"templates/"
|
|
12
|
+
],
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "https://github.com/BackendKit-labs/backendkit-agent-framework.git",
|
|
16
|
+
"directory": "packages/create-bk-agent"
|
|
17
|
+
},
|
|
18
|
+
"publishConfig": { "access": "public" },
|
|
19
|
+
"engines": { "node": ">=20.0.0" },
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build": "tsc",
|
|
22
|
+
"prepack": "node scripts/copy-templates.js && npm run build",
|
|
23
|
+
"typecheck": "tsc --noEmit"
|
|
24
|
+
},
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"prompts": "^2.4.2"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@types/node": "^20.0.0",
|
|
30
|
+
"@types/prompts": "^2.4.9",
|
|
31
|
+
"typescript": "^5.4.0"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -1,48 +1,42 @@
|
|
|
1
|
-
import 'dotenv/config';
|
|
2
|
-
import * as readline from 'readline';
|
|
3
|
-
import { createCodingEngine } from '@backendkit-labs/agent-coding';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
prompt();
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
console.log('Coding agent ready. Type your request or /exit to quit.\n');
|
|
48
|
-
prompt();
|
|
1
|
+
import 'dotenv/config';
|
|
2
|
+
import * as readline from 'readline';
|
|
3
|
+
import { createCodingEngine, TerminalTransport } from '@backendkit-labs/agent-coding';
|
|
4
|
+
|
|
5
|
+
// ── Provider setup ────────────────────────────────────────────────────────────
|
|
6
|
+
|
|
7
|
+
const provider = process.env.LLM_PROVIDER ?? 'anthropic';
|
|
8
|
+
const apiKey = process.env.ANTHROPIC_API_KEY ?? process.env.OPENAI_API_KEY ?? process.env.LLM_API_KEY ?? '';
|
|
9
|
+
const model = process.env.LLM_MODEL;
|
|
10
|
+
|
|
11
|
+
if (!apiKey) {
|
|
12
|
+
console.error('Missing API key. Set ANTHROPIC_API_KEY or OPENAI_API_KEY in .env');
|
|
13
|
+
process.exit(1);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// ── Engine ────────────────────────────────────────────────────────────────────
|
|
17
|
+
|
|
18
|
+
const transport = new TerminalTransport();
|
|
19
|
+
|
|
20
|
+
const engine = createCodingEngine({
|
|
21
|
+
providers: { [provider]: { apiKey, ...(model ? { model } : {}) } },
|
|
22
|
+
defaultProvider: provider,
|
|
23
|
+
workingDir: process.cwd(),
|
|
24
|
+
appName: 'my-coding-agent',
|
|
25
|
+
transport,
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
// ── REPL ──────────────────────────────────────────────────────────────────────
|
|
29
|
+
|
|
30
|
+
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
31
|
+
|
|
32
|
+
function prompt() {
|
|
33
|
+
rl.question('\n❯ ', async (input) => {
|
|
34
|
+
const trimmed = input.trim();
|
|
35
|
+
if (!trimmed || trimmed === '/exit') { rl.close(); return; }
|
|
36
|
+
await engine.run(trimmed);
|
|
37
|
+
prompt();
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
console.log('Coding agent ready. Type your request or /exit to quit.\n');
|
|
42
|
+
prompt();
|