from agentverse_ai.agent import Agent
from agentverse_ai.models.openai import OpenAIChat
from agentverse_ai.playground import Playground, serve_playground_app
from agentverse_ai.storage.agent.sqlite import SqliteAgentStorage

agent_storage_file: str = "tmp/agents.db"

basic_agent = Agent(
    name="Basic Agent",
    model=OpenAIChat(id="gpt-4o"),
    storage=SqliteAgentStorage(table_name="basic_agent", db_file=agent_storage_file),
    add_history_to_messages=True,
    num_history_responses=3,
    add_datetime_to_instructions=True,
    markdown=True,
)

app = Playground(
    agents=[
        basic_agent,
    ]
).get_app()

if __name__ == "__main__":
    serve_playground_app("basic:app", reload=True)
