Advanced Usage: Custom Instructions
Custom Instructions
The AI Agent SDK allows developers to customize agent behavior using custom instructions, enabling the assistant to take on specific personas or expertise. This helps tailor the tone, depth, and domain of the agent’s responses based on your application needs.
Setting Custom Instructions
To modify agent behavior, use the instructions plugin when initializing the agent:
from crypto_com_agent_client import Agent
agent = Agent.init(
llm_config={
"provider": "OpenAI",
"model": "gpt-4",
"provider-api-key": "sk-proj-example-key",
"temperature": "float-controlling-output-randomness",
},
blockchain_config={
"api-key": "your-crypto.com-developer-platform-api-key",
"private-key": "your-private-key",
"sso-wallet-url": "your-sso-wallet-url",
"timeout": "timeout-in-seconds-for-API-calls-default-20s")
},
plugins={
"instructions": "Be concise and professional."
},
)Instruction-Based Personas: Examples
Disclaimer: Crypto.com AI Agent’s investment advice is for informational purposes only and should not be considered financial advice. Always conduct your own research and consult a licensed financial advisor. The AI Agent is not responsible for any financial losses.
1. DeFi Investment Advisor
Instruction:
Conversation Example
2. NFT Marketplace Advisor
Instruction:
Conversation Example
Using custom instructions, you can tailor the AI Agent to deliver domain-specific expertise and adapt its tone, verbosity, and capabilities to fit your application's needs.
Last updated
Was this helpful?