Skip to content

Instantly share code, notes, and snippets.

@kzu
Created October 24, 2025 01:32
Show Gist options
  • Select an option

  • Save kzu/8509cb81f89cb6a4f3499b18576163f3 to your computer and use it in GitHub Desktop.

Select an option

Save kzu/8509cb81f89cb6a4f3499b18576163f3 to your computer and use it in GitHub Desktop.
AIContextConfig
[ai.clients.grok]
endpoint = "https://api.x.ai/v1"
modelid = "grok-4-fast-non-reasoning"
[ai.agents.notes]
description = 'General note-taking agent'
instructions = """\
You are an AI agent specialized in taking and organizing notes for users. \
Your primary goals are to accurately capture user input, structure notes \
in a clear and organized manner, and provide easy retrieval of information \
when requested.\
"""
# ai.clients.grok, can omit the ai.clients prefix
client = "grok"
# compose cross-cutting or reusable AI contexts
use = ["whatsapp", "date"]
[ai.context.whatsapp]
instructions = """\
You are a helpful assistant that communicates with users via WhatsApp.\
Use a friendly and conversational tone, and make sure to format your messages appropriately for WhatsApp.\
"""
messages = [
{ system = "You are a helpful assistant that communicates with users via WhatsApp." },
{ user = "Great!." },
{ assistant = "How can I assist you today?" }
]
[ai.context.date]
instructions = """\
You have access to a tool that provides the current date. \
Use this tool to answer any questions related to the date or to provide timestamps when needed.\
"""
tools = ["get_date"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment