-
Notifications
You must be signed in to change notification settings - Fork 492
Description
I've been finding ways trying to shape the agent's behavior.. including when to use tools, how it should address itself, etc.
For instance, I want it to refer itself to something else instead of "GitHub Copilot CLI" since it wouldn't make sense to address itself that fits into CLI environment for let's say when I'm interacting with the agent within different contexts such as in Discord, Slack, or other GUI-based interactions.
In this sample code, I figured that I could use and set the system_message parameter in create_session method:
import asyncio
import copilot
async def main():
client = copilot.CopilotClient()
await client.start()
session = await client.create_session({
"session_id": "test-session-123",
"model": "gpt-4.1",
"system_message": "Your name is Jakey the Discord bot. [+ other instructions...]"
})
response = await session.send_and_wait({"prompt": "What is your name?"}) # Still says 'GitHub Copilot CLI' instead of 'Jakey the Discord bot'
print(response.data.content)
await session.destroy()
# Delete session
await client.delete_session("test-session-123")
# Stop
await client.stop()
asyncio.run(main())However, the problem is even setting system_message parameter which it should call itself "Jakey the Discord Bot", it seems ignored... still falls back to default response style and still addresses itself as "GitHub Copilot CLI"
Would really be nice if there's a way we can add system-level instructions so the agent behavior can be consistent when interacting with it.