package golem:agent;
interface host {
use golem:rpc/types@0.2.2.{component-id};
use common.{agent-error, agent-type, data-value};
/// Associates an agent type with a component that implements it
record registered-agent-type {
agent-type: agent-type,
implemented-by: component-id
}
/// Gets all the registered agent types
get-all-agent-types: func() -> list<registered-agent-type>;
/// Get a specific registered agent type by name
get-agent-type: func(agent-type-name: string) -> option<registered-agent-type>;
/// Constructs a string agent-id from the agent type and its constructor parameters
make-agent-id: func(agent-type-name: string, input: data-value) -> result<string, agent-error>;
/// Parses an agent-id (created by `make-agent-id`) into an agent type name and its constructor parameters
parse-agent-id: func(agent-id: string) -> result<tuple<string, data-value>, agent-error>;
}