Skip to main content
Agentmark supports generating objects using object prompts. Object prompts are defined by specifying object_config in the object prompt’s frontmatter and defining schema for the object.

Example Configuration

example.prompt.mdx
---
name: example
object_config:
  model_name: gpt-4
  schema:
    type: object
    properties:
      event:
        type: object
        properties:
          name: 
            type: string
            description: The name of the event
          date:
            type: string
            description: The date of the event
          attendees:
            type: array
            items:
              type: object
              properties:
                name:
                  type: string
                  description: The name of the attendee
                role:
                  type: string
                  description: The role of the attendee
              required:
                - name
                - role
        required: 
          - name
          - date
          - attendees
---

<System>You are an event planner that creates detailed event objects with attendees and their roles.</System>
<User>Create an event for a team meeting next Friday with John as the facilitator and Sarah as the note-taker.</User>

Tags

TagDescription
<System>System-level instructions
<User>User message
<Assistant>Assistant message

Available Configuration

PropertyTypeDescriptionOptional/Required
model_namestringThe name of the model to use for object generation.Required
max_tokensnumberMaximum number of tokens to generate.Optional
temperaturenumberControls the randomness of the output; higher values result in more random outputs.Optional
max_callsnumberMaximum number of LLM calls allowed.Optional
top_pnumberControls the cumulative probability for nucleus sampling.Optional
top_knumberLimits the next token selection to the top k tokens.Optional
presence_penaltynumberPenalizes new tokens based on their presence in the text so far, encouraging the model to discuss new topics.Optional
frequency_penaltynumberPenalizes new tokens based on their frequency in the text so far, reducing the likelihood of repeating the same line verbatim.Optional
stop_sequencesstring[]Array of strings where the generation will stop if any of the strings are encountered.Optional
seednumberSeed value for random number generation, ensuring reproducibility.Optional
max_retriesnumberMaximum number of retries for the request in case of failures.Optional
schemaJSONSchemaA schema defining the expected structure of the model’s output.Required
schema_namestringA name for the schema.Optional
schema_descriptionstringA description of the schema.Optional
toolsstring[]List of tool names and MCP URIs available for the model to use. Tools are resolved from the tools passed to createAgentMarkClient.Optional

Have Questions?

We’re here to help! Choose the best way to reach us: