Documentation
Browse documentation

Bring memory in and take it out

Import from Jira

Bring a Jira project's tickets into memory, one note per ticket, so your agent can find the decisions and history behind the code.

Connect your Jira first

MemIndex reads Jira with your own Atlassian login. Do this once:

  1. Create an API token. Open Atlassian's API tokens page, choose Create API token, name it MemIndex, and copy the token.

  2. Add three lines to your settings file, ~/.memindex/settings.json, in your own editor. Keep what is already there and add:

    "MEMINDEX_JIRA_BASE_URL": "https://yourteam.atlassian.net",
    "MEMINDEX_JIRA_EMAIL": "[email protected]",
    "MEMINDEX_JIRA_API_TOKEN": "the token you copied"
    

    Use your own Jira address and the email of the Atlassian account that made the token.

  3. On Mac or Linux, make the file private: chmod 600 ~/.memindex/settings.json. The import refuses to run while other users can read a file that holds your token.

  4. Find your project key. It is the letters before a ticket's number: SHOP in SHOP-123.

Never paste the token into your agent's chat. Anything in a chat can end up in memory.

If you would rather not keep the token in a file, set JIRA_BASE_URL, JIRA_EMAIL and JIRA_API_TOKEN as environment variables instead; they take priority over the settings file.

Import

npx memindex import jira --project SHOP --dry-run   # see what would be written, with a sample note
npx memindex import jira --project SHOP

Each note holds the ticket's key, summary, status, resolution, type, priority, assignee and labels, its description as plain text and its newest five comments. Notes go in the area jira-<key>, such as jira-shop. Ticket text is marked as imported and untrusted, so an agent reads it as information, not as instructions.

  • --limit N imports at most N tickets, and --since YYYY-MM-DD only tickets updated since that day. --jql "..." chooses the tickets with your own query.
  • A run with no --limit that would write more than 200 notes asks before it starts. --yes answers for it.
  • Run it again whenever you like. Tickets that have not changed are skipped, and a changed ticket's note is updated in place, so its id and its pins stay.
  • On this machine, notes are stored as written, with no AI writer involved. On MemIndex hosting, each note counts against your plan's note allowance, and the dry run says so.
  • If Jira asks MemIndex to slow down, the import waits and carries on.

The Jira login comes from the environment variables JIRA_BASE_URL, JIRA_EMAIL and JIRA_API_TOKEN, or the Jira settings (see Connect your Jira first). The token is never printed, logged or saved in a note. If it is in settings.json, that file must be readable only by you (chmod 600), or the import refuses to run. Only Atlassian Cloud sites (*.atlassian.net) are accepted unless you add --allow-other-host.

Next steps