A trust and safety agent that interacts with Osprey for investigation, real-time analysis, and prevention implementations
1from typing import Literal
2from pydantic_settings import BaseSettings, SettingsConfigDict
3
4
5class Config(BaseSettings):
6 # clickhouse config
7 clickhouse_host: str = "localhost"
8 """host for the clickhouse server"""
9 clickhouse_port: int = 8123
10 """port for the clickhouse server"""
11 clickhouse_user: str = "default"
12 """username for the clickhouse server"""
13 clickhouse_password: str = "clickhouse"
14 """password for the clickhouse server"""
15 clickhouse_database: str = "default"
16 """default database for the clickhouse server"""
17
18 # kafka config (currently unused but maybe later...)
19 bootstrap_server: str = "localhost:9092"
20 """bootstrap server for atkafka events"""
21 input_topic: str = "atproto-events"
22 """input topic for atkafka events"""
23 group_id: str = "osprey-agent"
24 """group id for atkafka events"""
25
26 # model config. currently only supporting anthropic, but we can add the other models later.
27 # really want to see performance on kimi2.5...
28 model_api: Literal["anthropic", "openai", "openapi"] = "anthropic"
29 """the model api to use. must be one of `anthropic`, `openai`, or `openapi`"""
30 model_name: str = "claude-sonnet-4-5-20250929"
31 """the model to use with the given api"""
32 model_api_key: str = ""
33 """the model api key"""
34 model_endpoint: str = ""
35 """for openapi model apis, the endpoint to use"""
36
37 # ozone config
38 ozone_moderator_pds_host: str = ""
39 """the PDS host for the moderator account that has at least moderator-level permissions in Ozone"""
40 ozone_moderator_identifier: str = ""
41 """the moderator account's identifier (handle)"""
42 ozone_moderator_password: str = ""
43 """the moderator account's password"""
44 ozone_labeler_account_did: str = ""
45 """the DID of the labeler account. this variable is not the same as the moderator account, though for purely-agentified ozone instances, they may be the same. not recommended, since that means you're giving the agent _admin_ permissions..."""
46 ozone_allowed_labels: str = ""
47 """comma separated list of labels that Phoebe is allowed to apply. both specified to the agent via prompting and validated before applying labels directly"""
48
49 # osprey config
50 osprey_base_url: str = ""
51 """the base url for your osprey instance"""
52 osprey_repo_url: str = "https://github.com/roostorg/osprey"
53 """the url to fetch the osprey codebase from. used for letting the agent validate written rules directly"""
54 osprey_ruleset_url: str = "https://github.com/haileyok/atproto-ruleset"
55 """the url to fetch the osprey ruleset you are running. used when validating written rules (i.e. for having the needed features available for validation)"""
56
57 model_config = SettingsConfigDict(env_file=".env")
58
59
60CONFIG = Config()