How pendia/automaton-ai works
Automaton is a continuously running autonomous agent that provisions its own identity, reasons and acts through tools, monitors its ability to survive, and can modify or replicate itself. The boot path configures identity and runtime state before starting the agent loop and heartbeat; the loop uses context, inference, and tools to act. Conway infrastructure, persistent state, skills, on-chain discovery, social communication, and creator operations are meaningful supporting capabilities. Arrows are limited to relationships shown by excerpts, the source index, or README; unsampled implementation details are not inferred.
Main entry points: index.ts Runtime entry · loop.ts Agent loop · tools.ts Agent tools · wizard.ts Setup wizard
Components 29
Bootstrap and identity
- Runtime entry
src/index.ts - Setup wizard
src/setup/wizard.ts - Wallet identity
src/identity/wallet.ts - API provisioning
src/identity/provision.ts - Runtime config
src/config.ts
Agent runtime
- Agent loop
src/agent/loop.ts - Agent context
src/agent/context.ts - System prompt
src/agent/system-prompt.ts - Agent tools
src/agent/tools.ts - Model inference
src/conway/inference.ts - Persistent state
src/state/database.ts
Survival and infrastructure
- Heartbeat daemon
src/heartbeat/daemon.ts - Scheduled tasks
src/heartbeat/tasks.ts - Survival controls
src/survival/monitor.ts - Credit management
src/conway/credits.ts - Conway services
src/conway/client.ts - Payments
src/conway/x402.ts
Evolution and replication
- Self-modification
src/self-mod/code.ts - Modification audit
src/self-mod/audit-log.ts - Child replication
src/replication/spawn.ts - Lineage tracking
src/replication/lineage.ts
Skills and ecosystem
- On-chain registry
src/registry/erc8004.ts - Agent discovery
src/registry/discovery.ts - Agent messaging
src/social/client.ts - Skill loading
src/skills/loader.ts - Creator CLI
packages/cli/src/commands/fund.ts
Other components
- Creator
- Conway Cloud
- Base network
Connections 34
- Creator → Runtime entry: starts runtime
- Runtime entry → Setup wizard: launches if unconfigured
src/index.ts - Setup wizard → Wallet identity: creates or loads
src/setup/wizard.ts - Setup wizard → API provisioning: provisions key
src/setup/wizard.ts - Setup wizard → Runtime config: saves settings
src/setup/wizard.ts - Runtime entry → Wallet identity: loads identity
src/index.ts - Runtime entry → Runtime config: loads settings
src/index.ts - Runtime entry → Agent loop: runs turns
src/index.ts - Runtime entry → Heartbeat daemon: starts daemon
src/index.ts - Runtime entry → Skill loading: loads skills
src/index.ts - Agent loop → Agent context: builds context
src/agent/loop.ts - Agent loop → System prompt: uses prompt
src/agent/loop.ts - Agent loop → Agent tools: dispatches tools
src/agent/loop.ts - Agent loop → Model inference: requests inference
- Agent loop → Persistent state: persists turns
- Heartbeat daemon → Scheduled tasks: runs scheduled tasks
src/heartbeat/daemon.ts - Scheduled tasks → Credit management: checks tier
src/heartbeat/tasks.ts - Scheduled tasks → Payments: checks balance
src/heartbeat/tasks.ts - Scheduled tasks → Conway services: checks sandbox
src/heartbeat/tasks.ts - Survival controls → Credit management: monitors balance
- Agent tools → Conway services: operates infrastructure
- Agent tools → Payments: makes paid requests
src/agent/tools.ts - Conway services → Conway Cloud: manages resources
- Payments → Conway Cloud: pays for services
- Agent tools → Self-modification: edits source
src/agent/tools.ts - Self-modification → Modification audit: records changes
src/self-mod/code.ts - Self-modification → Child replication: supports evolution
- Agent tools → Child replication: spawns children
src/agent/tools.ts - Child replication → Lineage tracking: tracks descendants
- Agent tools → On-chain registry: registers identity
src/agent/tools.ts - On-chain registry → Base network: registers agent
- Agent discovery → On-chain registry: reads registrations
src/registry/discovery.ts - Runtime entry → Agent messaging: initializes messaging
src/index.ts - Creator CLI → Creator: accepts commands