Skip to content

Conversation

@Iamsdt
Copy link
Collaborator

@Iamsdt Iamsdt commented Nov 5, 2025

This pull request introduces several improvements and new features to the AgentFlow API, focusing on production readiness, enhanced error handling, observability, and extensibility. The most significant changes include the addition of Prometheus metrics, robust Sentry integration with environment-based configuration, expanded error handling for AgentFlow-specific exceptions, and new schemas for remote tool setup in graph execution.

Observability and Monitoring Enhancements:

  • Integrated Prometheus metrics collection and exposure using prometheus_fastapi_instrumentator in main.py, enabling real-time API monitoring. [1] [2]
  • Improved Sentry initialization logic in sentry_config.py to only activate in allowed environments (PRODUCTION, STAGING, DEVELOPMENT) and provide clear logging when disabled.

Error Handling Improvements:

  • Added comprehensive exception handlers for AgentFlow-specific errors (e.g., GraphError, NodeError, MetricsError, etc.) in handle_errors.py, ensuring consistent error responses and better debugging. [1] [2]
  • Refactored resource exception handling to distinguish between API and storage layer errors.

API and Configuration Updates:

  • Introduced new schemas for remote tool execution and graph setup (RemoteToolSchema, GraphSetupSchema) in graph_schemas.py, laying the groundwork for extensible graph operations.
  • Updated default API documentation paths in settings.py for better out-of-the-box usability.

Codebase and Router Refactoring:

  • Removed unused BackgroundTasks parameters from graph router endpoints and related service imports, simplifying API signatures. [1] [2] [3] [4] [5]
  • Added comments and placeholders for future graph setup endpoint implementation.

Documentation and Feature Highlights:

  • Updated TODOD.txt to highlight unique features such as single-command deployment, authentication extensibility, UUID control, Pydantic model usage, and Sentry integration.

@Iamsdt Iamsdt merged commit f67bf5b into main Nov 11, 2025
1 check failed
@Iamsdt Iamsdt deleted the feature/api-setup-fix branch November 29, 2025 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants