10xscale-agentflow-cli 0.3.1__tar.gz → 0.3.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/10xscale_agentflow_cli.egg-info/PKG-INFO +23 -4
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/10xscale_agentflow_cli.egg-info/SOURCES.txt +7 -2
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/10xscale_agentflow_cli.egg-info/requires.txt +6 -2
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/PKG-INFO +23 -4
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/README.md +18 -1
- 10xscale_agentflow_cli-0.3.2/agentflow.json +15 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/cli/templates/skills/agent-skills/SKILL.md +2 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/cli/templates/skills/agent-skills/references/api-configuration.md +11 -1
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/cli/templates/skills/agent-skills/references/api-settings-and-middleware.md +8 -0
- 10xscale_agentflow_cli-0.3.2/agentflow_cli/cli/templates/skills/agent-skills/references/callbacks-and-command.md +266 -0
- 10xscale_agentflow_cli-0.3.2/agentflow_cli/cli/templates/skills/agent-skills/references/rate-limiting.md +194 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/cli/templates/skills/copilot/agentflow.instructions.md +3 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/core/auth/jwt_auth.py +12 -1
- 10xscale_agentflow_cli-0.3.2/agentflow_cli/src/app/core/config/graph_config.py +248 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/core/config/setup_middleware.py +35 -1
- 10xscale_agentflow_cli-0.3.2/agentflow_cli/src/app/core/middleware/__init__.py +25 -0
- 10xscale_agentflow_cli-0.3.2/agentflow_cli/src/app/core/middleware/rate_limit/__init__.py +15 -0
- 10xscale_agentflow_cli-0.3.2/agentflow_cli/src/app/core/middleware/rate_limit/base.py +27 -0
- 10xscale_agentflow_cli-0.3.2/agentflow_cli/src/app/core/middleware/rate_limit/factory.py +98 -0
- 10xscale_agentflow_cli-0.3.2/agentflow_cli/src/app/core/middleware/rate_limit/memory.py +98 -0
- 10xscale_agentflow_cli-0.3.2/agentflow_cli/src/app/core/middleware/rate_limit/middleware.py +93 -0
- 10xscale_agentflow_cli-0.3.2/agentflow_cli/src/app/core/middleware/rate_limit/redis.py +115 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/main.py +6 -1
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/utils/media/extractor.py +1 -1
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/pyproject.toml +10 -3
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/requirements.txt +0 -2
- 10xscale_agentflow_cli-0.3.1/ActionPlan.md +0 -712
- 10xscale_agentflow_cli-0.3.1/agentflow.json +0 -6
- 10xscale_agentflow_cli-0.3.1/agentflow_cli/cli/templates/skills/agent-skills/references/callbacks-and-command.md +0 -102
- 10xscale_agentflow_cli-0.3.1/agentflow_cli/src/app/core/config/graph_config.py +0 -86
- 10xscale_agentflow_cli-0.3.1/agentflow_cli/src/app/core/middleware/__init__.py +0 -11
- 10xscale_agentflow_cli-0.3.1/plan.md +0 -190
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/10xscale_agentflow_cli.egg-info/dependency_links.txt +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/10xscale_agentflow_cli.egg-info/entry_points.txt +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/10xscale_agentflow_cli.egg-info/not-zip-safe +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/10xscale_agentflow_cli.egg-info/top_level.txt +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/MANIFEST.in +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/__init__.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/cli/__init__.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/cli/commands/__init__.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/cli/commands/api.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/cli/commands/build.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/cli/commands/init.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/cli/commands/skills.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/cli/commands/version.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/cli/constants.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/cli/core/__init__.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/cli/core/config.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/cli/core/output.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/cli/core/validation.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/cli/exceptions.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/cli/logger.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/cli/main.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/cli/templates/__init__.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/cli/templates/defaults.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/cli/templates/skills/agent-skills/references/agents-and-tools.md +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/cli/templates/skills/agent-skills/references/api-client.md +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/cli/templates/skills/agent-skills/references/architecture.md +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/cli/templates/skills/agent-skills/references/auth-and-authorization.md +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/cli/templates/skills/agent-skills/references/checkpointing-and-threads.md +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/cli/templates/skills/agent-skills/references/cli-commands.md +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/cli/templates/skills/agent-skills/references/client-auth-and-errors.md +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/cli/templates/skills/agent-skills/references/client-messages-invoke-stream.md +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/cli/templates/skills/agent-skills/references/client-threads-memory-files.md +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/cli/templates/skills/agent-skills/references/context-id-background.md +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/cli/templates/skills/agent-skills/references/dependency-injection.md +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/cli/templates/skills/agent-skills/references/id-and-thread-name-generators.md +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/cli/templates/skills/agent-skills/references/media-and-files.md +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/cli/templates/skills/agent-skills/references/memory-and-store.md +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/cli/templates/skills/agent-skills/references/prebuilt-agents-and-tools.md +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/cli/templates/skills/agent-skills/references/production-runtime.md +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/cli/templates/skills/agent-skills/references/providers-and-adapters.md +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/cli/templates/skills/agent-skills/references/publishers-and-runtime-protocols.md +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/cli/templates/skills/agent-skills/references/remote-tools.md +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/cli/templates/skills/agent-skills/references/rest-api-and-errors.md +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/cli/templates/skills/agent-skills/references/security-and-validators.md +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/cli/templates/skills/agent-skills/references/state-and-messages.md +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/cli/templates/skills/agent-skills/references/state-graph.md +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/cli/templates/skills/agent-skills/references/streaming.md +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/cli/templates/skills/agent-skills/references/testing-and-evaluation.md +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/__init__.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/__init__.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/core/__init__.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/core/auth/__init__.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/core/auth/auth_backend.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/core/auth/authorization.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/core/auth/base_auth.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/core/auth/permissions.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/core/config/__init__.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/core/config/media_settings.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/core/config/sentry_config.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/core/config/settings.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/core/config/setup_logs.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/core/config/worker_middleware.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/core/exceptions/__init__.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/core/exceptions/general_exception.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/core/exceptions/handle_errors.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/core/exceptions/resources_exceptions.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/core/exceptions/user_exception.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/core/middleware/request_limits.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/core/middleware/security_headers.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/core/utils/__init__.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/core/utils/log_sanitizer.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/loader.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/routers/__init__.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/routers/a2a.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/routers/a2ui.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/routers/checkpointer/__init__.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/routers/checkpointer/router.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/routers/checkpointer/schemas/__init__.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/routers/checkpointer/schemas/checkpointer_schemas.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/routers/checkpointer/services/__init__.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/routers/checkpointer/services/checkpointer_service.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/routers/graph/__init__.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/routers/graph/router.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/routers/graph/schemas/__init__.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/routers/graph/schemas/graph_schemas.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/routers/graph/services/__init__.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/routers/graph/services/graph_service.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/routers/graph/services/multimodal_preprocessor.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/routers/media/__init__.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/routers/media/router.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/routers/media/schemas.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/routers/ping/__init__.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/routers/ping/router.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/routers/setup_router.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/routers/store/__init__.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/routers/store/router.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/routers/store/schemas/__init__.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/routers/store/schemas/store_schemas.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/routers/store/services/__init__.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/routers/store/services/store_service.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/tasks/__init__.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/tasks/user_tasks.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/utils/__init__.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/utils/callable_helper.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/utils/media/__init__.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/utils/media/pipeline.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/utils/parse_output.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/utils/response_helper.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/utils/schemas/__init__.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/utils/schemas/output_schemas.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/utils/schemas/user_schemas.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/utils/snowflake_id_generator.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/utils/swagger_helper.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/utils/thread_name_generator.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/agentflow_cli/src/app/worker.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/graph/__init__.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/graph/react.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/graph/thread_name_generator.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/scripts/generate_docs.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/setup.cfg +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/tests/test_multimodal_sprint2_extraction.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/tests/test_sprint4_media_api.py +0 -0
- {10xscale_agentflow_cli-0.3.1 → 10xscale_agentflow_cli-0.3.2}/tests/test_utils_parse_and_callable.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: 10xscale-agentflow-cli
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.2
|
|
4
4
|
Summary: CLI and API for 10xscale AgentFlow
|
|
5
5
|
Author-email: 10xscale <contact@10xscale.ai>
|
|
6
6
|
Maintainer-email: Shudipto Trafder <shudiptotrafder@gmail.com>
|
|
@@ -31,8 +31,6 @@ Requires-Dist: pydantic-settings
|
|
|
31
31
|
Requires-Dist: uvicorn
|
|
32
32
|
Requires-Dist: typer
|
|
33
33
|
Requires-Dist: python-dotenv
|
|
34
|
-
Requires-Dist: PyJWT
|
|
35
|
-
Requires-Dist: textxtract[docx,html,md,pdf,xml]>=0.2.0
|
|
36
34
|
Provides-Extra: sentry
|
|
37
35
|
Requires-Dist: sentry-sdk>=2.10.0; extra == "sentry"
|
|
38
36
|
Provides-Extra: firebase
|
|
@@ -42,6 +40,10 @@ Provides-Extra: snowflakekit
|
|
|
42
40
|
Requires-Dist: snowflakekit; extra == "snowflakekit"
|
|
43
41
|
Provides-Extra: redis
|
|
44
42
|
Requires-Dist: redis>=5.0.7; extra == "redis"
|
|
43
|
+
Provides-Extra: jwt
|
|
44
|
+
Requires-Dist: PyJWT; extra == "jwt"
|
|
45
|
+
Provides-Extra: media
|
|
46
|
+
Requires-Dist: textxtract[docx,html,md,pdf,xml]>=0.2.0; extra == "media"
|
|
45
47
|
Provides-Extra: gcloud
|
|
46
48
|
Requires-Dist: google-cloud-logging; extra == "gcloud"
|
|
47
49
|
|
|
@@ -55,6 +57,7 @@ A professional Python API framework for building agent-based applications with F
|
|
|
55
57
|
- **[Configuration Guide](./docs/configuration.md)** - All configuration options explained
|
|
56
58
|
- **[Deployment Guide](./docs/deployment.md)** - Docker, Kubernetes, and cloud deployment
|
|
57
59
|
- **[Authentication Guide](./docs/authentication.md)** - JWT and custom authentication
|
|
60
|
+
- **[Rate Limiting Guide](./docs/rate-limiting.md)** - Memory, Redis, and custom rate-limit backends
|
|
58
61
|
- **[ID Generation Guide](./docs/id-generation.md)** - Snowflake ID generation
|
|
59
62
|
- **[Thread Name Generator Guide](./docs/thread-name-generator.md)** - Thread naming strategies
|
|
60
63
|
|
|
@@ -66,6 +69,21 @@ A professional Python API framework for building agent-based applications with F
|
|
|
66
69
|
pip install 10xscale-agentflow-cli
|
|
67
70
|
```
|
|
68
71
|
|
|
72
|
+
Redis rate limiting is optional. Install the Redis extra only when you configure
|
|
73
|
+
`rate_limit.backend` as `redis`:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
pip install "10xscale-agentflow-cli[redis]"
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
JWT auth and document text extraction are optional too. Install only the extra
|
|
80
|
+
you need:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
pip install "10xscale-agentflow-cli[jwt]"
|
|
84
|
+
pip install "10xscale-agentflow-cli[media]"
|
|
85
|
+
```
|
|
86
|
+
|
|
69
87
|
### Initialize a New Project
|
|
70
88
|
|
|
71
89
|
```bash
|
|
@@ -100,6 +118,7 @@ agentflow build --docker-compose
|
|
|
100
118
|
- ✅ **State Graph Orchestration** - Build complex agent workflows with LangGraph
|
|
101
119
|
- ✅ **FastAPI Backend** - High-performance async web framework
|
|
102
120
|
- ✅ **Authentication** - Built-in JWT auth and custom authentication support
|
|
121
|
+
- ✅ **Rate Limiting** - Sliding-window limits with memory, Redis, and custom backends
|
|
103
122
|
- ✅ **ID Generation** - Distributed Snowflake ID generation
|
|
104
123
|
- ✅ **Thread Management** - Intelligent thread naming and conversation management
|
|
105
124
|
- ✅ **Docker Ready** - Generate production-ready Docker files
|
|
@@ -221,6 +240,7 @@ The configuration file (`agentflow.json`) defines your agent, authentication, an
|
|
|
221
240
|
| `injectq` | string\|null | Path to InjectQ container |
|
|
222
241
|
| `store` | string\|null | Path to data store |
|
|
223
242
|
| `redis` | string\|null | Redis connection URL |
|
|
243
|
+
| `rate_limit` | object\|null | Sliding-window rate limiting configuration |
|
|
224
244
|
| `thread_name_generator` | string\|null | Path to custom thread name generator |
|
|
225
245
|
|
|
226
246
|
See the [Configuration Guide](./docs/configuration.md) for complete details.
|
|
@@ -591,4 +611,3 @@ Developed by [10xScale](https://10xscale.ai) and maintained by the community.
|
|
|
591
611
|
---
|
|
592
612
|
|
|
593
613
|
**Made with ❤️ for the AI agent development community**
|
|
594
|
-
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
ActionPlan.md
|
|
2
1
|
MANIFEST.in
|
|
3
2
|
README.md
|
|
4
3
|
agentflow.json
|
|
5
|
-
plan.md
|
|
6
4
|
pyproject.toml
|
|
7
5
|
requirements.txt
|
|
8
6
|
10xscale_agentflow_cli.egg-info/PKG-INFO
|
|
@@ -52,6 +50,7 @@ agentflow_cli/cli/templates/skills/agent-skills/references/prebuilt-agents-and-t
|
|
|
52
50
|
agentflow_cli/cli/templates/skills/agent-skills/references/production-runtime.md
|
|
53
51
|
agentflow_cli/cli/templates/skills/agent-skills/references/providers-and-adapters.md
|
|
54
52
|
agentflow_cli/cli/templates/skills/agent-skills/references/publishers-and-runtime-protocols.md
|
|
53
|
+
agentflow_cli/cli/templates/skills/agent-skills/references/rate-limiting.md
|
|
55
54
|
agentflow_cli/cli/templates/skills/agent-skills/references/remote-tools.md
|
|
56
55
|
agentflow_cli/cli/templates/skills/agent-skills/references/rest-api-and-errors.md
|
|
57
56
|
agentflow_cli/cli/templates/skills/agent-skills/references/security-and-validators.md
|
|
@@ -88,6 +87,12 @@ agentflow_cli/src/app/core/exceptions/user_exception.py
|
|
|
88
87
|
agentflow_cli/src/app/core/middleware/__init__.py
|
|
89
88
|
agentflow_cli/src/app/core/middleware/request_limits.py
|
|
90
89
|
agentflow_cli/src/app/core/middleware/security_headers.py
|
|
90
|
+
agentflow_cli/src/app/core/middleware/rate_limit/__init__.py
|
|
91
|
+
agentflow_cli/src/app/core/middleware/rate_limit/base.py
|
|
92
|
+
agentflow_cli/src/app/core/middleware/rate_limit/factory.py
|
|
93
|
+
agentflow_cli/src/app/core/middleware/rate_limit/memory.py
|
|
94
|
+
agentflow_cli/src/app/core/middleware/rate_limit/middleware.py
|
|
95
|
+
agentflow_cli/src/app/core/middleware/rate_limit/redis.py
|
|
91
96
|
agentflow_cli/src/app/core/utils/__init__.py
|
|
92
97
|
agentflow_cli/src/app/core/utils/log_sanitizer.py
|
|
93
98
|
agentflow_cli/src/app/routers/__init__.py
|
|
@@ -8,8 +8,6 @@ pydantic-settings
|
|
|
8
8
|
uvicorn
|
|
9
9
|
typer
|
|
10
10
|
python-dotenv
|
|
11
|
-
PyJWT
|
|
12
|
-
textxtract[docx,html,md,pdf,xml]>=0.2.0
|
|
13
11
|
|
|
14
12
|
[firebase]
|
|
15
13
|
firebase-admin>=6.5.0
|
|
@@ -18,6 +16,12 @@ oauth2client>=4.1.3
|
|
|
18
16
|
[gcloud]
|
|
19
17
|
google-cloud-logging
|
|
20
18
|
|
|
19
|
+
[jwt]
|
|
20
|
+
PyJWT
|
|
21
|
+
|
|
22
|
+
[media]
|
|
23
|
+
textxtract[docx,html,md,pdf,xml]>=0.2.0
|
|
24
|
+
|
|
21
25
|
[redis]
|
|
22
26
|
redis>=5.0.7
|
|
23
27
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: 10xscale-agentflow-cli
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.2
|
|
4
4
|
Summary: CLI and API for 10xscale AgentFlow
|
|
5
5
|
Author-email: 10xscale <contact@10xscale.ai>
|
|
6
6
|
Maintainer-email: Shudipto Trafder <shudiptotrafder@gmail.com>
|
|
@@ -31,8 +31,6 @@ Requires-Dist: pydantic-settings
|
|
|
31
31
|
Requires-Dist: uvicorn
|
|
32
32
|
Requires-Dist: typer
|
|
33
33
|
Requires-Dist: python-dotenv
|
|
34
|
-
Requires-Dist: PyJWT
|
|
35
|
-
Requires-Dist: textxtract[docx,html,md,pdf,xml]>=0.2.0
|
|
36
34
|
Provides-Extra: sentry
|
|
37
35
|
Requires-Dist: sentry-sdk>=2.10.0; extra == "sentry"
|
|
38
36
|
Provides-Extra: firebase
|
|
@@ -42,6 +40,10 @@ Provides-Extra: snowflakekit
|
|
|
42
40
|
Requires-Dist: snowflakekit; extra == "snowflakekit"
|
|
43
41
|
Provides-Extra: redis
|
|
44
42
|
Requires-Dist: redis>=5.0.7; extra == "redis"
|
|
43
|
+
Provides-Extra: jwt
|
|
44
|
+
Requires-Dist: PyJWT; extra == "jwt"
|
|
45
|
+
Provides-Extra: media
|
|
46
|
+
Requires-Dist: textxtract[docx,html,md,pdf,xml]>=0.2.0; extra == "media"
|
|
45
47
|
Provides-Extra: gcloud
|
|
46
48
|
Requires-Dist: google-cloud-logging; extra == "gcloud"
|
|
47
49
|
|
|
@@ -55,6 +57,7 @@ A professional Python API framework for building agent-based applications with F
|
|
|
55
57
|
- **[Configuration Guide](./docs/configuration.md)** - All configuration options explained
|
|
56
58
|
- **[Deployment Guide](./docs/deployment.md)** - Docker, Kubernetes, and cloud deployment
|
|
57
59
|
- **[Authentication Guide](./docs/authentication.md)** - JWT and custom authentication
|
|
60
|
+
- **[Rate Limiting Guide](./docs/rate-limiting.md)** - Memory, Redis, and custom rate-limit backends
|
|
58
61
|
- **[ID Generation Guide](./docs/id-generation.md)** - Snowflake ID generation
|
|
59
62
|
- **[Thread Name Generator Guide](./docs/thread-name-generator.md)** - Thread naming strategies
|
|
60
63
|
|
|
@@ -66,6 +69,21 @@ A professional Python API framework for building agent-based applications with F
|
|
|
66
69
|
pip install 10xscale-agentflow-cli
|
|
67
70
|
```
|
|
68
71
|
|
|
72
|
+
Redis rate limiting is optional. Install the Redis extra only when you configure
|
|
73
|
+
`rate_limit.backend` as `redis`:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
pip install "10xscale-agentflow-cli[redis]"
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
JWT auth and document text extraction are optional too. Install only the extra
|
|
80
|
+
you need:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
pip install "10xscale-agentflow-cli[jwt]"
|
|
84
|
+
pip install "10xscale-agentflow-cli[media]"
|
|
85
|
+
```
|
|
86
|
+
|
|
69
87
|
### Initialize a New Project
|
|
70
88
|
|
|
71
89
|
```bash
|
|
@@ -100,6 +118,7 @@ agentflow build --docker-compose
|
|
|
100
118
|
- ✅ **State Graph Orchestration** - Build complex agent workflows with LangGraph
|
|
101
119
|
- ✅ **FastAPI Backend** - High-performance async web framework
|
|
102
120
|
- ✅ **Authentication** - Built-in JWT auth and custom authentication support
|
|
121
|
+
- ✅ **Rate Limiting** - Sliding-window limits with memory, Redis, and custom backends
|
|
103
122
|
- ✅ **ID Generation** - Distributed Snowflake ID generation
|
|
104
123
|
- ✅ **Thread Management** - Intelligent thread naming and conversation management
|
|
105
124
|
- ✅ **Docker Ready** - Generate production-ready Docker files
|
|
@@ -221,6 +240,7 @@ The configuration file (`agentflow.json`) defines your agent, authentication, an
|
|
|
221
240
|
| `injectq` | string\|null | Path to InjectQ container |
|
|
222
241
|
| `store` | string\|null | Path to data store |
|
|
223
242
|
| `redis` | string\|null | Redis connection URL |
|
|
243
|
+
| `rate_limit` | object\|null | Sliding-window rate limiting configuration |
|
|
224
244
|
| `thread_name_generator` | string\|null | Path to custom thread name generator |
|
|
225
245
|
|
|
226
246
|
See the [Configuration Guide](./docs/configuration.md) for complete details.
|
|
@@ -591,4 +611,3 @@ Developed by [10xScale](https://10xscale.ai) and maintained by the community.
|
|
|
591
611
|
---
|
|
592
612
|
|
|
593
613
|
**Made with ❤️ for the AI agent development community**
|
|
594
|
-
|
|
@@ -8,6 +8,7 @@ A professional Python API framework for building agent-based applications with F
|
|
|
8
8
|
- **[Configuration Guide](./docs/configuration.md)** - All configuration options explained
|
|
9
9
|
- **[Deployment Guide](./docs/deployment.md)** - Docker, Kubernetes, and cloud deployment
|
|
10
10
|
- **[Authentication Guide](./docs/authentication.md)** - JWT and custom authentication
|
|
11
|
+
- **[Rate Limiting Guide](./docs/rate-limiting.md)** - Memory, Redis, and custom rate-limit backends
|
|
11
12
|
- **[ID Generation Guide](./docs/id-generation.md)** - Snowflake ID generation
|
|
12
13
|
- **[Thread Name Generator Guide](./docs/thread-name-generator.md)** - Thread naming strategies
|
|
13
14
|
|
|
@@ -19,6 +20,21 @@ A professional Python API framework for building agent-based applications with F
|
|
|
19
20
|
pip install 10xscale-agentflow-cli
|
|
20
21
|
```
|
|
21
22
|
|
|
23
|
+
Redis rate limiting is optional. Install the Redis extra only when you configure
|
|
24
|
+
`rate_limit.backend` as `redis`:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
pip install "10xscale-agentflow-cli[redis]"
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
JWT auth and document text extraction are optional too. Install only the extra
|
|
31
|
+
you need:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
pip install "10xscale-agentflow-cli[jwt]"
|
|
35
|
+
pip install "10xscale-agentflow-cli[media]"
|
|
36
|
+
```
|
|
37
|
+
|
|
22
38
|
### Initialize a New Project
|
|
23
39
|
|
|
24
40
|
```bash
|
|
@@ -53,6 +69,7 @@ agentflow build --docker-compose
|
|
|
53
69
|
- ✅ **State Graph Orchestration** - Build complex agent workflows with LangGraph
|
|
54
70
|
- ✅ **FastAPI Backend** - High-performance async web framework
|
|
55
71
|
- ✅ **Authentication** - Built-in JWT auth and custom authentication support
|
|
72
|
+
- ✅ **Rate Limiting** - Sliding-window limits with memory, Redis, and custom backends
|
|
56
73
|
- ✅ **ID Generation** - Distributed Snowflake ID generation
|
|
57
74
|
- ✅ **Thread Management** - Intelligent thread naming and conversation management
|
|
58
75
|
- ✅ **Docker Ready** - Generate production-ready Docker files
|
|
@@ -174,6 +191,7 @@ The configuration file (`agentflow.json`) defines your agent, authentication, an
|
|
|
174
191
|
| `injectq` | string\|null | Path to InjectQ container |
|
|
175
192
|
| `store` | string\|null | Path to data store |
|
|
176
193
|
| `redis` | string\|null | Redis connection URL |
|
|
194
|
+
| `rate_limit` | object\|null | Sliding-window rate limiting configuration |
|
|
177
195
|
| `thread_name_generator` | string\|null | Path to custom thread name generator |
|
|
178
196
|
|
|
179
197
|
See the [Configuration Guide](./docs/configuration.md) for complete details.
|
|
@@ -544,4 +562,3 @@ Developed by [10xScale](https://10xscale.ai) and maintained by the community.
|
|
|
544
562
|
---
|
|
545
563
|
|
|
546
564
|
**Made with ❤️ for the AI agent development community**
|
|
547
|
-
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"agent": "graph.react:app",
|
|
3
|
+
"thread_name_generator": "graph.thread_name_generator:MyNameGenerator",
|
|
4
|
+
"env": ".env",
|
|
5
|
+
"auth": null,
|
|
6
|
+
"rate_limit": {
|
|
7
|
+
"enabled": true,
|
|
8
|
+
"backend": "memory",
|
|
9
|
+
"requests": 100,
|
|
10
|
+
"window": 60,
|
|
11
|
+
"by": "ip",
|
|
12
|
+
"trusted_proxy_headers": false,
|
|
13
|
+
"exclude_paths": ["/health", "/docs", "/redoc", "/openapi.json"]
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -26,6 +26,7 @@ metadata:
|
|
|
26
26
|
- references/api-configuration.md
|
|
27
27
|
- references/auth-and-authorization.md
|
|
28
28
|
- references/api-settings-and-middleware.md
|
|
29
|
+
- references/rate-limiting.md
|
|
29
30
|
- references/rest-api-and-errors.md
|
|
30
31
|
- references/id-and-thread-name-generators.md
|
|
31
32
|
- references/client-auth-and-errors.md
|
|
@@ -78,6 +79,7 @@ Treat `agentflow-docs/docs` as the first source of truth for public package name
|
|
|
78
79
|
- `agentflow.json` and dependency loading: `references/api-configuration.md`
|
|
79
80
|
- API auth and authorization: `references/auth-and-authorization.md`
|
|
80
81
|
- API environment, settings, and middleware: `references/api-settings-and-middleware.md`
|
|
82
|
+
- Rate limiting (config, backends, headers, custom backend): `references/rate-limiting.md`
|
|
81
83
|
- REST routes and error behavior: `references/rest-api-and-errors.md`
|
|
82
84
|
- API Snowflake IDs and thread naming: `references/id-and-thread-name-generators.md`
|
|
83
85
|
- TypeScript auth helpers and structured errors: `references/client-auth-and-errors.md`
|
|
@@ -23,7 +23,15 @@ Common full shape:
|
|
|
23
23
|
"thread_name_generator": "graph.thread_name_generator:MyNameGenerator",
|
|
24
24
|
"authorization": "graph.auth:my_authorization_backend",
|
|
25
25
|
"env": ".env",
|
|
26
|
-
"auth": "jwt"
|
|
26
|
+
"auth": "jwt",
|
|
27
|
+
"rate_limit": {
|
|
28
|
+
"enabled": true,
|
|
29
|
+
"backend": "memory",
|
|
30
|
+
"requests": 100,
|
|
31
|
+
"window": 60,
|
|
32
|
+
"by": "ip",
|
|
33
|
+
"exclude_paths": ["/health", "/docs", "/redoc", "/openapi.json"]
|
|
34
|
+
}
|
|
27
35
|
}
|
|
28
36
|
```
|
|
29
37
|
|
|
@@ -37,6 +45,7 @@ Common full shape:
|
|
|
37
45
|
- `authorization`: optional import path to an authorization backend.
|
|
38
46
|
- `env`: optional `.env` path loaded before graph import.
|
|
39
47
|
- `auth`: `null`, `"jwt"`, or `{"method": "custom", "path": "module:backend"}`.
|
|
48
|
+
- `rate_limit`: optional sliding-window rate limiter config object; omit or set to `null` to disable. See `references/rate-limiting.md` for the full field reference.
|
|
40
49
|
|
|
41
50
|
## Loading Order
|
|
42
51
|
|
|
@@ -62,3 +71,4 @@ Common full shape:
|
|
|
62
71
|
- App startup: `agentflow-api/agentflow_cli/src/app/main.py`
|
|
63
72
|
- Main docs: `agentflow-docs/docs/reference/api-cli/configuration.md`
|
|
64
73
|
- How-to: `agentflow-docs/docs/how-to/api-cli/configure-agentflow-json.md`
|
|
74
|
+
- Rate limit config details: `references/rate-limiting.md`
|
|
@@ -48,6 +48,11 @@ Active middleware areas:
|
|
|
48
48
|
- Request ID assignment.
|
|
49
49
|
- Selective gzip behavior; streaming endpoints should avoid gzip buffering when configured.
|
|
50
50
|
- Worker middleware where used by deployment.
|
|
51
|
+
- Rate limiting: sliding-window limiter controlled by the `rate_limit` block in `agentflow.json`.
|
|
52
|
+
Uses an in-process `memory` backend by default; use the `redis` backend (requires
|
|
53
|
+
`pip install "10xscale-agentflow-cli[redis]"`) for multi-worker or multi-instance deployments.
|
|
54
|
+
Excluded paths, identity mode (`ip` or `global`), and `fail_open` behavior are all configurable.
|
|
55
|
+
See `references/rate-limiting.md` for the full option reference.
|
|
51
56
|
|
|
52
57
|
## Production Warnings
|
|
53
58
|
|
|
@@ -76,7 +81,10 @@ Production mode warns about unsafe defaults such as:
|
|
|
76
81
|
- Middleware setup: `agentflow-api/agentflow_cli/src/app/core/config/setup_middleware.py`
|
|
77
82
|
- Request limits: `agentflow-api/agentflow_cli/src/app/core/middleware/request_limits.py`
|
|
78
83
|
- Security headers: `agentflow-api/agentflow_cli/src/app/core/middleware/security_headers.py`
|
|
84
|
+
- Rate limit middleware: `agentflow-api/agentflow_cli/src/app/core/middleware/rate_limit/`
|
|
85
|
+
- Rate limit base class: `agentflow-api/agentflow_cli/src/app/core/middleware/rate_limit/base.py`
|
|
79
86
|
- Sentry: `agentflow-api/agentflow_cli/src/app/core/config/sentry_config.py`
|
|
80
87
|
- Log sanitizer: `agentflow-api/agentflow_cli/src/app/core/utils/log_sanitizer.py`
|
|
81
88
|
- Main docs: `agentflow-docs/docs/reference/api-cli/environment.md`
|
|
82
89
|
- Production docs: `agentflow-docs/docs/how-to/production/environment-variables.md`
|
|
90
|
+
- Rate limiting docs: `agentflow-api/docs/rate-limiting.md`
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
# Callbacks and Command
|
|
2
|
+
|
|
3
|
+
Use this when adding validation, tracing, invocation hooks, error recovery, or runtime graph jumps.
|
|
4
|
+
|
|
5
|
+
## CallbackManager
|
|
6
|
+
|
|
7
|
+
`CallbackManager` registers hooks around AI, tool, MCP, input validation, and skill invocations.
|
|
8
|
+
|
|
9
|
+
Invocation types:
|
|
10
|
+
|
|
11
|
+
- `InvocationType.AI`
|
|
12
|
+
- `InvocationType.TOOL`
|
|
13
|
+
- `InvocationType.MCP`
|
|
14
|
+
- `InvocationType.INPUT_VALIDATION`
|
|
15
|
+
- `InvocationType.SKILL`
|
|
16
|
+
|
|
17
|
+
Hook families:
|
|
18
|
+
|
|
19
|
+
- `register_before_invoke(invocation_type, callback)`: validate or transform input before invocation.
|
|
20
|
+
- `register_after_invoke(invocation_type, callback)`: inspect or transform output after invocation.
|
|
21
|
+
- `register_on_error(invocation_type, callback)`: log, recover, or return a recovery `Message`.
|
|
22
|
+
- `register_input_validator(validator)`: add a `BaseValidator` that validates incoming messages.
|
|
23
|
+
|
|
24
|
+
Callbacks can be callable objects or functions and may be sync or async. Error callbacks should return a `Message` recovery value or `None`.
|
|
25
|
+
|
|
26
|
+
## Validators
|
|
27
|
+
|
|
28
|
+
Use `BaseValidator` for input validation. Implement:
|
|
29
|
+
|
|
30
|
+
```python
|
|
31
|
+
async def validate(self, messages: list[Message]) -> bool:
|
|
32
|
+
...
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Register validators on a `CallbackManager`, then pass it to graph compilation:
|
|
36
|
+
|
|
37
|
+
```python
|
|
38
|
+
callback_manager = CallbackManager()
|
|
39
|
+
callback_manager.register_input_validator(MyValidator())
|
|
40
|
+
|
|
41
|
+
app = graph.compile(callback_manager=callback_manager)
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Use validators for safety checks, business rules, input policy, and prompt-injection detection.
|
|
45
|
+
|
|
46
|
+
## Graph Lifecycle Hooks
|
|
47
|
+
|
|
48
|
+
Graph lifecycle hooks fire at **graph orchestration level** — before/after the entire graph run, on checkpoints, on interrupts, on resume, and after each node transition. They complement the invocation-level hooks above (`before_invoke` / `after_invoke` / `on_error`), which fire inside a single node's AI/Tool/MCP call.
|
|
49
|
+
|
|
50
|
+
### GraphLifecycleContext
|
|
51
|
+
|
|
52
|
+
All 7 hooks receive this as their first argument. It provides run-identifying metadata.
|
|
53
|
+
|
|
54
|
+
```python
|
|
55
|
+
@dataclass
|
|
56
|
+
class GraphLifecycleContext:
|
|
57
|
+
config: dict[str, Any] # full config dict passed to invoke/stream
|
|
58
|
+
timestamp: str # ISO8601 start time from config["timestamp"]
|
|
59
|
+
metadata: dict[str, Any] | None = None # open-ended extra context
|
|
60
|
+
|
|
61
|
+
@property
|
|
62
|
+
def thread_id(self) -> str | None: ...
|
|
63
|
+
|
|
64
|
+
@property
|
|
65
|
+
def run_id(self) -> str | None: ...
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### GraphLifecycleHook
|
|
69
|
+
|
|
70
|
+
Subclass `GraphLifecycleHook` and override only the methods you need. All methods are async and default to no-ops.
|
|
71
|
+
|
|
72
|
+
```python
|
|
73
|
+
from agentflow.utils.callbacks import GraphLifecycleHook, GraphLifecycleContext, CallbackManager
|
|
74
|
+
from agentflow.core.state import AgentState
|
|
75
|
+
from agentflow.core.state.message import Message
|
|
76
|
+
|
|
77
|
+
class GraphLifecycleHook(ABC):
|
|
78
|
+
async def on_graph_start(
|
|
79
|
+
self, context: GraphLifecycleContext, state: AgentState
|
|
80
|
+
) -> AgentState | None: ...
|
|
81
|
+
# Fires: after state is loaded, before the first node executes.
|
|
82
|
+
# Return modified AgentState to replace the initial state, or None.
|
|
83
|
+
|
|
84
|
+
async def on_graph_end(
|
|
85
|
+
self, context: GraphLifecycleContext, final_state: AgentState,
|
|
86
|
+
messages: list[Message], total_steps: int
|
|
87
|
+
) -> AgentState | None: ...
|
|
88
|
+
# Fires: after execution loop completes, before final persistence.
|
|
89
|
+
# Return modified AgentState or None.
|
|
90
|
+
|
|
91
|
+
async def on_graph_error(
|
|
92
|
+
self, context: GraphLifecycleContext, error: Exception,
|
|
93
|
+
partial_state: AgentState, messages: list[Message], step: int, node_name: str
|
|
94
|
+
) -> tuple[AgentState, str] | None: ...
|
|
95
|
+
# Fires: when an unhandled exception escapes the graph loop.
|
|
96
|
+
# Return (AgentState, error_message) to change persisted error snapshot, or None.
|
|
97
|
+
# Cannot suppress the error — always re-raised after this hook.
|
|
98
|
+
|
|
99
|
+
async def on_interrupt(
|
|
100
|
+
self, context: GraphLifecycleContext, interrupted_node: str,
|
|
101
|
+
interrupt_type: str, # "before" | "after" | "stop" | "remote_tool"
|
|
102
|
+
state: AgentState
|
|
103
|
+
) -> AgentState | None: ...
|
|
104
|
+
# Fires: before interrupt state is persisted (covers before/after/stop/remote_tool types).
|
|
105
|
+
# Return modified AgentState or None.
|
|
106
|
+
|
|
107
|
+
async def on_resume(
|
|
108
|
+
self, context: GraphLifecycleContext, resumed_node: str,
|
|
109
|
+
state: AgentState, resume_data: dict[str, Any]
|
|
110
|
+
) -> AgentState | None: ...
|
|
111
|
+
# Fires: when a paused graph is resumed, before clear_interrupt().
|
|
112
|
+
# resume_data is mutable in-place. Return modified AgentState or None.
|
|
113
|
+
|
|
114
|
+
async def on_checkpoint(
|
|
115
|
+
self, context: GraphLifecycleContext, state: AgentState,
|
|
116
|
+
messages: list[Message], is_context_trimmed: bool
|
|
117
|
+
) -> tuple[AgentState, list[Message]] | AgentState | None: ...
|
|
118
|
+
# Fires: immediately before state/messages are persisted (every checkpoint, not just final).
|
|
119
|
+
# Return (AgentState, messages), AgentState, or None.
|
|
120
|
+
|
|
121
|
+
async def on_state_update(
|
|
122
|
+
self, context: GraphLifecycleContext, node_name: str,
|
|
123
|
+
old_state: AgentState, new_state: AgentState, step: int
|
|
124
|
+
) -> AgentState | None: ...
|
|
125
|
+
# Fires: after each node produces a result and state is merged.
|
|
126
|
+
# Return modified AgentState or None.
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Registration
|
|
130
|
+
|
|
131
|
+
```python
|
|
132
|
+
callback_mgr = CallbackManager()
|
|
133
|
+
callback_mgr.register_lifecycle_hook(MyHook())
|
|
134
|
+
|
|
135
|
+
# Combine with existing invocation-level hooks on the same manager:
|
|
136
|
+
callback_mgr.register_after_invoke(InvocationType.AI, my_ai_callback)
|
|
137
|
+
|
|
138
|
+
app = graph.compile(callback_manager=callback_mgr)
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### Hook Summary
|
|
142
|
+
|
|
143
|
+
| Hook | Returns | Fires N times | Fire location |
|
|
144
|
+
|---|---|---|---|
|
|
145
|
+
| `on_graph_start` | `AgentState \| None` | 1 per run | After state load, before loop |
|
|
146
|
+
| `on_graph_end` | `AgentState \| None` | 1 per successful run | After `state.complete()`, before final `sync_data()` |
|
|
147
|
+
| `on_graph_error` | `tuple[AgentState, str] \| None` | 1 per failed run | In except block, before error `sync_data()` |
|
|
148
|
+
| `on_interrupt` | `AgentState \| None` | 0–N per run | Before interrupt checkpoint persistence |
|
|
149
|
+
| `on_resume` | `AgentState \| None` | 0–1 per call | Before `clear_interrupt()` |
|
|
150
|
+
| `on_checkpoint` | `(AgentState, list[Message]) \| AgentState \| None` | 1–N per run | Before every durable checkpoint write |
|
|
151
|
+
| `on_state_update` | `AgentState \| None` | N per run (once per node) | After each node result is merged |
|
|
152
|
+
|
|
153
|
+
### Example
|
|
154
|
+
|
|
155
|
+
```python
|
|
156
|
+
class ObservabilityHook(GraphLifecycleHook):
|
|
157
|
+
async def on_graph_start(self, ctx, state):
|
|
158
|
+
self._span = tracer.start_span(f"graph.run.{ctx.thread_id}")
|
|
159
|
+
return None
|
|
160
|
+
|
|
161
|
+
async def on_graph_end(self, ctx, final_state, messages, total_steps):
|
|
162
|
+
self._span.set_attribute("steps", total_steps)
|
|
163
|
+
self._span.end()
|
|
164
|
+
|
|
165
|
+
async def on_graph_error(self, ctx, error, partial_state, messages, step, node_name):
|
|
166
|
+
self._span.record_exception(error)
|
|
167
|
+
self._span.end()
|
|
168
|
+
alert_oncall(f"Graph failed at node {node_name}: {error}")
|
|
169
|
+
return None
|
|
170
|
+
|
|
171
|
+
async def on_interrupt(self, ctx, interrupted_node, interrupt_type, state):
|
|
172
|
+
notify_frontend(ctx.thread_id, status="waiting_for_input", node=interrupted_node)
|
|
173
|
+
return None
|
|
174
|
+
|
|
175
|
+
async def on_resume(self, ctx, resumed_node, state, resume_data):
|
|
176
|
+
notify_frontend(ctx.thread_id, status="resuming", node=resumed_node)
|
|
177
|
+
return None
|
|
178
|
+
|
|
179
|
+
async def on_checkpoint(self, ctx, state, messages, is_context_trimmed):
|
|
180
|
+
metrics.increment("agentflow.checkpoints", tags={"thread": ctx.thread_id})
|
|
181
|
+
return None
|
|
182
|
+
|
|
183
|
+
async def on_state_update(self, ctx, node_name, old_state, new_state, step):
|
|
184
|
+
diff = compute_diff(old_state, new_state)
|
|
185
|
+
stream_diff_to_frontend(ctx.thread_id, diff)
|
|
186
|
+
return None
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
callback_mgr = CallbackManager()
|
|
190
|
+
callback_mgr.register_lifecycle_hook(ObservabilityHook())
|
|
191
|
+
app = graph.compile(callback_manager=callback_mgr)
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### Common Use Cases by Hook
|
|
195
|
+
|
|
196
|
+
- **`on_graph_start`**: inject trace IDs, pre-populate state from external DB, set rate-limit budgets, initialize OpenTelemetry spans.
|
|
197
|
+
- **`on_graph_end`**: send completion notifications (Slack/email), record step/message count metrics, archive transcripts, trigger downstream webhooks.
|
|
198
|
+
- **`on_graph_error`**: alert PagerDuty/Sentry, log structured failure diagnostics, close OTel spans with error status.
|
|
199
|
+
- **`on_interrupt`**: push "waiting for approval" notifications to frontend/mobile, start timeout timers, update task queue status.
|
|
200
|
+
- **`on_resume`**: cancel timeout timers, validate resume payload, record interrupt→resume cycle for audit trail.
|
|
201
|
+
- **`on_checkpoint`**: redact sensitive data before persistence, replicate to secondary store, invalidate caches, compliance audit logging (SOC2/HIPAA).
|
|
202
|
+
- **`on_state_update`**: real-time state diffing for frontend streaming, per-node invariant assertions, security scanning of state content.
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## Command
|
|
207
|
+
|
|
208
|
+
`Command` lets a node combine state/message updates with control flow. Use it when the next node depends on runtime logic inside the node and is awkward to express as a static conditional edge.
|
|
209
|
+
|
|
210
|
+
Fields:
|
|
211
|
+
|
|
212
|
+
- `update`: state update, `Message`, string, converter, or `None`.
|
|
213
|
+
- `goto`: next node name or `END`.
|
|
214
|
+
- `graph`: optional graph target; `Command.PARENT` is reserved for parent graph navigation patterns.
|
|
215
|
+
- `state`: optional attached state.
|
|
216
|
+
|
|
217
|
+
Prefer conditional edges for normal routing because they are easier to visualize and test. Use `Command(goto=...)` for dynamic jumps, recovery branches, handoffs, or side-effect-dependent routing.
|
|
218
|
+
|
|
219
|
+
## Patterns
|
|
220
|
+
|
|
221
|
+
Callback for tracing:
|
|
222
|
+
|
|
223
|
+
```python
|
|
224
|
+
from agentflow.utils.callbacks import CallbackContext, CallbackManager, InvocationType
|
|
225
|
+
|
|
226
|
+
async def trace_after(context: CallbackContext, input_data, output_data):
|
|
227
|
+
print(context.invocation_type, context.node_name)
|
|
228
|
+
return output_data
|
|
229
|
+
|
|
230
|
+
callback_manager = CallbackManager()
|
|
231
|
+
callback_manager.register_after_invoke(InvocationType.TOOL, trace_after)
|
|
232
|
+
app = graph.compile(callback_manager=callback_manager)
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
Command for dynamic routing:
|
|
236
|
+
|
|
237
|
+
```python
|
|
238
|
+
from agentflow.utils import Command, END
|
|
239
|
+
|
|
240
|
+
def router_node(state, config):
|
|
241
|
+
if state.context[-1].text() == "stop":
|
|
242
|
+
return Command(goto=END)
|
|
243
|
+
return Command(update={"route": "repair"}, goto="REPAIR")
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
## Rules
|
|
247
|
+
|
|
248
|
+
- Keep callback side effects bounded; they run inside graph execution paths.
|
|
249
|
+
- Avoid storing per-request mutable state globally inside callbacks.
|
|
250
|
+
- Use `CallbackContext` metadata to distinguish node/function/invocation details.
|
|
251
|
+
- Return transformed data from callbacks only when the downstream invocation expects that shape.
|
|
252
|
+
- Use `Command` sparingly; static and conditional edges remain the default graph structure.
|
|
253
|
+
- Always test command routes for recursion limits and missing destination nodes.
|
|
254
|
+
|
|
255
|
+
## Source Map
|
|
256
|
+
|
|
257
|
+
- Callback system (invocation hooks + graph lifecycle hooks): `agentflow/agentflow/utils/callbacks.py`
|
|
258
|
+
- Default validators: `agentflow/agentflow/utils/validators.py`
|
|
259
|
+
- Graph compile callback argument: `agentflow/agentflow/core/graph/state_graph.py`
|
|
260
|
+
- Command API: `agentflow/agentflow/utils/command.py`
|
|
261
|
+
- Command execution paths: `agentflow/agentflow/core/graph/compiled_graph.py`
|
|
262
|
+
- Lifecycle hook fire points — invoke path: `agentflow/agentflow/core/graph/utils/invoke_handler.py`
|
|
263
|
+
- Lifecycle hook fire points — stream path: `agentflow/agentflow/core/graph/utils/stream_handler.py`
|
|
264
|
+
- Lifecycle hook fire points — interrupt/resume: `agentflow/agentflow/core/graph/utils/heandler_utils.py`
|
|
265
|
+
- Lifecycle hook fire points — checkpoint: `agentflow/agentflow/core/graph/utils/utils.py`
|
|
266
|
+
- Legacy docs: `agentflow-docs/docs-mkdocs-legacy/reference/library/Command.md`
|