std.agents
Generated by
sema docfromstdlib/sema/agents.sema. Import withfrom std.agents import …. For a narrative introduction see std.agents.
agents
Section titled “agents”Typed specifications, envelopes, pools, and domain-neutral role presets.
Models and tools are injected by the caller. Presets create validated data;
Agent.build(spec, under=envelope) performs the governed runtime admission.
struct AgentSpec
Section titled “struct AgentSpec”Fields
| field | type | descriptor |
|---|---|---|
name | str | |
input_type | str | |
output_type | str | |
sem | str | |
model | str | |
tools | list[any] | |
completion | str | |
model_calls | int | |
tokens | int |
struct AgentEnvelope
Section titled “struct AgentEnvelope”Fields
| field | type | descriptor |
|---|---|---|
input_type | str | |
output_type | str | |
allowed_models | list[str] | |
tools | list[any] | |
max_model_calls | int | |
max_tokens | int | |
max_children | int | |
max_spawn_depth | int |
struct AgentPool
Section titled “struct AgentPool”Fields
| field | type | descriptor |
|---|---|---|
envelope | AgentEnvelope[I, O] | |
agents | list[any] |
struct ArtifactRef
Section titled “struct ArtifactRef”Fields
| field | type | descriptor |
|---|---|---|
digest | str | |
media_type | str | |
value_type | str | |
provenance | list[str] |
struct WorkUnit
Section titled “struct WorkUnit”Fields
| field | type | descriptor |
|---|---|---|
id | str | |
parent | str | |
dependencies | list[str] | |
status | str | |
artifact | str | |
stall_reason | str |
struct CircuitRun
Section titled “struct CircuitRun”Fields
| field | type | descriptor |
|---|---|---|
run_id | str | |
circuit | str | |
status | str | |
result | T | |
work | list[WorkUnit] |
enum WorkStatus
Section titled “enum WorkStatus”Variants
pendingrunningawaiting_signalsuspendedcompletefailedcancelled
def role_spec
Section titled “def role_spec”def role_spec[I, O](name: str, input_type: str, output_type: str, purpose: str, model: str, tools: list[any], model_calls: int, tokens: int) -> AgentSpec[I, O] !{}Parameters
| name | type |
|---|---|
name | str |
input_type | str |
output_type | str |
purpose | str |
model | str |
tools | list[any] |
model_calls | int |
tokens | int |
Returns AgentSpec[I, O]
Effects !{}
def Researcher
Section titled “def Researcher”def Researcher[I, O](input_type: str, output_type: str, model: str, tools: list[any], model_calls: int, tokens: int) -> AgentSpec[I, O] !{}Parameters
| name | type |
|---|---|
input_type | str |
output_type | str |
model | str |
tools | list[any] |
model_calls | int |
tokens | int |
Returns AgentSpec[I, O]
Effects !{}
def Architect
Section titled “def Architect”def Architect[I, O](input_type: str, output_type: str, model: str, tools: list[any], model_calls: int, tokens: int) -> AgentSpec[I, O] !{}Parameters
| name | type |
|---|---|
input_type | str |
output_type | str |
model | str |
tools | list[any] |
model_calls | int |
tokens | int |
Returns AgentSpec[I, O]
Effects !{}
def Orchestrator
Section titled “def Orchestrator”def Orchestrator[I, O](input_type: str, output_type: str, model: str, tools: list[any], model_calls: int, tokens: int) -> AgentSpec[I, O] !{}Parameters
| name | type |
|---|---|
input_type | str |
output_type | str |
model | str |
tools | list[any] |
model_calls | int |
tokens | int |
Returns AgentSpec[I, O]
Effects !{}
def Reviewer
Section titled “def Reviewer”def Reviewer[I, O](input_type: str, output_type: str, model: str, tools: list[any], model_calls: int, tokens: int) -> AgentSpec[I, O] !{}Parameters
| name | type |
|---|---|
input_type | str |
output_type | str |
model | str |
tools | list[any] |
model_calls | int |
tokens | int |
Returns AgentSpec[I, O]
Effects !{}
def Verifier
Section titled “def Verifier”def Verifier[I, O](input_type: str, output_type: str, model: str, tools: list[any], model_calls: int, tokens: int) -> AgentSpec[I, O] !{}Parameters
| name | type |
|---|---|
input_type | str |
output_type | str |
model | str |
tools | list[any] |
model_calls | int |
tokens | int |
Returns AgentSpec[I, O]
Effects !{}
def Writer
Section titled “def Writer”def Writer[I, O](input_type: str, output_type: str, model: str, tools: list[any], model_calls: int, tokens: int) -> AgentSpec[I, O] !{}Parameters
| name | type |
|---|---|
input_type | str |
output_type | str |
model | str |
tools | list[any] |
model_calls | int |
tokens | int |
Returns AgentSpec[I, O]
Effects !{}
def Monitor
Section titled “def Monitor”def Monitor[I, O](input_type: str, output_type: str, model: str, tools: list[any], model_calls: int, tokens: int) -> AgentSpec[I, O] !{}Parameters
| name | type |
|---|---|
input_type | str |
output_type | str |
model | str |
tools | list[any] |
model_calls | int |
tokens | int |
Returns AgentSpec[I, O]
Effects !{}
def Explorer
Section titled “def Explorer”def Explorer[I, O](input_type: str, output_type: str, model: str, tools: list[any], model_calls: int, tokens: int) -> AgentSpec[I, O] !{}Parameters
| name | type |
|---|---|
input_type | str |
output_type | str |
model | str |
tools | list[any] |
model_calls | int |
tokens | int |
Returns AgentSpec[I, O]
Effects !{}
def Engineer
Section titled “def Engineer”def Engineer[I, O](input_type: str, output_type: str, model: str, tools: list[any], model_calls: int, tokens: int) -> AgentSpec[I, O] !{}Parameters
| name | type |
|---|---|
input_type | str |
output_type | str |
model | str |
tools | list[any] |
model_calls | int |
tokens | int |
Returns AgentSpec[I, O]
Effects !{}
def Hardener
Section titled “def Hardener”def Hardener[I, O](input_type: str, output_type: str, model: str, tools: list[any], model_calls: int, tokens: int) -> AgentSpec[I, O] !{}Parameters
| name | type |
|---|---|
input_type | str |
output_type | str |
model | str |
tools | list[any] |
model_calls | int |
tokens | int |
Returns AgentSpec[I, O]
Effects !{}