Agents 0.0.2
Edge AI Agents SDK
|
Framework Namespace. More...
Namespaces | |
namespace | llms |
Large Language Models Namespace. | |
namespace | tools |
Tools Namespace. | |
namespace | workflows |
Worflows Namespace. | |
Classes | |
class | ActorAgent |
Actor-based agent implementation. More... | |
class | Agent |
Interface for agents. More... | |
class | AgentContext |
Context for an agent, containing tools, LLM, and memory. More... | |
class | AsyncGenerator |
A minimal AsyncGenerator implementation that doesn't rely on coroutines. More... | |
class | AutonomousAgent |
An agent that operates autonomously to complete a task. More... | |
class | ConfigLoader |
A utility class to load and access configuration values from .env files. More... | |
class | Executor |
A minimal executor implementation. More... | |
class | LLMInterface |
Interface for language model providers (OpenAI, Anthropic, Google, Ollama) More... | |
struct | LLMOptions |
Options for LLM API calls. More... | |
struct | LLMResponse |
Response from an LLM. More... | |
class | Logger |
Logger utility class that wraps spdlog functionality. More... | |
class | Memory |
Interface for agent memory storage. More... | |
struct | Message |
Message in a conversation. More... | |
struct | Parameter |
Parameter type for tools and LLM calls. More... | |
class | Task |
Provide a future-based fallback for Task. More... | |
class | Tool |
Interface for tools that an agent can use. More... | |
struct | ToolResult |
Result of a tool execution. More... | |
Typedefs | |
using | ToolCallback = std::function<ToolResult(const JsonObject&)> |
Callback type for tool execution. | |
using | String = std::string |
String type. | |
using | StringMap = std::map<String, String> |
String map type. | |
using | JsonObject = nlohmann::json |
JSON object type. | |
using | JsonArray = nlohmann::json::array_t |
JSON array type. | |
using | ParameterMap = std::map<String, Parameter> |
Parameter map type. | |
Enumerations | |
enum class | MemoryType { SHORT_TERM , LONG_TERM , WORKING } |
Memory types. More... | |
Functions | |
template<typename T> | |
T | blockingWait (Task< T > &&task) |
Helper to run a task and get the result synchronously. | |
template<typename T> | |
std::vector< T > | collectAll (AsyncGenerator< T > &&generator) |
Helper to collect all results from an AsyncGenerator. | |
Executor * | getExecutor () |
Get a global executor. | |
std::shared_ptr< LLMInterface > | createLLM (const String &provider, const String &api_key, const 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 String &name, const String &description, const std::vector< Parameter > ¶meters, 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<String, Parameter> |
Parameter map type.
using agents::String = std::string |
String type.
using agents::StringMap = std::map<String, String> |
String map type.
using agents::ToolCallback = std::function<ToolResult(const JsonObject&)> |
Callback type for tool execution.
|
strong |
Memory types.
Enumerator | |
---|---|
SHORT_TERM | Short term memory. |
LONG_TERM | Long term memory. |
WORKING | Working memory. |
T agents::blockingWait | ( | Task< T > && | task | ) |
Helper to run a task and get the result synchronously.
T | The type of the result of the task |
task | The task to run |
std::vector< T > agents::collectAll | ( | AsyncGenerator< T > && | generator | ) |
Helper to collect all results from an AsyncGenerator.
T | The type of the elements in the AsyncGenerator |
generator | The AsyncGenerator to collect results from |
std::shared_ptr< LLMInterface > agents::createLLM | ( | const String & | provider, |
const String & | api_key, | ||
const 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< Memory > agents::createMemory | ( | ) |
std::shared_ptr< Tool > agents::createTool | ( | const String & | name, |
const 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.