Skip to main content

Working with Coding Agents

A coding agent such as Claude Code, Codex or Antigravity can do routine course work for you through the Artemis REST API: draft competencies and their graph, announcements, exercises and lecture units, and keep them in sync with your teaching material. This page explains how to give an agent access, what it can and cannot do, and how to keep that access safe.

How access works​

You create a personal access token in Artemis and give it to the agent. Every request the agent makes with the token is treated as a request from you, with two limits:

  • The token can do no more than you can. If you are an editor in a course, the agent is an editor in that course, and in no other.
  • The token can do only what its scopes allow. You choose the scopes when you create it, and a token that holds competencies:read cannot post an announcement.

Only instructors and editors can create tokens: you need the instructor or editor role in at least one course. Administrators cannot use tokens at all, and an agent that works for an administrator account is rejected. If you reset your password, sign in again before you create a token.

Create a token​

  1. Open your user settings and choose Agent Access.
  2. Click Create token.
  3. Enter a Name that tells you later which agent or laptop the token belongs to.
  4. Select the Scopes the agent needs, and nothing more.
  5. Set the Lifetime in days. A token expires on its own; the longest lifetime is set by your administrator (90 days unless they changed it).
  6. Click Create and copy the secret that appears. It starts with art_pat_.

The list on the same page shows each token's name, the first characters of its secret, its scopes, when it expires and when it was last used. Click Revoke to stop a token immediately.

Scopes​

Scope in the interfaceWhat the agent can doRole it still needs in the course
Read your coursesList your coursesany
Read competenciesRead competencies, prerequisites and the relations between themstudent, editor for the relations
Create and edit competenciesCreate, bulk create, import standardized, update competencies; create and retype relationseditor
Post announcementsPost an announcement to the courseinstructor
Create and edit unpublished exercisesCreate and update text and modeling exerciseseditor
Create and edit unpublished programming exercisesCreate programming exercises; update their settings, dates, problem statement and test case weightseditor
Create and edit lectures and slidesCreate lectures, add units with slides, read the processing statuseditor

What stays in your hands​

Some things are deliberately not available to an agent, however it is configured:

  • Publishing now. Exercises and lecture units that an agent creates must have a release date in the future, so students cannot see them yet. An agent can also change only content that is still unpublished. A release date schedules publication: review the content before that date, and change the date in the Artemis web interface if you need more time. Programming exercises additionally must have no student participations.
  • Deleting. An agent can create and change competencies, relations, exercises and units, but not delete them.
  • Grades, exams and student data. No scope covers them.

Announcements, lectures and competencies are the exceptions to the draft rule. An announcement is visible to students, and they are notified, the moment it is posted. A lecture is listed for students with its title and description as soon as it exists, because only its units have a release date. Competencies and their relations have no draft state, so what an agent creates or changes shows in the course at once. Ask your agent to show you the text first, and give it the Post announcements or Create and edit lectures and slides scope only when you want that.

Give the agent the tools​

An agent needs three things: the address of your Artemis instance, the token, and a description of what it may call.

The API description is an OpenAPI file that lists exactly the operations a token can use, with their parameters and errors. It is published with this documentation at /agent/openapi.yaml, and /llms.txt points agents to it.

Agent skills teach an agent the common workflows, for example how to maintain a competency graph. Copy the skill folders you need from /agent-skills/ into the skills folder of your agent:

AgentSkills folder
Claude Code.claude/skills/ in your project, or ~/.claude/skills/ for all projects
Codex and Antigravity.agents/skills/ in your project, or ~/.agents/skills/ for all projects

Then give the agent the address and the token, for example by exporting ARTEMIS_URL and ARTEMIS_TOKEN in the terminal where it runs. The skills explain how they use them.

Connect through MCP​

Instead of skills and the API description, an agent can use Artemis as an MCP server, the Model Context Protocol that many agents and chat applications understand. Artemis offers it at /api/core/agent/mcp on your instance, over HTTP, and it accepts only personal access tokens. In Claude Code you add it like this:

claude mcp add --transport http artemis "$ARTEMIS_URL/api/core/agent/mcp" --header "Authorization: Bearer $ARTEMIS_TOKEN"

Other agents and applications have their own way to add a remote MCP server; look for the option that takes a server address and a bearer token or header.

The agent then sees a small set of tools, each for a task you would name yourself: list your courses, read and change the competency graph, post an announcement, list, read, create and change exercises, set up a programming exercise's problem statement, dates and test case weights, and create a lecture and check how far the processing of its slides has come. Which tools it sees depends on the scopes of the token. The tools call the same operations as the API description lists, so the same limits apply to them: the roles, the scopes and the draft rule.

  • Announcements need your approval. The announcement tool refuses to post until the agent confirms that you approved the exact text, and the agent is told to ask you first.
  • Slides are not uploaded through MCP. A PDF does not fit into a tool call. Use the lectures skill, or upload the slides in the Artemis web interface.

Keep it safe​

  • Create one token per agent and device, with the fewest scopes that do the job.
  • Prefer a short lifetime. Create a new token when an old one expires.
  • Revoke a token as soon as you no longer use it, or if you suspect it leaked.
  • Course content that students wrote, such as forum posts and submissions, can contain text that tries to steer an agent. Do not combine a token that can post announcements or change exercises with tasks that read student text.
  • Check what the agent did. Exercises and units it created are unpublished until their release date, which you can change, and your administrator can see which token made which request.
  • Do not paste a token into a chat, an issue or a commit.
Search documentation