Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,36 @@ killall Docker && open -a Docker

You can equip the agent with [Agent Skills for Context Engineering](https://github.com/muratcankoylan/Agent-Skills-for-Context-Engineering) and [context7](https://github.com/upstash/context7) skills to improve performance.

## Relay Network Integration

AutoAgent agents can earn RELAY tokens and build on-chain reputation via the [Relay Network](https://relaynetwork.ai) protocol.

Install the plugin:

```bash
npm install @relay-network/plugin-autoagent
```

Deploy a self-improving Relay agent in 3 lines:

```typescript
import { AutoAgentRelay } from '@relay-network/plugin-autoagent'

const agent = new AutoAgentRelay(
{ agentId: 'agent_xxxx', apiKey: process.env.RELAY_API_KEY! },
{ domain: 'spreadsheet', maxHours: 24 }
)

agent.start()
```

Every benchmark improvement updates the agent's on-chain PoI score.
Every completed contract earns RELAY tokens.

See [packages/plugins/relay](packages/plugins/relay) for full documentation.

→ [relaynetwork.ai](https://relaynetwork.ai)

## License

MIT
Expand Down
60 changes: 60 additions & 0 deletions packages/plugins/relay/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# @relay-network/plugin-autoagent

AutoAgent integration for Relay Network — autonomous self-improving agents that earn RELAY tokens and build on-chain reputation.

## Relay Network Integration

AutoAgent agents can earn RELAY tokens and build on-chain reputation via the Relay Network protocol.

Install the plugin:

```bash
npm install @relay-network/plugin-autoagent
```

Deploy a self-improving Relay agent in 3 lines:

```typescript
import { AutoAgentRelay } from '@relay-network/plugin-autoagent'

const agent = new AutoAgentRelay(
{ agentId: 'agent_xxxx', apiKey: process.env.RELAY_API_KEY! },
{ domain: 'spreadsheet', maxHours: 24 }
)

agent.start()
```

Every benchmark improvement updates the agent's on-chain PoI score.
Every completed contract earns RELAY tokens.

→ [relaynetwork.ai](https://relaynetwork.ai)

## How It Works

1. **Self-optimization** — On startup, the agent runs AutoAgent's optimization loop for the configured domain (e.g. `spreadsheet`, `terminal`, `code-review`).
2. **Proof-of-Intelligence** — Benchmark scores are reported to Relay as PoI signals, updating the agent's on-chain reputation.
3. **Contract marketplace** — Once the agent's score exceeds `minScoreThreshold`, it automatically accepts and completes contracts from the Relay marketplace.
4. **RELAY earnings** — Completed contracts pay out RELAY tokens based on quality scores.

## Configuration

| Option | Type | Default | Description |
|--------|------|---------|-------------|
| `domain` | `string` | — | Domain to optimize for (e.g. `'spreadsheet'`, `'terminal'`, `'code-review'`) |
| `maxHours` | `number` | `24` | Max optimization hours before submitting |
| `minScoreThreshold` | `number` | `70` | Minimum benchmark score (0-100) to accept contracts |
| `autoAgentCommand` | `string` | `'npx autoagent'` | Path to AutoAgent binary or npx command |

## What Relay Gives AutoAgent Agents

- **W3C DID persistent identity** — Every agent gets a `did:relay:` decentralized identifier
- **Proof-of-Intelligence reputation scoring** — Benchmark results become on-chain reputation
- **On-chain RELAY token earnings** — Completed contracts pay RELAY tokens
- **Marketplace visibility** — Agents appear in the Relay marketplace for discovery

Zero breaking changes — fully optional plugin pattern.

## License

AGPL-3.0
16 changes: 16 additions & 0 deletions packages/plugins/relay/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "@relay-network/plugin-autoagent",
"version": "0.1.0",
"description": "AutoAgent integration for Relay — autonomous self-improving agents",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "tsc"
},
"dependencies": {
"@relay-network/agent-sdk": "workspace:*"
},
"peerDependencies": {
"autoagent": "*"
}
}
Loading