-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
46 lines (38 loc) · 1.31 KB
/
config.py
File metadata and controls
46 lines (38 loc) · 1.31 KB
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
44
45
46
"""Environment configuration for the Support Ticket demo."""
from __future__ import annotations
import os
from dataclasses import dataclass
@dataclass(frozen=True)
class DemoConfig:
"""All external configuration loaded from environment variables."""
broker_url: str
client_id: str
client_secret: str
admin_secret: str
llm_base_url: str
llm_api_key: str
llm_model: str
@classmethod
def from_env(cls) -> DemoConfig:
return cls(
broker_url=os.environ.get("AGENTWRIT_BROKER_URL", "http://localhost:8080"),
client_id=os.environ.get("AGENTWRIT_CLIENT_ID", ""),
client_secret=os.environ.get("AGENTWRIT_CLIENT_SECRET", ""),
admin_secret=os.environ.get("AGENTWRIT_ADMIN_SECRET", ""),
llm_base_url=os.environ.get("LLM_BASE_URL", ""),
llm_api_key=os.environ.get("LLM_API_KEY", "EMPTY"),
llm_model=os.environ.get("LLM_MODEL", ""),
)
# Scope ceiling for the support app — registered with broker at setup time.
# Agents get subsets of this, never the full ceiling.
APP_SCOPE_CEILING: list[str] = [
"read:tickets:*",
"read:customers:*",
"write:customers:*",
"read:kb:*",
"read:billing:*",
"write:billing:*",
"write:notes:*",
"write:email:internal",
"delete:account:*",
]