You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/llms/overview.md
+76-31Lines changed: 76 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,52 +4,97 @@ sidebar_position: 1
4
4
title: Overview
5
5
---
6
6
7
-
# LLMs and AI Integration
7
+
# Uniswap AI Tools for Developers
8
8
9
-
Large Language Models (LLMs) and AI tools can help developers better understand and work with the Uniswap Protocol. This section provides resources and guidance for leveraging AI assistance when building on Uniswap.
9
+
Uniswap provides AI-powered development tools that help you integrate swaps, build v4 hooks, provide liquidity, and interact with the EVM from within your editor.
10
10
11
-
## AI-Powered Documentation
11
+
## Quick links
12
12
13
-
The Uniswap documentation is designed to work seamlessly with modern AI tools to provide enhanced developer support and assistance.
13
+
-[Uniswap AI](#uniswap-ai)
14
+
-[LLM Context Files](#llm-context-files)
15
+
-[Code Editor Setup](#code-editor-setup)
14
16
15
-
### Getting AI Help
17
+
##Uniswap AI
16
18
17
-
Use the built-in AI integration features throughout the documentation:
19
+
[Uniswap AI](https://github.com/Uniswap/uniswap-ai) is an open-source collection of plugins and skills that gives AI coding agents up-to-date, protocol-specific guidance across Uniswap protocols, APIs, and smart contracts.
18
20
19
-
-**Copy to AI**: Use the dropdown button on any documentation page to quickly get AI assistance
20
-
-**Context-Aware**: AI tools receive relevant documentation context for better responses
21
-
-**Multiple Platforms**: Integrate with popular AI assistants like Claude and ChatGPT
21
+
### Available plugins
22
22
23
-
## LLMs.txt
23
+
| Plugin | Description |
24
+
| --- | --- |
25
+
|**uniswap-trading**| Integrate swaps via [Trading API](https://developers.uniswap.org/dashboard), Universal Router SDK, or direct contract calls. |
26
+
|**uniswap-hooks**| Security-first guidance for building Uniswap v4 hooks. |
27
+
|**uniswap-viem**| EVM integration with viem and wagmi. |
28
+
|**uniswap-driver**| Token discovery and swap/liquidity planning with deep links. |
29
+
|**uniswap-cca**| Configure and deploy CCA contracts for token distribution. |
24
30
25
-
This documentation includes an [LLMs.txt file](/llms.txt) that provides comprehensive context about Uniswap for AI systems. This file helps ensure AI assistants can provide accurate and up-to-date information about:
31
+
### Install with the Skills CLI
26
32
27
-
- Protocol architecture and concepts
28
-
- Smart contract interfaces and functionality
29
-
- SDK usage and integration patterns
30
-
- Development best practices
33
+
Uniswap AI is available through [skills.sh](https://github.com/Uniswap/uniswap-ai). This works with any AI coding agent that supports skill files:
31
34
32
-
## Best Practices for AI-Assisted Development
35
+
```bash
36
+
npx skills add uniswap/uniswap-ai
37
+
```
33
38
34
-
When using AI tools for Uniswap development:
39
+
### Install as a Claude Code plugin
35
40
36
-
1.**Provide Context**: Always include relevant protocol version (v2, v3, v4) in your queries
37
-
2.**Verify Code**: Always test and verify AI-generated code before deployment
38
-
3.**Reference Documentation**: Cross-check AI responses against official documentation
39
-
4.**Security First**: Have AI-generated smart contracts audited before production use
41
+
If you use [Claude Code](https://claude.ai/code), first add the Uniswap marketplace, then install individual plugins:
40
42
41
-
## Supported AI Platforms
43
+
```bash
44
+
# Add the Uniswap marketplace
45
+
/plugin marketplace add uniswap/uniswap-ai
42
46
43
-
The documentation provides optimized integration with:
47
+
# Install individual plugins
48
+
claude plugin add uniswap-hooks # v4 hook development
49
+
claude plugin add uniswap-trading # Swap integration
50
+
claude plugin add uniswap-viem # EVM / viem / wagmi
51
+
claude plugin add uniswap-driver # Token discovery & deep links
52
+
claude plugin add uniswap-cca # CCA auction configuration
53
+
```
44
54
45
-
-**Claude**: Advanced reasoning for complex DeFi concepts
46
-
-**ChatGPT**: Code generation and debugging assistance
47
-
-**Other LLMs**: Compatible with any AI tool that supports context injection
55
+
Once installed, the plugins activate automatically when relevant to your task. You can also invoke specific skills directly. For example, **/uniswap-hooks:v4-security-foundations** for a security-first walkthrough of hook development.
48
56
49
-
## Contributing AI Resources
57
+
## LLM Context Files
50
58
51
-
Help improve AI assistance for the Uniswap community by:
59
+
If you prefer to give your AI agent raw documentation context rather than structured skills, Uniswap publishes LLM-optimized text files that summarize the protocol documentation.
52
60
53
-
- Reporting AI-generated errors or inaccuracies
54
-
- Suggesting improvements to the LLMs.txt context file
55
-
- Contributing examples of effective AI prompts for Uniswap development
61
+
### llms.txt and llms-full.txt
62
+
63
+
AI models have a context window (the amount of text they can process at once). Providing relevant documentation upfront helps the model give better answers without hallucinating.
64
+
65
+
Uniswap offers two context files:
66
+
-**[llms.txt](https://docs.uniswap.org/v4-llms.txt)**: A compact summary with links to documentation sections. Works well with most models (100K+ token context windows).
67
+
-**[llms-full.txt](https://docs.uniswap.org/v4-llms-full.txt)**: A verbose version with more inline content. Use this if your model has a larger context window or you want more detail without following links.
68
+
69
+
## Code Editor Setup
70
+
71
+
### Cursor
72
+
73
+
1. Navigate to **Cursor Settings > Features > Docs**
74
+
2. Select **Add new doc** and paste one of the following URLs:
75
+
76
+
```
77
+
https://docs.uniswap.org/v4-llms.txt
78
+
```
79
+
80
+
```
81
+
https://docs.uniswap.org/v4-llms-full.txt
82
+
```
83
+
84
+
3. Use `@docs` → **Uniswap** to reference the documentation in your chat.
85
+
86
+
### Windsurf
87
+
88
+
Windsurf requires referencing documentation in each conversation. Add it to the Cascade window (`CMD+L`):
89
+
90
+
```
91
+
@docs:https://docs.uniswap.org/v4-llms.txt
92
+
```
93
+
94
+
```
95
+
@docs:https://docs.uniswap.org/v4-llms-full.txt
96
+
```
97
+
98
+
### Claude Code
99
+
100
+
Install the Uniswap AI plugins (see [above](#install-as-a-claude-code-plugin)) for the richest integration. The plugins provide structured skills, expert agents, and protocol-specific tools that go beyond static documentation context.
0 commit comments