Set your OpenAI API key as an environment variable:
Copy
export OPENAI_API_KEY=your_api_key_here
3
Create Script
Create a new file simple_agent.py:
Copy
from praisonaiagents import Agentagent = Agent(instructions="You are a Markdown Agent, output in markdown format")agent.start("Write a blog post about AI")
# Example: Create a content generation agentfrom praisonaiagents import Agent# Create content agentagent = Agent( instructions="You are a Content Generation Agent, create engaging content")# Generate contentresponse = agent.start(""" Write a short story about: - A future world - With advanced AI - And human collaboration""")# Save the storywith open('ai_story.txt', 'w') as f: f.write(response)