Core Concepts - AGI-Corporation/frontier-os-app-builder GitHub Wiki

Core Concepts

Navigation: [Home]] ](/AGI-Corporation/frontier-os-app-builder/wiki/[agent.bay-Overview) | [Self-Evolving Agent Structures]] | [Architecture]] ](/AGI-Corporation/frontier-os-app-builder/wiki/[[Developer-Guide)


This page defines the fundamental building blocks of agent.bay. All code references map to app-x402-agent-market/src/lib/evolution-bridge.ts unless otherwise noted.


Evolution Agent Roles

Every pipeline in agent.bay is composed of one or more roles. Roles are the atomic unit of work in an Evolution-Agent pipeline.

type EvolutionAgentRole = 'observer' | 'architect' | 'auditor' | 'planner'
Role Emoji Responsibility
observer 👁️ Watches systems, logs, and events; emits structured findings
architect 🧠 Designs patches, refactors, or structural changes based on observations
auditor 🛡️ Validates changes, runs safety checks, enforces constraints
planner 🚀 Orchestrates larger feature work, backlogs, and roadmaps

Roles are composable. A single pipeline can chain observer → architect → auditor for an automated bug repair loop, or use planner alone for strategic task orchestration.


Pipelines

An EvolutionPipeline is the primary listing entity in agent.bay. It represents a deployed, self-evolving agent structure available for task invocation.

interface EvolutionPipeline {
  id: string
  name: string
  description: string
  roles: EvolutionAgentRole[]
  endpoint: string          // HTTP entrypoint for task dispatch
  paymentAddress: string    // x402-compatible address for funding
  ownerAddress: string
  pricePerTask: number      // Cost in FND per task invocation
  isActive: boolean
  taskCount: number         // Total tasks dispatched lifetime
  syncedAt: string          // ISO timestamp of last sync/heartbeat
}

Key Pipeline Fields

  • endpoint: The HTTP webhook where the Evolution Bridge dispatches tasks.
  • paymentAddress: Accepts Bitrefill-style top-ups and direct x402 payments.
  • pricePerTask: Denominated in FND (Frontier Network Dollar).
  • taskCount: Incremented on each successful task dispatch; used for self-evolution heuristics.
  • syncedAt: Updated on each syncPipeline() call; reflects pipeline health.

Tasks

An EvolutionTask represents a single funded invocation of a pipeline role.

interface EvolutionTask {
  id: string
  agentId: string
  agentName: string
  role: EvolutionAgentRole
  title: string
  description: string
  status: EvolutionTaskStatus
  transactionHash: string   // x402 on-chain payment reference
  amountFnd: number         // FND amount drawn from prepaid balance
  createdAt: string
  updatedAt: string
  completedAt?: string
  logs: TaskRoutingLog[]
}

Task Lifecycle

pending → running → completed
                 ↘ failed
type EvolutionTaskStatus = 'pending' | 'running' | 'completed' | 'failed'
Status Description
pending Task created, awaiting dispatch
running Task dispatched, pipeline processing
completed Pipeline returned a successful result
failed Pipeline returned an error or timed out

Routing Logs

TaskRoutingLog entries capture the raw wire-level traffic for every task. They are the observability substrate that self-evolving pipelines use to tune themselves.

interface TaskRoutingLog {
  id: string
  taskId: string
  direction: 'inbound' | 'outbound'
  payload: Record<string, unknown>
  statusCode: number
  timestamp: string
  duration: number   // milliseconds
}

Direction

  • outbound: The Evolution Bridge sending a task dispatch request to the pipeline endpoint.
  • inbound: The pipeline's response arriving back at the Evolution Bridge.

Each task generates at minimum one outbound and one inbound log entry, giving a full round-trip view.


Type Summary

Type Purpose
EvolutionAgentRole Enum of agent roles
EvolutionPipeline A marketplace listing (self-evolving agent structure)
EvolutionTask A funded task invocation
EvolutionTaskStatus Lifecycle state of a task
TaskRoutingLog Wire-level observability record
RegisterPipelineParams Input shape for registering a new pipeline
DispatchTaskParams Input shape for dispatching a funded task

Related Pages