agentleFS
MicrosoftKnown publishermicrosoft/iq-samples/travel-agent-hosted/.github/copilot-instructions.md

iq-samples / travel-agent-hosted

Copilot instructions7 starsChanged 5 months agoMITView on GitHub

This sample is part of the microsoft/iq-samples repo. Only read and modify files within this folder (travel-agent-hosted/). Do not touch other samples or root-level governance files (LICENSE, CODEOFCONDUCT.md, SECURITY.md, SUPPORT.md). This is a hosted Microsoft Foundry agent built with the Microsoft Agent Framework SDK. It is a corporate travel assistant grounded with two IQ tools: The agent's intelligence lives in the system prompt in agent/agent.py. The tool wiring (knowledge base + Work IQ Mail) is declared in agent/agent.manifest.yaml and injected…

  • Reads credentials

We split this copilot-instructions.md into the rules it gives an agent

5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Create a Foundry IQ knowledge base from knowledge/travel-policies.json (name it to match the knowledge.id in agent/agent.manifest.yaml).

    line 49
  2. Distinctive:

    Test in the Foundry hosted agent playground.

    line 53
  3. Very specific:

    Run evals from evals/ against the deployed agent.

    line 54
  4. Very specific:

    All secrets go in .env (gitignored) — never hardcode API keys, connection strings, or tokens.

    line 58
  5. Very specific:

    Prefer az login / DefaultAzureCredential over API keys for Azure AI Search.

    line 59

≈ “Common” is an estimate: at least 1 in 5 of the 3,669 Copilot instructions 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
copilot-instructions.md

Copilot Instructions — Travel Agent (Foundry IQ + Work IQ)

Scope

This sample is part of the microsoft/iq-samples repo. Only read and modify files within this folder (travel-agent-hosted/). Do not touch other samples or root-level governance files (LICENSE, CODE_OF_CONDUCT.md, SECURITY.md, SUPPORT.md).

Project Identity

This is a hosted Microsoft Foundry agent built with the Microsoft Agent Framework SDK. It is a corporate travel assistant grounded with two IQ tools:

  • Foundry IQ — a knowledge base of corporate travel policies (agentic retrieval).
  • Work IQ Mail — searches the employee's email for recent policy updates, budget freezes, and temporary overrides (via OBO / on-behalf-of auth).

The agent's intelligence lives in the system prompt in agent/agent.py. The tool wiring (knowledge base + Work IQ Mail) is declared in agent/agent.manifest.yaml and injected by the Foundry hosting platform — the tools are not instantiated in code. Because Work IQ Mail requires OBO, the agent only works fully when deployed (hosted), not locally.

Tech Stack

ComponentTechnology
Agent hostPython 3.12, Agent Framework SDK (agent-framework-*), agent-framework-foundry-hosting
ProtocolResponses (ResponsesHostServer)
DeploymentMicrosoft Foundry hosted agent (agent.yaml + Dockerfile)
Evaluationpytest-agent-evals against the deployed agent

Key Files

FilePurpose
agent/agent.pyAgent definition + system prompt. Builds a FoundryChatClient + Agent.
agent/main.pyHost entry point — runs ResponsesHostServer(agent).
agent/agent.manifest.yamlDeclares the model, the Foundry IQ knowledge resource, and the WorkIQMail tool. This is where tools are wired.
agent/agent.yamlContainer/hosting descriptor (kind: hosted, resources, env vars).
agent/Dockerfile / agent/startup.shContainer build + startup.
agent/.env.templateCopy to .env and fill in your Foundry endpoint + model.
evals/Evaluation suite (pytest-agent-evals) run against the deployed agent.
evals/evaluators.pyCustom policy_completeness grader (deterministic, fact-based).
evals/data.jsonlTest cases with ground truth (standing policy + email override).
knowledge/travel-policies.jsonSource content for the Foundry IQ knowledge base.

What NOT to Touch

  • .env files are gitignored. Never create or commit them. Use .env.template for documenting required variables.
  • Do not hardcode Foundry endpoints, search endpoints, tenant IDs, or API keys anywhere. Placeholders only.
  • Knowledge base ↔ eval consistency: knowledge/travel-policies.json and evals/evaluators.py/evals/data.jsonl are intentionally aligned (e.g. hotel cap $250/night, meal per diem $75/day). If you change a policy value in one, update the other or the evals will break.

Setup (high level — see README.md for full steps)

  1. az login
  2. Create a Foundry IQ knowledge base from knowledge/travel-policies.json (name it to match the knowledge.id in agent/agent.manifest.yaml).
  3. Configure the Work IQ Mail tool in the Foundry project (OBO connection).
  4. cp agent/.env.template agent/.env and fill in values.
  5. Deploy the hosted agent (agent/agent.yaml + Dockerfile).
  6. Test in the Foundry hosted agent playground.
  7. Run evals from evals/ against the deployed agent.

Security

  • All secrets go in .env (gitignored) — never hardcode API keys, connection strings, or tokens.
  • Prefer az login / DefaultAzureCredential over API keys for Azure AI Search.
  • Work IQ Mail uses OBO — auth is handled by the Foundry hosting layer, not in code.

Download now (ZIP)

  • Where files are headingNew Copilot instructions files have more rules about branches and pull requests, and fewer about code style.

    Of the Copilot instructions files we read, the 2,297 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.

  • In this repository2 other files it gives its agents.

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.