copilot-harness-sdk · tutorials
After publishing

The manual way: the agent without RAPP

Once an agent is published it is an ordinary Copilot Studio solution. Nothing calls back to a brainstem, the SDK or a registry. These are the packages from the proved rungs and the pac commands that put one into any environment with the harness enabled.

Packages

RungFileHow it was producedEnvironment values inside
0rappRAPPBrainstemSkillsDemoHarness.exported.zippac solution export from Copilot Studio, unmodifiednone
1rappBrainstemStarterHarness.portable.zipthe deploy's import package, org URL and connector id replaced by placeholders{{ORG_URL}}, {{HN_CONNECTOR}}
2rappBrainstemStarterSkillsHarness.portable.zipsame as rung 1{{ORG_URL}}, {{HN_CONNECTOR}}
3rappBrainstemScriptSkillsHarness.exported.zippac solution export, unmodifiednone
4rappBrainstemBriefingDeskHarness.exported.zippac solution export, unmodified (parent; import rung 2's package first)none
5rappBrainstemCommunitySkillsHarness.exported.zippac solution export, unmodified (34 skill components)none
Why rungs 1 and 2 are import packages, not exports. pac solution export refuses a solution whose connection reference points at a custom connector that was created outside a solution: "Exporting connection reference … for a custom connector requires the custom connector to be added to a dataverse solution". The tutorial creates the Hacker News connector with pac connector create and no --solution-unique-name, so it is not solution-aware, and adding it to the solution afterwards (component type 372) does not satisfy the check. The package shipped here is the exact zip the deploy imported, which is the same solution minus the two connection references and the flow that the deploy provisions on top. Making the tutorial create the connector inside the solution is the fix that would let the Studio export these rungs too.

Import a package

  1. Localize the placeholders (rungs 1 and 2 only). The connector id is the connectorinternalid of "RAPP Hacker News" in your environment, or empty if you are importing without the Hacker News part.
    node scripts/portable-solution.mjs localize rappBrainstemStarterHarness.portable.zip starter.zip \
      --org-url https://<org>.crm.dynamics.com/ --hn-connector shared_new-5frapp-20hacker-20news-5f<suffix>
  2. Import and publish.
    pac auth create --environment https://<org>.crm.dynamics.com/
    pac solution import --path starter.zip --environment https://<org>.crm.dynamics.com/ --publish-changes
    pac copilot list --environment https://<org>.crm.dynamics.com/        # find the bot id
    pac copilot publish --bot <bot-id> --environment https://<org>.crm.dynamics.com/
  3. Rung 0 is done at this point. For rungs 1 and 2, the tools need their plumbing: create the custom connector from tutorial/profiles/hackernews/connector/ (pac connector create --api-definition-file openapi.json --api-properties-file apiProperties.json --script-file script.csx), create the two connections in the maker portal, and create the connection references and the flow. That is exactly what scripts/deploy-harness-agent.mjs steps 6 to 8 do, so the shortest manual route is: import the package, then run the deploy script once against the same schema name; it reports every existing piece as existing and provisions only what is missing.
  4. Open the agent in Copilot Studio, Preview, and send the prompts from the rung's table. The first tool call may ask you to allow the connections.

What is in a package

[Content_Types].xml
solution.xml                     # unique name, version, publisher prefix
customizations.xml               # the bot and its components
bots/<schema>/bot.xml            # template cliagent-1.0.0, authentication mode, instructions
bots/<schema>/configuration.json
botcomponents/<schema>.skill.<prefix>_<name>/   # one InlineAgentSkill per SKILL.md, verbatim
botcomponents/<schema>.tool.<prefix>_<name>/    # one per Dataverse tool

The SKILL.md text is in each skill component's data file. Open one: it is the same file that lives in the skills folder of the brainstem, which is the whole point.