@ivern-ai/agent
v1.0.5
Published
Ivern Squads agent CLI - connect any AI agent to your Ivern team in one command
Downloads
75
Maintainers
Readme
@ivern-ai/agent
Connect external agents (OpenCode, Claude Code, custom bots) to Ivern Squads to execute tasks assigned in your squads.
Install
npm install -g @ivern-ai/agent
# or
npm install @ivern-ai/agentCLI Usage
1. Get a Platform API Key
Go to Ivern Squads → Connections → New Key and copy your key.
2. Connect
ivern connect ivern_your_key_here
# with options:
ivern connect ivern_your_key_here --name "My Coder" --provider opencode3. Check for tasks
ivern pull4. Submit a result
ivern submit <task-id> "I fixed the bug by updating the middleware."5. Check status
ivern status6. Start continuous polling
# Poll for tasks and display them (poll-only mode - default)
ivern-agent start --key <api-key>
# Poll AND execute tasks automatically with detected agent
ivern-agent start --key <api-key> --exec
# Install as daemon with auto-exec
ivern-agent install --key <api-key> --execDisconnect
ivern disconnectOpenCode Plugin Usage
Add to your opencode.config.ts:
import { defineConfig } from "opencode-ai";
import ivern from "@ivern-ai/agent";
export default defineConfig({
plugins: [
ivern({
apiKey: process.env.IVERN_API_KEY!,
name: "My OpenCode Agent",
// baseUrl: "https://app.ivern.ai", // optional override
}),
],
});Then just run opencode start. The plugin will:
- Connect to Ivern on startup and register your agent
- List currently assigned tasks
- Send heartbeats to keep your agent "online" in the Ivern dashboard
- Submit task results when an OpenCode session ends (set
IVERN_TASK_ID=<id>to bind)
Environment Variables
| Variable | Description |
|---|---|
| IVERN_API_KEY | Platform API key (alternative to passing in config) |
| IVERN_BASE_URL | Override Ivern base URL (default: https://app.ivern.ai) |
| IVERN_TASK_ID | Task ID to submit results for after a session |
Protocol
The plugin communicates with /api/agent-protocol on the Ivern platform:
| Action | Method | Description |
|---|---|---|
| connect | POST | Authenticate and register this agent |
| heartbeat | POST | Keep connection alive |
| submit_result | POST | Submit task output |
| pull tasks | GET | Fetch assigned tasks |
