33 lines
726 B
Python
33 lines
726 B
Python
import asyncio
|
|
|
|
from agent.config import settings
|
|
from agent.loop import run_session
|
|
from sandbox.session import PodmanSandbox
|
|
|
|
|
|
async def run_tui():
|
|
print("Starting sandbox....")
|
|
async with PodmanSandbox() as sandbox:
|
|
print("Sandbox ready")
|
|
await run_session(sandbox)
|
|
|
|
print("Sandbox destroyed")
|
|
|
|
|
|
def main():
|
|
print("Hello from mycode!")
|
|
|
|
# Validate required settings
|
|
if not settings.anthropic_api_key:
|
|
print("Error: ANTHROPIC_API_KEY not set")
|
|
print("\nPlease create a .env file with:")
|
|
print(" ANTHROPIC_API_KEY=sk-ant-...")
|
|
print("\nSee .env.example for template")
|
|
exit(1)
|
|
|
|
asyncio.run(run_tui())
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|