User Guide/Examples
Coding Agent Knowledge Base

How to Build a Coding Agent Knowledge Base in Cortex

Equip your coding agents with the Cortex API so they can gather the most relevant and up-to-date context on-demand. Your coding agents can maintain the Cortex project, tracking the systems your codebases depend on and continually improving the knowledge base via automated feedback loops.

Starter Prompt

To get started automatically with the Cortex assistant, send:

Help me create a coding agent knowledge base project in Cortex.
What You Will Create In Cortex
  • 1 Project for validator operations
  • Sources spanning RSS, API endpoint, Web, and X list connectors
  • 1 Feed that consolidates validator release and operator context
  • 1 Briefing Digest for validator upgrade preflight review
Other Requirements
  • A codebase you actively maintain
  • A coding agent or IDE like Claude Code, Copilot, etc.
  • Basic understanding of Agent Skills
  • A GitHub account with a personal access token
  • An X API credential for the curated technical experts list

Introduction

Coding agents need many kinds of context for many different jobs: current dependencies, operational guidance, breaking changes, incident history, security updates, and practical best practices. It is possible to rely on ad hoc knowledge bases like markdown files or notes, which work up to a point. But with the latest AI models, coding agents can now build and maintain durable, scalable knowledge bases that improve over time. Cortex gives them an API for gathering, organizing, and retrieving the information coding agents need to build powerful knowledge bases.

Step 1: Project setup

Make sure your coding agent has the access it needs to build and maintain this knowledge base, both in Cortex itself and in the external systems that supply source material.

Important

Create a Cortex account at runcortex.io/sign-up, then create a Cortex API key before continuing. If needed, follow the API key setup guide. API keys can only be created by organization admins.

Your coding agent can connect to Cortex in two ways. The fastest path is MCP (Model Context Protocol) — it gives your agent direct tool access to Cortex without writing any integration code. Alternatively, use the OpenAPI spec for the machine-readable contract and the API reference for endpoint-level usage details as you create and maintain the project, define the feed, and work with the resulting digests.

Before you add any sources, create the Cortex project that will hold the rest of this setup. A good project objective should be broad enough to guide everything in the project, but specific enough to define the operating decisions, workflows, or outcomes the system is meant to support over time.

Create Project
Project Name
Solana Validator Operations
Project Objective
Help the blockchain team make better Solana validator operating decisions by continuously tracking the client, fork, network, and ecosystem changes that affect client selection, Jito optimization, performance, reliability, validator economics, and upgrade planning.

Step 2: Set Up Sources for GitHub Repos

Start with the GitHub repositories that are closest to the product itself. In this example, those repositories expose the release feeds, pull requests, and proposal work that directly shape validator upgrades and operational decisions.

For a different product, this same pattern still applies. Begin with the repos where the product team ships releases, discusses implementation changes, or manages formal proposals. These are usually the highest-signal sources because they are where the product itself tells you what changed.

Important

Create a GitHub personal access token before you set up the API endpoint sources. In this example we assume the repositories are public, so the token supports reliable GitHub API access rather than unlocking private repository permissions. Use the GitHub credential guide when you are ready to add it.

Use the official Agave release feed as the cleanest direct signal for stable releases, release notes, and upgrade-critical changes.

Create Source
Source Type
RSS
Source Name
Agave Releases (RSS)
Connection Tips
Choose the most official feed you can find, make sure it reliably publishes the updates you care about, and set a polling schedule that matches how quickly you need to react.
View example connector config
{
  "url": "https://github.com/anza-xyz/agave/releases.atom",
  "cron": "0 0 * * *"
}

Track Jito Validator releases directly so the feed captures the client version changes and release notes operators are most likely to act on.

Create Source
Source Type
RSS
Source Name
Jito Solana Releases (RSS)
Connection Tips
Choose the most official feed you can find, make sure it reliably publishes the updates you care about, and set a polling schedule that matches how quickly you need to react.
View example connector config
{
  "url": "https://github.com/jito-foundation/jito-solana/releases.atom",
  "cron": "0 0 * * *"
}

Use the GitHub Pulls API for Agave so the feed can see important implementation changes before they are fully packaged into release notes.

Create Source
Source Type
API Endpoint
Source Name
Agave PR Tracker (GitHub Pulls)
Connection Tips
Define the request URL, authentication, and extraction paths clearly so Cortex can pull structured records from the endpoint without depending on brittle page scraping.
View example connector config
{
  "request": {
    "url": "https://api.github.com/repos/anza-xyz/agave/pulls?state=all&sort=updated&direction=desc&per_page=50",
    "auth": {
      "mode": "bearer_credential",
      "credentialRef": "<stored-github-credential-ref>"
    },
    "headers": [
      {
        "name": "Accept",
        "value": "application/vnd.github+json"
      }
    ]
  },
  "extract": {
    "itemsPath": "$[*]",
    "urlPath": "$.html_url",
    "titlePath": "$.title",
    "textPath": "$.body",
    "publishedAtPath": "$.updated_at"
  },
  "cron": "0 0 * * *"
}

Track SIMDs through pull requests so the feed can pick up protocol changes while they are still being discussed and refined.

Create Source
Source Type
API Endpoint
Source Name
Solana Improvement Documents (GitHub PRs)
Connection Tips
Define the request URL, authentication, and extraction paths clearly so Cortex can pull structured records from the endpoint without depending on brittle page scraping.
View example connector config
{
  "request": {
    "url": "https://api.github.com/repos/solana-foundation/solana-improvement-documents/pulls?state=all&sort=updated&direction=desc&per_page=50",
    "auth": {
      "mode": "bearer_credential",
      "credentialRef": "<stored-github-credential-ref>"
    },
    "headers": [
      {
        "name": "Accept",
        "value": "application/vnd.github+json"
      }
    ]
  },
  "extract": {
    "itemsPath": "$[*]",
    "urlPath": "$.html_url",
    "titlePath": "$.title",
    "textPath": "$.body",
    "publishedAtPath": "$.updated_at"
  },
  "cron": "0 0 * * *"
}

Include Firedancer releases as adjacent client signal so operators can keep an eye on another important implementation path.

Create Source
Source Type
RSS
Source Name
Firedancer Releases
Connection Tips
Choose the most official feed you can find, make sure it reliably publishes the updates you care about, and set a polling schedule that matches how quickly you need to react.
View example connector config
{
  "url": "https://github.com/firedancer-io/firedancer/releases.atom",
  "cron": "0 0 * * *"
}

Step 3: Set Up More Sources for More Context

Repo activity usually is not enough on its own. Add a smaller set of outside sources that help explain what those repo changes mean in practice, especially if your users need rollout guidance, operational context, expert discussion, incident history, or ecosystem reactions.

Each source stays compact by default. Expand the connector config only when you need to see the request, selector, or polling fields that actually wire the source into Cortex.

Important

Create an X API credential before you add the Solana Technical Experts list source. Follow the X API integration guide so Cortex can pull from the Solana Technical Experts X list used in this example.

Add a curated technical X list to capture rollout observations, caveats, and implementation details that often surface before they are written up elsewhere.

Create Source
Source Type
X List
Source Name
Solana Technical Experts (X)
Connection Tips
Use a curated list instead of a broad search whenever possible, then tune polling and filters so you capture relevant discussion without pulling in too much noise.
View example connector config
{
  "list_id": "<x-list-id-or-url>",
  "max_results": 100,
  "exclude_replies": false,
  "exclude_retweets": false,
  "cron": "0 0 * * *"
}

Include DoubleZero for networking and infrastructure context that can materially affect validator operations and upgrade planning.

Create Source
Source Type
Web
Source Name
DoubleZero Journal
Connection Tips
Start with the listing page you actually want to monitor, then identify the selectors Cortex needs for each item, the link, and any page-level metadata such as title or publish date.
View example connector config
{
  "url": "https://doublezero.xyz/journal",
  "selectors": {
    "item": "a.block[href*=\"/journal/\"]",
    "link": ":self",
    "title": "h6"
  },
  "pageSelectors": {
    "title": "h2",
    "date": "div.inline-flex.items-center span.text-foreground"
  },
  "waitFor": "css:a.block[href*=\"/journal/\"]",
  "cron": "0 0 * * *"
}

Use the official status history feed to ground the project in real incidents, degradations, and operator-relevant service events.

Create Source
Source Type
RSS
Source Name
Solana Status
Connection Tips
Choose the most official feed you can find, make sure it reliably publishes the updates you care about, and set a polling schedule that matches how quickly you need to react.
View example connector config
{
  "url": "https://status.solana.com/history.atom",
  "cron": "0 0 * * *"
}

Monitor the Solana forum for technical announcements, operator discussion, and rollout guidance that do not always show up in release notes.

Create Source
Source Type
RSS
Source Name
Solana Forum — Latest
Connection Tips
Choose the most official feed you can find, make sure it reliably publishes the updates you care about, and set a polling schedule that matches how quickly you need to react.
View example connector config
{
  "url": "https://forum.solana.com/latest.rss",
  "cron": "0 0 * * *"
}

Include Syndica for infrastructure-oriented commentary that helps interpret changes affecting validator operations and network usage.

Create Source
Source Type
RSS
Source Name
Syndica Blog
Connection Tips
Choose the most official feed you can find, make sure it reliably publishes the updates you care about, and set a polling schedule that matches how quickly you need to react.
View example connector config
{
  "url": "https://blog.syndica.io/rss/",
  "cron": "0 0 * * *"
}

Track Marinade for staking and validator-economics context that can shape operational priorities around upgrades and network changes.

Create Source
Source Type
RSS
Source Name
Marinade Finance Blog
Connection Tips
Choose the most official feed you can find, make sure it reliably publishes the updates you care about, and set a polling schedule that matches how quickly you need to react.
View example connector config
{
  "url": "https://marinade.finance/blog/rss.xml",
  "cron": "0 0 * * *"
}

Step 4: Set Up a Feed

Once the source set is in place, create a feed that brings those sources together under one filtering objective. The feed is where Cortex turns a pile of source material into a consistent stream of relevant items for this project.

Create Feed
Feed Name
Validator Operations Feed
Feed Objective
Collect high-signal information that materially affects running a Solana validator. Prioritize releases, SIMD proposals, protocol and client changes, CLI or configuration changes, incidents, security guidance, performance and reliability updates, staking economics changes, and operator discussions when they could change upgrade timing, configuration, monitoring, or day-to-day operations. Prefer items with clear operator implications such as version numbers, timelines, mitigations, or required actions. Deprioritize broad crypto news, commentary, and ecosystem chatter unless it has direct consequences for validator operations.
Sources
  • Agave Releases (RSS)
  • Jito Solana Releases (RSS)
  • Agave PR Tracker (GitHub Pulls)
  • Solana Improvement Documents (GitHub PRs)
  • Firedancer Releases
  • Solana Technical Experts (X)
  • DoubleZero Journal
  • Solana Status
  • Solana Forum — Latest
  • Syndica Blog
  • Marinade Finance Blog

Step 5: Set Up a Digest

For now, keep this example scoped to a single briefing digest. The feed already gathers more signal than an operator wants to read raw, so the briefing is the place where Cortex turns that stream into an upgrade-focused working view.

Create Digest
Digest Name
Validator Upgrade Preflight Brief
Digest Objective
Create a validator upgrade preflight brief for Jito Validator (`jito-solana`) and Agave, focused on the latest stable mainnet release. Include only newly published releases, advisories, and validator-relevant changes that materially affect upgrading to or operating the current stable version. Prioritize breaking changes, CLI and config changes, feature-gate and compatibility impacts, performance or resource shifts, security fixes, and staking, rewards, or MEV implications. For each relevant change, capture the affected component or version, the technical change, operator impact, recommended actions, required CLI, config, or feature-gate updates, post-upgrade validation checks, and any rollback or known-issue notes. Exclude non-operational commentary.
Digest Type
Briefing
Feed Scope
  • Validator Operations Feed

Conclusion: Observe and Improve the System

After the first digest starts producing useful output, observe what is working and improve the setup based on what you learn. Outside Cortex, the operator still uses normal tooling to do the actual work. In this example, that environment is centered on VS Code with GitHub Copilot, connected to Cortex via MCP.

The operator reads the Cortex outputs, reviews what is useful or noisy, and then updates the source set, feed objective, or digest objective accordingly. Over time, the system becomes more tailored to the actual operating questions that matter.

The digests surface the high-level picture. When something looks relevant, the coding agent can dig deeper: query the feed for related items, fetch the original source content, or call the GitHub API directly for full PR diffs, commit history, or issue threads. Cortex handles the continuous monitoring so the agent starts from context instead of starting from scratch.

Information begins in the tracked sources: release feeds, repository pull requests, SIMD proposal work, operator discussion, and supporting infrastructure updates. Cortex collects those items into the Validator Operations Feed. The feed provides the common intelligence layer for the project.

From there, Cortex generates the Validator Upgrade Preflight Brief. That briefing gives the operator a synthesized view of the latest changes that matter for upgrading and operating the current validator stack.

The operator then uses those outputs in their working environment to decide what action to take. Cortex continuously reduces the manual overhead of staying current, while the operator keeps control over execution in their normal tooling.