iqdeepdive
AGENTS.md35 starsChanged 47 days agoMITView on GitHub
This project was built with the microsoft-foundry skill. Before working on or answering questions about Foundry agents, read the microsoft-foundry skill first. This repository contains a six-part Microsoft Foundry IQ notebook lab and six Python agents deployed as Microsoft Foundry hosted agents. A single Azure Developer CLI (azd) project provisions the shared Foundry project, model deployments, Azure AI Search, storage, monitoring, and optional Microsoft Fabric capacity. The notebooks and hosted agents share infrastructure but create separate knowledge bases. The hosted-agent…
- Reads credentials
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 35,337 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
13 rules. About 0 are common, 3 are distinctive, and 10 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 125
Keep changes scoped to the owning environment:
- Very specific: line 129
Do not assume a package available in the root .venv exists in the hosted agent.
- Very specific: line 130
Keep the agent compatible with the Python runtime configured in azure.yaml (python_3_13).
- Very specific: line 132
Use structured Azure SDK APIs for resource and data operations.
- Very specific: line 135
Do not commit .env, credentials, generated tokens, or local virtual environments.
- Very specific: line 239
When the published Fabric Data Agent MCP server is used directly from GitHub Copilot in VS Code, Copilot currently surfaces …
- Distinctive: line 246
Keep these open Python hosting issues in mind when changing the Work IQ consent flow:
- Very specific: line 293
Use azd hooks run postdeploy to retry the postdeploy role-assignment step without rerunning provisioning or agent deployment.
- Distinctive: line 295
Run any agent locally with the same service manifest:
- Very specific: line 352
Do not move the hosted-agent role assignment into Bicep or postprovision unless the identity lifecycle changes.
- Very specific: line 359
Keep each agent's uv.toml with system-certs = true.
- Very specific: line 381
Every required hosted variable must be listed under the corresponding agent's environmentVariables in azure.yaml.
- Very specific: line 418
Before provisioning, deploying, assigning roles, or monitoring, verify the selected Azure subscription, tenant, and azd environment.
≈ “Common” is an estimate: at least 1 in 5 of the 45,344 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
This project was built with the microsoft-foundry skill. Before working on or answering questions about Foundry
agents, read the microsoft-foundry skill first.
Project overview
This repository contains a six-part Microsoft Foundry IQ notebook lab and six Python agents deployed as
Microsoft Foundry hosted agents. A single Azure Developer CLI (azd) project provisions the shared Foundry project,
model deployments, Azure AI Search, storage, monitoring, and optional Microsoft Fabric capacity.
The notebooks and hosted agents share infrastructure but create separate knowledge bases. The hosted-agent setup
creates contoso-company-kb-low with low reasoning effort and contoso-company-kb-minimal with minimal reasoning
effort over the same Search sources. The low KB configures the Azure OpenAI model; the extractive minimal KB does
not configure a model. Several hosted agents use contoso-company-kb-minimal:
agent-foundryiq-mcp connects through the Azure AI Search knowledge-base MCP endpoint,
agent-foundryiq-api calls the knowledge-base retrieval API with a custom Python tool, and
agent-toolbox-foundryiq connects through a Foundry toolbox.
agent-toolbox-workiq uses a separate OAuth2 RemoteA2A connection and toolbox, backed by the shared Work IQ
Entra app, to access the signed-in user's Microsoft 365 work context through Work IQ.
agent-toolbox-foundryiq-workiq instead connects through a Foundry toolbox to the multi-source
knowledge base created by infra/create-search-indexes.py --include-workiq. Its dedicated PMI connection must target that exact
knowledge-base MCP URL so Toolbox emits the user's Search-scoped query-source authorization.
Provisioning also creates a separate web analytics lakehouse, Direct Lake Power BI semantic model, and PBIR
report. The semantic model feeds the same Fabric Data Agent as the ontology and Graph; provisioning selects all
seven model tables before publishing the agent.
Sample data design
The product review graph is built from deterministic synthetic data loaded into the ontology lakehouse. Its sentiment, confidence, and evidence values are fixture ground truth generated during provisioning; the sample does not claim to extract sentiment with AI at runtime. Saving and refreshing the Graph Model ingests those tables into Fabric's queryable graph representation.
The separate web analytics lakehouse contains a date dimension, channel, device, geography, and page dimensions,
plus session- and page-view-grain facts. The Direct Lake semantic model defines explicit measures such as total
sessions, unique visitors, pages per session, bounce rate, conversion rate, revenue, and average session
duration. The generated Contoso Web Analytics Dashboard item is technically a Power BI report: unlike a
Power BI Service dashboard, its pages and interactive visuals can be fully represented and deployed through the
Fabric API. Provisioning creates or updates the TMDL and PBIR definitions by display name.
Repository map
azure.yaml:azdservice manifest. It declares the existing Foundry project service, the six hosted services, Python 3.13 remote build settings, runtime environment variables, and deployment hooks.pyproject.tomlanduv.lock: root Python environment for infrastructure helpers and notebook support. Use this environment for files underinfra/.README.md: user-facing setup, deployment, notebook, and local-agent instructions.ATTRIBUTION.md: upstream sources, revisions, and retained attribution.data/: source documents and exported JSONL/index definitions used to seed Azure AI Search.data/ai-search-data/: files uploaded or indexed for the notebook and agent examples.data/index-data/: exported Search indexes and index metadata restored during provisioning.data/semantic-models/web-analytics/: source-controlled TMDL definition for the Direct Lake web analytics semantic model.data/ontologies/contoso-diy/: source-controlled TMDL definition for the Contoso DIY Fabric IQ ontology.data/reports/web-analytics/: source-controlled enhanced PBIR definition for the web analytics Power BI report.infra/main.bicep: subscription-scope entry point. Creates the resource group and composes Foundry, Search, storage, monitoring, and optional Fabric modules.infra/main.parameters.json: mapsazdenvironment values into the Bicep deployment.infra/core/: reusable Bicep modules for Foundry, Search, storage, monitoring, and Fabric resources.infra/create-search-indexes.py: restores sample indexes and creates the low-reasoningcontoso-company-kb-lowand minimal-reasoningcontoso-company-kb-minimal.infra/create-toolbox-foundryiq.py: creates and promotes the toolbox version after the knowledge base exists. It uses the dedicatedkb-mcp-connectionremote-tool project connection by default and accepts overrides for the Work IQ knowledge-base toolbox.infra/create-fabric-graph.py: creates or updates the lakehouse-backed product review Graph Model, refreshes its queryable data, and writes its ID and Fabric portal URL to.env.infra/create-fabric-data-agent.py: creates or reuses an ontology-, Graph-, and semantic-model-backed Fabric Data Agent, selects the semantic model tables, attaches the ontology through the Data Agent definition, publishes its staging configuration through the Fabric REST API, and writes its ID and MCP endpoint to.env.infra/create-web-analytics-lakehouse.py: creates a separate lakehouse and loads deterministic website session, page-view, and dimensional data.infra/create-semantic-model.py: binds the source-controlled TMDL model to the web analytics lakehouse SQL endpoint, creates or updates the Direct Lake semantic model, and writes its ID and portal URL to.env.infra/create-web-analytics-report.py: binds the source-controlled PBIR definition to the semantic model, creates or updates the Power BI report, and writes its ID and portal URL to.env.infra/create-workiq-entra.py: opt-in (ENABLE_WORK_IQ_KB_TOOLBOX) Graph setup of the Entra app and federated credential that Azure AI Search uses to authenticate the Work IQ knowledge source. It writesWORK_IQ_SEARCH_ENTRA_APP_ID,WORK_IQ_SEARCH_ENTRA_TENANT_ID, andWORK_IQ_SEARCH_FEDERATED_CREDENTIAL_IDto.env.infra/create-toolbox-workiq.py: opt-in Graph SDK setup that reuses the shared Work IQ Entra app (WORK_IQ_SEARCH_ENTRA_APP_ID) when present, adds delegated consent, a client secret and the callback URI, creates the OAuth2RemoteA2Aconnection, and publishes the separate Work IQ toolbox.infra/create-lakehouse.py: creates the optional Fabric lakehouse, loads its tables, and binds the source-controlled ontology TMDL to it.infra/setup-env.py: writes generated Azure outputs to the local.envused by notebooks and local agent runs.infra/hooks/postprovision.shandinfra/hooks/postprovision.ps1: run after infrastructure provisioning to write local settings, seed Search, and optionally prepare Fabric.infra/hooks/postdeploy.shandinfra/hooks/postdeploy.ps1: run after agent deployment, resolve the generated hosted-agent identity, and grant itSearch Index Data Contributoron Azure AI Search.notebooks/fabriciq-dataagent-mcp.ipynb: authenticates to the published Fabric Data Agent MCP endpoint, lists its tools, and submits a question through the selected tool.notebooks/fabriciq-ontology-mcp.ipynb: authenticates to the Fabric ontology MCP endpoint, lists its tools, and asks product and inventory questions throughask_ontology.notebooks/foundryiq-mcp.ipynb: authenticates to the minimal Azure AI Search knowledge-base MCP endpoint, lists its tool schema, and retrieves extractive HR and benefits passages throughknowledge_base_retrieve.notebooks/: the six ordered Foundry IQ lab notebooks. Their extra kernel dependencies are listed innotebooks/requirements.txt.src/agent-foundryiq-mcp/main.py: Agent Framework application. It exposes a Responses server, uses Foundry for chat, and connects to the Search knowledge base with an authenticatedMCPStreamableHTTPTool.src/agent-foundryiq-api/main.py: sibling Agent Framework application whose custom Python tool calls the Azure AI Search knowledge-base retrieval API withKnowledgeBaseRetrievalClient.src/agent-toolbox-foundryiq/main.py: sibling Agent Framework application that accesses the knowledge base, web search, and code interpreter throughFoundryToolbox.src/agent-toolbox-foundryiq-workiq/main.py: standalone Agent Framework application that accesses the Work IQ-backed multi-source knowledge base throughFoundryToolbox.src/agent-toolbox-workiq/main.py: sibling Agent Framework application that accesses the signed-in user's Microsoft 365 work context through the Work IQ toolbox.src/agent-foundryiq-mcp/pyproject.toml,src/agent-foundryiq-mcp/uv.lock, andsrc/agent-foundryiq-mcp/uv.toml: isolated MCP agent dependency definition, lockfile, and remote-build TLS configuration.src/agent-foundryiq-api/pyproject.toml,src/agent-foundryiq-api/uv.lock, andsrc/agent-foundryiq-api/uv.toml: isolated API agent dependency definition, lockfile, and remote-build TLS configuration.src/agent-toolbox-foundryiq/pyproject.toml,src/agent-toolbox-foundryiq/uv.lock, andsrc/agent-toolbox-foundryiq/uv.toml: isolated toolbox agent dependency definition, lockfile, and remote-build TLS configuration.src/agent-toolbox-foundryiq-workiq/pyproject.toml,src/agent-toolbox-foundryiq-workiq/uv.lock, andsrc/agent-toolbox-foundryiq-workiq/uv.toml: isolated Work IQ knowledge-base agent dependency definition, lockfile, and remote-build TLS configuration.src/agent-toolbox-workiq/pyproject.toml,src/agent-toolbox-workiq/uv.lock, andsrc/agent-toolbox-workiq/uv.toml: isolated Work IQ agent dependency definition, lockfile, and remote-build TLS configuration.
Development guidance
Keep changes scoped to the owning environment:
- Infrastructure and seeding dependencies belong in the root
pyproject.tomland rootuv.lock. - Hosted-agent runtime dependencies belong in each agent's own
pyproject.tomlanduv.lock. - Do not assume a package available in the root
.venvexists in the hosted agent. - Keep the agent compatible with the Python runtime configured in
azure.yaml(python_3_13). - Preserve direct source deployment unless the agent begins requiring custom OS packages.
- Use structured Azure SDK APIs for resource and data operations; use shell hooks only for lifecycle work that
depends on an identity created by
azd deploy. - Maintain both POSIX and PowerShell hooks when changing deployment behavior.
- Do not commit
.env, credentials, generated tokens, or local virtual environments.
The MCP server requires authentication during session.initialize(). Attach Azure bearer authentication to the
supplied httpx.AsyncClient; do not replace it with only header_provider, which applies runtime tool-call headers
too late for initialization.
Fabric Data Agent SDK limitations
infra/create-fabric-data-agent.py intentionally uses the Fabric REST API with the root Python environment instead
of fabric-data-agent-sdk. Reconsider the SDK when both of these preview limitations are fixed:
fabric-data-agent-sdk==0.1.26a0pinsazure-identity==1.17.1andhttpx==0.27.2, which conflicts with this repository's newer root dependencies.- The SDK's public management objects resolve workspaces and item names through Semantic Link. Outside a Fabric
notebook, create and reuse paths can initialize Semantic Link's .NET workspace client and fail with
RuntimeError: Can not determine dotnet root.
The package metadata points to the internal A365/SynapseML-Agent-SDK Azure DevOps repository and does not publish
a public issue tracker. Check newer package metadata and release notes before restoring an SDK dependency.
The Fabric Data Agent MCP endpoint redirects requests through Fabric's routing layer. Its MCP client must use an
HTTP client with redirects enabled before session.initialize(); a plain httpx.AsyncClient defaults to
follow_redirects=False and can surface a misleading 500 Internal Server Error. The current MCP client works and
negotiates the endpoint's supported protocol version when follow_redirects=True.
begin_create_* in microsoft-fabric-api cannot be waited on
Verified against the pinned microsoft-fabric-api==0.1.0b20. The package ships no async surface at all: no
aio subpackage, no async def begin_*, no AsyncLROPoller, and no asyncio import anywhere in the
distribution, so await is not an alternative to what follows. Polling is the only option.
FabricClient.lakehouse and FabricClient.ontology resolve to the extensions packages, not the generated
ones. Their begin_create_* methods do not return the LROPoller their own docstrings and type hints
advertise. They create the poller, attach an _LROResultExtractor as a done callback, and return the extractor:
extractor = _LROResultExtractor[_models.Ontology]()
poller = super().begin_create_ontology(..., polling=LROBasePolling(...))
poller.add_done_callback(extractor)
return extractor # the poller itself is discardedThe extractor exists for a real reason: Fabric's LRO protocol returns the created item from a separate
GET /v1/operations/{id}/result call, which azure-core's stock poller never makes. The problem is the shape it
was given. Three consequences, none of which fail loudly:
- The extractor has no
wait(),done()orresult(). Itsresultis a property, so.result()calls whatever the property returned and raisesTypeError: 'Lakehouse' object is not callable. - There is no way to block on it.
.resultisNonewhile the create is in flight, so the only option is to spin on it, which is exactly what the SDK's own blockingcreate_ontology/create_lakehousewrappers do, in an unboundedwhile extractor.result is None: time.sleep(5). Registration order is not the problem here:add_done_callbackinvokes the callback immediately when the operation has already finished, so a create that succeeds populates the extractor either way. - A failed operation is never re-raised, and this is what makes the spin dangerous.
LROPoller._start()stores the exception on the discarded poller, where onlywait()would surface it. On that path the extractor's own callback also raisesAttributeError: 'NoneType' object has no attribute 'additional_properties'inside the background thread, which Python prints as a stray traceback and discards..resultthen staysNoneforever, so the SDK's unbounded loop hangs and a failure is indistinguishable from slowness.
Poll for the item by display name instead, with a deadline, and word the timeout so it does not claim the operation
is merely slow. wait_for_created_item in infra/create-lakehouse.py does this for both item types.
The split is consistent and worth checking before adding a call: begin_create_* on items returns an extractor,
while begin_load_table and every begin_update_*_definition return real LROPoller objects where .result()
is correct. Verify with inspect.getsource, not the type hints, which are wrong for the extractor cases.
Fabric IQ ontology (TMDL definition)
infra/create-lakehouse.py replaces an empty ontology's definition with the TMDL files in
data/ontologies/contoso-diy/ (format reference),
substituting {{WORKSPACE_ID}} and {{LAKEHOUSE_ID}} in expressions.tmdl. Keep LF line endings and the
existing lineage tags: without them, Fabric assigns random tags on create and every later update fails with
"relationship ... refers to an object which cannot be found". Column dataType values must match the Delta types
that Load Table infers from the CSVs.
The ontology MCP endpoint exposes ask_ontology ({"request": ...}), list_ontology_entities, and
list_ontology_rules; search_ontology is not supported. ask_ontology takes 30 to 60 seconds, and past about
60 seconds returns an empty 200 OK that the MCP client cannot parse, so always pass read_timeout_seconds.
Data Agents reject ontologies as staging datasources (OntologyAddAsDataSourceBlocked).
create-fabric-data-agent.py instead writes Files/Config/draft/ontologies/{displayName}/ontology.json through
updateDefinition; that part has no instructions field, so ontology guidance belongs in aiInstructions. If the
published agent says it cannot access the ontology right after setup, open the agent in the Fabric portal and retry.
Open Fabric Data Agent issues
Fabric Data Agent NL2GQL can generate Cypher-style WHERE clauses for Fabric Graph queries, but the Fabric Graph
GQL endpoint requires FILTER. For example, a generated negative-sentiment review query timed out with WHERE,
while changing only WHERE to FILTER succeeded against the same graph. The Graph endpoint may time out on this
invalid syntax instead of returning a useful syntax diagnostic.
Removing the predicate is not a reliable workaround. Fabric Data Agent also failed to execute a generated
predicate-free aggregate query and a simple feature-list query, even though the exact generated aggregate GQL
succeeded through the Graph REST endpoint. An ontology-backed inventory question succeeded through the same
published Data Agent MCP tool, isolating the broader failure to the Data Agent's Graph source path rather than MCP
connectivity. Adding Graph-specific instructions and two validated direct-execution GQL examples as published
few-shot queries did not resolve either Graph question. Diagnostics confirmed that both examples loaded, matched
the predicate-free question, and guided NL2GQL to a valid query. The exact generated query succeeded through the
Graph REST endpoint, but the Data Agent's analyze.database.execute step failed with Failed to execute GQL: Unable
to process the request (RAID bc80ee4e-8fc0-4fd0-b47f-8035b54c2c64). Until the Graph integration is fixed, use
direct Graph GQL for review questions.
GitHub Copilot MCP rendering
When the published Fabric Data Agent MCP server is used directly from GitHub Copilot in VS Code, Copilot currently surfaces structuredContent.deepLinkUrl but does not render the natural-language
answer from the standard content array. This is tracked by
microsoft/vscode#290063. The notebook path
(notebooks/fabriciq-dataagent-mcp.ipynb) reads result.content directly and is not affected.
Upstream Agent Framework issues
Keep these open Python hosting issues in mind when changing the Work IQ consent flow:
- microsoft/agent-framework#5594:
ResponsesHostServercannot automatically resume an interrupted turn after OAuth consent. The user must resend the original request. - microsoft/agent-framework#7227:
the Python consent parser recognizes MCP sources but not Work IQ's
a2a_previewsource, so the unmodified host does not surface Work IQCONSENT_REQUIREDerrors asoauth_consent_requestoutput. - microsoft/agent-framework#7166:
after consent, reconnecting the same
FoundryToolboxinstance loses its authenticated HTTP client. Resending in the same hosted session returns401 Unauthorizedduring MCP initialization, while a fresh agent session and conversation succeeds. This issue includes a reproduced root cause and Work IQ validation.
Local validation
Install and validate root tooling:
uv sync --locked --all-groups
uv run ruff check .
uv run python -m compileall -q infra src/agent-foundryiq-mcp src/agent-foundryiq-api src/agent-toolbox-foundryiq src/agent-toolbox-foundryiq-workiq src/agent-toolbox-workiq
az bicep build --file infra/main.bicep --stdout > /dev/null
azd showValidate the hosted-agent package separately:
uv sync --project src/agent-foundryiq-mcp --python 3.13 --frozen --dry-run
uv run --project src/agent-foundryiq-mcp --python 3.13 python -m py_compile src/agent-foundryiq-mcp/main.py
uv sync --project src/agent-foundryiq-api --python 3.13 --frozen --dry-run
uv run --project src/agent-foundryiq-api --python 3.13 python -m py_compile src/agent-foundryiq-api/main.py
uv sync --project src/agent-toolbox-foundryiq --python 3.13 --frozen --dry-run
uv run --project src/agent-toolbox-foundryiq --python 3.13 python -m py_compile src/agent-toolbox-foundryiq/main.py
uv sync --project src/agent-toolbox-foundryiq-workiq --python 3.13 --frozen --dry-run
uv run --project src/agent-toolbox-foundryiq-workiq --python 3.13 python -m py_compile src/agent-toolbox-foundryiq-workiq/main.py
uv sync --project src/agent-toolbox-workiq --python 3.13 --frozen --dry-run
uv run --project src/agent-toolbox-workiq --python 3.13 python -m py_compile src/agent-toolbox-workiq/main.pyValidate deployment hooks after editing them:
sh -n infra/hooks/postdeploy.sh
azd hooks run postdeployUse azd hooks run postdeploy to retry the postdeploy role-assignment step without rerunning provisioning or agent deployment. The hook uses AzureDeveloperCliCredential and requires the active azd environment to provide AZURE_TENANT_ID, AZURE_SUBSCRIPTION_ID, AZURE_RESOURCE_GROUP, and AZURE_AI_SEARCH_SERVICE_NAME. Confirm those values with azd env get-value before running the hook.
Run any agent locally with the same service manifest:
azd ai agent run agent-foundryiq-mcp
azd ai agent invoke --local "What benefits are available, and when do I need to enroll?"
azd ai agent run agent-foundryiq-api
azd ai agent invoke --local "What benefits are available, and when do I need to enroll?"
azd ai agent run agent-toolbox-foundryiq
azd ai agent invoke --local "What benefits are available, and when do I need to enroll?"
azd ai agent run agent-toolbox-workiq
azd ai agent invoke --local \
"Check my recent Teams chats for messages about the Professional Claw Hammer. Summarize what colleagues are saying and what actions have been requested."Deployment workflow
For a new environment or infrastructure changes:
azd auth login
azd upFor agent-only code or dependency changes:
azd deploy agent-foundryiq-mcp
azd ai agent invoke agent-foundryiq-mcp "What benefits are available, and when do I need to enroll?"
azd deploy agent-foundryiq-api
azd ai agent invoke agent-foundryiq-api "What benefits are available, and when do I need to enroll?"
azd deploy agent-toolbox-foundryiq
azd ai agent invoke agent-toolbox-foundryiq "What benefits are available, and when do I need to enroll?"
azd deploy agent-toolbox-foundryiq-workiq
azd ai agent invoke agent-toolbox-foundryiq-workiq --new-session --new-conversation \
"Search my recent emails for Professional Claw Hammer and summarize requested actions."
azd deploy agent-toolbox-workiq
azd ai agent invoke agent-toolbox-workiq --new-session --new-conversation \
"Check my recent Teams chats for messages about the Professional Claw Hammer. Summarize what colleagues are saying and what actions have been requested."azd up performs these phases:
- Bicep provisions shared Azure resources.
postprovisionwrites.env, restores Search data, creates the agent knowledge base and toolbox, and optionally configures Fabric.- Foundry remotely builds and deploys all agent packages under
src/. postdeploygrants Search data access to the Search-backed agents. The Work IQ agent additionally receives Foundry User at account and project scopes and uses the caller's delegated Microsoft 365 identity.
Do not move the hosted-agent role assignment into Bicep or postprovision unless the identity lifecycle changes.
The instance identity does not exist until the agent has been deployed.
Deployment troubleshooting
Remote build or TLS failure
Keep each agent's uv.toml with system-certs = true. Regenerate the corresponding lockfile with Python 3.13
after dependency changes:
uv lock --project src/agent-foundryiq-mcp --python 3.13
uv sync --project src/agent-foundryiq-mcp --python 3.13 --frozen --dry-run
uv lock --project src/agent-foundryiq-api --python 3.13
uv sync --project src/agent-foundryiq-api --python 3.13 --frozen --dry-run
uv lock --project src/agent-toolbox-foundryiq --python 3.13
uv sync --project src/agent-toolbox-foundryiq --python 3.13 --frozen --dry-run
uv lock --project src/agent-toolbox-foundryiq-workiq --python 3.13
uv sync --project src/agent-toolbox-foundryiq-workiq --python 3.13 --frozen --dry-run
uv lock --project src/agent-toolbox-workiq --python 3.13
uv sync --project src/agent-toolbox-workiq --python 3.13 --frozen --dry-runMissing runtime setting
Every required hosted variable must be listed under the corresponding agent's environmentVariables in
azure.yaml. Local .env values are not automatically available in the hosted container.
MCP cancellation error
A message such as MCP server failed to initialize: Cancelled via cancel scope often masks the HTTP failure that
caused the MCP transport to close. Inspect the preceding httpx log line:
401 Unauthorized: the initialization request did not carry a valid bearer token. Check the authenticatedhttpx.AsyncClientinsrc/agent-foundryiq-mcp/main.py.403 Forbidden: authentication succeeded, but the hosted agent's generated managed identity lacks Search RBAC or the role assignment has not propagated yet.
The postdeploy hook grants the required Search role. Azure RBAC may take a few minutes to propagate; retry in a
fresh invocation before changing application code.
Inspect deployed sessions
List sessions and monitor the exact failing session rather than mixing logs from older versions:
azd ai agent sessions list --output json
azd ai agent monitor agent-foundryiq-mcp --session-id <session-id> --type console --tail 300 --utc
azd ai agent monitor agent-foundryiq-mcp --session-id <session-id> --type system --tail 300 --utcConfirm the active deployment and its generated identity with:
azd ai agent show agent-foundryiq-mcp --output jsonA healthy knowledge-base request should show successful Search MCP responses followed by
knowledge_base_retrieve succeeded.
Azure CLI safety
Before provisioning, deploying, assigning roles, or monitoring, verify the selected Azure subscription, tenant,
and azd environment. Avoid sharing mutable Azure CLI or azd state across concurrent sessions. Prefer an isolated
CLI profile when automating commands, and always pass the intended azd environment explicitly when more than one
environment exists.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

