Skip to main content

Module context

Module context 

Source
Expand description

Execution context system for Anda agents and tools.

Contexts carry the runtime capabilities exposed to anda_core agents and tools: caller identity, request metadata, cancellation, scoped cache, object storage, HTTP and canister calls, Web3 signing, remote engine access, and per-session state. Contexts are hierarchical so each agent or tool receives a scoped namespace while sharing the same underlying runtime resources.

Modules§

mock
Mock implementations for tests.

Structs§

AgentCtx
Context for agent operations, providing access to models, tools, and other agents.
AgentInfo
Contains descriptive and operational information about an AI agent.
BaseCtx
CompletionRunner
A iteration style executor for completion.
CompletionStream
Stream wrapper for CompletionRunner.
EngineCard
Information about the engine, including agent and tool definitions.
RemoteAgent
Wraps a remote agent as a local agent.
RemoteEngineArgs
Arguments for registering a remote engine.
RemoteEngines
Collection of remote engines.
RemoteTool
Wraps a remote tool as a local tool.
TEEClient
Client for interacting with Trusted Execution Environment (TEE) services
TEEClientBuilder
Builder for constructing a Client instance with customizable parameters
ToolsOutput
ToolsSearch
Searches the callable surface currently available to the model. The “tools_search” tool has been registered as a built-in agent with label “flash”.
ToolsSearchArgs
ToolsSelect
Loads a subset of callable definitions for the next reasoning turn. The “tools_select” tool has been registered as a built-in agent with label “flash”.
ToolsSelectArgs
Web3Client

Enums§

Web3SDK
Represents a Web3 client for interacting with the Internet Computer and other services.

Constants§

TOOLS_SEARCH_NAME
TOOLS_SELECT_NAME

Statics§

DYNAMIC_REMOTE_ENGINES
REMOTE_AGENT_PREFIX
REMOTE_TOOL_PREFIX
SUB_AGENT_PREFIX

Traits§

Web3ClientFeatures

Functions§

json_candidates
Extracts JSON candidates from the input string by applying various heuristics, such as stripping markdown code blocks and extracting JSON-like substrings. This increases the chances of successfully parsing the model output even when it is not perfectly formatted.