Aether SDK
v5.2
Core

Agents

Agents are the core abstraction in Aether. They combine a model, a system prompt, memory, and tools into a stateful entity that can reason across multiple turns.

Creating an agent

import { Agent } from 'aether-sdk'

const agent = new Agent({
  model:   'claude-sonnet-4',
  system:  'You are a helpful coding assistant.',
  memory:  { type: 'episodic', maxTokens: 8000 },
  tools:   [searchTool, execTool],
  maxSteps: 10,                // limit agentic loops
  onStep:  (step) => log(step) // observe each step
})

Running an agent

// Single turn
const result = await agent.run('Refactor this function: ...')

// Streaming
for await (const event of agent.stream('Explain this codebase')) {
  if (event.type === 'text')      process.stdout.write(event.delta)
  if (event.type === 'tool_call') console.log('calling:', event.tool)
  if (event.type === 'done')      console.log('tokens:', event.usage)
}

Agent options

Option Type Default Description
model string Model identifier
system string System prompt
memory MemoryConfig none Memory strategy
tools Tool[] [] Available tools
maxSteps number 20 Agentic loop limit
temperature number 1.0 Sampling temperature

Always set maxSteps in production to prevent runaway agentic loops from consuming unexpected tokens and API budget.