File size: 1,175 Bytes
28a08e7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10ba334
 
28a08e7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
---
title: Agente AI Backend
emoji: πŸ€–
colorFrom: indigo
colorTo: blue
sdk: docker
app_port: 7860
pinned: false
---

# Agente AI β€” Backend FastAPI

Backend Python FastAPI per Agente AI. Streaming LLM, memoria, esecuzione codice, terminal PTY.

## Endpoints principali

- `GET  /health`              β€” stato backend
- `GET  /api/status`          β€” versione + config
- `POST /api/reason/loop`     β€” agent reasoning loop
- `POST /api/exec`            β€” esecuzione codice Python
- `POST /api/execute-shell`   β€” shell commands
- `POST /api/search`          β€” web search proxy
- `POST /api/fetch-page`      β€” page fetch proxy
- `WS   /ws/terminal`         β€” PTY WebSocket terminal

## Stack

- Python 3.11 + FastAPI + uvicorn
- smolagents>=1.14.0 + litellm>=1.40.0
- supabase (opzionale)

## Variabili ambiente

| Variabile | Descrizione |
|-----------|-------------|
| GROQ_API_KEY | Groq API key |
| GEMINI_API_KEY | Google Gemini key |
| OPENROUTER_API_KEY | OpenRouter key |
| HF_TOKEN | HuggingFace token |
| SUPABASE_URL | Supabase URL (opzionale) |
| SUPABASE_ANON_KEY | Supabase anon key (opzionale) |
| ALLOWED_ORIGINS | CORS origins comma-separated |