feat: configurable displayName prefix for agent messages in group chats (#255)

Add optional displayName field to agent config. When set, outbound
agent responses are prefixed (e.g. "💜 Signo: Hello!").

Useful in multi-agent group chats where multiple bots share a channel
and users need to tell them apart.

Closes #252

Written by Cameron ◯ Letta Code

"The details are not the details. They make the design." -- Charles Eames
This commit is contained in:
Cameron
2026-02-10 12:08:45 -08:00
committed by GitHub
parent dad510150a
commit df18cba565
7 changed files with 78 additions and 8 deletions

View File

@@ -332,4 +332,46 @@ describe('normalizeAgents', () => {
expect(agents[0].polling).toEqual(config.polling);
expect(agents[0].integrations).toEqual(config.integrations);
});
it('should pass through displayName', () => {
const config: LettaBotConfig = {
server: { mode: 'cloud' },
agent: {
name: 'Signo',
displayName: '💜 Signo',
},
channels: {
telegram: { enabled: true, token: 'test-token' },
},
};
const agents = normalizeAgents(config);
expect(agents[0].displayName).toBe('💜 Signo');
});
it('should pass through displayName in multi-agent config', () => {
const agentsArray: AgentConfig[] = [
{
name: 'Signo',
displayName: '💜 Signo',
channels: { telegram: { enabled: true, token: 't1' } },
},
{
name: 'DevOps',
displayName: '👾 DevOps',
channels: { discord: { enabled: true, token: 'd1' } },
},
];
const config = {
server: { mode: 'cloud' as const },
agents: agentsArray,
} as LettaBotConfig;
const agents = normalizeAgents(config);
expect(agents[0].displayName).toBe('💜 Signo');
expect(agents[1].displayName).toBe('👾 DevOps');
});
});