pub async fn create_agent(
persistence: &dyn PersistenceLayer,
agent: AgentArtifact,
) -> Result<AgentArtifact>Expand description
Create a new agent, assigning an id when absent and marking its kind.
Returns the stored artifact (with any generated id) so callers can echo it back.
ยงErrors
Returns an error if the persistence write fails.