parallax-agent-runtime 0.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 ADDED
@@ -0,0 +1,194 @@
1
+ # parallax-agent-runtime
2
+
3
+ MCP server for AI agent orchestration. Enables AI assistants like Claude to spawn, manage, and coordinate multiple AI agents through the [Model Context Protocol](https://modelcontextprotocol.io).
4
+
5
+ ## Quick Start
6
+
7
+ ### Claude Desktop
8
+
9
+ Add to your `claude_desktop_config.json`:
10
+
11
+ ```json
12
+ {
13
+ "mcpServers": {
14
+ "parallax": {
15
+ "command": "npx",
16
+ "args": ["parallax-agent-runtime"]
17
+ }
18
+ }
19
+ }
20
+ ```
21
+
22
+ Restart Claude Desktop. You can now ask Claude to spawn and manage agents:
23
+
24
+ > "Spawn a code review agent to analyze my project"
25
+
26
+ ### CLI
27
+
28
+ ```bash
29
+ # Run directly
30
+ npx parallax-agent-runtime
31
+
32
+ # Or install globally
33
+ npm install -g parallax-agent-runtime
34
+ parallax-agent-runtime
35
+ ```
36
+
37
+ ## Features
38
+
39
+ - **Spawn AI Agents** - Create Claude, Codex, Gemini, or Aider agents
40
+ - **Multi-Agent Coordination** - Agents can communicate and collaborate
41
+ - **Real-time Logs** - Stream agent terminal output
42
+ - **Metrics & Health** - Monitor agent resource usage
43
+ - **Authentication** - Optional JWT/API key auth for remote access
44
+
45
+ ## MCP Tools
46
+
47
+ | Tool | Description |
48
+ |------|-------------|
49
+ | `spawn` | Create and start a new AI agent |
50
+ | `stop` | Stop a running agent |
51
+ | `list` | List agents with optional filtering |
52
+ | `get` | Get detailed agent information |
53
+ | `send` | Send a message to an agent |
54
+ | `logs` | Get agent terminal output |
55
+ | `metrics` | Get agent resource metrics |
56
+ | `health` | Check runtime health status |
57
+
58
+ ## MCP Resources
59
+
60
+ | Resource | URI Pattern | Description |
61
+ |----------|-------------|-------------|
62
+ | Agent State | `agents://{agentId}` | Current agent state as JSON |
63
+ | Agent Logs | `logs://{agentId}` | Terminal output stream |
64
+
65
+ ## MCP Prompts
66
+
67
+ | Prompt | Description |
68
+ |--------|-------------|
69
+ | `spawn_review_team` | Spawn a coordinated code review team |
70
+ | `spawn_dev_agent` | Quick spawn a development agent |
71
+
72
+ ## Examples
73
+
74
+ ### Spawn a Code Review Agent
75
+
76
+ ```
77
+ User: "Spawn a code review agent for my project"
78
+
79
+ Claude uses the spawn tool:
80
+ {
81
+ "name": "reviewer",
82
+ "type": "claude",
83
+ "capabilities": ["code_review"],
84
+ "workdir": "/path/to/project"
85
+ }
86
+ ```
87
+
88
+ ### Send a Task to an Agent
89
+
90
+ ```
91
+ User: "Ask the reviewer to check the authentication module"
92
+
93
+ Claude uses the send tool:
94
+ {
95
+ "agentId": "reviewer-abc123",
96
+ "message": "Review the authentication module for security issues",
97
+ "expectResponse": true
98
+ }
99
+ ```
100
+
101
+ ### Spawn a Review Team
102
+
103
+ ```
104
+ User: "Set up a full code review team"
105
+
106
+ Claude uses the spawn_review_team prompt with:
107
+ {
108
+ "project_dir": "/path/to/project",
109
+ "review_focus": "security"
110
+ }
111
+
112
+ This spawns:
113
+ - Architect agent (high-level design review)
114
+ - Reviewer agent (detailed code review)
115
+ - Test engineer agent (test coverage analysis)
116
+ ```
117
+
118
+ ## CLI Options
119
+
120
+ ```bash
121
+ parallax-agent-runtime [options]
122
+
123
+ Options:
124
+ --debug Enable debug logging
125
+ --max-agents=N Maximum concurrent agents (default: 10)
126
+ --help, -h Show help
127
+ --version, -v Show version
128
+ ```
129
+
130
+ ## Programmatic Usage
131
+
132
+ ```typescript
133
+ import { ParallaxAgentRuntime, StdioServerTransport } from 'parallax-agent-runtime';
134
+ import pino from 'pino';
135
+
136
+ const runtime = new ParallaxAgentRuntime({
137
+ logger: pino(),
138
+ maxAgents: 10,
139
+ // Optional authentication
140
+ auth: {
141
+ enabled: true,
142
+ apiKeys: new Map([
143
+ ['plx_your_key', { name: 'my-app', permissions: ['*'] }]
144
+ ]),
145
+ },
146
+ });
147
+
148
+ const transport = new StdioServerTransport();
149
+ await runtime.connect(transport);
150
+ ```
151
+
152
+ ## Authentication
153
+
154
+ For remote deployments, enable authentication:
155
+
156
+ ```typescript
157
+ const runtime = new ParallaxAgentRuntime({
158
+ logger,
159
+ auth: {
160
+ enabled: true,
161
+ // JWT authentication
162
+ jwt: {
163
+ secret: process.env.JWT_SECRET,
164
+ algorithm: 'HS256',
165
+ },
166
+ // Or API key authentication
167
+ apiKeys: new Map([
168
+ ['plx_your_api_key', {
169
+ name: 'my-integration',
170
+ permissions: ['agents:*', 'health:check'],
171
+ }],
172
+ ]),
173
+ },
174
+ });
175
+ ```
176
+
177
+ ## Supported Agent Types
178
+
179
+ | Type | CLI | Description |
180
+ |------|-----|-------------|
181
+ | `claude` | Claude Code | Anthropic's Claude in CLI mode |
182
+ | `codex` | Codex CLI | OpenAI's Codex CLI |
183
+ | `gemini` | Gemini CLI | Google's Gemini CLI |
184
+ | `aider` | Aider | AI pair programming tool |
185
+ | `custom` | Custom | User-defined agent |
186
+
187
+ ## Requirements
188
+
189
+ - Node.js 18+
190
+ - Supported agent CLIs installed (claude, codex, etc.)
191
+
192
+ ## License
193
+
194
+ MIT