Skip to content

Latest commit

 

History

History
65 lines (49 loc) · 1.49 KB

File metadata and controls

65 lines (49 loc) · 1.49 KB

AgentKit

License: MIT CI

TypeScript SDK for building agents on the Agentage platform.

Packages

Package Description
@agentage/core Agent interface, run model, state machine, event types
@agentage/platform Daemon/hub protocol types — machine, heartbeat, WebSocket messages

Quick Start

npm install @agentage/core
import { createAgent } from '@agentage/core';

const agent = createAgent({
  name: 'hello-agent',
  description: 'A simple hello agent',
  path: './hello-agent',
  async *run(input) {
    yield {
      type: 'output',
      data: { type: 'output', content: `Hello: ${input.task}`, format: 'text' },
      timestamp: Date.now(),
    };
    yield {
      type: 'result',
      data: { type: 'result', success: true, output: 'done' },
      timestamp: Date.now(),
    };
  },
});

const process = await agent.run({ task: 'world' });
for await (const event of process.events) {
  console.log(event.type, event.data);
}

Development

# Install
npm ci

# Full verify (type-check + lint + format + test + build)
npm run verify

# Test with coverage
npm run test:coverage

Requires Node.js >= 22.0.0.

License

MIT