10xgraph-api 0.7.0__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.
- 10xgraph_api-0.7.0/10xgraph.json +16 -0
- 10xgraph_api-0.7.0/10xgraph_api.egg-info/PKG-INFO +618 -0
- 10xgraph_api-0.7.0/10xgraph_api.egg-info/SOURCES.txt +218 -0
- 10xgraph_api-0.7.0/10xgraph_api.egg-info/dependency_links.txt +1 -0
- 10xgraph_api-0.7.0/10xgraph_api.egg-info/entry_points.txt +3 -0
- 10xgraph_api-0.7.0/10xgraph_api.egg-info/not-zip-safe +1 -0
- 10xgraph_api-0.7.0/10xgraph_api.egg-info/requires.txt +44 -0
- 10xgraph_api-0.7.0/10xgraph_api.egg-info/top_level.txt +2 -0
- 10xgraph_api-0.7.0/CHANGELOG.md +357 -0
- 10xgraph_api-0.7.0/CODE_OF_CONDUCT.md +122 -0
- 10xgraph_api-0.7.0/CONTRIBUTING.md +109 -0
- 10xgraph_api-0.7.0/LICENSE +21 -0
- 10xgraph_api-0.7.0/MANIFEST.in +23 -0
- 10xgraph_api-0.7.0/PKG-INFO +618 -0
- 10xgraph_api-0.7.0/README.md +556 -0
- 10xgraph_api-0.7.0/RELEASE_NOTES.md +51 -0
- 10xgraph_api-0.7.0/SECURITY.md +75 -0
- 10xgraph_api-0.7.0/agentflow_cli/__init__.py +69 -0
- 10xgraph_api-0.7.0/pyproject.toml +390 -0
- 10xgraph_api-0.7.0/setup.cfg +4 -0
- 10xgraph_api-0.7.0/tenxgraph_api/__init__.py +23 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/__init__.py +6 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/capabilities.py +127 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/commands/__init__.py +49 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/commands/api.py +262 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/commands/audit.py +213 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/commands/build.py +305 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/commands/config.py +71 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/commands/demo.py +93 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/commands/eval.py +909 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/commands/init.py +531 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/commands/skills.py +532 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/commands/test.py +113 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/commands/version.py +47 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/config_editor/__init__.py +15 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/config_editor/schema.py +566 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/config_editor/server.py +240 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/config_editor/static/app.css +2 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/config_editor/static/app.js +3 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/config_editor/static/favicon.svg +11 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/config_editor/static/index.html +20 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/config_editor/store.py +120 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/config_editor/validation.py +377 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/constants.py +112 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/context.py +46 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/core/__init__.py +0 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/core/animations.py +550 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/core/config.py +279 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/core/output.py +625 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/core/prompts.py +220 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/core/screen.py +287 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/core/steps.py +621 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/core/theme.py +242 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/core/validation.py +251 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/exceptions.py +129 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/logger.py +84 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/main.py +936 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/__init__.py +0 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/defaults.py +844 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/dev/.env.example +1 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/dev/10xgraph.json +16 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/dev/graph/__init__.py +0 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/dev/graph/agent.py +63 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/prod/.env.example +75 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/prod/.pre-commit-config.yaml +50 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/prod/.python-version +1 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/prod/10xgraph.json +42 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/prod/auth/__init__.py +0 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/prod/auth/agent_auth.py +46 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/prod/evals/__init__.py +0 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/prod/evals/user_simulator_eval.py +76 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/prod/evals/weather_agents_eval.py +53 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/prod/graph/__init__.py +0 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/prod/graph/agent.py +50 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/prod/graph/state.py +5 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/prod/graph/thread_name_generator.py +7 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/prod/graph/tools/__init__.py +0 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/prod/graph/tools/weather_tool.py +43 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/prod/graph/validators/__init__.py +0 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/prod/graph/validators/lifecyle.py +107 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/prod/graph/validators/manager.py +9 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/prod/graph/validators/validators.py +21 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/prod/pyproject.toml +79 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/prod/tests/__init__.py +0 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/prod/tests/conftest.py +6 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/prod/tests/test_agent_eval.py +78 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/prod/tests/test_catalog_tools.py +47 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/prod/tests/test_graph_nodes.py +57 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/skills/10xgraph/SKILL.md +92 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/skills/10xgraph/references/agents-and-tools.md +389 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/skills/10xgraph/references/api-client.md +61 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/skills/10xgraph/references/api-configuration.md +75 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/skills/10xgraph/references/api-settings-and-middleware.md +89 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/skills/10xgraph/references/architecture.md +91 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/skills/10xgraph/references/auth-and-authorization.md +149 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/skills/10xgraph/references/callbacks-and-command.md +283 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/skills/10xgraph/references/checkpointing-and-threads.md +63 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/skills/10xgraph/references/cli-commands.md +73 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/skills/10xgraph/references/client-auth-and-errors.md +94 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/skills/10xgraph/references/client-messages-invoke-stream.md +115 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/skills/10xgraph/references/client-threads-memory-files.md +80 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/skills/10xgraph/references/context-id-background.md +80 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/skills/10xgraph/references/dependency-injection.md +58 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/skills/10xgraph/references/evaluation.md +500 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/skills/10xgraph/references/id-and-thread-name-generators.md +69 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/skills/10xgraph/references/media-and-files.md +66 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/skills/10xgraph/references/memory-and-store.md +70 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/skills/10xgraph/references/prebuilt-agents-and-tools.md +394 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/skills/10xgraph/references/production-runtime.md +56 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/skills/10xgraph/references/providers-and-adapters.md +89 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/skills/10xgraph/references/publishers-and-runtime-protocols.md +84 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/skills/10xgraph/references/rate-limiting.md +194 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/skills/10xgraph/references/realtime.md +172 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/skills/10xgraph/references/remote-tools.md +55 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/skills/10xgraph/references/rest-api-and-errors.md +97 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/skills/10xgraph/references/security-and-validators.md +86 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/skills/10xgraph/references/state-and-messages.md +68 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/skills/10xgraph/references/state-graph.md +232 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/skills/10xgraph/references/stream-emitter.md +144 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/skills/10xgraph/references/streaming.md +53 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/skills/10xgraph/references/testing-and-evaluation.md +64 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/skills/10xgraph/references/unit-testing.md +202 -0
- 10xgraph_api-0.7.0/tenxgraph_api/cli/templates/skills/copilot/10xgraph.instructions.md +108 -0
- 10xgraph_api-0.7.0/tenxgraph_api/py.typed +0 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/__init__.py +0 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/__init__.py +13 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/core/__init__.py +15 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/core/auth/__init__.py +0 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/core/auth/auth_backend.py +38 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/core/auth/authorization.py +379 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/core/auth/base_auth.py +27 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/core/auth/jwt_auth.py +122 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/core/auth/ownership_resolver.py +170 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/core/auth/permissions.py +354 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/core/auth/request_config.py +130 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/core/auth/route_guard.py +105 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/core/config/__init__.py +0 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/core/config/graph_config.py +532 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/core/config/media_settings.py +72 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/core/config/sentry_config.py +60 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/core/config/settings.py +202 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/core/config/setup_logs.py +65 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/core/config/setup_middleware.py +483 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/core/config/worker_middleware.py +99 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/core/exceptions/__init__.py +17 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/core/exceptions/general_exception.py +58 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/core/exceptions/handle_errors.py +363 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/core/exceptions/resources_exceptions.py +72 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/core/exceptions/user_exception.py +58 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/core/middleware/__init__.py +25 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/core/middleware/rate_limit/__init__.py +15 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/core/middleware/rate_limit/base.py +27 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/core/middleware/rate_limit/factory.py +98 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/core/middleware/rate_limit/keying.py +133 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/core/middleware/rate_limit/memory.py +98 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/core/middleware/rate_limit/middleware.py +90 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/core/middleware/rate_limit/redis.py +115 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/core/middleware/request_limits.py +154 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/core/middleware/security_headers.py +239 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/core/utils/__init__.py +14 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/core/utils/log_sanitizer.py +216 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/loader.py +516 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/main.py +180 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/routers/__init__.py +4 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/routers/ag_ui/__init__.py +10 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/routers/ag_ui/converter.py +195 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/routers/ag_ui/event_mapper.py +353 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/routers/ag_ui/router.py +90 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/routers/ag_ui/service.py +193 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/routers/checkpointer/__init__.py +1 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/routers/checkpointer/router.py +482 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/routers/checkpointer/schemas/__init__.py +1 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/routers/checkpointer/schemas/checkpointer_schemas.py +121 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/routers/checkpointer/services/__init__.py +1 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/routers/checkpointer/services/checkpointer_service.py +300 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/routers/evals/__init__.py +6 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/routers/evals/router.py +38 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/routers/evals/services/__init__.py +1 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/routers/evals/services/eval_report_service.py +354 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/routers/graph/__init__.py +6 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/routers/graph/realtime_guard.py +161 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/routers/graph/router.py +821 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/routers/graph/schemas/__init__.py +1 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/routers/graph/schemas/graph_schemas.py +386 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/routers/graph/services/__init__.py +1 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/routers/graph/services/graph_service.py +1219 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/routers/graph/services/multimodal_preprocessor.py +164 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/routers/media/__init__.py +506 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/routers/media/router.py +242 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/routers/media/schemas.py +39 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/routers/ping/__init__.py +4 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/routers/ping/router.py +28 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/routers/setup_router.py +60 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/routers/store/__init__.py +4 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/routers/store/router.py +200 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/routers/store/schemas/__init__.py +28 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/routers/store/schemas/store_schemas.py +200 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/routers/store/services/__init__.py +4 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/routers/store/services/store_service.py +203 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/tasks/__init__.py +0 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/tasks/user_tasks.py +38 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/utils/__init__.py +12 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/utils/callable_helper.py +26 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/utils/media/__init__.py +15 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/utils/media/extractor.py +172 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/utils/media/pipeline.py +83 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/utils/parse_output.py +17 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/utils/response_helper.py +129 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/utils/schemas/__init__.py +11 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/utils/schemas/output_schemas.py +28 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/utils/schemas/user_schemas.py +13 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/utils/snowflake_id_generator.py +90 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/utils/swagger_helper.py +160 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/utils/telemetry_store.py +123 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/utils/thread_name_generator.py +304 -0
- 10xgraph_api-0.7.0/tenxgraph_api/src/app/worker.py +91 -0
- 10xgraph_api-0.7.0/tests/test_agentflow_cli_alias.py +66 -0
- 10xgraph_api-0.7.0/tests/test_multimodal_sprint2_extraction.py +213 -0
- 10xgraph_api-0.7.0/tests/test_sprint4_media_api.py +341 -0
- 10xgraph_api-0.7.0/tests/test_utils_parse_and_callable.py +72 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"agent": "graph.react:app",
|
|
3
|
+
"thread_name_generator": "graph.thread_name_generator:MyNameGenerator",
|
|
4
|
+
"store": "graph.dummy_store:store",
|
|
5
|
+
"env": ".env",
|
|
6
|
+
"auth": null,
|
|
7
|
+
"rate_limit": {
|
|
8
|
+
"enabled": true,
|
|
9
|
+
"backend": "memory",
|
|
10
|
+
"requests": 100,
|
|
11
|
+
"window": 60,
|
|
12
|
+
"by": "ip",
|
|
13
|
+
"trusted_proxy_headers": false,
|
|
14
|
+
"exclude_paths": ["/health", "/docs", "/redoc", "/openapi.json"]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,618 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: 10xgraph-api
|
|
3
|
+
Version: 0.7.0
|
|
4
|
+
Summary: Production server for 10xGraph agents (formerly 10xscale-agentflow-cli). Serves a compiled graph over REST, SSE, WebSocket, realtime audio and AG-UI with JWT or custom auth, scoped authorization on every endpoint, owner-only threads and rate limiting, and generates Docker Compose and Kubernetes files. Includes the 10xgraph CLI. MIT licensed, self-hosted.
|
|
5
|
+
Author-email: Shudipto Trafder <shudiptotrafder@gmail.com>
|
|
6
|
+
Maintainer-email: Shudipto Trafder <shudiptotrafder@gmail.com>, 10xScale <contact@10xscale.ai>
|
|
7
|
+
License: MIT
|
|
8
|
+
Project-URL: Homepage, https://10xgraph.com
|
|
9
|
+
Project-URL: Repository, https://github.com/10xGraph/10xgraph-api
|
|
10
|
+
Project-URL: Issues, https://github.com/10xGraph/10xgraph-api/issues
|
|
11
|
+
Project-URL: Documentation, https://10xgraph.com
|
|
12
|
+
Project-URL: Changelog, https://github.com/10xGraph/10xgraph-api/blob/main/CHANGELOG.md
|
|
13
|
+
Keywords: 10xgraph,10xscale,agentflow,agents,ai-agents,multi-agent,agent-server,agent-deployment,llm,fastapi,api-server,rest-api,sse,websocket,realtime-audio,ag-ui,jwt,authentication,authorization,rbac,multi-tenant,rate-limiting,self-hosted,production,docker,kubernetes,cli
|
|
14
|
+
Classifier: Development Status :: 4 - Beta
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Operating System :: OS Independent
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
22
|
+
Classifier: Topic :: Internet :: WWW/HTTP :: HTTP Servers
|
|
23
|
+
Requires-Python: >=3.12
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
License-File: LICENSE
|
|
26
|
+
Requires-Dist: 10xgraph<2.0,>=0.10.0
|
|
27
|
+
Requires-Dist: fastapi<1.0,>=0.116
|
|
28
|
+
Requires-Dist: gunicorn<24,>=23.0
|
|
29
|
+
Requires-Dist: orjson<4,>=3.11
|
|
30
|
+
Requires-Dist: platformdirs<5,>=4.0
|
|
31
|
+
Requires-Dist: python-multipart<0.1,>=0.0.19
|
|
32
|
+
Requires-Dist: pydantic<3,>=2.13
|
|
33
|
+
Requires-Dist: pydantic-settings<3,>=2.3
|
|
34
|
+
Requires-Dist: uvicorn<1.0,>=0.30
|
|
35
|
+
Requires-Dist: typer<1.0,>=0.17
|
|
36
|
+
Requires-Dist: python-dotenv<2,>=1.0
|
|
37
|
+
Requires-Dist: questionary<3,>=2.0
|
|
38
|
+
Requires-Dist: rich<15,>=14.0
|
|
39
|
+
Provides-Extra: sentry
|
|
40
|
+
Requires-Dist: sentry-sdk>=2.10.0; extra == "sentry"
|
|
41
|
+
Provides-Extra: firebase
|
|
42
|
+
Requires-Dist: firebase-admin>=6.5.0; extra == "firebase"
|
|
43
|
+
Requires-Dist: oauth2client>=4.1.3; extra == "firebase"
|
|
44
|
+
Provides-Extra: snowflakekit
|
|
45
|
+
Requires-Dist: snowflakekit<1.0,>=0.1.1; extra == "snowflakekit"
|
|
46
|
+
Provides-Extra: redis
|
|
47
|
+
Requires-Dist: redis<7,>=5.0.7; extra == "redis"
|
|
48
|
+
Provides-Extra: jwt
|
|
49
|
+
Requires-Dist: PyJWT<3,>=2.8; extra == "jwt"
|
|
50
|
+
Provides-Extra: media
|
|
51
|
+
Requires-Dist: textxtract[docx,html,md,pdf,xml]>=0.2.0; extra == "media"
|
|
52
|
+
Provides-Extra: gcloud
|
|
53
|
+
Requires-Dist: google-cloud-logging; extra == "gcloud"
|
|
54
|
+
Provides-Extra: otel
|
|
55
|
+
Requires-Dist: opentelemetry-api>=1.20.0; extra == "otel"
|
|
56
|
+
Requires-Dist: opentelemetry-sdk>=1.20.0; extra == "otel"
|
|
57
|
+
Requires-Dist: opentelemetry-instrumentation-fastapi>=0.40b0; extra == "otel"
|
|
58
|
+
Requires-Dist: opentelemetry-exporter-otlp>=1.20.0; extra == "otel"
|
|
59
|
+
Provides-Extra: ag-ui
|
|
60
|
+
Requires-Dist: ag-ui-protocol<2,>=1.0; extra == "ag-ui"
|
|
61
|
+
Dynamic: license-file
|
|
62
|
+
|
|
63
|
+
# 10xGraph API
|
|
64
|
+
|
|
65
|
+
*Formerly `10xscale-agentflow-cli`.* The production server for 10xGraph agents.
|
|
66
|
+
|
|
67
|
+
[](https://github.com/10xGraph/10xgraph-api/actions/workflows/ci.yaml)
|
|
68
|
+
[](https://github.com/10xGraph/10xgraph-api/releases/latest)
|
|
69
|
+
[](https://pypi.org/project/10xgraph-api/)
|
|
70
|
+
[](https://pypi.org/project/10xgraph-api/)
|
|
71
|
+
[](https://github.com/10xGraph/10xgraph-api/blob/main/LICENSE)
|
|
72
|
+
|
|
73
|
+
`10xgraph-api` generates the production server around a [10xGraph](https://github.com/10xGraph/10xGraph) agent. Point `10xgraph.json` at your compiled graph and it serves REST, SSE streaming, WebSocket and realtime-audio endpoints with JWT or custom auth, scoped authorization on every endpoint, owner-only threads and rate limiting, then writes your Docker Compose and Kubernetes files. MIT licensed and self-hosted.
|
|
74
|
+
|
|
75
|
+
Other frameworks give you the graph. 10xGraph gives you the graph and the server around it, in the same open-source project.
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## What the server gives you
|
|
80
|
+
|
|
81
|
+
- **Endpoints generated from the graph.** Invoke, SSE stream, stop, WebSocket and realtime audio; threads, state and messages; the memory store; file uploads for multimodal input; and an optional [AG-UI](https://10xgraph.com/docs/server/ag-ui) endpoint for CopilotKit and other AG-UI clients.
|
|
82
|
+
- **Authentication.** `"auth": "jwt"`, or your own `BaseAuth` subclass.
|
|
83
|
+
- **Scoped authorization on every endpoint.** Routes require `resource:action` scopes such as `graph:invoke`, `graph:stream` or `checkpointer:read`, checked by a pluggable `AuthorizationBackend`. The server refuses to start if any non-public route has no guard.
|
|
84
|
+
- **Owner-only threads.** In production mode a thread is readable and writable only by the user who created it, on every step that touches it. Ownership checks are cached in-process and optionally in Redis, so they do not hit the database on each request.
|
|
85
|
+
- **Rate limiting.** Sliding-window limits with a memory, Redis or custom backend.
|
|
86
|
+
- **Production hardening.** Request size limits (10 MB default), security headers, error and log sanitization, startup warnings for insecure settings, and Snowflake IDs for multi-node deployments.
|
|
87
|
+
- **Deployment files.** `10xgraph build --docker-compose --k8s` writes a `Dockerfile`, `.dockerignore`, `docker-compose.yml` and `k8s.yaml`.
|
|
88
|
+
- **A secure-by-default scaffold.** `10xgraph init --yes --template production --auth jwt --rate-limit redis` writes a project with JWT auth, owner-only thread access, a Redis rate limit, a prompt-injection validator, evals, tests, `.env.example` and a pre-commit config.
|
|
89
|
+
|
|
90
|
+
Not built in: automatic per-tool permissions (user A may call `refund`, user B may not). Tools receive the caller's verified scopes and can check them with `tenxgraph.core.authz.has_scope`.
|
|
91
|
+
|
|
92
|
+
| Package | What it does | Install |
|
|
93
|
+
|---|---|---|
|
|
94
|
+
| [`10xgraph`](https://github.com/10xGraph/10xGraph) | Core engine: graph, state, replay-safe tools, checkpointing, memory | `pip install 10xgraph` (pulled in by this package) |
|
|
95
|
+
| `10xgraph-api` (this repository) | Production server and the `10xgraph` command | `pip install 10xgraph-api` |
|
|
96
|
+
| [`10xgraph-client`](https://github.com/10xGraph/10xgraph-client) | Typed TypeScript client for every endpoint | `npm install 10xgraph-client` (until it is published, `@10xscale/agentflow-client`) |
|
|
97
|
+
|
|
98
|
+
Docs: [10xgraph.com](https://10xgraph.com).
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## Migrating from 10xscale-agentflow-cli
|
|
103
|
+
|
|
104
|
+
10xGraph is the new name of 10xScale Agentflow. The server, CLI, license and maintainers are
|
|
105
|
+
the same, and existing projects keep working.
|
|
106
|
+
|
|
107
|
+
| | Before | Now |
|
|
108
|
+
|---|---|---|
|
|
109
|
+
| PyPI package | `10xscale-agentflow-cli` | `10xgraph-api` |
|
|
110
|
+
| Python import | `agentflow_cli` | `tenxgraph_api` |
|
|
111
|
+
| Command | `agentflow` | `10xgraph` |
|
|
112
|
+
| Config file | `agentflow.json` | `10xgraph.json` |
|
|
113
|
+
| Core framework | `10xscale-agentflow` (import `agentflow`) | `10xgraph` (import `tenxgraph`) |
|
|
114
|
+
| CLI env vars | `AGENTFLOW_NO_FULLSCREEN`, `AGENTFLOW_NO_SPINNER`, `AGENTFLOW_ASCII` | `TENXGRAPH_NO_FULLSCREEN`, `TENXGRAPH_NO_SPINNER`, `TENXGRAPH_ASCII` |
|
|
115
|
+
| Website | agentflow.10xscale.ai | [10xgraph.com](https://10xgraph.com) |
|
|
116
|
+
| GitHub | [github.com/10xHub](https://github.com/10xHub) | [github.com/10xGraph](https://github.com/10xGraph) |
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
pip uninstall 10xscale-agentflow-cli 10xscale-agentflow
|
|
120
|
+
pip install 10xgraph-api
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
The old core and the new one both ship an `agentflow` module, so do not install
|
|
124
|
+
`10xscale-agentflow` next to `10xgraph`.
|
|
125
|
+
|
|
126
|
+
Kept working until 2.0, so you can migrate at your own pace:
|
|
127
|
+
|
|
128
|
+
- **`agentflow` command.** Runs the same CLI and prints a one-line deprecation notice.
|
|
129
|
+
- **`from agentflow_cli import ...`.** Resolves to the same modules as `tenxgraph_api` and
|
|
130
|
+
emits a `DeprecationWarning`.
|
|
131
|
+
- **`agentflow.json`.** Read when no `10xgraph.json` sits in the same directory. When both
|
|
132
|
+
exist, `10xgraph.json` wins. Rename the file when convenient: the keys are unchanged.
|
|
133
|
+
- **`AGENTFLOW_*` CLI env vars.** Read when the `TENXGRAPH_*` variable is unset.
|
|
134
|
+
- **`agentflow-bearer` WebSocket subprotocol and `agentflow://media/` URLs.** Still accepted.
|
|
135
|
+
New media references are written as `graph://media/`, and the server now also accepts
|
|
136
|
+
`10xgraph-bearer`.
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## Installation
|
|
141
|
+
|
|
142
|
+
**Basic installation:**
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
pip install 10xgraph-api
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Optional extras; install only what you configure:
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
pip install "10xgraph-api[redis]" # Redis rate-limit / cache backend
|
|
152
|
+
pip install "10xgraph-api[jwt]" # JWT authentication
|
|
153
|
+
pip install "10xgraph-api[media]" # Document text extraction (multimodal)
|
|
154
|
+
pip install "10xgraph-api[otel]" # OpenTelemetry tracing
|
|
155
|
+
pip install "10xgraph-api[snowflakekit]" # Snowflake ID generation
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Requires Python 3.12 or newer. Installs the core `10xgraph` framework as a dependency.
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## Quick start
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
# 1. Scaffold a project (interactive: dev vs production, auth, rate limiting)
|
|
166
|
+
10xgraph init
|
|
167
|
+
|
|
168
|
+
# 2. Start the local development server and open the playground (127.0.0.1:8000)
|
|
169
|
+
10xgraph dev
|
|
170
|
+
|
|
171
|
+
# 3. Check the environment if anything looks wrong
|
|
172
|
+
10xgraph audit
|
|
173
|
+
|
|
174
|
+
# 4. Generate production Docker files
|
|
175
|
+
10xgraph build --docker-compose
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
`10xgraph api` (server only) and `10xgraph play` (server + playground) remain
|
|
179
|
+
available; `dev` is the goal-oriented wrapper around them.
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
## CLI commands
|
|
184
|
+
|
|
185
|
+
Run `10xgraph --help` or `10xgraph COMMAND --help` for the generated command reference.
|
|
186
|
+
|
|
187
|
+
### `10xgraph init`
|
|
188
|
+
|
|
189
|
+
Initialize a new project with configuration and a sample graph.
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
10xgraph init # interactive (chooses dev vs production setup)
|
|
193
|
+
10xgraph init --path ./my-app # custom directory
|
|
194
|
+
10xgraph init --force # overwrite existing files
|
|
195
|
+
10xgraph init --path ./my-app --name MyAgent --template quick-start \
|
|
196
|
+
--non-interactive # reproducible CI/agent workflow
|
|
197
|
+
10xgraph init --path ./my-app --template production --auth jwt \
|
|
198
|
+
--rate-limit redis --yes --dry-run
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### `10xgraph dev`
|
|
202
|
+
|
|
203
|
+
Start the development API server and open the hosted playground when it is ready.
|
|
204
|
+
|
|
205
|
+
```bash
|
|
206
|
+
10xgraph dev # defaults (127.0.0.1:8000)
|
|
207
|
+
10xgraph dev --host 127.0.0.1 --port 9000 # custom host/port
|
|
208
|
+
10xgraph dev --config production.json # custom config file
|
|
209
|
+
10xgraph dev --no-open --no-reload # API only, without auto-reload
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
`10xgraph api` and `10xgraph play` remain available as compatibility commands.
|
|
213
|
+
|
|
214
|
+
### Adaptive and structured output
|
|
215
|
+
|
|
216
|
+
```bash
|
|
217
|
+
10xgraph play # branded intro, then output in your scrollback
|
|
218
|
+
10xgraph demo # preview every animation theme safely
|
|
219
|
+
10xgraph demo --style build # one theme: typing, network, init, build, or eval
|
|
220
|
+
10xgraph --fullscreen play # opt-in pinned header/footer surface
|
|
221
|
+
10xgraph --no-animation play # accessible/static workflow
|
|
222
|
+
10xgraph --format plain --no-color audit
|
|
223
|
+
10xgraph --format jsonl eval --parallel
|
|
224
|
+
10xgraph --quiet build
|
|
225
|
+
10xgraph --cwd ../my-agent dev
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
On an interactive terminal each command opens with a short intro (under a second) in
|
|
229
|
+
the logo's colors: the 10XGRAPH wordmark in ink, swept in by the amber entry node and the
|
|
230
|
+
blue accent, the command, the running versions (`10xgraph-api`, core `10xgraph`,
|
|
231
|
+
Python), and the command's own pipeline drawn like the logo's graph: `play`/`dev`
|
|
232
|
+
config→runtime→server→playground, `init` template→graph→config→project, `build`
|
|
233
|
+
source→deps→image→ship, `eval` discover→load→score→report, `audit`
|
|
234
|
+
python→core→config→port. Press any key to skip it; Ctrl+C quits at once. The intro then
|
|
235
|
+
leaves a one-line branded header in your normal scrollback, and the command's output
|
|
236
|
+
follows it, so there is nothing to dismiss when it ends.
|
|
237
|
+
|
|
238
|
+
`--fullscreen` (or `TENXGRAPH_FULLSCREEN=1`) runs the command on a dedicated surface
|
|
239
|
+
instead: a pinned header and footer with the output scrolling between them. That surface
|
|
240
|
+
waits for Enter after a normal finish, so a fast command cannot erase its own result;
|
|
241
|
+
Ctrl+C releases it immediately.
|
|
242
|
+
|
|
243
|
+
Long-running work reports through a live step timeline: stages are declared up
|
|
244
|
+
front, pending ones stay dimmed, and the running one animates with an elapsed
|
|
245
|
+
timer. `10xgraph eval` uses a determinate progress bar with a running pass/fail
|
|
246
|
+
tally.
|
|
247
|
+
|
|
248
|
+
Motion is disabled automatically for redirected output, CI, `TERM=dumb`,
|
|
249
|
+
JSON/JSONL, and `TENXGRAPH_NO_SPINNER=1`. Use `--no-animation` for a stable
|
|
250
|
+
screen-reader friendly experience, or `--animation` to force motion in a
|
|
251
|
+
compatible terminal. Every animated surface has a plain line-per-transition
|
|
252
|
+
renderer and a versioned JSON/JSONL event renderer.
|
|
253
|
+
|
|
254
|
+
### `10xgraph build`
|
|
255
|
+
|
|
256
|
+
Generate production Docker files.
|
|
257
|
+
|
|
258
|
+
```bash
|
|
259
|
+
10xgraph build # Dockerfile
|
|
260
|
+
10xgraph build --docker-compose # Dockerfile + docker-compose.yml
|
|
261
|
+
10xgraph build --k8s # Dockerfile + k8s.yaml (Deployment + Service)
|
|
262
|
+
10xgraph build --python-version 3.12 --port 9000
|
|
263
|
+
10xgraph build --service-name my-agent # name used in docker-compose.yml / k8s.yaml
|
|
264
|
+
10xgraph build --force # overwrite an existing Dockerfile
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
### `10xgraph eval` / `10xgraph test`
|
|
268
|
+
|
|
269
|
+
Run agent evaluations (discovers `*_eval.py` / `eval_*.py`, writes HTML + JSON to `eval_reports/`) and project tests (pytest).
|
|
270
|
+
|
|
271
|
+
```bash
|
|
272
|
+
10xgraph eval --parallel --threshold 0.8
|
|
273
|
+
10xgraph test --coverage
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
### `10xgraph skills`
|
|
277
|
+
|
|
278
|
+
Install bundled coding-agent skills (Codex, Claude, GitHub Copilot) into your project so your AI assistant knows how to build with 10xGraph.
|
|
279
|
+
|
|
280
|
+
```bash
|
|
281
|
+
10xgraph skills # pick agents interactively (space toggles, enter confirms)
|
|
282
|
+
10xgraph skills --all # install for every supported agent
|
|
283
|
+
10xgraph skills --agent claude # install for one
|
|
284
|
+
10xgraph skills --list # show supported agents
|
|
285
|
+
10xgraph skills --force # overwrite an existing install
|
|
286
|
+
10xgraph skills --validate ./.agents/skills # check skills against the Agent Skills spec
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
Run without flags to get a checklist of the supported agents. Each row shows
|
|
290
|
+
where it installs, agents that are already set up are labelled and pre-checked,
|
|
291
|
+
and picking one that exists offers to overwrite rather than failing.
|
|
292
|
+
|
|
293
|
+
### `10xgraph version`
|
|
294
|
+
|
|
295
|
+
Display CLI and package version information.
|
|
296
|
+
|
|
297
|
+
```bash
|
|
298
|
+
10xgraph --version # script-friendly CLI version only
|
|
299
|
+
10xgraph version
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
### `10xgraph audit`
|
|
303
|
+
|
|
304
|
+
Read-only check of everything that has to be true before `dev`, `eval`, or `build`
|
|
305
|
+
can work here: the Python interpreter, the installed `10xgraph-api` and
|
|
306
|
+
`10xgraph` packages, whether the installed core still exposes the
|
|
307
|
+
evaluation API this CLI imports, whether `10xgraph.json` is present and declares a
|
|
308
|
+
valid `agent` key, and whether the default port is free.
|
|
309
|
+
|
|
310
|
+
```bash
|
|
311
|
+
10xgraph audit # table of six checks
|
|
312
|
+
10xgraph --format json audit # machine-readable, for CI
|
|
313
|
+
10xgraph --no-animation audit # static output
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
Nothing is written or changed. It exits `1` if any check fails and `0` otherwise.
|
|
317
|
+
Warnings (no project config, port already bound) are reported without failing the run,
|
|
318
|
+
so it works as a CI gate.
|
|
319
|
+
|
|
320
|
+
### `10xgraph config`
|
|
321
|
+
|
|
322
|
+
Open a local browser editor for `10xgraph.json`: switch optional sections (auth,
|
|
323
|
+
authorization, rate limiting, observability, ...) on or off, fill in their fields,
|
|
324
|
+
**Validate** without saving, and **Save** to write the file. Saving is blocked while
|
|
325
|
+
there are errors, and the previous file is kept as `10xgraph.json.bak`.
|
|
326
|
+
|
|
327
|
+
```bash
|
|
328
|
+
10xgraph config # edit ./10xgraph.json
|
|
329
|
+
10xgraph config -c path/to/10xgraph.json --port 8765 --no-open
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
### `10xgraph demo`
|
|
333
|
+
|
|
334
|
+
Preview the terminal animations and progress states without touching project state.
|
|
335
|
+
|
|
336
|
+
```bash
|
|
337
|
+
10xgraph demo # every theme
|
|
338
|
+
10xgraph demo --style eval # one of: typing, network, init, build, eval
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
---
|
|
342
|
+
|
|
343
|
+
## Configuration
|
|
344
|
+
|
|
345
|
+
The configuration file (`10xgraph.json`) defines your agent, authentication, and infrastructure settings:
|
|
346
|
+
|
|
347
|
+
```json
|
|
348
|
+
{
|
|
349
|
+
"agent": "graph.react:app",
|
|
350
|
+
"env": ".env",
|
|
351
|
+
"auth": null,
|
|
352
|
+
"checkpointer": null,
|
|
353
|
+
"injectq": null,
|
|
354
|
+
"authorization": null,
|
|
355
|
+
"store": null,
|
|
356
|
+
"remote_tools": [],
|
|
357
|
+
"redis": null,
|
|
358
|
+
"thread_name_generator": null,
|
|
359
|
+
"rate_limit": {}
|
|
360
|
+
}
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
### Configuration Options
|
|
364
|
+
|
|
365
|
+
| Field | Type | Description |
|
|
366
|
+
|-------|------|-------------|
|
|
367
|
+
| `agent` | string | Path to your compiled agent graph, `"module:attribute"` (required) |
|
|
368
|
+
| `env` | string | Path to environment variables file |
|
|
369
|
+
| `auth` | null \| "jwt" \| object | Authentication configuration |
|
|
370
|
+
| `authorization` | string \| null | Path to an `AuthorizationBackend` (RBAC / per-tool access) |
|
|
371
|
+
| `checkpointer` | string \| null | Path to a custom checkpointer |
|
|
372
|
+
| `injectq` | string \| null | Path to an InjectQ container |
|
|
373
|
+
| `store` | string \| null | Path to a data store |
|
|
374
|
+
| `remote_tools` | array | Trusted schemas for tools executed by clients; attached at startup |
|
|
375
|
+
| `redis` | string \| null | Redis connection URL |
|
|
376
|
+
| `rate_limit` | object \| null | Sliding-window rate limiting configuration |
|
|
377
|
+
| `thread_name_generator` | string \| null | Path to a custom thread name generator |
|
|
378
|
+
| `ag_ui` | object | `{"enabled": true}` mounts `POST /v1/ag-ui` (needs the `ag-ui` extra) |
|
|
379
|
+
|
|
380
|
+
Full reference: [Configuration](https://10xgraph.com/docs/reference/api-cli/configuration).
|
|
381
|
+
|
|
382
|
+
---
|
|
383
|
+
|
|
384
|
+
## Authentication
|
|
385
|
+
|
|
386
|
+
JWT or your own backend. Guide: [Authentication](https://10xgraph.com/docs/server/auth).
|
|
387
|
+
|
|
388
|
+
### JWT Authentication
|
|
389
|
+
|
|
390
|
+
**10xgraph.json:**
|
|
391
|
+
```json
|
|
392
|
+
{ "auth": "jwt" }
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
**.env:**
|
|
396
|
+
```bash
|
|
397
|
+
JWT_SECRET_KEY=your-super-secret-key
|
|
398
|
+
JWT_ALGORITHM=HS256
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
### Custom Authentication
|
|
402
|
+
|
|
403
|
+
**10xgraph.json:**
|
|
404
|
+
```json
|
|
405
|
+
{ "auth": { "method": "custom", "path": "auth.custom:MyAuthBackend" } }
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
**auth/custom.py:**
|
|
409
|
+
```python
|
|
410
|
+
from typing import Any
|
|
411
|
+
|
|
412
|
+
from fastapi import HTTPException, Request, Response
|
|
413
|
+
from fastapi.security import HTTPAuthorizationCredentials
|
|
414
|
+
from tenxgraph_api import BaseAuth
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
class MyAuthBackend(BaseAuth):
|
|
418
|
+
def authenticate(
|
|
419
|
+
self,
|
|
420
|
+
request: Request,
|
|
421
|
+
response: Response,
|
|
422
|
+
credential: HTTPAuthorizationCredentials,
|
|
423
|
+
) -> dict[str, Any] | None:
|
|
424
|
+
token = credential.credentials
|
|
425
|
+
user = verify_token(token) # your token check
|
|
426
|
+
if not user:
|
|
427
|
+
raise HTTPException(401, "Invalid token")
|
|
428
|
+
return {"user_id": user.id, "username": user.username, "email": user.email}
|
|
429
|
+
```
|
|
430
|
+
|
|
431
|
+
---
|
|
432
|
+
|
|
433
|
+
## ID generation
|
|
434
|
+
|
|
435
|
+
10xGraph includes Snowflake ID generation for distributed, time-sortable unique IDs.
|
|
436
|
+
|
|
437
|
+
```bash
|
|
438
|
+
pip install "10xgraph-api[snowflakekit]"
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
```python
|
|
442
|
+
from tenxgraph_api import SnowFlakeIdGenerator
|
|
443
|
+
|
|
444
|
+
generator = SnowFlakeIdGenerator(
|
|
445
|
+
snowflake_epoch=1704067200000, # Jan 1, 2024
|
|
446
|
+
snowflake_node_id=1,
|
|
447
|
+
snowflake_worker_id=1,
|
|
448
|
+
)
|
|
449
|
+
new_id = await generator.generate()
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
**Environment configuration:**
|
|
453
|
+
```bash
|
|
454
|
+
SNOWFLAKE_EPOCH=1704067200000
|
|
455
|
+
SNOWFLAKE_NODE_ID=1
|
|
456
|
+
SNOWFLAKE_WORKER_ID=1
|
|
457
|
+
SNOWFLAKE_TIME_BITS=39
|
|
458
|
+
SNOWFLAKE_NODE_BITS=5
|
|
459
|
+
SNOWFLAKE_WORKER_BITS=8
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
More: [Extensibility](https://10xgraph.com/docs/concepts/extensibility).
|
|
463
|
+
|
|
464
|
+
---
|
|
465
|
+
|
|
466
|
+
## Thread name generation
|
|
467
|
+
|
|
468
|
+
Generate human-friendly names for conversation threads.
|
|
469
|
+
|
|
470
|
+
```python
|
|
471
|
+
from tenxgraph_api.src.app.utils.thread_name_generator import AIThreadNameGenerator
|
|
472
|
+
|
|
473
|
+
generator = AIThreadNameGenerator()
|
|
474
|
+
name = generator.generate_name()
|
|
475
|
+
# "thoughtful-dialogue", "exploring-ideas", ...
|
|
476
|
+
```
|
|
477
|
+
|
|
478
|
+
Custom generators: [Extensibility](https://10xgraph.com/docs/concepts/extensibility).
|
|
479
|
+
|
|
480
|
+
---
|
|
481
|
+
|
|
482
|
+
## Security
|
|
483
|
+
|
|
484
|
+
Security features of the server:
|
|
485
|
+
|
|
486
|
+
- **Authentication:** JWT and custom authentication backends
|
|
487
|
+
- **Authorization:** scoped access on every endpoint, owner-only threads, extensible backends
|
|
488
|
+
- **Request limits:** configurable request size limit (10 MB default)
|
|
489
|
+
- **Error sanitization:** production-safe error messages that do not leak internals
|
|
490
|
+
- **Log sanitization:** automatic redaction of tokens, passwords and secrets
|
|
491
|
+
- **Security warnings:** startup validation for insecure configurations
|
|
492
|
+
- **Security headers:** HSTS, frame options and CSP, configurable
|
|
493
|
+
|
|
494
|
+
### Production Security Checklist
|
|
495
|
+
|
|
496
|
+
```bash
|
|
497
|
+
MODE=production # production mode
|
|
498
|
+
JWT_SECRET_KEY=<32+ chars> # strong secret (secrets.token_urlsafe(32))
|
|
499
|
+
IS_DEBUG=false # disable debug
|
|
500
|
+
ORIGINS=https://yourdomain.com # specific CORS origins (never *)
|
|
501
|
+
ALLOWED_HOST=yourdomain.com # specific allowed hosts (never *)
|
|
502
|
+
DOCS_PATH= # recommended: disable API docs
|
|
503
|
+
REDOCS_PATH=
|
|
504
|
+
MAX_REQUEST_SIZE=10485760 # request size limit (10MB default)
|
|
505
|
+
```
|
|
506
|
+
|
|
507
|
+
See the [Production checklist](https://10xgraph.com/docs/server/production-checklist) and
|
|
508
|
+
[Authentication](https://10xgraph.com/docs/server/auth).
|
|
509
|
+
|
|
510
|
+
---
|
|
511
|
+
|
|
512
|
+
## Deployment
|
|
513
|
+
|
|
514
|
+
Guide: [Deploy](https://10xgraph.com/docs/server/deploy).
|
|
515
|
+
|
|
516
|
+
```bash
|
|
517
|
+
# Generate Docker files
|
|
518
|
+
10xgraph build --docker-compose
|
|
519
|
+
|
|
520
|
+
# Build and run
|
|
521
|
+
docker compose up --build -d
|
|
522
|
+
|
|
523
|
+
# Check logs
|
|
524
|
+
docker compose logs -f
|
|
525
|
+
```
|
|
526
|
+
|
|
527
|
+
For Kubernetes, `10xgraph build --k8s` writes `k8s.yaml`; see [Kubernetes](https://10xgraph.com/docs/server/kubernetes).
|
|
528
|
+
|
|
529
|
+
---
|
|
530
|
+
|
|
531
|
+
## Project structure
|
|
532
|
+
|
|
533
|
+
```
|
|
534
|
+
10xgraph-api/
|
|
535
|
+
├── tenxgraph_api/ # Main package
|
|
536
|
+
│ ├── __init__.py # Package exports (BaseAuth, SnowFlakeIdGenerator, ThreadNameGenerator)
|
|
537
|
+
│ ├── cli/ # Typer CLI: main.py + commands/ + templates/
|
|
538
|
+
│ └── src/app/ # FastAPI application (main.py, loader.py, core/, routers/, utils/)
|
|
539
|
+
├── tests/ # Test suite
|
|
540
|
+
├── 10xgraph.json # Configuration
|
|
541
|
+
├── pyproject.toml # Project metadata
|
|
542
|
+
└── README.md # This file
|
|
543
|
+
```
|
|
544
|
+
|
|
545
|
+
---
|
|
546
|
+
|
|
547
|
+
## Development
|
|
548
|
+
|
|
549
|
+
```bash
|
|
550
|
+
# Clone and set up
|
|
551
|
+
git clone https://github.com/10xGraph/10xgraph-api.git
|
|
552
|
+
cd 10xgraph-api
|
|
553
|
+
uv sync --dev
|
|
554
|
+
pre-commit install
|
|
555
|
+
|
|
556
|
+
# Quality gate
|
|
557
|
+
pytest # tests (coverage gate: 80%)
|
|
558
|
+
pytest --cov=tenxgraph_api --cov-report=html
|
|
559
|
+
ruff check . && ruff format . # lint + format
|
|
560
|
+
pre-commit run --all-files # full gate (ruff + bandit, pinned versions)
|
|
561
|
+
```
|
|
562
|
+
|
|
563
|
+
### Using the Makefile
|
|
564
|
+
|
|
565
|
+
```bash
|
|
566
|
+
make build # build sdist + wheel
|
|
567
|
+
make test # run tests
|
|
568
|
+
make publish # upload to PyPI (maintainers)
|
|
569
|
+
make clean # remove build artifacts
|
|
570
|
+
```
|
|
571
|
+
|
|
572
|
+
### Releasing
|
|
573
|
+
|
|
574
|
+
Releases are cut by pushing a version tag that matches `pyproject.toml`. The
|
|
575
|
+
[`release.yml`](./.github/workflows/release.yml) workflow then verifies the tag, builds the
|
|
576
|
+
sdist + wheel, checks the distribution metadata, and creates a GitHub Release with auto-generated
|
|
577
|
+
notes and the artifacts attached. PyPI publishing is manual (`make publish`).
|
|
578
|
+
|
|
579
|
+
```bash
|
|
580
|
+
git tag v0.7.0 && git push origin v0.7.0
|
|
581
|
+
```
|
|
582
|
+
|
|
583
|
+
---
|
|
584
|
+
|
|
585
|
+
## License
|
|
586
|
+
|
|
587
|
+
10xGraph is [MIT licensed](https://github.com/10xGraph/10xgraph-api/blob/main/LICENSE) and made by
|
|
588
|
+
[10xScale](https://10xscale.ai). Contributions are accepted under the same license.
|
|
589
|
+
|
|
590
|
+
---
|
|
591
|
+
|
|
592
|
+
## Links
|
|
593
|
+
|
|
594
|
+
- Documentation: [10xgraph.com](https://10xgraph.com)
|
|
595
|
+
- Core framework: [`10xgraph`](https://github.com/10xGraph/10xGraph)
|
|
596
|
+
- PyPI: [`10xgraph-api`](https://pypi.org/project/10xgraph-api/)
|
|
597
|
+
- [Issues](https://github.com/10xGraph/10xgraph-api/issues)
|
|
598
|
+
- [Changelog](https://github.com/10xGraph/10xgraph-api/blob/main/CHANGELOG.md)
|
|
599
|
+
|
|
600
|
+
---
|
|
601
|
+
|
|
602
|
+
## Contributing
|
|
603
|
+
|
|
604
|
+
Contributions are welcome. Fork the repo, create a feature branch, run tests and linting, and open a
|
|
605
|
+
Pull Request. See the [repository](https://github.com/10xGraph/10xgraph-api) for issue reporting and
|
|
606
|
+
guidelines.
|
|
607
|
+
|
|
608
|
+
---
|
|
609
|
+
|
|
610
|
+
## Support
|
|
611
|
+
|
|
612
|
+
- **Documentation:** [10xgraph.com](https://10xgraph.com/)
|
|
613
|
+
- **Issues:** [GitHub Issues](https://github.com/10xGraph/10xgraph-api/issues)
|
|
614
|
+
- **Repository:** [GitHub](https://github.com/10xGraph/10xgraph-api)
|
|
615
|
+
|
|
616
|
+
---
|
|
617
|
+
|
|
618
|
+
Developed by [10xScale](https://10xscale.ai), which runs its own AI products on 10xGraph.
|