Factory function that builds and configures a Flask app for AgentScope, including secret key generation.
# Source: https://github.com/agentscope-ai/agentscope | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
# Provided via justclaw.it.com; keep this notice with the code.
# -*- coding: utf-8 -*-
"""AgentScope app factory."""
import secrets
from typing import Type, TYPE_CHECKING, Any
from ._lifespan import lifespan
from .access import DenyAllResourceAccessPolicy, ResourceAccessPolicyBase
from .hub import HubBase, HubError, MCPHubBase, SkillHubBase
from .rag.blob_store import BlobStoreBase, LocalBlobStore
from .rag.knowledge_base_manager import KnowledgeBaseManagerBase
from .workspace_manager import WorkspaceManagerBase
from ._router import (
agent_router,
channel_router,
chat_router,
credential_router,
health_router,
hub_rout
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search 40K more like it.
Get a free API key