Agent Definition

An agent declares its provider, model and tasks, or uses an agent main block for executable logic. Ollama is the dedicated implemented model adapter; additional provider names and transport metadata are not working adapters.

axon
FieldBehavior
provider, modelSelect Ollama and a separately installed model.
temperatureModel sampling option; lower values do not guarantee deterministic output.
max_tokens, num_ctxRequested generation/context limits, subject to backend behavior.
delayFinite non-negative post-delay after a successful whole-agent invocation.
timeoutTotal cooperative budget for this invocation, capped by its parent.
endpoint, transportDeclaration metadata does not establish alternate CLI endpoints or gRPC support. The CLI uses its configured local Ollama service.
Model examples require a running local Ollama service and llama3.2. Syntax checks alone do not execute the provider or certify model output quality.

Tasks and Input/Output

Tasks have explicit or inherited input, a prompt list, and optional delay/timeout. The following is a complete two-task example; Summarize receives Analyze.output.

axon
Input or accessCurrent behavior
input = __input__Use the whole-agent invocation argument.
input = Analyze.outputRead the prior task’s published output.
No input fieldUse the previous task output, or the agent argument for the first task.
input = nullExplicit null; no fallback.
Processor.Analyze / Processor.Analyze.outputRead published cached output.
input = Processor->AnalyzeRead available cached output in an input field.
Processor->Analyze(value)Explicit task execution.
Forward references and stale outputs from a previous invocation are rejected during an active run. Prefer explicit arguments when execution is intended. prompt is the recommended spelling; prompts remains an alias. output=json and validation declarations are not general schema enforcement or automatic hallucination detection.

Calling Agents: Three Forms

Whole-agent calls, explicit task calls and pipeline stages use different invocation forms. This local example needs no model because the agents execute main blocks.

axon
FormBehavior
Agent(value)Run the agent; sequential tasks follow declaration order unless a graph is used.
Agent->Task(value)Run one task; no whole-agent post-delay.
value >> A >> BPass each stage’s result to the next agent.
Agent.TaskRead a published task result rather than invoke it.

Task Graphs

Basic ordered task chains are implemented. The same input/output resolution applies to sequential and graph execution. Parser acceptance of edge attributes does not establish complete conditional, confidence or retry policy behavior.

axon

Parallel Execution

Independent assignment/expression branches run on bounded native workers with deep lexical snapshots. Put loops or other control flow inside a function called from a branch.

axon
  • A block uses at most eight workers, bounded by branch count and detected CPU concurrency; nested blocks have separate bounded pools.
  • Branches cannot read sibling assignments. Successful results, task caches and buffered print output publish in source order.
  • A failure requests cooperative sibling cancellation; jobs are joined before returning and assignment/cache updates are not committed.
  • Memory/file/network/SQL side effects are not automatically rolled back. Some native services remain serialized; model servers may queue requests.
External Python and shell use separate processes. Their context-local __result__ is not implicitly published to the parent; return an ordinary value from a function and assign that function call in the parallel branch.

Pipeline Operator >>

axon

input >> [AgentA, AgentB] runs a group concurrently and retains the last declared branch result for compatibility. Use named assignments in parallel when you need each returned value. Shared model hardware may still serialize generation.

Compute and GPU Options

Compute and model options are passed to Ollama. Backend/model support determines actual placement, memory use and concurrency.

axon
OptionCurrent contract
compute = auto / gpu / cpuauto and gpu request num_gpu=-1; cpu requests num_gpu=0 and a default num_thread=4.
num_gpuDirect layer preference when compute does not override it; placement remains backend-dependent.
num_threadOllama inference threads, not Axon parallel worker count.
main_gpu, num_batchPassed model/backend preferences.
f16_kv, low_vramPassed options; no universal support or VRAM-reduction guarantee.
gpu_fallbackParsed/request metadata; automatic GPU-failure CPU retry is not implemented by the current adapter.