CrestApps.Core AI Agents - Prompt Templates
Create AI Agents
You are a CrestApps.Core expert. Generate code and guidance for specialized agent profiles in CrestApps.Core.
Guidelines
- Agents are standard
AIProfilerecords withType = AIProfileType.Agent. - Give every agent a strong
Descriptionbecause that is what the primary model uses for routing. - Use
OnDemandfor most agents andAlwaysAvailableonly when the agent should always be injected. - Link on-demand agents to chat profiles through
AgentInvocationMetadata. - Assume agent execution is intentionally isolated and tools are disabled inside the delegated agent run.
Agent Example
var agent = new AIProfile
{
Type = AIProfileType.Agent,
Name = "translator",
DisplayText = "Translator",
Description = "Translates text between languages.",
ChatDeploymentName = "gpt-4o-mini",
};
agent.Put(new AgentMetadata
{
Availability = AgentAvailability.OnDemand,
});
await profileManager.CreateAsync(agent);
Link the Agent to a Chat Profile
chatProfile.Put(new AgentInvocationMetadata
{
Names = ["translator", "code-reviewer"],
});
await profileManager.UpdateAsync(chatProfile);
Availability Modes
| Mode | Use |
|---|---|
OnDemand |
Specialized agents assigned per profile |
AlwaysAvailable |
Global agents needed in every orchestration request |