Skip to content

Agent

Agent blueprint defining capabilities and handler.

Constructor

typescript
const agent = new Agent({
  name: 'worker',
  description: 'Processes tasks',
  tools: ['http_fetch'],
  memory: { persistent: true },
  contract: { input: { type: 'string' }, output: { type: 'string' } },
  handler: async (ctx) => `Result: ${ctx.input}`,
});

AgentConfig

FieldTypeRequiredDescription
namestringUnique agent name
descriptionstringHuman-readable description
toolsstring[]Allowed tool names
memoryMemoryConfigMemory settings
contractAgentContractInput/output validation + SLA
handlerAgentHandlerThe execution function

Released under the MIT License.