Skip to content

Commit 99010d2

Browse files
docs: LLMs page update + adding API references to the llm.txt file
1 parent 5e89eae commit 99010d2

File tree

2 files changed

+81
-31
lines changed

2 files changed

+81
-31
lines changed

docs/llms/overview.md

Lines changed: 76 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4,52 +4,97 @@ sidebar_position: 1
44
title: Overview
55
---
66

7-
# LLMs and AI Integration
7+
# Uniswap AI Tools for Developers
88

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.
1010

11-
## AI-Powered Documentation
11+
## Quick links
1212

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)
1416

15-
### Getting AI Help
17+
## Uniswap AI
1618

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.
1820

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
2222

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. |
2430

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
2632

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:
3134

32-
## Best Practices for AI-Assisted Development
35+
```bash
36+
npx skills add uniswap/uniswap-ai
37+
```
3338

34-
When using AI tools for Uniswap development:
39+
### Install as a Claude Code plugin
3540

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:
4042

41-
## Supported AI Platforms
43+
```bash
44+
# Add the Uniswap marketplace
45+
/plugin marketplace add uniswap/uniswap-ai
4246

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+
```
4454

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.
4856

49-
## Contributing AI Resources
57+
## LLM Context Files
5058

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.
5260

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.

static/llms.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,11 @@ Uniswap is a decentralized exchange protocol built on Ethereum that enables user
132132
- GitHub: https://github.com/Uniswap
133133
- Governance: https://gov.uniswap.org
134134

135+
### AI and API Resources
136+
- Uniswap API Docs (Introduction): https://api-docs.uniswap.org/introduction
137+
- Uniswap Developer Portal (API keys and onboarding): https://developers.uniswap.org/
138+
- Uniswap AI toolkit and skills: https://github.com/Uniswap/uniswap-ai
139+
135140
### Community
136141
- Discord: https://discord.gg/uniswap
137142
- Twitter: https://twitter.com/Uniswap

0 commit comments

Comments
 (0)