Skip to main content

Crate anda_engine

Crate anda_engine 

Source
Expand description

Runtime implementation for the Anda agent framework.

anda_engine turns the traits and data contracts from anda_core into a runnable agent engine. It provides the execution context, model routing, storage, hooks, memory tools, remote engine integration, and built-in extensions used by Anda agents.

§Main modules

  • engine: engine construction, agent execution, tool calls, and remote engine metadata.
  • context: runtime contexts passed to agents and tools, including cache, storage, HTTP, Web3, cancellation, and state features.
  • model: model provider adapters and label-based model routing.
  • extension: reusable tools such as filesystem, shell, fetch, notes, skills, todos, extraction, and search.
  • memory: persistent conversation and resource memory backed by AndaDB and the Cognitive Nexus.
  • store: object storage abstraction used by engine contexts.

§Feature flags

  • sandbox: enables the sandboxed shell runtime backed by boxlite.
  • full: enables all optional runtime features currently provided by this crate.

Modules§

context
Execution context system for Anda agents and tools.
engine
Engine construction and top-level execution APIs.
extension
Built-in tool and agent extensions.
hook
Hook system for observing and customizing runtime behavior.
management
Engine visibility and caller management policies.
memory
Persistent memory tools and conversation storage.
model
Model provider integration and label-based routing.
store
Object storage support for engine contexts.
subagent

Constants§

ANONYMOUS
This is used to represent unauthenticated or anonymous users in the system.

Statics§

APP_USER_AGENT
User agent string used by Anda Engine HTTP clients.

Functions§

json_convert_rfc3339_timestamp
Converts each JSON object’s timestamp field from Unix milliseconds to RFC 3339.
json_set_unix_ms_timestamp
Sets the Unix timestamp in milliseconds for each JSON object in the vector.
local_date_hour
Converts a Unix timestamp in milliseconds to a local datetime string in the format “YYYY-MM-DD HH(AM/PM) ±TZ”. Example: 1970-01-01 08AM +08:00
rand_bytes
Generates cryptographically secure random bytes.
rand_number
Generates a random number within the given range.
rfc3339_datetime
Converts a Unix timestamp in milliseconds to an RFC 3339 UTC datetime string.
rfc3339_datetime_now
Returns the current UTC datetime in RFC 3339 format with millisecond precision.
unix_ms
Returns the current Unix timestamp in milliseconds. Returns the current unix timestamp in milliseconds.