Skip to main content

Module inference_agent

Module inference_agent 

Source

Re-exports§

pub use crate::modalities::logic::n3_compiler::AgentIntentFrame;
pub use crate::modalities::logic::n3_compiler::N3OutputMode;
pub use crate::modalities::logic::n3_compiler::MAX_CONTEXT_NAMESPACE_SLOTS;
pub use crate::modalities::logic::n3_compiler::MAX_INTENT_SCOPE_SLOTS;

Structs§

AgentIntent
Structured intent message from LLM → Webizen. Every call must declare what it intends to do — the Webizen validates this against the Rights Ontology BEFORE the LLM ever sees the user’s semantic graph.
AgentOutput
The raw output from the LLM, before Webizen validation.
LocalLlmAgent
The concrete local inference agent. Uses a mock inference path for now; swap infer_local_model for an actual llama.cpp FFI call.

Enums§

AgentBackend
Describes where inference actually runs.
AgentError
WebizenVerdict
The Webizen VM’s ruling on an AgentIntent or AgentOutput.

Constants§

INFERENCE_TIMEOUT_MS
Default maximum milliseconds for a local inference call (interactive). Batch/overnight profile raises this via llm_bench::inference_timeout_ms().
LLM_MEMORY_BUDGET_BYTES
Hard memory ceiling for the LLM runtime within the 512MB system floor. Leaves the remaining 384MB for the Webizen VM, SLG Arena, and WASM stack.
LLM_RULE_INTENT_FRAME_MISMATCH
LLM_RULE_NO_ADVERSARIAL_CONDUCT
LLM_RULE_NO_OUTBOUND_TELEMETRY
LLM_RULE_NO_SANCTUARY_ACCESS
LLM_RULE_PROFILE_VIOLATION
LLM_RULE_PROVENANCE_REQUIRED
LLM_RULE_REMOTE_CONSENT
LLM_RULE_TOKEN_BUDGET
MAX_OUTPUT_TOKENS
Maximum tokens the agent may generate in a single turn. Enforces deterministic compute cost — no runaway generation that blocks the edge device.
SANCTUARY_SCOPE_WEBIZEN
Special webizen hash marking a Sanctuary-flagged graph scope.

Traits§

AgentRuntime
The core abstraction. All LLM backends MUST implement this. The trait is object-safe so it can be boxed and swapped at runtime.