Skip to content

Commit 2313162

Browse files
authored
add docs pages and content for docs pages (#6)
* add docs pages and content for docs pages * fix types pathing * add docs to header and footer, add sdk npm link to footer * remove comments
1 parent 28342fb commit 2313162

File tree

26 files changed

+5347
-1770
lines changed

26 files changed

+5347
-1770
lines changed

.source/index.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// @ts-nocheck -- skip type checking
2+
import * as docs_5 from "../content/docs/sdk.mdx?collection=docs&hash=1751495305626"
3+
import * as docs_4 from "../content/docs/prompt-authoring.mdx?collection=docs&hash=1751495305626"
4+
import * as docs_3 from "../content/docs/index.mdx?collection=docs&hash=1751495305626"
5+
import * as docs_2 from "../content/docs/git-sync.mdx?collection=docs&hash=1751495305626"
6+
import * as docs_1 from "../content/docs/getting-started.mdx?collection=docs&hash=1751495305626"
7+
import * as docs_0 from "../content/docs/core-concepts.mdx?collection=docs&hash=1751495305626"
8+
import { _runtime } from "fumadocs-mdx"
9+
import * as _source from "../source.config"
10+
export const docs = _runtime.docs<typeof _source.docs>([{ info: {"path":"core-concepts.mdx","absolutePath":"/Users/lanzo/projects/agentsmith/content/docs/core-concepts.mdx"}, data: docs_0 }, { info: {"path":"getting-started.mdx","absolutePath":"/Users/lanzo/projects/agentsmith/content/docs/getting-started.mdx"}, data: docs_1 }, { info: {"path":"git-sync.mdx","absolutePath":"/Users/lanzo/projects/agentsmith/content/docs/git-sync.mdx"}, data: docs_2 }, { info: {"path":"index.mdx","absolutePath":"/Users/lanzo/projects/agentsmith/content/docs/index.mdx"}, data: docs_3 }, { info: {"path":"prompt-authoring.mdx","absolutePath":"/Users/lanzo/projects/agentsmith/content/docs/prompt-authoring.mdx"}, data: docs_4 }, { info: {"path":"sdk.mdx","absolutePath":"/Users/lanzo/projects/agentsmith/content/docs/sdk.mdx"}, data: docs_5 }], [])

.source/source.config.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// source.config.ts
2+
import { defineDocs } from "fumadocs-mdx/config";
3+
var docs = defineDocs({
4+
dir: "content/docs"
5+
});
6+
export {
7+
docs
8+
};

content/docs/core-concepts.mdx

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
title: Core Concepts
3+
description: Learn how Agentsmith works
4+
---
5+
6+
## Architecture
7+
8+
Agentsmith is a platform that consists of four main components:
9+
10+
1. **Agentsmith Studio** - A Next.js application that provides a visual interface for creating and managing prompts
11+
2. **Git Sync Engine** - A system that syncs prompts from the studio to a GitHub repository as files
12+
3. **Agentsmith SDK** - A TypeScript SDK for fetching and executing prompts from the file system (and/or studio)
13+
4. **OpenRouter** - All AI calls are made through OpenRouter to achieve maximum flexibility and cost-efficiency
14+
15+
## OpenRouter
16+
17+
We built Agentsmith to be as flexible as possible, which is why we use OpenRouter as the backbone of making LLM calls.
18+
With OpenRouter, you get a unified API for all LLMs and access to many providers.
19+
Allowing you to focus on on the prompts rather than the underlying infrastructure, while also giving you the flexibility to switch models and providers as needed.
20+
21+
## Agentsmith SDK
22+
23+
The Agentsmith SDK was designed to use types and files to provide intellisense in your IDE. The SDK will guard against mis-using prompts and provide a type-safe way to execute prompts.
24+
You can make sure you are avoiding silent errors by using the correct variables and configuration when executing a prompt.
25+
26+
To learn more about the SDK, see the [SDK](/docs/sdk) page.
27+
28+
## Prompt Authoring
29+
30+
Authors can create prompts in the studio which will save the prompt content, variables, and configuration to the database.
31+
32+
To learn more about prompt authoring, see the [Prompt Authoring](/docs/prompt-authoring) page.
33+
34+
## Git Sync
35+
36+
Authors can sync the prompts to a connected GitHub repository at any time by clicking the sync button in the studio header, or on the project home page.
37+
38+
To learn more about git-powered handoff, see the [Git-Sync](/docs/git-sync) page.

content/docs/getting-started.mdx

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
title: Getting Started
3+
description: Getting started with the Agentsmith Studio and SDK
4+
---
5+
6+
import { Alert, AlertTitle, AlertDescription } from '@/components/ui/alert';
7+
import { TriangleAlert } from 'lucide-react';
8+
9+
## Prerequisites
10+
11+
- A [GitHub](https://github.com/) account
12+
- An [OpenRouter](https://openrouter.ai/) account
13+
14+
## Create an Agentsmith account
15+
16+
Go to the [sign-up page](/sign-up) and create an account.
17+
18+
<Alert variant="warning">
19+
<TriangleAlert />
20+
<AlertTitle>Alpha Status</AlertTitle>
21+
<AlertDescription>
22+
We are only accepting a limited number of users at this time. Creating an account will put you
23+
on a waitlist. If you want access now, you can join the [Alpha Club](/#pricing) for 50% off the
24+
first year.
25+
</AlertDescription>
26+
</Alert>
27+
28+
## Follow Onboarding
29+
30+
Once you have an account, you can access the [studio](/studio).
31+
32+
You will be prompted to:
33+
34+
1. Install the Agentsmith GitHub app
35+
2. Connect your Agentsmith project to a GitHub repository
36+
3. Connect your [OpenRouter](https://openrouter.ai/) Account
37+
4. Create a new prompt
38+
5. Test the prompt
39+
6. Sync your prompt to your GitHub repository
40+
41+
This will give you a basic understanding of how to Author, Test, and Sync prompts using Agentsmith.
42+
43+
## After Onboarding
44+
45+
Once you have completed the onboarding in the studio, you can start using the SDK to compile and execute those prompts safely.
46+
47+
Follow the [SDK](/docs/sdk) page to continue.

content/docs/git-sync.mdx

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
title: Git Sync
3+
description: Keep engineers in the loop
4+
---
5+
6+
## Triggering a Sync
7+
8+
You can trigger a sync by clicking the sync button in the studio header, or on the project home page.
9+
This will kick off a process that will:
10+
11+
1. Get the state of the prompts from the studio database
12+
2. Get the state of the prompts from the connected GitHub repository
13+
3. Compare the two states
14+
4. Determine actions to take (create, update, delete)
15+
5. Apply those actions to the connected GitHub repository or the studio database
16+
17+
## Viewing sync history
18+
19+
You can view the sync history by clicking the "Events" link in the studio navigation.
20+
Here you can see the status of any syncs that have been triggered, and when clicking on an event you can see the details.
21+
The details include in which direction the sync was ran, the diff of the changes, and a link to the GitHub PR.
22+
23+
## Making changes in your GitHub repository
24+
25+
You can make changes to your GitHub repository by editing the files in the repository.
26+
Once you have pushed your changes, a sync is automatically triggered.
27+
Make sure to create your files in the correct directory structure to ensure they are properly synced to the studio.
28+
You can view the status of your sync by clicking the "Events" link in the studio navigation.
29+
30+
## Note about publishing
31+
32+
When pushing changes to your GitHub repository, Agentsmith will create prompts that do not exist in the studio database.
33+
Agentsmith will publish those prompts ONLY if the push was made to the default branch of your repository.
34+
Otherwise, all prompt versions will be in DRAFT status.
35+
This is to prevent you from accidentally publishing changes to your prompts in a non-default branch.

content/docs/index.mdx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
title: Welcome to Agentsmith
3+
description: Build AI agents with peace of mind
4+
---
5+
6+
import { Alert, AlertTitle, AlertDescription } from '@/components/ui/alert';
7+
import { TriangleAlert } from 'lucide-react';
8+
9+
Agentsmith is an open-source AI agent development platform that makes building, testing, and deploying AI agents accessible to both technical and non-technical users. Our intuitive prompt authoring tools, seamless GitHub synchronization, and type-safe SDK ensure reliability and maintainability in production environments.
10+
11+
## What is Agentsmith?
12+
13+
Agentsmith is a comprehensive platform for AI agent development that bridges the gap between prompt engineering and production deployment. It provides:
14+
15+
- **Intuitive Prompt Authoring** - Visual tools for creating and managing AI prompts with variables and versioning
16+
- **GitHub Integration** - Automatic synchronization of your prompts to GitHub repositories with version control
17+
- **Type-Safe Development** - Fully-typed TypeScript SDK that prevents runtime errors and ensures reliability
18+
- **Observability** - Built-in logging for debugging, monitoring, and cost tracking
19+
- **Multi-Provider Support** - Switch between AI providers seamlessly using OpenRouter integration
20+
21+
<Alert variant="warning">
22+
<TriangleAlert />
23+
<AlertTitle>Alpha Release</AlertTitle>
24+
<AlertDescription>
25+
Agentsmith is currently in alpha. Changes are pushed frequently and may include breaking
26+
changes. If you encounter any issues, please reach out to support@agentsmith.app for assistance.
27+
</AlertDescription>
28+
</Alert>

content/docs/prompt-authoring.mdx

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
title: Prompt Authoring
3+
description: Author prompts with ease
4+
---
5+
6+
## Jinja
7+
8+
All prompts should follow the Jinja2 template syntax, more specifically, the [nunjucks](https://mozilla.github.io/nunjucks/templating.html) syntax.
9+
10+
## Versioning
11+
12+
When first creating a prompt, it will be in DRAFT status. This means it will not be available under the "latest" tag when fetching via the SDK.
13+
However, you can still fetch the prompt by using the `version` parameter. (e.g. `hello-world@0.0.1`)
14+
15+
You can publish a prompt by clicking the "Publish" button in the studio.
16+
That version will then be the "latest" version of the prompt and available for fetching via the SDK via the slug (`hello-world`) or the latest tag (`hello-world@latest`).
17+
18+
You can then create a new version of the prompt by clicking the "Create New Version" button in the studio.
19+
We make sure you follow the [semver](https://semver.org/) convention for versioning which quick access for patch, minor, and major version bumps.
20+
21+
### Updating a published version
22+
23+
Once your prompt is published, it is generally advised to create a new version for any changes you make.
24+
However, you can also update a version that is already published by clicking the "Update Published Version" button in the studio.
25+
You will be met with a modal asking you to confirm, as this may affect any systems you have that are using that version expecting different variables or configuration.
26+
27+
## Variables
28+
29+
You can define variables in your prompt by using the `{{ variable_name }}` syntax.
30+
You have the option to define the type of the variable, and the default value.
31+
32+
### Global Variables
33+
34+
Under the "Globals" tab in the studio, you can define global variables that are available to all prompts.
35+
36+
These variables are available to all prompts, and can be used by calling `{{ global.variable_name }}` in your prompt.
37+
38+
### Advanced Templating
39+
40+
You can use the same features as nunjucks allows to use all kinds of logic in your prompts.
41+
42+
For example, you can use the `{% if %}` tag to conditionally include content in your prompt.
43+
44+
```jinja
45+
{% if condition %}
46+
This will be included in your prompt.
47+
{% endif %}
48+
```
49+
50+
You can also use the `{% for %}` tag to loop through a list of items.
51+
52+
```jinja
53+
{% for item in list %}
54+
{{ item }}
55+
{% endfor %}
56+
```
57+
58+
See all the available tags and filters [here](https://mozilla.github.io/nunjucks/templating.html).
59+
60+
## Configuration
61+
62+
Each prompt comes with configuration that will be passed to OpenRouter when executed.
63+
You can provide a list of up to three models for OpenRouter to choose at random, or specify "openrouter/auto" to let OpenRouter choose the best model for your prompt.
64+
65+
You can find a full list of all available models [here](https://openrouter.ai/models).
66+
67+
Models have a wide range of support for different features. Such as web search, tools, and more. You can view all available configuration [here](https://openrouter.ai/docs/api-reference/overview).
68+
69+
You can further override the configuration when you execute a prompt via the [SDK](/docs/sdk).

0 commit comments

Comments
 (0)