
Security News
White House Authorizes Private Companies to Conduct Offensive Cyber Operations
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.
@spfunctions/harness
Advanced tools
Dual pi-agent runtime harness. Two agents (local + Cloudflare) negotiate, share state, and self-modify via a 5-message protocol.
Dual pi-agent runtime harness. Two agents (local + Cloudflare) negotiate, share state, and self-modify via a 5-message protocol. Open source. $1–2/day to run.
npm i -g @spfunctions/harness
After install, the binary is sparkco.
sparkco init
The setup wizard will:
npm install -g wrangler)npm install -g @anthropic-ai/claude-code)You need a Cloudflare API Token with these permissions:
| Permission | Level | Why |
|---|---|---|
| Workers Scripts | Edit | Deploy/update Workers |
| Workers KV Storage | Edit | Create/read/write KV |
| Workers Routes | Edit | Configure routing |
| Durable Objects | Edit | Create DO namespace |
| Account Settings | Read | Verify account |
Create your token:
sparkco initSparkCo Harness runs two pi-agent runtimes that need LLM access to autonomously write code and modify environments.
The setup wizard will ask you to configure an LLM provider. Recommended: OpenRouter — one key accesses all models.
Default model: minimax/minimax-m2.7 ($0.30/$1.20 per M tokens).
Best cost-performance ratio for continuous agent operation.
| Variable | Required | Default |
|---|---|---|
SPARKCO_LLM_PROVIDER | No | openrouter |
SPARKCO_LLM_API_KEY | Yes | — |
SPARKCO_CLIENT_MODEL | No | minimax/minimax-m2.7 |
SPARKCO_SERVER_MODEL | No | Same as client |
sparkco model # View current config
sparkco model test # Verify both agents can respond
sparkco model set both anthropic/claude-sonnet-4-6 # Switch models
sparkco model key set <new-key> # Update API key
At default settings (MiniMax M2.7), continuous operation costs roughly $1-2/day depending on activity level. This covers both client and server pi runtimes.
| Command | Description |
|---|---|
sparkco init | Interactive setup wizard |
sparkco status | System overview |
sparkco daemon start|stop|restart | Manage client daemon |
sparkco send <type> <content> | Send protocol message |
sparkco inbox | View pending requests |
sparkco routes list|add|remove | Manage local endpoints |
sparkco ps | Process management |
sparkco manifest show|history|rollback | Version control |
sparkco logs [name] | View logs |
sparkco deploy | Deploy/redeploy server |
sparkco secret set|list|delete | Manage secrets |
sparkco model show|set|list|key|test | Manage LLM models |
sparkco server status|logs|tasks | Server runtime management |
sparkco improve status|issues|fixes|pause|resume | Self-improvement engine |
sparkco destroy | Tear down everything |
All commands support --json for machine-readable output (useful for pi).
CLIENT (local) CLOUDFLARE SERVER (VPS)
+--------------+ +------------------+ +--------------+
| pi-agent | | Worker (relay) | | pi-agent |
| daemon |<SSE>| ├─ auth |<SSE>| daemon |
| read/write | REST| ├─ SSE relay | REST| read/write |
| npm/git |---->| └─ KV/R2 proxy |<----| npm/git |
+--------------+ | Durable Object | | scheduler |
| └─ event log | +--------------+
+------------------+
The communication protocol has 5 message types:
After init, install the sparkco skill:
# For pi
cp src/pi/skill.md ~/.pi/agent/skills/sparkco/SKILL.md
# For Claude Code
cp src/pi/skill.md ~/.claude/skills/sparkco/SKILL.md
Or let the setup wizard handle it automatically.
Pi can then use all sparkco commands via bash to coordinate
client-server workflows autonomously.
Config lives at ~/.sparkco/config.json. See sparkco status for current values.
npm install
npm test # all tests
npm run test:unit # unit tests only
npm run test:integration # integration tests only
npx tsx scripts/dev.ts # local dev server + daemon
sparkco destroy
npm uninstall -g @spfunctions/harness
Apache-2.0
FAQs
Dual pi-agent runtime harness. Two agents (local + Cloudflare) negotiate, share state, and self-modify via a 5-message protocol.
The npm package @spfunctions/harness receives a total of 2 weekly downloads. As such, @spfunctions/harness popularity was classified as not popular.
We found that @spfunctions/harness demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.

Research
/Security News
The campaign amassed more than 75,000 installs by targeting Russian-speaking users seeking access to blocked services.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.