56 results available
Sign in
Skills directory

rw-integrate-documents

runwayml

·

Last changed
Hardened

This skill has been hardened by Chainguard

Last changed

This version passed the hardening gate. Hardening applied 1 targeted change and preserved all other text. Classified findings before hardening: 0. Classified findings closed: 0. Classified findings remaining: 0. Unclassified scanner findings remaining: 0. Review findings closed: 8. Review findings remaining: 10.


Open before hardening

None

Open after hardening

None


Expand
File
Group
Subtype
Severity
Status

No findings available

0 findings


SKILL.md

Integrate Documents (Knowledge Base)

Give your Characters access to domain-specific knowledge. Upload content that your Avatar can reference during conversations for accurate, contextual responses.

When to Use Documents

Use CaseExample Content

Customer support

FAQs, product info, company policies, return procedures

Quizzes & games

Question banks, correct answers, scoring rules

Education

Course material, reference content, learning objectives

Brand experiences

Brand guidelines, messaging, product catalogs

Constraints

  • Each Avatar supports up to 50,000 tokens of knowledge
  • Supported formats: plain text and Markdown
  • More formats planned for future releases

Flow

The flow is: Create a Document → Link it to an Avatar

Step 1: Create a Document

Node.js

import RunwayML from '@runwayml/sdk';

const client = new RunwayML();

const document = await client.documents.create({
  name: 'Product FAQ',
  content: `# Product FAQ

## What is your return policy?
We offer a 30-day return policy for all unused items in original packaging.

## How do I track my order?
Log in to your account and visit the Orders page. You'll find tracking information for all shipped orders.

## Do you offer international shipping?
Yes, we ship to over 50 countries. Shipping costs and delivery times vary by destination.`,
});

console.log('Document created:', document.id);

Python

from runwayml import RunwayML

client = RunwayML()

document = client.documents.create(
    name='Product FAQ',
    content="""# Product FAQ

## What is your return policy?
We offer a 30-day return policy for all unused items in original packaging.

## How do I track my order?
Log in to your account and visit the Orders page.

## Do you offer international shipping?
Yes, we ship to over 50 countries.""",
)

print('Document created:', document.id)

Update your Avatar to attach the document. This replaces any existing document attachments — pass all document IDs you want linked.

Node.js

await client.avatars.update(avatarId, {
  documentIds: [document.id],
});

Python

client.avatars.update(
    avatar_id,
    document_ids=[document.id],
)

Multiple Documents

You can link multiple documents to a single avatar (total must stay under 50,000 tokens):

const faq = await client.documents.create({
  name: 'FAQ',
  content: '...',
});

const policies = await client.documents.create({
  name: 'Company Policies',
  content: '...',
});

await client.avatars.update(avatarId, {
  documentIds: [faq.id, policies.id],
});

Step 3: Start a Session

Once documents are linked, the Avatar automatically has access to the knowledge during conversations. Start a session as usual — no additional configuration needed:

const session = await client.realtimeSessions.create({
  model: 'gwm1_avatars',
  avatar: {
    type: 'custom',
    avatarId: avatarId,
  },
});
session = client.realtime_sessions.create(
    model='gwm1_avatars',
    avatar={
        'type': 'custom',
        'avatar_id': avatar_id,
    },
)

See +rw-integrate-characters for the full session creation, polling, and WebRTC flow.

Integration Patterns

Load Documents from Files

Read content from local files and create documents:

import fs from 'fs';
import RunwayML from '@runwayml/sdk';

const client = new RunwayML();

// Read a local markdown file
const content = fs.readFileSync('./knowledge/product-faq.md', 'utf-8');

const document = await client.documents.create({
  name: 'Product FAQ',
  content,
});
from pathlib import Path
from runwayml import RunwayML

client = RunwayML()

content = Path('./knowledge/product-faq.md').read_text()

document = client.documents.create(
    name='Product FAQ',
    content=content,
)

Tips

  • Use Markdown for structured content — headings help the Avatar navigate the knowledge.
  • Be concise — stay well under the 50,000 token limit for best retrieval quality.
  • Organize by topic — multiple focused documents work better than one giant document.
  • Update regularly — keep knowledge current by re-creating documents when content changes.
  • Documents can also be managed via the Developer Portal UI.

Install

Install with chainctl
chainctl skill install public/runwayml/rw-integrate-documents:latest
Get started with chainctl
View source

Harden your own skills

Bring Chainguard's hardening pipeline to your first-party skills — custom rulesets, automated remediation, full audit trail.

Provenance

Upstream sourcehttps://github.com/runwayml/skills
Upstream commit9b7c1ed4d5cab8704107fe08a173c329cd0cefdb
OCI reference

skills.cgr.dev/public/github.com/runwayml/skills/rw-integrate-documents:latest

License

MIT

Files

HARDENING.md

LICENSE

SKILL.md


The trusted source for open source

Talk to an expert
PrivacyTerms

Product

Chainguard ContainersChainguard LibrariesChainguard VMsChainguard OS PackagesChainguard ActionsChainguard Agent SkillsIntegrationsPricing
© 2026 Chainguard, Inc. All Rights Reserved.
Chainguard® and the Chainguard logo are registered trademarks of Chainguard, Inc. in the United States and/or other countries.
The other respective trademarks mentioned on this page are owned by the respective companies and use of them does not imply any affiliation or endorsement.