agentdefinitions
Package github.com/emergent-company/emergent.memory/apps/server/pkg/sdk/agentdefinitions
The agentdefinitions client manages agent definitions — reusable configurations that store system prompts, model settings, and tools. Agent definitions are scoped to a project.
See also: agents for the runtime agents that use these definitions.
Methods
Section titled “Methods”func (c *Client) List(ctx context.Context) (*APIResponse[[]AgentDefinitionSummary], error)func (c *Client) Get(ctx context.Context, definitionID string) (*APIResponse[AgentDefinition], error)func (c *Client) Create(ctx context.Context, req *CreateAgentDefinitionRequest) (*APIResponse[AgentDefinition], error)func (c *Client) Update(ctx context.Context, definitionID string, req *UpdateAgentDefinitionRequest) (*APIResponse[AgentDefinition], error)func (c *Client) Delete(ctx context.Context, definitionID string) errorKey Types
Section titled “Key Types”AgentDefinition
Section titled “AgentDefinition”type AgentDefinition struct { ID string ProductID *string ProjectID string Name string Description *string SystemPrompt *string Model *ModelConfig Tools []string IsDefault bool MaxSteps *int DefaultTimeout *int Visibility string ACPConfig *ACPConfig Config map[string]any CreatedAt time.Time UpdatedAt time.Time}AgentDefinitionSummary
Section titled “AgentDefinitionSummary”Lightweight representation returned by List.
type AgentDefinitionSummary struct { ID string ProjectID string Name string Description *string Visibility string IsDefault bool ToolCount int CreatedAt time.Time UpdatedAt time.Time}ModelConfig
Section titled “ModelConfig”type ModelConfig struct { Name string // Model name, e.g. "gemini-2.0-flash" Temperature *float32 MaxTokens *int}ACPConfig
Section titled “ACPConfig”Agent Card Protocol metadata, used when exposing the agent via ACP.
type ACPConfig struct { DisplayName string Description string Capabilities []string InputModes []string OutputModes []string}CreateAgentDefinitionRequest
Section titled “CreateAgentDefinitionRequest”type CreateAgentDefinitionRequest struct { Name string Description *string SystemPrompt *string Model *ModelConfig Tools []string IsDefault *bool MaxSteps *int DefaultTimeout *int Visibility string ACPConfig *ACPConfig Config map[string]any}UpdateAgentDefinitionRequest
Section titled “UpdateAgentDefinitionRequest”All fields are optional (pointer or omitempty).
type UpdateAgentDefinitionRequest struct { Name *string Description *string SystemPrompt *string Model *ModelConfig Tools []string IsDefault *bool MaxSteps *int DefaultTimeout *int Visibility *string ACPConfig *ACPConfig Config map[string]any}APIResponse
Section titled “APIResponse”type APIResponse[T any] struct { Success bool Data T Error *string Message *string}Example
Section titled “Example”// Create an agent definitionresp, err := client.AgentDefinitions.Create(ctx, &agentdefinitions.CreateAgentDefinitionRequest{ Name: "Document Summarizer", Description: strPtr("Summarizes new documents as they are ingested"), SystemPrompt: strPtr("You are a summarization agent. For each document, produce a concise summary..."), Model: &agentdefinitions.ModelConfig{ Name: "gemini-2.0-flash", Temperature: float32Ptr(0.3), MaxTokens: intPtr(1024), }, Tools: []string{"read_document", "create_graph_object"},})fmt.Printf("Created definition: %s\n", resp.Data.ID)
// List definitions in the projectlist, err := client.AgentDefinitions.List(ctx)for _, def := range list.Data { fmt.Printf("%s — tools: %d\n", def.Name, def.ToolCount)}
// Update the system prompt_, err = client.AgentDefinitions.Update(ctx, resp.Data.ID, &agentdefinitions.UpdateAgentDefinitionRequest{ SystemPrompt: strPtr("Updated prompt..."),})