Using Artifacts with Agents
Give your agent files and skills using artifacts
Loading artifacts into an agent is how you give it the files and skills a task needs. Dana's
email asks for the Q3 numbers, which are Acme's files rather than the state of any env, so this page
loads them into assistant, the agent working in the email instance, with a skill for sending
them. The steps form one task, which Tasks and steps covers.
Load files into the agent
The Q3 numbers are q3-workpapers, the file artifacts from
Creating your artifacts. A load_artifact step with
agent_name copies an artifact into that agent's container. These steps seed the email instance,
deploy assistant next to it and give it the files:
[
{"id": "deploy", "type": "deploy_env", "env_id": "email", "env_version": 1},
{"id": "seed", "type": "load_artifact", "env_id": "email",
"artifact_id": "acme-email", "artifact_version": 2,
"depends_on": [{"task_step_id": "deploy"}]},
{"id": "agent", "type": "deploy_agent", "a2a_agent_id": "my-agent",
"agent_name": "assistant", "env_ids": ["email"],
"depends_on": [{"task_step_id": "seed"}]},
{"id": "workpapers", "type": "load_artifact", "agent_name": "assistant",
"artifact_id": "q3-workpapers", "artifact_version": 1,
"depends_on": [{"task_step_id": "agent"}]}
]The files land in /tmp/file_artifacts, as q3-numbers.csv and notes.md, and
destination_path puts them somewhere else. The same step takes a single file artifact too, or an
environment universe, which an agent gets as one folder per environment name: the demo's second
agent, analyst, gets acme as email/emails.json and contacts/contacts.json.
Skills
Skills are modeled as artifacts: a stored skill is versioned like any other artifact, and a task
pins the version it gives an agent. Skills covers writing one,
storing it and
adding it in a task. This task's add_skills step gives
assistant the skill q3-report, and a second skill that says where the q3-workpapers files are:
{"id": "skills", "type": "add_skills", "agent_name": "assistant",
"skills": [{"skill_artifact_id": "q3-report", "skill_artifact_version": 1}],
"file_artifact_universe_ids": ["q3-workpapers"],
"depends_on": [{"task_step_id": "workpapers"}]}Last updated on