1
Install Slide
2
Set Up Your API Key
Your agent needs an API key to use the LLM. Choose your provider:
Create your API key from platform.openai.com then add it to your environment:
For production, use a
.env
file. If you choose this approach:- Install python-dotenv:
uv add python-dotenv
orpip install python-dotenv
- Create a
.env
file with your API keys - Uncomment the dotenv import lines in the code example below
3
Create Your Agent
Create a file called
agent.py
:4
Run Your Agent
What’s Next?
Now that you have a working agent, explore these guides to add more capabilities:Your First Agent
Detailed walkthrough with persistence and interactive sessions
Tyler CLI
Chat with agents instantly using the interactive CLI
Conversation Persistence
Make your agent maintain conversation history
Streaming Responses
See responses as they’re generated in real-time
Testing Agents
Write tests to ensure your agent behaves correctly
Deploy Your Agent
Deploy to Slack
Turn your agent into a Slack agent
Adding Tools
Add built-in and custom tools to agents
Troubleshooting
API Key Errors
API Key Errors
Make sure to set your OpenAI API key:Or use a different model provider:
Tyler automatically handles model-specific parameter restrictions. For example, O-series models
only support
temperature=1
, but Tyler will automatically drop incompatible parameters, so you
can use the same agent configuration across all models.Import Errors
Import Errors
Make sure you’ve installed all packages:
Async Errors
Async Errors
Remember to use
asyncio.run()
or run in an async context: