|
Agents 1.4.0
Edge AI Agents SDK
|
Framework Namespace. More...
Namespaces | |
| namespace | llms |
| Large Language Models Namespace. | |
| namespace | media |
| Media envelope namespace. | |
| namespace | tools |
| Tools Namespace. | |
| namespace | workflows |
| Worflows Namespace. | |
Classes | |
| class | Agent |
| Interface for agents. More... | |
| class | ActorAgent |
| Actor-based agent implementation. More... | |
| class | AutonomousAgent |
| An agent that operates autonomously to complete a task. More... | |
| struct | VoiceConfig |
| Configuration for the VoicePipeline. More... | |
| class | VoiceAgent |
| Voice agent that inherits from AutonomousAgent and adds voice capabilities. More... | |
| class | ConfigLoader |
| A utility class to load and access configuration values from .env files. More... | |
| class | Context |
| Context for an agent, containing tools, LLM, and memory. More... | |
| class | Task |
| Standard C++20 coroutine-based Task implementation. More... | |
| class | Task< void > |
| Task specialization for void. More... | |
| class | AsyncGenerator |
| AsyncGenerator with a Folly-compatible API: next() returns Task<optional<T>>. More... | |
| class | Executor |
| A minimal executor implementation (fire-and-forget). More... | |
| class | HTTPClient |
| Thin HTTP Client wrapper for internal use. More... | |
| struct | LLMOptions |
| Options for LLM API calls. More... | |
| class | LLMInterface |
| Interface for language model providers (OpenAI, Anthropic, Google, Ollama). More... | |
| class | Logger |
| Logger utility class that wraps spdlog functionality. More... | |
| class | Memory |
| Interface for agent memory storage. More... | |
| struct | AudioFormat |
| Audio format specification for live AI sessions. More... | |
| struct | LiveSessionConfig |
| Configuration for live AI sessions. More... | |
| class | ILiveClient |
| Abstract interface for live real-time AI clients. More... | |
| struct | ToolResult |
| Result of a tool execution. More... | |
| struct | ToolError |
| A ToolResult that represents a failure. More... | |
| class | Tool |
| Interface for tools that an agent can use. More... | |
| class | MCPTool |
| Interface for tools that an agent can use. More... | |
| struct | Parameter |
| Parameter type for tools and LLM calls. More... | |
| struct | LLMResponse |
| Response from an LLM. More... | |
| struct | Message |
| Message in a conversation. More... | |
| struct | mcpConfig |
| MCP server config. More... | |
| class | Utils |
| Utility class providing static helper functions. More... | |
| struct | VoiceCallbacks |
| Callbacks for voice events. More... | |
| class | VoicePipeline |
| VoicePipeline class for push-to-talk speech-to-text. More... | |
| struct | SttCallbacks |
| Callbacks for STT events. More... | |
| struct | SttConfig |
| Configuration for the STT Service. More... | |
| class | ISttService |
| Interface for the STT Engine. Pure virtual class to enforce ABI boundaries. More... | |
Typedefs | |
| using | ToolCallback = std::function<ToolResult(const JsonObject&)> |
| Callback type for tool execution. | |
| using | JsonObject = nlohmann::json |
| JSON object type. | |
| using | JsonArray = nlohmann::json::array_t |
| JSON array type. | |
| using | ParameterMap = std::map<std::string, Parameter> |
| Parameter map type. | |
| using | ToolCalls = std::vector<std::pair<std::string, JsonObject>> |
| Tool calls type. | |
Enumerations | |
| enum class | TransportProtocol { WEBSOCKET , WEBRTC , HTTP_STREAM , CUSTOM } |
| Transport protocol types for live AI communication. More... | |
| enum class | MemoryType { SHORT_TERM , LONG_TERM , WORKING } |
| Memory types. More... | |
Functions | |
| template<typename T> | |
| T | blockingWait (Task< T > &&task) |
| Helper to run a coroutine and get the result synchronously. | |
| void | blockingWait (Task< void > &&task) |
| Helper to run a coroutine and get the result synchronously. | |
| template<typename T> | |
| Task< std::vector< T > > | collectAllFromGenerator (AsyncGenerator< T > &&generator) |
| Helper to collect all results from an AsyncGenerator. | |
| template<typename T> | |
| std::vector< T > | collectAll (AsyncGenerator< T > &&generator) |
| Helper to run an async generator and collect results. | |
| Executor * | getExecutor () |
| Get a global executor. | |
| std::shared_ptr< LLMInterface > | createLLM (const std::string &provider, const std::string &api_key, const std::string &model="") |
| Factory function to create a specific LLM provider. | |
| std::shared_ptr< Memory > | createMemory () |
| Create a Memory instance. | |
| std::shared_ptr< Tool > | createTool (const std::string &name, const std::string &description, const std::vector< Parameter > ¶meters, ToolCallback callback) |
| Create a custom tool with a name, description, parameters, and callback. | |
| std::shared_ptr< Tool > | createMCPTool (const std::string &name, const std::string &description, const std::vector< Parameter > ¶meters, const mcpConfig &mcpConfig, ToolCallback callback) |
| Create a custom tool with a name, description, parameters, and callback. | |
Framework Namespace.
| using agents::JsonArray = nlohmann::json::array_t |
JSON array type.
| using agents::JsonObject = nlohmann::json |
JSON object type.
| using agents::ParameterMap = std::map<std::string, Parameter> |
Parameter map type.
| using agents::ToolCallback = std::function<ToolResult(const JsonObject&)> |
Callback type for tool execution.
| using agents::ToolCalls = std::vector<std::pair<std::string, JsonObject>> |
Tool calls type.
|
strong |
Memory types.
| Enumerator | |
|---|---|
| SHORT_TERM | Short term memory. |
| LONG_TERM | Long term memory. |
| WORKING | Working memory. |
|
strong |
Transport protocol types for live AI communication.
Different protocols offer different trade-offs in terms of latency, reliability, and browser compatibility.
| T agents::blockingWait | ( | Task< T > && | task | ) |
Helper to run a coroutine and get the result synchronously.
| T | The type of the result |
| task | The task to run |
|
inline |
Helper to run a coroutine and get the result synchronously.
| task | The task to run |
| std::vector< T > agents::collectAll | ( | AsyncGenerator< T > && | generator | ) |
Helper to run an async generator and collect results.
| T | The type of the result |
| generator | The generator to collect results from |
| Task< std::vector< T > > agents::collectAllFromGenerator | ( | AsyncGenerator< T > && | generator | ) |
Helper to collect all results from an AsyncGenerator.
| T | The type of the result |
| generator | The generator to collect results from |
| std::shared_ptr< LLMInterface > agents::createLLM | ( | const std::string & | provider, |
| const std::string & | api_key, | ||
| const std::string & | model = "" ) |
Factory function to create a specific LLM provider.
| provider | One of: "anthropic", "openai", "google", "ollama" |
| api_key | API key for the provider |
| model | Model to use (provider-specific) |
| std::shared_ptr< Tool > agents::createMCPTool | ( | const std::string & | name, |
| const std::string & | description, | ||
| const std::vector< Parameter > & | parameters, | ||
| const mcpConfig & | mcpConfig, | ||
| ToolCallback | callback ) |
Create a custom tool with a name, description, parameters, and callback.
| name | The name of the tool |
| description | The description of the tool |
| parameters | The parameters of the tool; can be left empty to auto-discover from mcp server |
| mcpConfig | The mcp client config |
| callback | The callback for the tool |
| std::shared_ptr< Memory > agents::createMemory | ( | ) |
| std::shared_ptr< Tool > agents::createTool | ( | const std::string & | name, |
| const std::string & | description, | ||
| const std::vector< Parameter > & | parameters, | ||
| ToolCallback | callback ) |
Create a custom tool with a name, description, parameters, and callback.
| name | The name of the tool |
| description | The description of the tool |
| parameters | The parameters of the tool |
| callback | The callback for the tool |
|
inline |
Get a global executor.