Skip to content

Add AGENTS.md#928

Open
acroca wants to merge 3 commits intodapr:mainfrom
acroca:agents
Open

Add AGENTS.md#928
acroca wants to merge 3 commits intodapr:mainfrom
acroca:agents

Conversation

@acroca
Copy link
Member

@acroca acroca commented Feb 24, 2026

The file has been generated with Claude Code, and I verified it's all valid.
I asked it to pay special attention to the examples directory as it's also how we do integration testing.

@acroca acroca requested review from a team as code owners February 24, 2026 10:50
Signed-off-by: Albert Callarisa <albert@diagrid.io>
@codecov
Copy link

codecov bot commented Feb 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.89%. Comparing base (bffb749) to head (9461052).
⚠️ Report is 80 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #928      +/-   ##
==========================================
+ Coverage   86.63%   86.89%   +0.26%     
==========================================
  Files          84      103      +19     
  Lines        4473     7305    +2832     
==========================================
+ Hits         3875     6348    +2473     
- Misses        598      957     +359     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: Albert Callarisa <albert@diagrid.io>
Signed-off-by: Albert Callarisa <albert@diagrid.io>
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds agent-oriented documentation (AGENTS.md) across the repo (root, examples, and each extension) and wires CLAUDE.md to point at the root agent doc for improved AI/tooling context.

Changes:

  • Added a root-level AGENTS.md describing repo structure, conventions, and how to run tests/examples.
  • Added extension-specific AGENTS.md files documenting APIs, architecture, dependencies, and testing for each ext/* package.
  • Added examples/AGENTS.md documenting how example validation works (mechanical-markdown/STEP blocks) and how to add new examples; added CLAUDE.md pointer.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
AGENTS.md Root context doc for the Dapr Python SDK structure, conventions, testing, and CI expectations.
CLAUDE.md Points Claude tooling at the root AGENTS.md.
examples/AGENTS.md Documents example validation as CI-driven integration tests via mechanical-markdown STEP blocks.
ext/flask_dapr/AGENTS.md Documents Flask integration (DaprApp, DaprActor) and behavior/testing notes.
ext/dapr-ext-fastapi/AGENTS.md Documents FastAPI integration (DaprApp, DaprActor) APIs and testing notes.
ext/dapr-ext-grpc/AGENTS.md Documents gRPC callback server extension API, routing, and tests.
ext/dapr-ext-workflow/AGENTS.md Documents workflow extension architecture, API surface, gotchas, and tests.
ext/dapr-ext-langgraph/AGENTS.md Documents LangGraph checkpointer extension API, schema, and tests.
ext/dapr-ext-strands/AGENTS.md Documents Strands session manager extension API, schema, and tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


## Key details

- **Async actors**: `register_actor` is an async method (must be awaited). Actor method/timer/reminder handlers are dispatched through `ActorRuntime` which uses `asyncio.run()`.
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section says actor handlers are dispatched through ActorRuntime which uses asyncio.run(), but the FastAPI actor integration is fully async and directly awaits ActorRuntime calls (see dapr/ext/fastapi/actor.py). Please adjust this description to avoid implying a sync/async bridge or per-request event loop creation in the FastAPI extension.

Suggested change
- **Async actors**: `register_actor` is an async method (must be awaited). Actor method/timer/reminder handlers are dispatched through `ActorRuntime` which uses `asyncio.run()`.
- **Async actors**: `register_actor` is an async method (must be awaited). FastAPI actor routes are async handlers that directly `await` the corresponding `ActorRuntime` operations on the existing event loop (no `asyncio.run()` or per-request event loop creation).

Copilot uses AI. Check for mistakes.
Comment on lines +34 to +38
├── README.md # Documentation + mechanical-markdown STEP blocks (REQUIRED)
├── *.py # Python application files
├── requirements.txt # Dependencies (e.g., dapr>=1.17.0rc6)
├── components/ # Dapr component YAML configs (if needed)
│ ├── statestore.yaml
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the example directory layout, requirements.txt is shown as a standard/required file, but most examples in this repo (e.g. state_store/, invoke-simple/, etc.) don’t have a top-level requirements.txt (some have requirements nested like demo_actor/demo_actor/requirements.txt). Consider marking requirements.txt as optional or clarifying where dependencies are specified for examples that don’t use it.

Copilot uses AI. Check for mistakes.

```
ext/dapr-ext-strands/
├── setup.cfg # Deps: dapr, strands-agents, strands-agents-tools, python-ulid, msgpack
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The source layout comment lists msgpack as a dependency, but the package dependency in setup.cfg is msgpack-python. Align the naming here with the actual install requirement to avoid confusion when users try to pip install dependencies.

Suggested change
├── setup.cfg # Deps: dapr, strands-agents, strands-agents-tools, python-ulid, msgpack
├── setup.cfg # Deps: dapr, strands-agents, strands-agents-tools, python-ulid, msgpack-python

Copilot uses AI. Check for mistakes.

```
ext/dapr-ext-langgraph/
├── setup.cfg # Deps: dapr, langgraph, langchain, python-ulid, msgpack
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The source layout comment lists msgpack as a dependency, but setup.cfg specifies msgpack-python. Please use the same package name here as in install_requires to reduce ambiguity.

Suggested change
├── setup.cfg # Deps: dapr, langgraph, langchain, python-ulid, msgpack
├── setup.cfg # Deps: dapr, langgraph, langchain, python-ulid, msgpack-python

Copilot uses AI. Check for mistakes.
DaprWorkflowContext, # Passed to workflow functions as first arg
WorkflowActivityContext, # Passed to activity functions as first arg
WorkflowState, # Snapshot of a workflow instance's state
WorkflowStatus, # Enum: RUNNING, COMPLETED, FAILED, TERMINATED, PENDING, SUSPENDED
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The WorkflowStatus enum list here is incomplete/inconsistent with the actual WorkflowStatus in workflow_state.py, which includes UNKNOWN and STALLED in addition to the other statuses. Update this list so readers don’t miss valid states returned by WorkflowState.runtime_status.

Suggested change
WorkflowStatus, # Enum: RUNNING, COMPLETED, FAILED, TERMINATED, PENDING, SUSPENDED
WorkflowStatus, # Enum: UNKNOWN, RUNNING, COMPLETED, FAILED, TERMINATED, PENDING, SUSPENDED, STALLED

Copilot uses AI. Check for mistakes.
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