Contributing---
title: Contributing to Docs
Thank you for your interest in contributing to Agent SDK! This guide will help you get started.nav_exclude: true
Ways to Contribute
Contributing to Documentation
Bug Reports: Open an issue with detailed reproduction steps
Feature Requests: Describe the feature and its use case Pages live under
docs/and are rendered by GitHub Pages with the Just the Docs theme.Documentation: Fix typos, clarify explanations, add examples Each page should start with YAML front matter including at least
titleand optionallynav_order.Code: Submit pull requests for bug fixes or new features Section landing pages use the directory
README.mdpattern.
Development Setup## Local preview (optional)
PrerequisitesYou can preview locally with Docker, without installing Ruby:
Node.js >= 18.17```sh
npm, pnpm, or yarndocker run --rm -p 4000:4000 -v "$PWD/docs":/site -w /site bretfisher/jekyll-serve
### Getting Started
Then open http://localhost:4000.
```bash
# Clone the repositoryIf you prefer Ruby:
git clone https://github.com/Cognipeer/agent-sdk
cd agent-sdk```sh
gem install bundler jekyll
# Install dependenciescd docs && bundle init && echo 'gem "just-the-docs"' >> Gemfile && bundle && bundle exec jekyll serve
npm install```
# Build the packageNote: GitHub Pages will build automatically on pushes to the default branch when Pages is enabled for this repo and the source is set to the `docs/` folder.
npm run build
# Run examples
npm run example:basic
# Run documentation locally
npm run docs:devProject Structure
agent-sdk/
├── agent-sdk/ # Core SDK package
│ ├── src/ # Source code
│ └── package.json # Package manifest
├── docs/ # VitePress documentation
│ ├── .vitepress/ # VitePress config
│ ├── guide/ # User guides
│ ├── api/ # API reference
│ └── examples/ # Example documentation
├── examples/ # Example applications
└── package.json # Monorepo rootMaking Changes
Code Changes
Fork and Clone
bashgit clone https://github.com/your-username/agent-sdk cd agent-sdkCreate a Branch
bashgit checkout -b feature/your-feature-nameMake Changes
- Write clear, commented code
- Follow existing code style
- Add tests if applicable
Test Your Changes
bashnpm run build npm run example:basic # Test with examplesCommit and Push
bashgit add . git commit -m "feat: add your feature description" git push origin feature/your-feature-nameOpen a Pull Request
- Describe what changed and why
- Reference related issues
- Wait for review
Documentation Changes
Documentation uses VitePress and lives in the docs/ directory.
Run docs locally
bashnpm run docs:devEdit markdown files
- Guides:
docs/guide/ - API:
docs/api/ - Examples:
docs/examples/
- Guides:
Preview changes at the local preview URL printed by the dev server
Submit PR following the same process as code changes
Code Style
- Use TypeScript for type safety
- Follow existing patterns and conventions
- Write clear comments for complex logic
- Keep functions small and focused
- Use descriptive variable names
Commit Messages
Follow conventional commits:
feat:New featurefix:Bug fixdocs:Documentation changesrefactor:Code refactoringtest:Test additions or changeschore:Build process or tooling changes
Example: feat: add support for custom model adapters
Testing
- Test changes with provided examples
- Add new examples for significant features
- Ensure builds pass:
npm run build
Documentation Guidelines
- Use clear, concise language
- Include code examples
- Link to related docs
- Test all code snippets
- Update API docs for interface changes
Adding Examples
When adding a new example:
- Create folder in
examples/ - Add TypeScript file with implementation
- Add npm script in root
package.json - Create documentation in
docs/examples/ - Update example index
Questions?
- Open a GitHub Discussion
- Join our community chat (if available)
- Check existing issues and PRs
License
By contributing, you agree that your contributions will be licensed under the MIT License.
Code of Conduct
Be respectful and constructive. We're all here to learn and build together.
Thank you for contributing to Agent SDK!

