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 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.
Structs§
- Agent
Ctx - Context for agent operations, providing access to models, tools, and other agents.
- Agent
Info - Contains descriptive and operational information about an AI agent.
- BaseCtx
- Runtime context shared by engine tools and nested agent calls.
- Completion
Runner - A iteration style executor for completion.
- Completion
Stream - Stream wrapper for
CompletionRunner. - Engine
Card - Information about the engine, including agent and tool definitions.
- Remote
Agent - Wraps a remote agent as a local agent.
- Remote
Engine Args - Arguments for registering a remote engine.
- Remote
Engines - Collection of remote engines.
- Remote
Tool - Wraps a remote tool as a local tool.
- Tool
Group Summary - One entry in the capability group directory returned by
ToolsGroups. - Tool
Groups Output - Output returned by
ToolsGroups. - Tools
Groups - Lists the capability groups available to the model as a compact directory.
- Tools
Groups Args - Arguments for
ToolsGroups. - Tools
Output - Output returned by callable discovery tools.
- Tools
Search - Searches the callable surface currently available to the model. The “tools_search” tool has been registered as a built-in agent with label “flash”.
- Tools
Search Args - Arguments for
ToolsSearch. - Tools
Select - Returns a subset of callable definitions for direct use in the next reasoning turn. The “tools_select” tool has been registered as a built-in agent with label “flash”.
- Tools
Select Args - Arguments for
ToolsSelect. - Web3SDK
- Backend-agnostic Web3 capability handle used by engine contexts.
Constants§
- TOOLS_
GROUPS_ NAME - Built-in name for listing capability groups (the group directory).
- TOOLS_
SEARCH_ NAME - Built-in name for keyword search across available callables.
- TOOLS_
SELECT_ NAME - Built-in name for selecting callables by exact name.
Statics§
- COMPACTION_
PROMPT - DYNAMIC_
REMOTE_ ENGINES - Reserved dynamic-configuration key for remote engine registrations.
- REMOTE_
AGENT_ PREFIX - Prefix used for routed remote-agent calls in model-facing tool names.
- REMOTE_
TOOL_ PREFIX - Prefix used for routed remote-tool calls in model-facing tool names.
- SUB_
AGENT_ PREFIX - Prefix used for routed subagent calls in model-facing tool names.
Traits§
- Web3
Client Features - Object-safe Web3 capability surface required by
Web3SDK.
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.