Deploy
Note: Deploy means running your script where the key and the users are. The Try it sandbox is only for learning.
Save the script
Put the agent in app.py. The same three lines you already ran are enough to start.
Example
from praisonai import Agent
agent = Agent(instructions="You are a helpful assistant")
print(agent.start("Hello"))Example explained
- from praisonai import Agent — Imports Agent needed for save the script.
- Agent(…) — Instantiates the Agent configured for save the script.
- .start(…) — Executes the configured run for save the script and returns the result.
Run it on your machine
Set the key in that terminal, then run the file. The process lives as long as you need the agent.
Example
export OPENAI_API_KEY=your_key_here
python app.pyExample explained
- export OPENAI_API_KEY — Sets an environment variable in the current shell without hardcoding secrets.
Reference: documentation