forked from the-turing-way/the-turing-way
-
Notifications
You must be signed in to change notification settings - Fork 0
small section on ai #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
PepeRulo
wants to merge
5
commits into
main
Choose a base branch
from
ai-jose
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+126
−2
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
5598787
small section on ai
PepeRulo 9b467a5
simplified
PepeRulo 7bdf9f7
binary does not seem to be put on PATH by default
PepeRulo d9604c7
Correct capitalization of 'Skill' in documentation
PepeRulo b44f3a1
introduced agents and added skill example
PepeRulo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
110 changes: 110 additions & 0 deletions
110
book/website/artificial-intelligence/ai-agent-standards.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,110 @@ | ||
| (ai-agent-standards)= | ||
| # Standards for AI Agents | ||
|
|
||
| An AI agent is a software system that can use a large language model (LLM) to interpret a task, decide what steps to take, and act through available tools or services. | ||
| In a research context, an agent might help draft documentation, inspect and write code, run tests, query project files, or coordinate steps in a workflow. | ||
| Because agents can act on behalf of a user, their instructions, permissions, and connections to other systems should be carefully considered. | ||
|
|
||
| AI agents can be configured in different ways. | ||
| Two emerging standards are especially relevant: [Agent Skills](https://agentskills.io/home) and the [Model Context Protocol](https://modelcontextprotocol.io/docs/getting-started/intro) (MCP). | ||
| They solve related but different problems. | ||
|
|
||
| ## Agent Skills | ||
|
|
||
| Agent Skills are lightweight, portable bundles of instructions that teach an agent how to perform a particular task. | ||
| An Agent Skill is usually a directory containing a required `SKILL.md` file, with optional subdirectories for scripts, references, or other resources. | ||
| At minimum, `SKILL.md` contains a `name`, a `description` and instructions that explain when and how the Skill should be used. | ||
|
|
||
| A basic `SKILL.md` might look like this: | ||
|
|
||
| ```markdown | ||
| --- | ||
| name: metadata-check | ||
| description: Check whether a dataset has the core metadata needed before sharing. | ||
| --- | ||
|
|
||
| Use this Skill when reviewing a dataset for sharing or archiving. | ||
|
|
||
| Check that the dataset includes: | ||
|
|
||
| - a clear title; | ||
| - creator names and affiliations; | ||
| - a short description of the data; | ||
| - license information; | ||
| - information about how the data were collected; | ||
| - any access restrictions or sensitivity concerns. | ||
|
|
||
| Report missing items as a checklist. | ||
| Do not invent metadata values. | ||
| ``` | ||
|
|
||
| A common project-level layout is: | ||
|
|
||
| ```text | ||
| .agents/ | ||
| +-- skills/ | ||
| +-- data-cleaning/ | ||
| +-- SKILL.md | ||
| +-- scripts/ | ||
| +-- references/ | ||
| +-- assets/ | ||
| ``` | ||
|
|
||
| Skills are useful when an agent needs procedural knowledge: how to follow a lab's data-cleaning checklist, how to prepare a manuscript according to a journal style, or how to run a recurring quality-control workflow. | ||
| They are designed around progressive disclosure: agents first see only a Skill's name and description, and load the full instructions only when the task requires it. | ||
| This helps reduce context use and makes Skills relatively token-efficient. | ||
|
|
||
| Skills are best suited for reusable guidance and lightweight automation. | ||
| While they can include executable scripts, they do not provide an access-management system, instead relying on tokens saved locally. | ||
| If a Skill needs to interact with services, the surrounding agent environment still needs appropriate authentication, permissions, etc. | ||
|
|
||
| ## Model Context Protocol | ||
|
|
||
| The Model Context Protocol is an open protocol for connecting AI applications to external systems. | ||
| MCP servers can expose tools, resources, prompts and workflows to an AI client. | ||
| For example, an MCP server might let an agent query a database, read documents from a project repository, search an institutional knowledge base or call a service API. | ||
|
|
||
| MCP is useful when the agent needs a structured connection to an external provider or system. | ||
| Unlike a Skill, which primarily tells an agent how to do something, an MCP server gives the agent a defined interface for accessing something. | ||
| MCP also includes an [authorization framework](https://modelcontextprotocol.io/docs/tutorials/security/authorization) for HTTP-based transports, supporting patterns such as OAuth-based access to protected resources. | ||
| This can make MCP more suitable for shared services, enterprise environments and cases where identity, permissions and audit trails matter. | ||
|
|
||
| However, MCP authorization is not automatic. | ||
| Implementers still need to configure servers and clients securely, minimise scopes, validate tokens and avoid unsafe patterns such as token passthrough. | ||
|
|
||
| ## Choosing Between Skills and MCP | ||
|
|
||
| Skills and MCPs are complementary. | ||
|
|
||
| Use a Skill when you want to package reusable expertise, instructions, examples or small scripts for an agent. | ||
| A Skill might describe how to run a reproducibility checklist, prepare metadata or follow a project's contribution workflow. | ||
|
|
||
| Use an MCP server when the agent needs controlled access to an external system: a database, cloud storage provider, calendar, issue tracker or another service where authentication and permissions matter. | ||
|
|
||
| In practice, the two can work together. | ||
|
|
||
| ## Security and Trust | ||
|
|
||
| Both Skills and MCP servers should be treated as part of the software supply chain. | ||
| They may contain instructions, code, links, dependencies or service connections that affect what an agent can do. | ||
| Guidance from the MCP security documentation highlights risks such as prompt injection, tool poisoning, excessive permissions and token misuse. | ||
| Similar caution is appropriate for Skills, especially when they include scripts or instructions from untrusted sources. | ||
|
|
||
| Good practice includes: | ||
|
|
||
| - install Skills and MCP servers only from trusted sources; | ||
| - review `SKILL.md`, scripts, dependencies and external URLs before use; | ||
| - run code with the least privileges needed; | ||
| - use scoped credentials rather than broad tokens; | ||
| - require human confirmation for sensitive actions; | ||
| - be especially careful with content from untrusted sources, as these may contain prompt-injection attempts. | ||
|
|
||
| For research projects, these standards are most valuable when they are version-controlled, documented, reviewed and maintained like other research software infrastructure. | ||
|
|
||
| ## Further Resources | ||
|
|
||
| - [Agent Skills specification](https://agentskills.io/specification) | ||
| - [Agent Skills client implementation guidance](https://agentskills.io/client-implementation/adding-skills-support) | ||
| - [Model Context Protocol documentation](https://modelcontextprotocol.io/docs/getting-started/intro) | ||
| - [MCP security best practices](https://modelcontextprotocol.io/docs/tutorials/security/security_best_practices) | ||
| - [MCP authorization guide](https://modelcontextprotocol.io/docs/tutorials/security/authorization) | ||
9 changes: 9 additions & 0 deletions
9
book/website/artificial-intelligence/artificial-intelligence.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| (ai)= | ||
| # Guide for Artificial Intelligence | ||
|
|
||
| ***This guide covers topics related to using artificial intelligence systems and best practices.*** | ||
|
|
||
| Artificial intelligence systems are increasingly used to support research workflows, from literature discovery and code generation to documentation, data stewardship and project management. | ||
| These systems can be useful, but they also introduce new questions about reproducibility, accountability, security, privacy, authorship and maintenance. | ||
|
|
||
| Check out our [contributing guidelines](#ch-contributing) to get involved. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really good, but I actually think that skills are so straightforward that you could add a real example from the markdown of an actual skill here and people would see what skills contain and how they work through that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, though perhaps linking to a skills repo (ours?) may be better to show real skills and, ideally, their use cases and results from using them.